Problems reading LBO from PowerBoost 500 Charger

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rikjoh
 
Posts: 40
Joined: Wed Jun 11, 2014 2:50 am

Problems reading LBO from PowerBoost 500 Charger

Post by rikjoh »

Hello World!

I have a project based on https://learn.adafruit.com/trinket-rgb- ... k/overview
I have use the Chronodot (PRODUCT ID: 255) as the RTC
I also use the PowerBoost 500 Charger (PRODUCT ID: 1944) to power the project together with a
Lithium Ion Polymer Battery - 3.7v 1200mAh (PRODUCT ID: 258)

My problem:
I want to read the "Low Battery" pin on the booster to set my background to red and write "Low Bat" in the display.
I works perfectly as long as I don't connect the pin to the trinket.
As soon as I connect the pin "LB" on the booster to pin 4 on the trinket, the booster signals low battery and the red led lights up.
the moment I remove the jumper, it goes back to normal mode.
This also happen if I run the booster via USB.

Snippet from the https://learn.adafruit.com/adafruit-pow ... er/pinouts

<quote>
LBO - not a leveraged buy out! this is the Low Battery Output. By default it is pulled high to
BAT but when the charger detects a low voltage (under 3.2V) the pin will drop down to 0V.
You can use this to signal when its time to shut down or alert the user that the battery is low.
There is also a red LED connected to this pin.
</quote>

If I try to "hard wire" pin 4:
If I pull pin 4 to Vcc it indicates system ok (Blue background)
If I pull pin 4 to GND it indicates Low battery
If I let the pin float, it indicates Low Battery

I have tried to init the pin 4 on the trinket as both HIGH and LOW.
pinMode(LB, INPUT); // Define LB (pin 4) to Digital input
digitalWrite(LB, HIGH); // with pullup

Same result.

So the question is:
What am I overlooking?

Attached is the code if you want to see what it does, and if I have made any major errors.
Attachments
Trinket_RGB_LCD_Shield_Clock.ino.txt
Source code
(3.35 KiB) Downloaded 151 times

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Problems reading LBO from PowerBoost 500 Charger

Post by adafruit_support_mike »

You're getting caught by the voltage protection diodes on the USB data lines.

Pins 3 and 4 are connected to USB D+ and D-, which have to be 3.3v safe. To make that happen, the 5v Trinket has 3.8v zener diodes connected from pins 3 and 4 to GND.

The PowerBoost's LBO pin has weak pull-up resistors connected to it (both inside the boost chip and externally, biasing a PNP transistor that controls the red LED), so you'll get a small amount of current flowing out of that pin and into anything connected to GND. I just measured the connection and it came to about 200uA.

A zener diode's reverse-breakdown voltage doesn't make a sharp jump from 0v to the rated voltage.. it starts to conduct about 1v below the spec voltage but only allows a small amount of current through. By the time you get to about 5mA, the voltage will be near it's official value.

The 200uA flowing out of the LBO pin only pulls the zener voltage up to about 3v, which is below the boost chip's low-voltage threshold.

I tried moving the LBO connection over to pin 1, but that has the red LED and also pulls below 3v when connected to the pull-ups on the PowerBoost.

You'll probably need extra hardware to carry that signal over to the Trinket.

User avatar
rikjoh
 
Posts: 40
Joined: Wed Jun 11, 2014 2:50 am

Re: Problems reading LBO from PowerBoost 500 Charger

Post by rikjoh »

You happen to have a simple idea on what to use?
A transistor?
(Have forgotten TOO much since school...)

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Problems reading LBO from PowerBoost 500 Charger

Post by adafruit_support_mike »

You'd need a couple:
buffer.jpg
buffer.jpg (16.83 KiB) Viewed 2017 times
You want the EN pin to match the level of the LBO pin, and it's easier to do that in two steps.

The PowerBoost already has a PNP transistor wired to the LBO pin with connections like the ones above. Adding a second copy will work without adding unexpected side effects. The external PNP controls an NPN, which will pull the EN pin low.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”