[STM32F407xx] - external power/battery

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
nebelgrau
Posts: 8
Joined: Mon Jun 03, 2019 4:37 pm

[STM32F407xx] - external power/battery

Post by nebelgrau » Tue Oct 15, 2019 12:48 pm

Hello all,

I'm very happy with the STM32F407VET black board I got and managed to install Micropython, thanks to the excellent explanation and work by mcauser (viewtopic.php?f=12&t=3086&hilit=f407). What I can't figure out, though, is how to power the board, other than through the USB port. This way I can power it from my PC, a phone charger or a power bank. What about LiPos or simple 9V or AA batteries, though? Is there any way to supply 3.3 or 5V to this board? In mcauser's post a Q1 battery connector is mentioned, but I can't locate it on the board. Can the JTAG be used for that? What I have in mind is a data logger: the board is perfect for it, as the SD card and RTC work out of the box, in fact it's currently logging data from a BME280 sensor. I would like to make it more portable, using for example 4 rechargeable AA batteries. Is that possible?

Thanks!

User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

Re: [STM32F407xx] - external power/battery

Post by mcauser » Wed Oct 16, 2019 5:59 am

The Q1 or B1 in the schematics is the RTC battery (bottom right CR1220 lithium cell on the board).
It's designed to be a backup 3V power source to maintain the RTC datetime while you unplug / plug the primary power source.

Schematics are available on Github. See the links in the readme footer.
https://github.com/mcauser/BLACK_F407VE

You can power the board with 5V over the USB port, or provide 5V to the 5V pin on the UART header next to the MicroSD, or one of the 5V pins on the top left. From there it goes through the AMS1117 regulator and provides the board with 3V3.

The AMS1117 is a 5V->3.3V low dropout regulator:
http://www.advanced-monolithic.com/pdf/ds1117.pdf

The second page of the schematics pdf in the /docs folder on Github, shows the pcb layout, which you can trace from the 5V pins to the regulator.

The JTAG connector powers the board over 3V3. I have not tried using it to power the board, although it should work. You'd be missing the 5V part of the board as you're providing power after the AMS1117 regulator.

You could power it with a Mini USB phone charger, which would provide a steady 5V.

You can also power it with a one of those lithium ion power banks, which are designed to power phones over USB. They tend to contain one or more 18650 batteries with a 5V regulator.

Regarding 4xAA rechargeables. Watch the voltage. If they are NiCd's, they are a nominal 1.2V instead of the usual 1.5V. At full charge, a 4xAA pack would be 4.8V using NiCd's.

If board size is an issue, there is a smaller version of this board by the same designer (MCUDev). They call it the DevEBox.
https://github.com/mcauser/MCUDEV_DEVEBOX_F407VET6

nebelgrau
Posts: 8
Joined: Mon Jun 03, 2019 4:37 pm

Re: [STM32F407xx] - external power/battery

Post by nebelgrau » Wed Oct 16, 2019 12:20 pm

Thank you for the detailed answer!

Currently I'm using either a phone charger, or a LiOn power bank, so the 5V is guaranteed and stable, just like you said.
The Q1 or B1 in the schematics is the RTC battery (bottom right CR1220 lithium cell on the board).
It's designed to be a backup 3V power source to maintain the RTC datetime while you unplug / plug the primary power source.
OK, clear.
You can power the board with 5V over the USB port, or provide 5V to the 5V pin on the UART header next to the MicroSD, or one of the 5V pins on the top left. From there it goes through the AMS1117 regulator and provides the board with 3V3.
OK, clear - didn't know about the UART header. So I could use that to supply power through a buck-boost converter for example.
I wasn't sure whether the 5V pins were both output and input, this seems to vary between various types of boards. What about the 3.3V pins, can they be used as input?
The second page of the schematics pdf in the /docs folder on Github, shows the pcb layout, which you can trace from the 5V pins to the regulator.
Yep... need to learn more about reading the schematics :)
The JTAG connector powers the board over 3V3. I have not tried using it to power the board, although it should work. You'd be missing the 5V part of the board as you're providing power after the AMS1117 regulator.
OK, got it. It should work for my project, which uses only 3.3V elements (sensor, display).
Regarding 4xAA rechargeables. Watch the voltage. If they are NiCd's, they are a nominal 1.2V instead of the usual 1.5V. At full charge, a 4xAA pack would be 4.8V using NiCd's.
Those I have are NiMH, I believe they are 1.5V, as I used to use such batteries for a digital camera, back when cameras still used AA batteries (Canon S3is for example). So 4 of them would make 6V at full charge. That buck-boost converter should solve that I guess?
If board size is an issue, there is a smaller version of this board by the same designer (MCUDev). They call it the DevEBox.
https://github.com/mcauser/MCUDEV_DEVEBOX_F407VET6
That's a cool board, didn't know it before. It's missing the RTC, though.. or just the actual battery for it?

A noob electronics question: the STM32F407 is rated for 1.8 - 3.6V operation. I understand this is the voltage for the actual MCU, but how does it work in the context of the whole board? Let's say I have a script that doesn't need any external devices other than a LED to blink and a button to switch through blinking cycles, in other words doesn't need to power any external circuits: could it be powered from a coin cell until it "browns out"?

nbg

Post Reply