I'm using an 18M2+ in a circuit that controls a 600W water pump (via a relay). For its inputs, float switches in a rainwater tank outside are connected to the 18M2 via long wires. The problem was, every time the pump turns on or off (even by an external switch downstream) it creates a lot of electrical noise that resets the 18M2. Disconnecting the float switches solved the problem (the PICAXE already had caps on the power rails and the relay had a freewheel diode), so I reconnected them with the noise suppression circuit below:
This circuit is effective in preventing noise from resetting the PICAXE. It is an RC filter between the switch and the input pin and, as well as filtering out spikes, it slows down the transitions in the switch's voltage level, which I think could damage the PICAXE's input circuitry if it is TTL type. The 18M2 only has TTL inputs.
I read that schmitt trigger inputs on PIC microcontrollers work like the 74HC14 for example, in that they can tolerate slow signals better than TTL, but have a larger hysteresis (1 to 4V), although a thread here on ST inputs disputed this.
The control circuit is powered 24/7 and needs to be reliable - it has been working fine for 7 days with this noise suppressor on each input so far. All the inputs are fully debounced in software with transition acceptance times of at least 20ms.
Does anyone think the above noise suppression circuit is safe for TTL inputs, or should it only be used on ST inputs?
Thanks. T
Code:
+5V
|
\
/ 10k
\
/ |
.___/ _____________________|______/\/\/\____________. 18M2 input
0V long wire 10k |
|
___|___
_______ 22nF
|
0V
I read that schmitt trigger inputs on PIC microcontrollers work like the 74HC14 for example, in that they can tolerate slow signals better than TTL, but have a larger hysteresis (1 to 4V), although a thread here on ST inputs disputed this.
The control circuit is powered 24/7 and needs to be reliable - it has been working fine for 7 days with this noise suppressor on each input so far. All the inputs are fully debounced in software with transition acceptance times of at least 20ms.
Does anyone think the above noise suppression circuit is safe for TTL inputs, or should it only be used on ST inputs?
Thanks. T