Toggle Switch Alternative

Thread Starter

DJ_AA

Joined Aug 6, 2021
490
Hi All,

I would like to inquire whether there's an alternative to using a toggle switch, such as a latching circuit, or if there's a better approach altogether.

I have a PCB that includes microcontrollers, RF modules, sensors, etc., and is powered by a Li-ion battery. Currently, I'm using a toggle switch to enable or disable the enable signal to my DC-DC step-down converter in the power supply. The purpose of this is to completely switch off the circuit, as opposed to using a tactile switch on a GPIO pin to force the microcontroller into a low-energy mode, like sleep mode. The reason behind this approach is to address the scenario where, if the battery continues to lose power due to not being charged and drops to a very low level, it then needs to enter a recovery mode. In this mode, the battery is charged at a rate of 10mA until it reaches a safe voltage level. However, if the microcontroller tries to power up (e.g., LED flashing, etc.) while it's being supplied with only 10mA, the battery could enter a state where it never recovers, as the 10mA would also be consumed by the circuit.

Therefore, I'm wondering if we could develop a simple latching circuit or something similar that could replace the toggle switch and allow the use of a more economical tactile switch. Perhaps upon powering up, the microcontroller could check the battery voltage using an ADC on the LTC4162-L (as detailed in its datasheet from Analog Devices), although I've never utilized the I2C features before proceeding with operations (like flashing an LED), etc.
 

Ya’akov

Joined Jan 27, 2019
10,226
I can’t fully follow your narrative but…

It sounds like you could use a comparator so that when you push the power tactile the closure either starts the µC or does something else—like flash an LED using whatever power is available before it is current limited for charging, or nothing at all.
 

MrChips

Joined Oct 2, 2009
34,655
I think that you can still use a push-button connected to a GPIO pin.
You can use the push-button to enable power via a transistor. When the MCU is up and running, use software to detect subsequent actions of the push-button along with making decisions based on other power conditions.
 

MisterBill2

Joined Jan 23, 2018
27,236
I suggest that using the toggle switch to physically disconnect the power is by far the most reliable and certainly the most effective way of actually switching off the load. And the toggle switch does not have to be a terribly expensive one made for lots of power. Using a cheaper tactile switch to shift to a lower power mode is not even close to the same as physically switching OFF the power.
 
Top