Help with a switching a circuit with a "soft" power on button

Hoping someone can help solve a problem.

Here's my problem..

I have an Arduino (well, a Teensy) in a project which is battery operated and includes a small LCD and an ADS1115. Use is on demand, and is only required for a few seconds at a time, and a handful of times in a short period. And then most likely dormant for a few days.
It's running on a 400mA LiPo battery.

I know I could use a physical switch, and that would make life easy, but I prefer to have a timeout power off. And for some reason I always seem to find the hardest way to want to do things.

I've implemented sleep routines that turn off as much as possible, and wake on a button connected to digital input. This drops total power consumption to about 8mA in this state. Which is fine for use every few minutes. But I want to drop it even further during extended power off periods.

I have a few modules at my disposal, and I'm not sure how to make them all work together.

I'll start with an Adafruit PowerBoost 500C. That allows me to charge the battery from a USB port, while also powering the device via a built in 5v (actually 5.2v) regulator. The PowerBoost's regulated output is ON by default, and will draw 4mA even with nothing connected. But if the enable (EN) pin is shorted to GND, the output circuit is disabled and drops battery current consumption to about 10uA.

So my question is, how can i wire a circuit so that:

  • With no power to the microcontroller, the PowerBoost EN pin is shorted to ground
  • Pushing a physical button disconnects the short, thereby turning on the microcontroller (added bonus, this only happens on a 1-2 sec buton hold, although this could be done on the microcontroller startup)
  • Microcontroller can activate the short-to-ground via a digital output to turn itself off after a timeout.
  • Same power button that is used to turn the circuit on is also a digital input to signal the microcontroller to shutdown.

I've tried looking at a switching circuit using either an NPN or PNP transister, but I don't know how to short EN to GND with a floating base, and open it with either a high or a low digital output from the microcontroller.

Hope anyone can take the time to read and help me out! (Or point to another way I can solve this problem - my Google-fu has not been strong with this one!)

  • A low power relay with a N.C. contact can be connected between EN and GND.
    The relay energizes the GND is removed.

I'd not thought of using a relay, just BJT or MOSFETs. Relays are always something I think of as being used for high current uses.

Something like this? AQW654
https://au.mouser.com/ProductDetail/Panasonic-Industrial-Devices/AQW654?qs=UvCmBq8CNhXJymoHrT911A%3D%3D&utm_id=10897615195

Forgive me if I'm missing something, but these look to draw quite a lot of power.

The HFD27 datasheets shows that for the 003-H model, which will can be activated through the voltage range of a LiPo, coil resistance is 60ohm. So at 3.7v, thats 62mA of current draw, which is half as much as the entire rest of my circuit, including the Teensy and LCD display.

Surely I'm mistaken?!

I think you could do this with 1 or 2 mosfets.

Maybe rephrase 'short' to 'take low' or 'hold low' or 'set low'.
A 'short' is an unwanted connection that causes damage...

  • Sensitive type

  • 40mA when the relay is energized.
    After the relay is energized, software starts running, the relay can be dropped after software is finished.

1 Like

Could you remove the power enable resistor from the board? So that you can take the enable pin low with a resistor to ground and high with an arduino output? Maybe a mosfet to do additional level shifting?
I hoped that the board would have a jumper to do this, but on the picture from google I do not see any jumpers...

Here's a simple idea. It may be too crude, and waste too much battery power.

You don't need to short it to ground.

The pull-up-resistor on board the Adafruit PowerBoost 500C is quite a high value (340K):


Experiment with different resistor values to find the highest value that will reliably pull the EN pin low and turn the circuit off. Higher is better because less battery power will be drained when the circuit is off. Let's say that's 33K.

Put a push-to-break (normally closed) switch in series with that pull-down resistor. When pressed, the EN pin will be pulled up and the circuit should switch on.

Also connect a Teensy pin to the EN pin via a second resistor. Experiment with that resistor value to find the highest value that will (in combination with the 340K pull-up) overcome the pull-down resistor and keep the circuit switched on. Let's say that's 3K3.

When the circuit is off, the battery will be drained through the 340K+33K, which should be only around 10uA, plus the 10uA consumed by the booster.

The Teensy can keep the power on by setting that output HIGH. Around 100uA will flow from the pin.

1 Like

The big advantage with using a relay is that you do not need to know anything about the circuit you are connecting to. This is because it provides perfect isolation.

The problem with using electronic connections like a FET is that you need to know exactly what you are connecting to and design your interface to suit. Often this might involve higher voltages like mains which bring its own problems of protection and isolation.

I can't use the 005-S version, as the pick-up voltage is 3.75. A LiPo battery has a nominal output of 3.7V, which will be lower as the battery discharges, so it may not be able to activate the relay.

I've just found a similar thread on the Adafruit forums (https://forums.adafruit.com/viewtopic.php?t=143103), using a MOSFET. I might give that a try, but I'm not sure where to start selecting a suitable MOSFET?

If you want to go the mosfets way, instead of the EN pin, why not cutting the battery power directly? You could use a latch circuit like this:
image
SW1 will turn it on, the GPIO needs to be switched high to keep it on, and set it low to switch off.

Or to detect a second button press:


The switch turns the MCU on. Then with GPIO2 you detect when the button is pressed again and with GPIO1 you switch it off.

3 Likes

It's 3.75V max.. Could work with 2V.
Signal relay is a simple and efficient way of switching something on for a small percent of overall time.

10seconds/24hours would give you total average consumption of 4uA

It sounds like that guy got it to work just out of dumb luck.
I don't see a final circuit and part numbers?

Yeah I know! doesn't really help that much!

I actually don't mind this idea - The pull-up resistor looks easy enough to desolder, and then assuming that leaving EN floating will not enable the regulator circuit, I just use a push-button to tie and extern 340k resister to VBAT. Sounds about this simplest solution.

Then don't look at it and forget anything you saw there.

1 Like

Bad assumption unless the datasheet explicitly says so

1 Like

The datasheet for the TPS61090 boost chip states:

Says nothing about a floating input on EN.