Sunday 8 May 2016

switches - Make a momentary switch control a toggle


What are the simplest, cheapest, smallest ways to make a momentary switch produce a 2-state toggling output (latching momentary switch)?


In other words, the output is continuously low, and when you momentarily press the button/tact switch, the output changes to continuously high, and then when you press it again, it switches back to low.




Answer



Here's another alternative with two inverters and debouncing:


Two inverters


For logic output, only the two inverters, RC, and feedback resistor are needed:


enter image description here


NC7WZ14 is $0.06 with 2 inverters, small 6-pin package, and Schmitt trigger inputs, though I think this circuit doesn't even need Schmitt inputs because of the RC. Also it can drive 24 mA, so you could connect the LED directly to it if you're using an LED for whatever reason.


Also shown here and here as a toggle touch switch.


I think the feedback resistor has to be much smaller than the center resistor to prevent it from oscillating if you hold down the button, because the low-impedance connection to the output will prevent the capacitor from charging to the middle voltage until you let go.


Variants are described at Press ON - Press OFF soft latching circuits:


AND gate variant



No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...