Quote:
|
Originally Posted by de_
I'm looking for feedback on actual competition usage of the gear sensors. How did they do ? If you used the manufacturers recommended circuit for noise reduction/filtering, did the sensors prove to be noise resistant (no missed state changes, false state changes). Could they be counted on for very accurate, repeatable measurements from dead stop to full rotation in autonomous mode ? Any issues keeping within the 2mm air gap requirement under with shock and gear wear/wobble etc ? Anyone find the 2mm max materially conservative or optimistic ? What did you trigger off (gears in the standard transmission, chain drive sprockets ?) We have tested them on the bench and they look promising but things could be quite different in "combat".
|
We used the reccommended circuit "for regulated power supplies" for noise reduction and filtering, putting it all on a small PC board that mounted the sensor. Our "pull up" resistor was around 2K ohms (might have been 2.2K), the standard value for TTL circuits. We sensed the drive sprocket on the KOP gearbox from the side, positioning the sensor to get as close to a 50/50 on/off signal as we could get, optimal for busy polling. The spacing to the sprocket was 2mm.
If the pulse rate is slow enough (sensing a sprocket and relatively slow robot operation) you can busy poll the sensor without losing state transitions. If you require reliable high speed operation, or want to sense the relatively faster pulse rate of a gear, you will want to use interrupt based wheel counter code. In this case, there is the rare possibility of an interrupt hitting while reading the counter via your state machine that controls the robot, resulting in a bogus value. A bogus value is unlikely, but a bogus value read two times in a row is even more unlikely.