Electronics > Projects, Designs, and Technical Stuff
Using BOD 2.7V AVR ATTiny85 as Li-ion 18650 4.2V battery discharge protection?
beduino:
Hello,
I'd like to protect Li-ion 18650 4.2Vmax battery which powers directly ATTiny85 consuming a few mA of current probably since running at 8MHz, so idea is to enable 101 BOD 2.7V typical (attached 21.6 Brown-Out Detection from ATTinu85 datasheet),
however it is for 3.3Vcc, but Li-ion will be charged by small photovoltaic solar panel up to 4.15Vmax (<4.20V),
so probably this trick could do the job and in the case for some reason Li-ion didn't get charged for a long time and its voltage dropped below 2.7V (2.5V in worst case scenario according to BOD datascheet specs) should put AVR into reset state with its pins in high impedance tri-state, so battery discharge below typical 2.7V should be prevented by BOD in AVR MPU itself or I missed something?
There shouldn't be problem of running 8Mhz ATTiny85 AVR at voltage range 2.7V - 4.15V (more realistic 3.6V-4.15V since it consumes small power relative to 18650 Li-ion capacity) ?
Off, course I will test it right now, but looking for your opion or expierience while maybe someone tried to use AVR BOD to protect Li-ion battery from discharge below 2.7V.
So, idea is run ATTiny85 @ 8Mhz with enabled 101 BOD 2.7V typical directly from Li-ion 18650 4.2Vmax at normal conditions up to 3V, but to ensure put it in reset when battery is discharged.
Not sure if ATTiny85 can run 8MHz clock at 2.7Vcc, but it should be specified in its datasheet :-/O
Regards.
beduino:
Update: According to ATTiny85 AVR datasheet @ 8MHz 2.7Vcc it needs something about 2.5mA, so it looks like it shoud run at 8MHz internal clock up to 2.7Vcc, so probably enabling 101 BOD 2.7V typical should do the trick and protect 18650 Li-ion?
What do you think?
Anyway, probably it is time to make experiment and test this, while datasheet looks good :-/O
Regards.
Kleinstein:
The BOD is not very accurate. Still using the BOD function is definitely better than no protection. Even after brown out is detected, there will be a little current draw (maybe a µA and maybe more from the charger circuit).
There is the question if the µC really has to run at 8 MHz - may tasks can use an even lower clock.
The maximum voltage of a solar panel is not that well defined. It depends on the light intensity and also temperature. So the maximum voltage would need a more reliable limit. If in doubt set the upper limit lower - the capacity will be a little lower at the cost of longer life time.
Ian.M:
Although BOD is nessercery to prevent incorrect AVR operation during Vcc brownouts, it isn't going to do a great job of LiPO protection. Its accuracy is +/- 0.2V, so the range is 2.7V-2.9V, and as LiPOs are at risk below about 2.65V/cell, and 2.5V is the threshold chosen for many non-resettable 'final disconnect' protection circuits.
Therefore it isn't suitable for LiPO protection unless you select your ATtinys on test for above average BOD voltage.
Unfortunately your chosen MCU can't do an ADC conversion on its internal 1.1V reference, so you cant use the technique of back-calculating the voltage on Vcc as the ADC reference voltage, from the 1.1V reference reading. If you could, you could monitor Vcc and go into a deep sleep or powerdown mode if Vcc is under 3.0V, only waking up on a pin change AND Vcc>3.0V.
Therefore, if you want to avoid the need for an external protection circuit, you may wish to consider changing MCUs to one that can do an ADC conversion on its internal reference. N.B. calibration will be required - with a known Vcc, do an ADC conversion on the reference, and store it in the EEPROM to be used for calculating under and over-voltage thresholds.
For overvoltage, have a resistor that can use up the full direct sunlight solar cell output, and switch it on with an I/O pin if Vcc >4.0V.
mikerj:
How much current does the BOD take when enabled? That doesn't seem to be specified in the datasheet, and the power down currents are stated with BOD disabled implying it's large enough to impact those values.
Navigation
[0] Message Index
[#] Next page
Go to full version