Electronic – How to prolong the reed switch output time

reedsample and holdsamplingschmitt-triggerswitches

I put a reed switch ( https://en.wikipedia.org/wiki/Reed_switch ) on the handle of a measuring wheel (perambulator). The reed switch will be activated up to around 20 times per second (every 50 ms). The sampling rate on my data acquisition is 200 Hz (every 5 ms). The DAQ is made with an IOIO OTG ( https://en.wikipedia.org/wiki/IOIO ) and the analog input I use can handle (0-3) V. Should I go for a Schmitt trigger or do you have a more elegant solution on how to have a long enough output signal from the reed switch to safely sample it?

I am only interested in the time between activations of the reed switch. I plan to put a LED and a beeper to get a short noise and a flash of light for each. The input level to the IOIO OTG will be the 0.7 V due to the LED. There are 9 mm diameter neodymium magnets mounted on the wheel and the wheel has a circumference of 1 m. I put 10 magnets on the wheel and the approximately highest speed I will measure is 2 m/s. Then the wheel rotates twice per second and thus I have up to around 20 activations of the reed switch per second.

Since we know the circumference of the wheel (1 m) and the 10 magnets are evenly spread out, knowledge of the time between activation of the reed switch will give a good approximation of the speed.

Edit: Changed the text regarding the placement of the reed switch. The reed switch is next to the wheel and the 10 magnets are on the wheel. I want to have 10 magnets to get a good estimation of the walking speed of the person holding the measuring wheel.

I guess I could use a digital input instead. I didn't consider it would be a better option in this case.

Maybe I should clarify what I mean about 1 m circumference and 10 magnets. Between every reed switch output the wheel has travelled 10 cm. If the wheel rotates 2 times per second at fast walking speed (2 m/s) the reed switch will close 20 times per second.

Best Answer

With reed activations for every meter traveled and 200Hz sampling rate, you're effectively limited to 10 m/s in terms of speed you can reliably measure (if you have achieved a perfect 5ms pulse time from the reed). In non-ideal conditions, you should expect reliable operation at about a half of that speed, 5m/s or 18 km/h. Assuming a bicycle application, that's not much.

My point is, you should either increase the sampling rate or reduce the number of magnets you use. The latter is the easiest option, with 2 magnets you'll be able to measure speeds up to 90 km/h, which looks reasonable.

And here's the RC circuit Steve told you about in his comment. It has a time constant of 5ms, so you'll measure between 3 and 1V in the sample following a reed activation, and less that 1V in subsequent samples.

schematic

simulate this circuit – Schematic created using CircuitLab