Inverter input w/NC switch
BADHABIT
Posts: 138
I am using a switch that is normally·closed and need to read a high signal when it opens. The whole rig is running from a 3v coin cell.
The current circuit is using a single gate little logic·inverter (smallest pkg) to bring the input high when the switch opens. There is a pull-dn on the inverter input that keeps it from floating when the switch is open,·as well as·attempting to keep battery consumption down. It takes at least 5 seconds for the inverter output·state to change to high, but·it goes low almost instantly.
If I place a 1uF cap from between switch out and inverter Vcc the response becomes 1 second. Larger and smaller caps appear to create a larger time response although the only cap I could fit in over 1uF was a 10uF which created a 4 second response.
The response time required is 1/8sec. or better and I'm having a hell of a time getting it. I'm sure there is some configuration of electronic doodads that will acheive what is desired, but...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
BH
The current circuit is using a single gate little logic·inverter (smallest pkg) to bring the input high when the switch opens. There is a pull-dn on the inverter input that keeps it from floating when the switch is open,·as well as·attempting to keep battery consumption down. It takes at least 5 seconds for the inverter output·state to change to high, but·it goes low almost instantly.
If I place a 1uF cap from between switch out and inverter Vcc the response becomes 1 second. Larger and smaller caps appear to create a larger time response although the only cap I could fit in over 1uF was a 10uF which created a 4 second response.
The response time required is 1/8sec. or better and I'm having a hell of a time getting it. I'm sure there is some configuration of electronic doodads that will acheive what is desired, but...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
BH
Comments
Does your switch need to tbe grounded? You could run the switch from another pin as an output so that you can control both the response and the current. Alternatively there is a circuit I use which relies upon the input switching to an output through a resistor plus a capacitor to ground.
I use this circuit for detecting high or low or float conditions but because the I/O current is controlled by the prop it makes it ideal for a low-power switch interface. Software will try to charge the cap high for a very brief period and then sample the input to see if it is still high. If it's high it means the switch is open.
*Peter*
So connect the switch's other end to + through an resistor and also connect the Prop's input-pin to that point. You might have to try a bit how high the resistance can be (to save energy) but 1M is a good start. If its too slow, reduce the resistance.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO