Speed of banner sensor

just a thought, how fast can banner sensors pick up the white lines? cause today when we were testing it, didnt seem to pic up the lines well enough, a 8 in diameter wheel with a counter sticker that has…1cm think lines, 4 lines going across totaling up to 8 counts per revolution.

I don’t know how fast the Banner sensor itself operates, but in the user_routines.c file, code is only executed every 26.2ms, which works out to 38 times per second. This is not fast enough to work with the vast majority of encoder applications. I would suggest either moving your code to user_routines_fast.c, or using Kevin Watson’s encoder code (which is more accurate, but also more difficult to use and understand than your own code).

yeah this is in our auton code, but it didnt run too well, i dont know if its because our wheels spin too fast for the sensor to tell the difference between black and white, or if our line is too thin. cause when i match up the sensor to the lines, the sensors a bit bigger so it might pick up black white black, and discern that as black instead of white

We were able to using Kevin’s code were able to get Quadrature (two banners) from a four edge (one 1/4 white 1/4 black etc.) motor coupler on Cim motors running flat out, this was confirmed in code and with a scope. Last year after ship date. We could not, get anything else to work. As I recall there are spces for banners on their website. Things vary with the model, And some teams have reported that they drop out every now and again. Cims flat out are around 4800 rpm and since the interrupt was on both edges this was about 320 Hz as I recall, scope read about 160 Hz as it was only triggering on either falling or rising edges Good luck

aright i guess i will take a look at the kevin FRC code place. i assume it was from '04? do you still remember the file name or was it the one named beacon.zip?

It was the code having to do interrupts and quadrature. I think he updated it for this year. The big part of it is using interrupts.

ah ok i see, thanks for all the help biff. really appreciate it

We used it to. We had a shiny metal disk break and used an older model (for reflective tape). We painted a white disk behind the metal black. We were able to count the spokes that went by and so were able to move the arm percicly.

But the count was different if you went at regular speed vs counting by hand. So the number that we got at one point was higher than we wanted. But We tweeked it and things went OK (for comming in dead last)