# Pull-up resister or pull-down resister with filtering capacitor on signal input

8 years 1 month ago #29531158 by wstuck
I am trying to setup a fail safe condition where the input signal goes low or high if the signal wire is not present. I have a capacitor between the signal wire and ground for filtering the signal noise. If I remove the signal wire the capacitor pulls the signal low but I am not sure it is the best way to do it. Also, if I wanted the signal to float at 2.5v with no signal wire the capacitor is pulling the internal resistors down. Any suggestions would be helpful.

8 years 1 month ago #29531159
So you are referencing an analog input signal being lost? The voltage would likely either shoot up to 5V or 0V depending on which end was lost(VCC or GND). If the Analog input wiper wire were lost, then the voltage would be a floating voltage at 0 to +50mV depending on the noise factor. Considering that a capacitor was used, that may be a bit different.

Perhaps the guardband features would be of help(Enabled by default). These are cut offs from motor command if the value of the input is 50mV from min or max value.

So if your min is say 250mV and max is 4750mV, then at about 4.7V and 300mV the output cuts off. This would take into consideration that the output signal was lost or floating as the voltage would drop to 0V.
The following user(s) said Thank You: wstuck

8 years 1 month ago #29531160 by wstuck
What if I needed to maintain a 2.5v center with the analog signal wire disconnected but I had a filtering capacitor to reduce the noise? I found that the capacitor going from the signal wire to ground will basically pull the signal to low or ground if the signal wire is not connected. If I don't use a filtering capacitor the open analog signal stays at 2.5v. (I think from the internal resistors) Can you use two 10K resistors in series between the 5v VCC and ground with the signal wire and the capacitor connecting to the center point between the two 10K resistors to force a 2.5v reference if the signal wire is removed or disconnected?

8 years 1 month ago #29531162
If 2 signals are present, you will have issues with the competing voltages. The 2.5V will be present if the signal is lost, but if you try to drive the analog signal, you can see what happens.

8 years 2 weeks ago #29531227 by LROBBINS
An alternative would be to let the capacitor pull down the input pin, but use a script to check for that and adjust the parameter set by the analog signal to mid-range if the actual signal goes to 0 (or < ca. 50 mV as implied above). In suggesting this I am assuming that your analog input is not rail-to-rail so that in normal operation it is never at or very near gnd. If the analog input is e.g. a pot with the outer pins connected to 0 & 5 V, you can add a pair of resistors, one from each outer pin, to restrict normal output to say 0.5 to 4.5 V and a script can easily detect a fault condition. Ciao, Lenny