# Reference design for the latching switch with momentary pushbutton

I've noticed in a few production-grade schematics that the toggling power ON/OFF switch with a (normally open) pushbutton is frequently realized with two ICs, namely:

• single Schmitt-trigger inverter
• single positive-edge-triggered D-type flip-flop.

This approach is also used in TI's "Electric Toothbrush Controller Reference Design":

I wonder, is this design really preferable for consumer products or is it just a random choice by a subset of electrical engineers? If it actually is beneficial, what makes it better than other approaches (like using dual inverter, for example)?

(To give you some context, I'm not an electrical engineer myself and was just looking for a widely accepted low-power design I could quickly assemble on a breadboard, as well as put inside a consumer product eventually.)

Seems like a silly and overly-complex choice for a production design. The micro alone should be capable of doing this- the MSP430 that TI is trying to flog is known to be particularly low power in sleep mode. So you wake up on the button push and do the toggle.

Sometimes in simple consumer products an ASIC is used (for example, bicycle lights) or a very simple micro (for example the PIC10F222 used in vibrating shavers).

If you want to play around with the TI circuit I suggest a resistor (eg. 1K) in series with the inverter input. The 100nF cap on the D FF output to ground is cruel and unusual punishment for the output transistors- possibly added because something is marginal- such as very noisy power supply rail.

• I am surprised by the option of using micros for this. The toothbrush document claims they have very low standby current of ~55 nA, whereas PIC10F222 uses 100 nA and MSP430G2210 - 500 nA in standby mode. Maybe that's why it's preferred? – Andriy Makukha Nov 30 '17 at 15:38
• @AndriyMakukha Shouldn't make much difference in most battery powered applications- the self-discharge current of the battery is likely much more than that. The PIC is likely cheaper and that does make a big difference as to what is preferred. – Spehro Pefhany Nov 30 '17 at 17:00
• Yes, you are right in case of NiMH rechargeable batteries. They discharge at a rate of 30% per month. For a 2400 mAh battery that amounts to 720 mAh discharge per month, compared to 360 mAh consumption by a sleeping MSP430. For Li-ion batteries, however, self-discharge rate would be smaller than consumption by the micros. – Andriy Makukha Dec 1 '17 at 3:33
• @AndriyMakukha Numbers. Li-ion cells lose about 2.5% per month, so a cell of greater than 300mAh capacity will have more than 10uA of self-discharge current. A typical 2000mA flat cell has a self-discharge current of perhaps 65uA. Li metal primary cells can be much better, but that's a much narrower market segment (smart water meters and such like) – Spehro Pefhany Dec 1 '17 at 4:12
• Sorry, you are right… Sleeping MSP430G2210 micro takes 0.36 mAh per month, of course, not 360 mAh. My bad. This amount is indeed quite negligible for any kind of battery (AA size and bigger). – Andriy Makukha Dec 1 '17 at 5:31

I don't know what an "on-off chip" plus surrounding logic costs so can not answer for people who DID use this circuit. I have been asked to hold presentations and it is one of the subjects I talk about: the cost of a component is not about the cost of the component. Pick and place machines can add cost of about $0.005 per component. (On the small volumes I have) Thus a resistor of$0.001 becomes five times as expensive!
My Chinese manufacturer charges me "per contact" but charges extra for 'special' footprints like BGAs, LGAs en QFNs. Thus if I have to place 8 pull-up resistors, an array with one common and 8 outputs is more expensive to buy then 8 loose resistors, but in production may become cheaper again.
Something else I do, is to try to re-use the same value everywhere. For example: you use 100nF decoupling capacitors. Then you calculate you need R=27K, C=220nF for the reset. I change that to 68K and 100nF. I might change it to 100K and 100nF if I already have 100K resistors in the design. The reset takes 2.5ms longer to release, so what!

• The BOM get shorter, thus less different components to manage and to buy.
• They don't need to mount another roll of 220nF components. (Which may mean the use of a smaller, cheaper, P&P machine.)
• My 100nF volume gets bigger and thus cheaper.