Cleaning reed switch signal for speed measurement - Page 1
Forum section: electronics / projects

author: XaviPacheco
author_rank: Regular Contributor
timestamp: October 18, 2018, 11:48:39 pm
content: My old treadmdill has a reed switch attached. When the motor is running, the switching signal is extremely noisy, until the point that using input capture method to measure speed fails. I used a schmitt trigger inverter to see what happens, and the signal continues to be noisy. Would a comparator circuit like the one attached be better at this?

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 19, 2018, 12:01:59 am
content: You'd need some kind of filtering - that's what you added on your schematic. You could also do the filtering on the MCU using simple debouncing techniques (but I guess in this case using a simple input capture peripheral would not cut it).As for me, if modifying the device is possible, I would try and replace the reed switch with a Hall-effect sensor. Might still need some minor filtering, but the signal would be cleaner and life expectancy much higher.

author: XaviPacheco
author_rank: Regular Contributor
timestamp: October 19, 2018, 12:08:47 am
content: Okay. I will try the comparator circuit first. Would you modify something on it? Also, what do you think of those little hall effect modules for Arduino/Raspberry on Amazon and Ebay? Can I try with those?

author: DaJMasta
author_rank: Super Contributor
timestamp: October 19, 2018, 12:33:30 am
content: What kind of noise? It could be vibration effecting the contacts in the reed switch, but it could also be noise induced in the switch wiring from the powered up motor - if it's picked up noise, getting rid of it could be as simple as some shielding or using a different cable to go out to the switch.Otherwise, yeah, debouncing is a good approach. If you can find that the noise has a pretty short period (maybe, 200ms or less?), you could put on an RC filter with a low cutoff frequency and run it through a schmitt trigger or a comparator and probably get good results, at least as long as the charge up time for the first impulse into the filter isn't too long as to be useful for the thing monitoring the relay.

author: macboy
author_rank: Super Contributor
timestamp: October 19, 2018, 02:36:23 pm
content: Try a clamp-on ferrite on the cable to the reed switch, near the end which connects to the controller board (not near the switch). This prevents the cable from becoming an antenna for EMI/RFI emitted by the motor.

author: duak
author_rank: Super Contributor
timestamp: October 19, 2018, 04:43:35 pm
content: Without a 'scope waveform of the input signal it's hard to suggest a simple solution.If it's RFI from the motor then a 1K0 resistor between the reed switch and the 104n cap will form a better filter. This will also help with any contact bounce.The filter will probably introduce a slew rate problem, ie., the sensed signal is not changing fast enough so adding hysteresis to the comparator will help, This could be done with positive feedback from the comparator output to the + input with a 1M0 resistor and 1K0 resistor between the + input and the 104n capacitor.Cheers,

author: perieanuo
author_rank: Frequent Contributor
timestamp: October 19, 2018, 05:03:29 pm
content: Measuring speed with reed switch?never heard of that.put a real sensorEnvoyé de mon iPad en utilisant Tapatalk

author: XaviPacheco
author_rank: Regular Contributor
timestamp: October 19, 2018, 06:33:11 pm
content: I really like the idea of dropping the reed switch and use an optical slot or reflective sensor. Look at the motor attached. I have seen many motors that bring physical spot for these sensors, but the motor I want control didn't bring it.

author: perieanuo
author_rank: Frequent Contributor
timestamp: October 22, 2018, 04:04:35 pm
content: Hi,Just put some reflexive on the pulley or put some screw and detect the screw with proximity sensor.very easy and cleanPierreEnvoyé de mon iPad en utilisant Tapatalk