# Powering up STM32L from Lithium Ion battery [closed]

I've just started with MCUs, so would like to at least to know whether I'm in the right direction...

Trying to power MCU STM32L100RC (just the MCU by itself) from a Panasonic Lithium Ion NCR18650B battery.

However, I'm trying to test it on the integrated circuit board first. See below.

1st part

The battery is constantly charging/discharging from PV solar array via DC-DC boost converter, mosfet driver, MCU and other components that make up - Maximum Power Point tracker.

I looked at the battery's data-sheet, and it seems that it can't ever output more than 5V, and over 200mA, battery's internal resistance is 29-39mohm.

So MCU is safe either way, since it said in MCU IC's documentation it can handle up to 1000mA.

Per documentation of the STM32L100RC MCU discovery board. It seems that my only option is to use 5V pin for power input, top right on the MCU.

MCU discovery board's manual also says that

LD1 (red) for 3.3 V power on

...

Does it mean MCU discovery board only requires exactly 3.3V?

What if power input varies? I actually tested with a DC power supply, and the MCU discovery board worked between 2.2V and 5V (I didn't risk higher voltages), but strangely enough I couldn't find the 2.2V minimum limit on the manual...

Btw, regarding that power input, it's just gonna be some voltage in, right? Like if I choose to do LDO regulator, output of LDO is just some voltage, correct? That voltage is gonna be connected through a wire to pin called "5V" on the top right of MCU discovery board?

Would this MCU discovery board still work if voltage in is below 3.3V? How about if it's above 3.3V? Say, like 6V? I guess it'd still work, but if it can work with 3.3V, then for efficiency it's better to stick with 3.3V, right?

2nd part

So I guess I will use an LDO regulator circuit to get power in for MCU discovery board.

I was gonna use a voltage divider circuit first for its simplicity, but it seems that the battery's voltage will vary between 2V and 5V(?), so it's better to use LDO circuit.

So, using LDO regulator. Do I just attach a wire at this point and then the other end of the wire connect to pin "5V" (top right) on MCU discovery board?

And in the LDO circuit schematic, the 5V voltage source - that's gonna be the positive terminal of a single NCR18650B battery, correct?

There are actually 27 of the 18650B cells in parallel, and 23 of those modules in series.

But I only need to use one of those batteries to power up MCU discovery board, don't I?

Last dumb question:

What does 1.65 V to 3.6 V power supply in datasheet mean? Does it mean the power into MCU or the output of MCU (what MCU can provide?) I think it's the latter.

I will stop with questions here for now.

## closed as too broad by Chris Stratton, RoyC, laptop2d, Bence Kaulics, Michel KeijzersApr 3 '18 at 8:41

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• First you must do is edit your question to clearly and explicitly specify if you are talking about an STM32L100 MCU, or about a circuit board containing one and additional circuitry. The STM32L100 most definitely cannot tolerate a 5v supply, nor the actual voltage of an 18650 during most of its discharge curve, but if what you have is a board and not just an MCU IC, the situation might be different. FWIW a bare STM32 should work with a 2.8 v LDO that would accept most of the discharge range of a single lithium cell as input. – Chris Stratton Mar 31 '18 at 1:42
• Questions which are not clear and specific do not survive here. – Chris Stratton Mar 31 '18 at 2:49

(1) The STM32L100RC MCU discovery Discovery board, per its user manual, has embedded LDO from 5 V to 3.3 V, minus Schottky diode D2 for power rail decoupling, which makes the output at about +3.0 V, and it is labeled as such:

As per this design, the Discovery kit can be powered at least in two ways:

 (a) through the standard USB port (5V 500 mA), or

(b) directly by 3 V supply, bypassing the LDO U1.


Obviously the whole system has wide margin, which doesn't mean you need to stress all option and overvoltage the board.

(2) Regarding the 18650 Li-Ion battery, your conclusion that "it seems that it can't ever output more than 5V, and over 200mA," is staggering.

While yes, Li-Ion batteries never output more than 4.35 V, the datasheet for this particular battery clearly presents data that it can be safely discharged at 2C rate, meaning that you can get up to 6.4 A of current, easily, and not just "200 mA"

Furthermore, the Discovery kit uses on-board LDO regulator LD3985, which can output only up to 150 mA, which means that the MCU cannot consume more that that. And the input voltage range is from 6 V (absolute max) down to 2.5 V. Which means that you don't need any additional "LDO reguator" and can safely feed the board either from your undisclosed "PV solar panel" (assuming its output is fixed at 5 V), or feed the +5 V power pin directly from a charged NCR18650B battery. Be aware however that the LD3985 doesn't have "undervoltage" protection, and its parameters are not guaranteed if input is below 2.5V. Therefore some special measures should be taken to prevent the cell overdischarge since the NCR18650B cell is unprotected.

• @Jack, please really read the datasheets, and try to understand their terms. The 100 mA is an absolute max current the MCU internals can handle including all GPIO driving load of loads. The front page however says: "185 uA per MHz Run Mode", which means that if you run the MCU at 1MHz clock, the core will consume no more than 0.2 mA, not even 5 mA. Check their Table 16 for different clocking options and measured power consumption. This is a good ultra-low-power MCU. – Ale..chenski Mar 31 '18 at 19:38
• @Jack, judging from MCU datasheet, the simplest way is to use LDO like the LD3985, just as the devlopment kit does, just get the 1.8V variant (because the MCU seems to be happy with 1.8V supply). Regarding your solar source, you still fail to provide any information on what it is, and your description as "charging/discharging constantly of 0-5V" makes little sense. Obviously with input voltage as "0" it will be difficult to have any functionality from any MCU. – Ale..chenski Mar 31 '18 at 20:54
• @Jack, ??? You already have the LDO, it is U1. There are 12 figures more in the manual. st.com/resource/en/user_manual/dm00092190.pdf Did you read the manual past its first page? – Ale..chenski Mar 31 '18 at 21:34
• @Jack, No. You can't disregard the discovery board. IT IS YOUR GUIDE HOW TO CONNECT THE LDO!!!!! – Ale..chenski Apr 1 '18 at 1:31
• Listen @Jack, I am telling you third time that the MCU must be connected in accord with schematics provided for your convenience in the kit user manual. There are 5 (five) pins you would need to connect. Then why you are not asking where to connect clocks, or ports, or bypass caps? If you can't figure this out and can't read schematics, drop the project. – Ale..chenski Apr 1 '18 at 18:35