Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can STM8S parts run on 2.8v, a flat LiPo cell voltage? #287

Closed
VK6TT opened this issue Jan 22, 2020 · 13 comments
Closed

Can STM8S parts run on 2.8v, a flat LiPo cell voltage? #287

VK6TT opened this issue Jan 22, 2020 · 13 comments
Assignees
Labels

Comments

@VK6TT
Copy link
Collaborator

VK6TT commented Jan 22, 2020

I know this is general to all STM8 software, not just STM8eForth, but no reports could be found of people trying to run them below 2.95v.

I

@VK6TT VK6TT self-assigned this Jan 22, 2020
@sbridger
Copy link
Collaborator

sbridger commented Jan 22, 2020

I would look at VCAP the 1.8V regulator pin, and reduce supply voltage until it drops.

Also
VIT Brown-out reset threshold - 2.5 2.65 2.8

Is BOR optional? ( STM8L it can be disabled )

@TG9541
Copy link
Owner

TG9541 commented Jan 22, 2020

Hi everyone, sorry for letting you wait :-)
The STM8S core specifies a minimal supply voltage of just above 3V. There is no way to work around the low voltage detection at 2.8V - there will be a reset, no matter what you do.

There is a nice reset related thread in the ST community forum that gave me a bit to think about.

I once discussed the idea of using the reset pulse to create a "joule thief" like behavior. The idea is to use reset to load a capacitor with a boost converter for standby mode. The same boost converter could be controlled by the STM8S in operation mode.

@sbridger
Copy link
Collaborator

Back to your title, a flat LIPO at modest current drains is well above 3.2V.
2.8V is the permanent-damage-protection voltage - the cell is effectively exhausted well above this when you look at the curves.

@VK6TT
Copy link
Collaborator Author

VK6TT commented Jan 24, 2020 via email

@VK6TT VK6TT closed this as completed Jan 24, 2020
@TG9541
Copy link
Owner

TG9541 commented Jan 24, 2020

Hi Richard, maybe you should consider using an STM8L chip - there it's much easier to control low voltage protection feature. Just a hint: better don't use "value line" data sheets - there ST sometimes relaxes the specs to the point where contradictions arise. I've seen cases where the same chip (e.g. medium density) with "better specs" (i.e. operation range) also has the "better data sheet" (i.e. conscise description).

@VK6TT
Copy link
Collaborator Author

VK6TT commented Jan 24, 2020 via email

@sbridger
Copy link
Collaborator

STM8L has too low an absolute maximum rating of VDD (4V) to take max possible 4.3v charging voltage of the lithium.

One trick that appears possible is to use a diode as a dropper to VDD when VBatt is too high for the 4V rating. You can then use a 5V tolerant high current pin (pA7) (5.2Vmax) as a pfet to connect VBatt (on PA7) to VDD (internally) when voltage is low enough / too low.

Annoying these pins seem to be on lqfp48 only.
Also not driven by any pwm hardware, so the potential for a dirty buck smps vanishes.


Another idea is to just charge to 4.0V. You still get 75% of lipo capacity

@TG9541
Copy link
Owner

TG9541 commented Jan 28, 2020

Your idea is to "vent" or "shunt" power using a 5V tolerant pin? This might work, but how is PA7 different from the FT pins available in LQFP32 or TSSOP20 packages? At least in LQFP32 some pins have timer functions.

Why not use a low power LDO? For example the TPS79733-EP consumes about 1 µA. Some charger/battery management chips with LDO even have lower quiescent current (e.g. the BQ25150).

Controlling the charge of a battery is, of course, another option.

@VK6TT
Copy link
Collaborator Author

VK6TT commented Jan 28, 2020 via email

@sbridger
Copy link
Collaborator

@VK6TT

orders of magnitude less than the resistor string I was going to use with the inbuilt ADC.

You don't do this. I am pretty sure STM8L can measure its own supply voltage. (use VDDA as ADC reference, and measure internal reference) .

The CN61CC33 flagging when the voltage drops below 3.3V

PVD does this at 3.05V for you.

The device features an embedded programmable voltage detector (PVD) that monitors the VDD/VDDA power supply and compares it to ... 7 different levels between 1.85 V and 3.05 V ... An interrupt can be generated ...

@sbridger
Copy link
Collaborator

sbridger commented Jan 28, 2020

@TG9541

but how is PA7 different from the FT pins available in LQFP32 or TSSOP20 packages?

In the stm8L151 datasheet PA7 and PE0 are the only five volt tolerant pins I see, except for I2C pins. Does another STM8L have them in small packages?

Why not use a low power LDO?

A better question is why use it when you can just use a diode, transistor or fet ? Really, its that I just like dirty deeds done dirt cheap.
I have done a few things using PICs where the quite grunty ports let you make self powering boost convertors with nothing extra than an inductor.

Richard doesn't say what he is doing, but if this is a very low average drain, outside application, then I use a software boost convertor from a small ($0.43) 1V, 80mA solar cell to extend battery life at negligible cost. (or keeping a small lipo charged from an alkaline primary). On PIC this is a single inductor (fet and diode are internal). On STM8L it might be the high current pin PA0+schottky.

Even simpler is a tiny 5V panel , I just saw these, and they seem really cheap. If battery is low, then it charges through a diode. When battery is full, then shunt panel to gnd with the port pins. Use one or more HS port pins according to current. You could also charge through the port pin pfet to VDD, and skip the diode. Back leakage into the panel when it is dark needs to be considered, and the pfet turned off.

@TG9541
Copy link
Owner

TG9541 commented Jan 29, 2020

@sbridger I agree, I also like "sufficient" solutions, especially if they're reliable or have that little "systems quirk", like replacing hardware by a smart software solution :-)

You're right about the limitations of the STM8L151 regarding FT pins - I checked the STM8L152 datasheet which has more options. Maybe you should look for a STM8L052 device.

@sbridger
Copy link
Collaborator

L052 are pin compatible with L151, so same i/o pins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants