garthvh / garthvh.github.io

http://garthvh.com
MIT License
1 stars 0 forks source link

Low battery LED lit all the time #1

Open elyngaas opened 9 years ago

elyngaas commented 9 years ago

Hi! Trying to achieve almost exactly what you're doing with reading the LBO state but as soon as I connect "anything" to the pin the Low Battery LED lights up. It measures close to the battery voltage but even touching the pin seems to be enough to pull it down making the LED come on. As far as I can tell from your photos yours is not on and it's connected directly to a GPIO. I can still read the state of it just fine, but it's annoying to have the LED on when the battery isn't actually low. After extensive searching I've not been able to find any solution to this, only others who've experienced the same thing. Have even tried changing the Pi DeviceTree config with no luck. Any tips or info would be greatly appreciated!

Cheers, Espen

garthvh commented 9 years ago

Mine comes on while the pi is booting and then turns off once the pi has booted. I read the adafruit forum posts before I put it together because that is all the info I could find on the LBO pin, I think some people were adding a 2k resistor between the switch and bat pin for arduinos. Mine never lite up without the battery being low so I guess I got lucky. How big is your battery? Are you using a B+ pi?

elyngaas commented 9 years ago

I'm using a Pi 2 B, the battery is a single Samsung ICR18650-26A (2600mAh) cell. I finally figured out one solution although it might not be electronically sane, my spare transistor selection was somewhat limited. I guess it would work with most NPN transistors and with 5V if adjusting the resistors values. Increased the resistor value coming from LBO until the LED was no longer lit for normal battery. Voltage at GPIO is 0.13V for normal battery and 3.03V when battery low and LBO LED is lit. Leaving the schematics here, hopefully saving someone some headache :) lbo-to-gpio