Search My Blog

Saturday, December 3, 2011

Flat Mate - a battery voltage monitor with ATTiny45

Flat Mate - a battery voltage monitor with ATTiny45

unixbigot/Flat-Mate - GitHub

This project monitors the voltage of a battery and displays a 5-element bar-graph indicating battery charge state. Optionally MOSFET control may be used to cut off supply to protect the battery from over-discharge.

See construction pictures on my blog

It is particularly applicable for multi-cell Lithium-ion Polymer (LiPo) packs, which are easily ruined if over-discharged.

It is intended for use in high power applications such as portable lighting, robotics and power tools where a charged SLA or LiPo battery is discharged in the presence of a human operator. The first deployment was for a high-power bicycle headlamp. Design was inspired by the simple state-of-charge indicators present on some electric bicycles.

The advantage over existing inexpensive "off the shelf" protection circuits is that this circuit gives a visual indication of state-of-charge, presented as an easy-to-read bar-graph. Existing protection circuits (often designed for flashlights or model aircraft) either have no display (sudden surprise cutoff), digital voltage display (requires memorizing cutoff voltages) or audio-only alert (no visual display).

An Atmel ATTiny45 microcontroller is used to sample the battery voltage and control the LED bargraph. Power for the microcontroller is derived from a 78L05 regulator connected to the main battery. Battery voltage is monitored using an analog input via a voltage divider and compared to the microcontroller's 1.1v internal voltage reference.

The bargraph will show 4 LEDs when at "full charge" and 1 LED when at minimum usable voltage. When voltage is critical a 5th "alert" LED will illuminate (and output supply can be terminated).

The circuit can be used purely as a voltage indicator by leaving off the optional MOSFET switch components. If a MOSFET is fitted this can be used to disconnect the main load when the battery is depleted.

Hardware Details

Read More and Download Code...

I would love to make something like this and also convert my old Makita and Dewalt Cordless Drills to use Lithium-ion Polymer (LiPo) Battery Packs! That would save my Drills!:)

Cordless Tools low battery cutoff solutions
From the readers: low battery cutoff solutions - Hack a Day
Pros and cons of replacing tool batteries with Lithium Polymer - Hack a Day
unixbigot/Flat-Mate - GitHub
flatmate.png (PNG Image, 1002x454 pixels) - Scaled (99%)
Pros and cons of replacing tool batteries with Lithium Polymer - Hack a Day

No comments: