12V A23 battery for a MCU. - Page 1
Forum section: electronics / beginners

author: Johannes79
author_rank: Newbie
timestamp: June 03, 2025, 10:16:06 am
content: Hi!I'm using a Gigadevice GD32VF103 MCU, with a small LCD, 3 sensors, and 3 LEDs. Is it fair to say that a small battery like a 12V A23 battery will only last a few hours with this setup? I've seen the datasheets and this seems to be the case. It's not possible to try on my own at this moment so I'm asking you guys. Edit: the sensor measurements, the LCD, and the LEDs are updated once per second.Cheers

author: Psi
author_rank: Super Contributor
timestamp: June 03, 2025, 10:42:52 am
content: Since you would enable sleep mode on the MCU this is really going to be decided by how much current the LED and LCD are drawing.What is the total average LCD+LED current?There is a wide range of current draw from LCD types depending on if they are color and have a backlight or not.But yeah, couple of hours at like 10mA, and you will likely be wasting a reasonable percentage of the battery energy because you have too much voltage and have to burn off some of it as heat in linear regs.I assume you want to use a 12V battery because your LCD needs 9/12V ?But you'd probably be better off with a 1.5/3V battery and a boost circuit if the 9/12V is very low current.Just don't use CR2032's they are terrible for continuous current draw above 1mA

author: Johannes79
author_rank: Newbie
timestamp: June 03, 2025, 10:57:58 am
content: Thanks, yeah I'm inclined to agree. I will use a 9V battery with 550 mah, instead, like a 9V 6LR61 with 550 mah. Maybe it will last around 12 hours, then. The maximum load of the setup is around 2,5 W, and the minimum is around a tenth of that.

author: Ian.M
author_rank: Super Contributor
timestamp: June 03, 2025, 11:27:41 am
content: A23 batteries are internally a stack of eight tiny LR932 alkaline button cells with a nominal capacity of around 56mAH. Due to its smaller size and all the wasted internal space due to the stack of button cells construction, its only good for about 40% of the energy of a single Alkaline AAA. Your suspicions are correct - its a lousy choice for a powering a 32 bit MCU that isn't in a deep power saving mode nearly all the time, let alone lighting LEDs for any significant length of time.I assume you are aware that end-of-life the 6LR61 will be down around 5V, and its internal resistance will be pretty high. You certainly aren't going to be able to get 2.5W out of one for long. 0.25W is more achievable, but I still doubt you'll get 12 hours, and with a 2.5W peak load you are going to need a big supercap to smooth the demand.If you are proposing a 6LR61, you obviously don't actually need 12V (or are willing to boost to get it). If you tell us what voltage rails you actually need and the max. and average load current for each, we are more likely to be able to suggest viable solutions.

author: Zero999
author_rank: Super Contributor
timestamp: June 03, 2025, 11:44:26 am
content: How are the LEDs connected and powered? Please don't say in parallel and from a resistor/linear regulator. If you're going to power them off 12V, they need to be in series, if powered by a resistor/linear regulator. If they're in parallel, either use a lower voltage, or a buck regulator.

author: Johannes79
author_rank: Newbie
timestamp: June 03, 2025, 03:43:43 pm
content: Quote from: Zero999 on June 03, 2025, 11:44:26 amThanks, well the LEDs are controlled by code and are connected to three different GPIO ports. They are connected to three pull-down resistors respectively, 470 ohms each. I assume that all the parts of this setup need 5 volts maximum.

author: Johannes79
author_rank: Newbie
timestamp: June 03, 2025, 03:46:35 pm
content: Quote from: Ian.M on June 03, 2025, 11:27:41 amThanks for the reply. All of the parts of this setup need 5 volts maximum. If there are 5V batteries with high mah values, I might take a look at them. The high load probably occurs every second when all of the sensors take measurements. The maximum load current, I'm not sure. One of the documents mentioned something like 1.5 mA in average, and up to 50 mA, maximum. That's for one sensor.

author: Ian.M
author_rank: Super Contributor
timestamp: June 03, 2025, 04:10:43 pm
content: Boost converters that can provide 5V out from a lower voltage are readily available. Its probably worth avoiding the ones that can work with a single AA cell as input, as the low input voltage results in much higher current in the coil and switching transistor, thus higher I2R losses and worse efficiency vs those intended for input from 2x (series) AA cells or even a single LiPO. The only fly in the ointment is output ripple and switching noise which may be an issue if you have very sensitive analog sensors. 2x AA cells occupies a similar volume and footprint to a 6LR61, store over 50% more energy and are suitable for a far higher pulsed discharge rate, they are also typically one of the best value for money primary cells. Note that when selecting a boost IC or module, low quiescent current is important, and if using 2x AA cells operating down to under 2V is essential to get >90% of the stored energy out of them. This is less important for LiPOs which should never be discharged much below 3V (at small load currents), so an undervoltage cutoff is a preferred feature.For a one-off I might hack a small powerbank, of the USB charged single 18650 cell variety, but do check its output voltage is adequate when its 'sleeping', and to find out how much load current it needs to wake up.

author: Johannes79
author_rank: Newbie
timestamp: June 03, 2025, 04:33:01 pm
content: Quote from: Ian.M on June 03, 2025, 04:10:43 pmThank you. Well, I'm a newbie at this. I guess that by supercap, you mean a capacitor with a high value in Fahrads. Let's pretend that I use a boost IC module, what is a rough estimate for what these batteries you mentioned (2x AA cells) will last with this setup? If I don't use a boost IC (and another kind of battery, maybe the one I suggested), what is a rough estimate for how long that battery will last?

author: Peabody
author_rank: Super Contributor
timestamp: June 03, 2025, 05:39:16 pm
content: Quote from: Johannes79 on June 03, 2025, 03:46:35 pmBut what minimum voltage could they operate on? Your MCU is 3.3V. What about the other parts? Could everything work on 3.3V? Or even 3V? If not, are there alternate 3.3V versions of the parts that require 5V?

author: Johannes79
author_rank: Newbie
timestamp: June 03, 2025, 07:58:28 pm
content: Quote from: Peabody on June 03, 2025, 05:39:16 pmThere is a 5V power input on the MCU, and the parts, except for the LEDs, are connected to it.

author: mariush
author_rank: Super Contributor
timestamp: June 03, 2025, 08:25:16 pm
content: here's the GD32VF103 datasheet :https://www.mouser.com/datasheet/2/870/GD32VF103_Datasheet_Rev1_6-3082846.pdf?srsltid=AfmBOooR1GwFlZ4ZQKmGZQ3NTrjg0fC3-zv2V57Gsz4XlqjqOKfVxpXYOn page 48, it showsVDD Supply voltage — 2.6 3.3 3.6 VVDDA Analog supply voltage Same as VDD 2.6 3.3 3.6 VVBAT Battery supply voltage — 1.8 — 3.6 VSo you could probably run the microcontroller with 2.8v, probably at lower frequencies.On page 54, you can see the estimated power consumption in RUN mode and in SLEEP mode, with and without peripherals enabled - at 108 Mhz it consumes 35mA with all peripherals enabled, 20mA without them but if you scale it down to 24-36-48 Mhz you're in the <10mA without peripherals.Unless you need to use white or blue leds with 3v+ forward voltage, you could probably get the voltage down to 2.8v (0.2v higher than minimum)... but I think you'd have to stay with 3.3v because of the lcd and the sensors.If you have a 5v lcd display, you could probably use a 3.3v one, or use a raw lcd segment display and a led segment driver.12v A23 batteries will be really lousy ... you have around 45-55mAh worth of energy. If you use a buck regulator to reduce 12v to 3.3v with around 90-92% efficiency, you'll probably have around 220-250mAh worth of battery capacity.They use 10.3mm x 28.5mm - AAA batteries are just a bit longer at 10.5mm x 44.5mm and you can get up to around 1300mAh in non-rechargeable alkaline batteries.For example, Duracell PX2400 claim to have 1465 mAh worth of energy :https://www.digikey.com/en/products/detail/duracell-industrial-operations-inc/PX2400/16344172The cheaper PC2400 claims to have 1250 mAh :https://www.digikey.com/en/products/detail/duracell-industrial-operations-inc/PC2400/16344166You could easily use a step-up regulator to boost 1.2v...1.5v to 3.3v with around 85-90% efficiency, which would mean you'll have around 500-600mAh worth of capacityExample of step-up regulator ... TPS613221 is 30 cents, and will be ~90% efficient :https://www.digikey.com/en/products/detail/texas-instruments/TPS613221ADBVR/8638375AP6714 would also work (a bit bigger package, MSOP-8) but just as easy to use :https://www.digikey.com/en/products/detail/diodes-incorporated/AP6714M10G-13/1964675TLV61070A would also work, but only if you're gonna use non-rechargeable because it has a minimum startup voltage of 1.3v :https://www.digikey.com/en/products/detail/texas-instruments/TLV61070ADBVR/16982069edit : and if you have space for a 9v battery, just use a couple AA batteries instead or a couple AAA batteries. A step-up regulator will have no problems boosting 2.4v..3.1v to 3.3vOr you could have 3 AAA/AA in series for at least 3.6v if using rechargeable or 4.5v if using alkaline ... a 10-20 cent step-down regulator will have no problem producing 3.3v from this range.

author: Peabody
author_rank: Super Contributor
timestamp: June 03, 2025, 09:20:15 pm
content: Quote from: Johannes79 on June 03, 2025, 07:58:28 pmCould you provide a link to your MCU module?And let me ask again - even if the other parts can run on 5V, do they need 5V, or could they run on 3.3V? If you'd provide links to the items you're using, perhaps we can figure this out. If everything can run on 3.3V, then instead of a noisy boost converter you might be able to use a 3.3V linear regulator and a rechargeable lithium cell.

author: Buriedcode
author_rank: Super Contributor
timestamp: June 03, 2025, 10:10:44 pm
content: A schematic will help. Or even a block diagram. You can then estimate/calculate how much power/current each module/part will draw.If you're trying to maximise battery life for a given battery, then things like controlling power to modules so they are only powered when needed helps - and going further sending MCU to sleep when it doesn't need to be used etc.. its how smart phones maintain long battery life despite regularly drawing power that would cause the battery to drain in a cople of hours.

author: Johannes79
author_rank: Newbie
timestamp: June 03, 2025, 10:30:44 pm
content: Quote from: mariush on June 03, 2025, 08:25:16 pmThank you very much!

author: Johannes79
author_rank: Newbie
timestamp: June 03, 2025, 10:33:43 pm
content: Quote from: Peabody on June 03, 2025, 09:20:15 pmYeah, they do run on 3.3V. You're right, along with Mariush and others who posted here. Thank you.