Arduino Boost Converter that activates with a button and is held on by a arduino

Hi, was wondering if any of you know about a cheap boost converter breakout board on ebay, aliexpress etc that can power on my arduino with a momentary tactile switch and the arduino holds it on after it boots and stays on until the arduino turns it off. Iv looked at the low power sleep mode/ watchdog for arduino but i want to completely turn of the arduino. iv drawed a masterpiece picture to show what i mean if my explenation is unclear. :slight_smile:

Check at Pololu.com, they have push button power switches, I don't know if any offer turn off by the device being powered.

OP's diagram...

Looks good so far. But consider that when the Wemos is off, all its inputs and outputs are held LOW. So D6 will be LOW which will be like pressing the enable button.

So you need a HIGH signal to begin turning it on and a resistor between that and the Arduino so that the button can override the powered-off Arduino.

Hi and thanks for you answers. I checked polulu and found this

I think this is what im looking for?

If it is, i just need it in a cheaper version :S

bump:)

That Pololu product looks good. I have not used it but I use a lot of other Pololu modules.

If you're only building one, then the price should not be a deal-breaker. If you're building 100 of them then you need an engineer to optimize the cost of manufacturing.

bump:)

Really ?
You're really going to do that on the Forum where at any given time there is about a 100 + years of collective electronics experience online (at 3am). Usually it's probably closer to 200 -250 .

If you haven't got a reply, then just wait.

There is no point in looking at sleep modes etc. if your intention is to turn the Wemos completely off (no power to it).

You should be able to achieve what you have described by a simple latch using a mosfet switch.
Use a P channel sub 3.3volt logic level mosfet e.g. Si2333DDS. That effectively switches power from the battery to the boost converter and the Wemos.
Pull the gate high with a 10K resistor so it is normally off. Pressing the push button pulls it low to start. That starts the boost converter and Wemos which continues to hold the mosfet gate low so you can let go of the button. When the Wemos is finished, it stops holding the gate low and it all shuts down.

MorganS:
That Pololu product looks good. I have not used it but I use a lot of other Pololu modules.

If you're only building one, then the price should not be a deal-breaker. If you're building 100 of them then you need an engineer to optimize the cost of manufacturing.

Hi, im building more than one and with different designs every time so cost efficiency is important :slight_smile:

raschemmel:
Really ?
You're really going to do that on the Forum where at any given time there is about a 100 + years of collective electronics experience online (at 3am). Usually it's probably closer to 200 -250 .

If you haven't got a reply, then just wait.

Yes, i dont se anything wrong with that? If you dont have anything productive to add to this post, please dont answer.

6v6gt:
There is no point in looking at sleep modes etc. if your intention is to turn the Wemos completely off (no power to it).

You should be able to achieve what you have described by a simple latch using a mosfet switch.
Use a P channel sub 3.3volt logic level mosfet e.g. Si2333DDS. That effectively switches power from the battery to the boost converter and the Wemos.
Pull the gate high with a 10K resistor so it is normally off. Pressing the push button pulls it low to start. That starts the boost converter and Wemos which continues to hold the mosfet gate low so you can let go of the button. When the Wemos is finished, it stops holding the gate low and it all shuts down.

Hi, that would be easy and awesome! i think i tried to do this but i ran into problems when i tried using the button as an input to the wemos too. But maybe i did it wrong, can you make a drawing? :slight_smile:

It would be something like this:

When the Wemos starts after the button is pressed, it defines GPIOx as an output pin and pulled low so all is still powered on even when the button is released. When the Wemos has completed its task, it allows GPIOx to float high (by redefining it as an input pin) and all power is cut off until the next time the button is pressed.

Edit:

  1. Description changed so GPIOx is never set to output high in order to eliminate the risk of a potential conflict. It can be either be output low or high impedance (input). The diagram should read: GPIOx normally high impedance.
  2. This solution risks exposing the Wemos pin to an out of spec voltage in the case of a fully charged battery [also see post #10 @MorganS for other issues relating to this "sole-Mosfet" solution] . You could add an NPN transistor to switch the mosfet or the mosfet could be replaced with a load switch e.g. tps22917 and the button moved to the high side. The logic would then be inverted. Here is the load switch variant:

6v6gt:
It would be something like this:

I've never used a WEMOS but consider what happens when the input voltage (pin 1) is zero. Pin 11 cannot be anything higher than 0.5V for all microcontrollers with ESD protection diodes. So it turns the MOSFET on all the time and can never be turned off.

Edit:

Looks much better.

Yes, you are of course correct and thanks for pointing it out. It would also have worked with the mosfet being switched via an an npn transistor (which effectively duplicates the function of the load switch), but the "lone" P-channel mosfet circuit cannot be used as it stands. I'll make another edit.

I don't have a tps2291 laying around, and i couldn't find it on my main supplier (ebay) either, so the n-channel + p-channel mosfet solution would be great! :slight_smile:

With the info you both have given me i went to the interwebs and did som researce now that i know what to look for. I made a little sketch. Second schematic iv ever drawn in kicad so bear with me and iv probably made mistakes somewhere :S

im not sure if i can use the mosfets i have lying around either.

N-Channel irl520n

P-Channel FQP27P06

my schematic

What are you going to do about battery charging?

Also, if this is specifically for the D1 Mini, do you need the boost converter at all? If you apply the raw battery voltage to the 5V pin of the D1 Mini, it looks like the Mini's regulator would work down to maybe 3.5V, which would use up most of the battery charge. I just hate to see two regulators in series.

Neither Mosfet is a logic level type. In fact, with a possible minimum voltage of 2.4 volts, your choice is quite limited even among logic level mosfets. For the P-Channel mosfets, maybe some of these are suitable: Si2333DDS; Si2323DS; PMV33UPE;
The N Channel mosfet can well, in that application be substituted with a normal NPN transistor, say a 2N3904. It is also possible, depending on the load, that the P-Channel mosfet could also be replaced with PNP transistor.

I'm not sure that your connection to D5 is necessary. Can't you just in setup() define pin D6 as an output pin and set it high to keep it all latched on. As soon as the task has finished it sets the pin to low and everything switches off.

I also wondered about what peripherals you were going to switch on which justified the boost to 5 volts.

I don't think this works.

First, when power is turned off, you will still have current flowing through R3 and R4, then through the protection diode on pin D5, to Vcc, which will effectively be at ground. So power won't be completely off.

But more important, when the processor turns on the N-channel mosfet, the gate of the P-channel will be at ground whether the button is pressed or not. So the button press doesn't work as an input in this circuit.

I think this will work better (see the two diodes):

ShermanP:
What are you going to do about battery charging?

Also, if this is specifically for the D1 Mini, do you need the boost converter at all? If you apply the raw battery voltage to the 5V pin of the D1 Mini, it looks like the Mini's regulator would work down to maybe 3.5V, which would use up most of the battery charge. I just hate to see two regulators in series.

Hi, i almost always have use boost converters for all my 5v sensors etc, so i power the wemos with the boost converter too. But to be honest iv never thought of powering the wemos directly from the battery, did a small test now. At 3.5v from what i understand lithium batteries have lost all if not most of its charge?. The built in regulator works fine (havent tested under load thou) down to 3.46v to be precise, and up to 5.5v.

Thanks for the heads up! :slight_smile:

For charging i have the negative and positive poles from the battery to a terminal so i can charge it with a lipo charger. Havnt drawn it in the schematic.

6v6gt:
Neither Mosfet is a logic level type. In fact, with a possible minimum voltage of 2.4 volts, your choice is quite limited even among logic level mosfets. For the P-Channel mosfets, maybe some of these are suitable: Si2333DDS; Si2323DS; PMV33UPE;
The N Channel mosfet can well, in that application be substituted with a normal NPN transistor, say a 2N3904. It is also possible, depending on the load, that the P-Channel mosfet could also be replaced with PNP transistor.

I'm not sure that your connection to D5 is necessary. Can't you just in setup() define pin D6 as an output pin and set it high to keep it all latched on. As soon as the task has finished it sets the pin to low and everything switches off.

I also wondered about what peripherals you were going to switch on which justified the boost to 5 volts.

thx! i ordered 20pcs Si2333DDS. i have plenty of 2n3904 lying around, didnt think of that :).
I use D5 as a input to the wemos so i can use the same tactile button as an input too.

If the lithium batteries is dead anyways at 3.5v. could i use the mosfets i already have at 3.5v instead of 2.4v? Changing the irl520n to a 2n3904 now that you mentioned it.

ShermanP:

I don't think this works.

First, when power is turned off, you will still have current flowing through R3 and R4, then through the protection diode on pin D5, to Vcc, which will effectively be at ground. So power won't be completely off.

But more important, when the processor turns on the N-channel mosfet, the gate of the P-channel will be at ground whether the button is pressed or not. So the button press doesn't work as an input in this circuit.

I think this will work better (see the two diodes):

Your totaly right, Thanks! :slight_smile:

jackmicro:
Have checked on digikey

No i havnt checked there for a breakoutboard if thats what you mean, thx :slight_smile:

My rule of thumb based on discharge curves I've seen is that at 3.5V a Lipo is about 80% discharged, and the voltage drops rapidly at that point. The problem with the D1 Mini is the current spikes when it's transmitting. Andreas Spiess has a video on powering the Mini, and he ends up adding a 1000ยตF electrolytic cap to the 3.3V pin to keep the voltage from dropping too much during the current spikes.

For battery charging, keep in mind that you can't power the Mini while you're charging the battery without something called a load sharing circuit.