EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: ioncoder on May 26, 2020, 12:11:29 pm

Title: How to handle different battery voltages in a circuit
Post by: ioncoder on May 26, 2020, 12:11:29 pm
Please excuse me if this is a dumb ass question.

I am creating a project which uses a ESP32-VROOM-32D module (not dev board).

Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32d_esp32-wroom-32u_datasheet_en.pdf (https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32d_esp32-wroom-32u_datasheet_en.pdf)

This module can take up to 3.6V.

If I use 3 x AA rechargeable batteries @ 1.2V each that gives me 3.6V, but if I put 3 x AA none rechargeable @ 1.5v that is 4.5V, above the 3.6 of the module.

I can't use a switching regulator, because they all seem to require 4.5V minimum input and input must be 1.5v higher than output.
I could use a Zener diode, but that would only work for the 4.5V to regulate to 3.6 and is very inefficient.
I could up my batteries to 4 x AA, but that is still only 4.8V for the switching regulator and I am then getting outside the bounds of the device size that I want.

Ideally, I want to stick with AA batteries because they are common, cheap and everyone can get hold of them.

So what options do I have?
Title: Re: How to handle different battery voltages in a circuit
Post by: tunk on May 26, 2020, 12:31:15 pm
NB: A fully charged NiMH battery has a voltage of 1.45-1.5V:
https://lygte-info.dk/review/batteries2012/Eneloop%20AA%20BK-3MCCE%201900mAh%20(White)%20UK.html

Edit: And a new alkaline cell is around 1.6V:
https://lygte-info.dk/review/batteries2012/Ikea%20AA%2023050%20UK.html
Title: Re: How to handle different battery voltages in a circuit
Post by: ioncoder on May 26, 2020, 12:40:20 pm
I had simply assumed the voltage displayed on the battery casing of 1.2V. in that case I will hook 3 of them up to a switching regulator and see if I can get it to crank out 3.5V. Although the ESP32 docs say 3.3V in reality with WiFI enabled, it requires slightly more else it will not boot.

Thank you, I will let you know how it goes.
Title: Re: How to handle different battery voltages in a circuit
Post by: AVGresponding on May 26, 2020, 12:42:17 pm
Why not just use an LDO linear regulator?

https://www.rapidonline.com/st-le33cz-tr-ldo-regulator-3-3v-0-1a-2-to92-tape-reel-82-3010 (https://www.rapidonline.com/st-le33cz-tr-ldo-regulator-3-3v-0-1a-2-to92-tape-reel-82-3010)
Title: Re: How to handle different battery voltages in a circuit
Post by: chriva on May 26, 2020, 12:43:30 pm
Looked at buck-boost solutions?

Granted there is some loss but it's much more efficient than linear regulators or having to deal with a bulk load of batteries.

Marketing wank but it should give you an idea: https://www.analog.com/en/technical-articles/it-just-got-easier-to-convert-lithium-ion-battery-voltage-to-33v.html# (https://www.analog.com/en/technical-articles/it-just-got-easier-to-convert-lithium-ion-battery-voltage-to-33v.html#)
Title: Re: How to handle different battery voltages in a circuit
Post by: AVGresponding on May 26, 2020, 12:50:45 pm
For a 3 or 4 cell battery, a linear LDO would be far simpler to implement.

A buck/boost converter will put you in the territory of needing extra battery protection circuitry if you're using NiMH as it'll likely continue working until they are so badly discharged it'll greatly shorten their service life.
Title: Re: How to handle different battery voltages in a circuit
Post by: tunk on May 26, 2020, 12:53:30 pm
Remember that the voltage declines as the cell is discharged.
Look at the discharge curves in the link and calculate/estimate
if it will work. And if you have other cells, the discharge curve
will be different.
Title: Re: How to handle different battery voltages in a circuit
Post by: Psi on May 26, 2020, 12:53:48 pm
The simple solution is to use a number of cells which will exceed the voltage you need by at least 500mV when the cells are considered flat.
Then add a LDO regulator.

More complex solution is using a switchmode regulator.
You can get ones that will boost between 0.8 - 2V  up to 5V or 3.3V (intended for this sort of application)



Title: Re: How to handle different battery voltages in a circuit
Post by: ioncoder on May 26, 2020, 12:58:14 pm
Thanks for the suggestion, the only problem with these regulators is the max current. The ESP32 needs up to 500mA and will use up to 200mA while using WIFI. The voltage regulators that have a low enough drop out voltage seem to max out at 100mA.
Title: Re: How to handle different battery voltages in a circuit
Post by: chriva on May 26, 2020, 01:08:43 pm
Sticking to the theme: https://www.analog.com/media/en/technical-documentation/data-sheets/ADP2503_2504.pdf (https://www.analog.com/media/en/technical-documentation/data-sheets/ADP2503_2504.pdf)

This fella has a low voltage shutdown at 2.1V and won't start below 2.25.
Can supply 600 mA or one amp and only takes one inductor. Cost one-off from farnell: 3 Euro

It's a bloody pain to solder these tho
Title: Re: How to handle different battery voltages in a circuit
Post by: madires on May 26, 2020, 02:20:14 pm
Have you thought about using an 18650 Li-Ion cell with an LDO? Or two in series with a buck converter?
Title: Re: How to handle different battery voltages in a circuit
Post by: tooki on May 26, 2020, 02:34:28 pm
Please excuse me if this is a dumb ass question.

I am creating a project which uses a ESP32-VROOM-32D module (not dev board).

Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32d_esp32-wroom-32u_datasheet_en.pdf (https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32d_esp32-wroom-32u_datasheet_en.pdf)

This module can take up to 3.6V.

If I use 3 x AA rechargeable batteries @ 1.2V each that gives me 3.6V, but if I put 3 x AA none rechargeable @ 1.5v that is 4.5V, above the 3.6 of the module.

I can't use a switching regulator, because they all seem to require 4.5V minimum input and input must be 1.5v higher than output.
I could use a Zener diode, but that would only work for the 4.5V to regulate to 3.6 and is very inefficient.
I could up my batteries to 4 x AA, but that is still only 4.8V for the switching regulator and I am then getting outside the bounds of the device size that I want.

Ideally, I want to stick with AA batteries because they are common, cheap and everyone can get hold of them.

So what options do I have?
Why not roll your own? Go on Texas Instruments' website and use the WEBENCH Power Designer (http://www.ti.com/design-resources/design-tools-simulation/webench-power-designer.html). You tell it your basic specs (e.g. 2.7-5V* input, 3.3V 0.7A output) and it spits out designs for you, with parts lists, schematics, and often a simulation and PCB layout. For example, I plugged in 2.7-5.1V input, 3.3V 1A output (to give you some breathing room), then restricted the results to hand-solderable components, and it generated two designs, one producing an error showing it being right at its limits, and a second one that works well. The attached file is the output of the "Print Report" button on the Export page of the design.

(As it happens, I have been working on a project that needs exactly this kind of thing, so I was using that tool to find converters to produce various voltages from the 3.0-4.3V* range of a Li-Ion cell's range.)


*Remember that the nominal cell voltage is far from the highest voltage the device will encounter. The voltage of a brand new 1.5V alkaline cell is around 1.7V unloaded, so you want to support a 5Vish input (3x1.7=5.1V). The same goes for rechargeable batteries, especially if you are going to use an internal battery charge: then your load also has to be able to accept the maximum battery charging voltage for extended periods. For 3.6/3.7V Li-Ion/LiPo, this is normally between 4.1-4.35V per cell, and for NiMH, it can go as high as 1.9V per cell, though 1.65V is typical. Hence why a 3-cell NiMH-powered device with internal charger has to support 3x1.65=4.95V. If charging externally, the peak voltage will drop quickly, especially under load, but with the load paralleled up with the charger (as is frequently the case for in-device charging), the load has to endure it during the whole charge cycle.
Title: Re: How to handle different battery voltages in a circuit
Post by: ioncoder on May 26, 2020, 02:41:32 pm
It looks interesting, but after reading the datasheet it seems you have to bring your inductor to the party. This is going to increase cost and complexity beyond what I had in mind. Thanks for the suggestion though.
Title: Re: How to handle different battery voltages in a circuit
Post by: ioncoder on May 26, 2020, 02:56:47 pm
Why not roll your own? Go on Texas Instruments' website and use the WEBENCH Power Designer (http://www.ti.com/design-resources/design-tools-simulation/webench-power-designer.html). You tell it your basic specs (e.g. 2.7-5V* input, 3.3V 0.7A output) and it spits out designs for you, with parts lists, schematics, and often a simulation and PCB layout. For example, I plugged in 2.7-5.1V input, 3.3V 1A output (to give you some breathing room), then restricted the results to hand-solderable components, and it generated two designs, one producing an error showing it being right at its limits, and a second one that works well. The attached file is the output of the "Print Report" button on the Export page of the design.

(As it happens, I have been working on a project that needs exactly this kind of thing, so I was using that tool to find converters to produce various voltages from the 3.0-4.3V* range of a Li-Ion cell's range.)


*Remember that the nominal cell voltage is far from the highest voltage the device will encounter. The voltage of a brand new 1.5V alkaline cell is around 1.7V unloaded, so you want to support a 5Vish input (3x1.7=5.1V). The same goes for rechargeable batteries, especially if you are going to use an internal battery charge: then your load also has to be able to accept the maximum battery charging voltage for extended periods. For 3.6/3.7V Li-Ion/LiPo, this is normally between 4.1-4.35V per cell, and for NiMH, it can go as high as 1.9V per cell, though 1.65V is typical. Hence why a 3-cell NiMH-powered device with internal charger has to support 3x1.65=4.95V. If charging externally, the peak voltage will drop quickly, especially under load, but with the load paralleled up with the charger (as is frequently the case for in-device charging), the load has to endure it during the whole charge cycle.

Wow, that is a really powerful tool. I am looking at it now. Rolling my own does appeal to me. Every project I try to learn/try something new, the skills I would get from this, would help tremendously with future projects.

Thank you
Title: Re: How to handle different battery voltages in a circuit
Post by: ioncoder on May 26, 2020, 03:35:12 pm
Have you thought about using an 18650 Li-Ion cell with an LDO? Or two in series with a buck converter?

Good idea, why did I not think of that. I'm a vapour as well, so I already have some. I am always a bit concerned about these batteries, due to the safety issue you hear about, but for this project, it's simple, gives long life and it makes the housing for my project to be 3d printed, smaller.

Thankyou
Title: Re: How to handle different battery voltages in a circuit
Post by: AVGresponding on May 26, 2020, 05:49:51 pm
Thanks for the suggestion, the only problem with these regulators is the max current. The ESP32 needs up to 500mA and will use up to 200mA while using WIFI. The voltage regulators that have a low enough drop out voltage seem to max out at 100mA.

These'll kick out 1.25A and have only a 350mV drop: https://www.rapidonline.com/micrel-mic2941awt-1-25a-low-drop-out-regulator-82-4020 (https://www.rapidonline.com/micrel-mic2941awt-1-25a-low-drop-out-regulator-82-4020)

A 4-cell NiMH battery would work fine, and would be less prone to combustion than an 18650...   :-DD
Title: Re: How to handle different battery voltages in a circuit
Post by: tooki on May 27, 2020, 07:39:17 am
Why not roll your own? Go on Texas Instruments' website and use the WEBENCH Power Designer (http://www.ti.com/design-resources/design-tools-simulation/webench-power-designer.html). You tell it your basic specs (e.g. 2.7-5V* input, 3.3V 0.7A output) and it spits out designs for you, with parts lists, schematics, and often a simulation and PCB layout. For example, I plugged in 2.7-5.1V input, 3.3V 1A output (to give you some breathing room), then restricted the results to hand-solderable components, and it generated two designs, one producing an error showing it being right at its limits, and a second one that works well. The attached file is the output of the "Print Report" button on the Export page of the design.

(As it happens, I have been working on a project that needs exactly this kind of thing, so I was using that tool to find converters to produce various voltages from the 3.0-4.3V* range of a Li-Ion cell's range.)


*Remember that the nominal cell voltage is far from the highest voltage the device will encounter. The voltage of a brand new 1.5V alkaline cell is around 1.7V unloaded, so you want to support a 5Vish input (3x1.7=5.1V). The same goes for rechargeable batteries, especially if you are going to use an internal battery charge: then your load also has to be able to accept the maximum battery charging voltage for extended periods. For 3.6/3.7V Li-Ion/LiPo, this is normally between 4.1-4.35V per cell, and for NiMH, it can go as high as 1.9V per cell, though 1.65V is typical. Hence why a 3-cell NiMH-powered device with internal charger has to support 3x1.65=4.95V. If charging externally, the peak voltage will drop quickly, especially under load, but with the load paralleled up with the charger (as is frequently the case for in-device charging), the load has to endure it during the whole charge cycle.

Wow, that is a really powerful tool. I am looking at it now. Rolling my own does appeal to me. Every project I try to learn/try something new, the skills I would get from this, would help tremendously with future projects.

Thank you
You’re welcome!

Note also that all the components in a design are just suggestions. If you go into the BOM, you can go in and select alternatives, and it shows you what the criteria were for its component selection. So if it’s suggesting a brand your favorite distributor doesn’t carry, you can find another. (Indeed, the caps it recommends the most are now being obsoleted by MuRata, so I’ve been going in and selecting others.) You can also change the criteria, if you e.g. wanna see the effect of a different value. Then re-run the simulations and it will reflect the changed components. (Like on one design where I asked it to make an 18V boost, but to see how it’d work as a variable-voltage supply, changed the values of the feedback resistors to make it output 5V.) Also, in the simulations, you can change things like the input voltage (and its source impedance, etc). Crazy powerful for a free web tool.

The only major downside I’ve encountered is that not all converter ICs are available in it. For example, we needed a dual-rail supply for some op-amps, and TI has a part that appears perfect, but isn’t WEBENCH enabled. (At least WEBENCH could tell me of its existence, in the “why couldn’t a design be found” report.)
Title: Re: How to handle different battery voltages in a circuit
Post by: ioncoder on May 27, 2020, 09:32:56 am
I have thought about everyone's suggestions and in the end I have decided on the following two to experiment with.

1. 18650 battery. This is the simplest solution, offers a long life, and no shortage of current. However I am bit concerned about the long term safety of these batteries, which is the reason for option 2.
2. I did a bit of digging myself, being armed with a bit more wisdom from everyone's suggestions and have found the following voltage regulator.
https://4donline.ihs.com/images/VipMasterIC/IC/MCHP/MCHPS04278/MCHPS04278-1.pdf?hkey=52A5661711E402568146F3353EA87419
It has a very low drop out that should state within my required voltage tolerances. It only needs a single capacitor to work, so it keeps my PCB simple.

Thank you for all the time and help you have given me. What a great community.

Simon
Title: Re: How to handle different battery voltages in a circuit
Post by: chriva on May 27, 2020, 09:38:51 am
18650's are only really bad if you severely mistreat them. :)

Get one of those cells with builtin protection and you'd have a very hard time making it blow up even if you tried.

Keep in mind that their nominal working voltage is 3.6-3.7V tho so you'll only be able to extract around 60-80% of the capacity before it drops too low. Even if you were to crash, the cell protection will cut off at around 3 Volts
Title: Re: How to handle different battery voltages in a circuit
Post by: ioncoder on May 27, 2020, 09:44:10 am
Sticking to the theme: https://www.analog.com/media/en/technical-documentation/data-sheets/ADP2503_2504.pdf (https://www.analog.com/media/en/technical-documentation/data-sheets/ADP2503_2504.pdf)

This fella has a low voltage shutdown at 2.1V and won't start below 2.25.
Can supply 600 mA or one amp and only takes one inductor. Cost one-off from farnell: 3 Euro

It's a bloody pain to solder these tho

One of the projects I have just finished is a reflow oven, so while it's still a pain, I am finding soldering is now much easier and repeatable than using the rework station.
Title: Re: How to handle different battery voltages in a circuit
Post by: madires on May 27, 2020, 09:51:07 am
I agree with chriva, And keep away from cheap no-name Li-Ion cells. Li-Ion cells are ubiquitous for years, e.g. laptop battery packs and cordless tools. A few days ago I changed old ones in a hedge trimmer with over 10 years of service.
Title: Re: How to handle different battery voltages in a circuit
Post by: David Hess on May 27, 2020, 10:38:38 pm
I can't use a switching regulator, because they all seem to require 4.5V minimum input and input must be 1.5v higher than output.

Switching regulators which will operate on one or two cells minimum are common and a SEPIC or buck-boost converter can handle an input voltage which is lower or higher than the output.
Title: Re: How to handle different battery voltages in a circuit
Post by: langwadt on May 27, 2020, 11:49:03 pm
TLV62568 ?