How can I detect Powerboost 1000C micro usb connection?

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Poi123
 
Posts: 7
Joined: Fri Nov 12, 2021 9:22 pm

How can I detect Powerboost 1000C micro usb connection?

Post by Poi123 »

I got a powerboost 1000C and it's working fine. I would like to be able to send some sort of signal to a pi zero when the board is charging, so I can show some visual feedback on the display the pi is connected to.

As I understand it, the USB pin on the board has 5V when a power source is connected to the micro USB and has 0V when nothing is connected, the documentation says you can use that pin to draw power from, but surely it can also be used as just a signal, right?

I am not sure what should I do to connect the pin to the pi though, should I just connect it directly to one of the GPIO pins and then check for whether it's high or low? Would I need to ground such a connection?

Or maybe there is a different way of doing what I want?

Any help is appreciated, thanks!

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: How can I detect Powerboost 1000C micro usb connection?

Post by mikeysklar »

Using the USB pin seems like the best solution to monitor for a USB connection. It looks like the VS pin could also be used and will have battery voltage.

The only issue I see with your proposed setup is that your Pi is 3v3 and the output from the USB pin will be up to 5v2. You’ll need to add a resistor or logic level converter to drop the voltage to a level the Pi can handle without blowing out your GPIO.

Include GND connect between the boards as well.

User avatar
Poi123
 
Posts: 7
Joined: Fri Nov 12, 2021 9:22 pm

Re: How can I detect Powerboost 1000C micro usb connection?

Post by Poi123 »

This worked out just fine using the USB pin on the powerboost.

I ended un using a 470 ohm resistor to lower the voltage and was good to go.

Now my pi knows when it is connected to the wall and when it is running on battery!

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: How can I detect Powerboost 1000C micro usb connection?

Post by mikeysklar »

Thanks for the followup. Glad to hear your Powerboost 1000C can now report when it has a valid USB power connection.

User avatar
Poi123
 
Posts: 7
Joined: Fri Nov 12, 2021 9:22 pm

Re: How can I detect Powerboost 1000C micro usb connection?

Post by Poi123 »

For anyone that might see this in the future. I realised that the single 470 ohm resistor wasn't really doing anything to reduce the voltage, the circuit seemed to work and there was no visible damage to my pi zero, but to be on the safe side I wired up a simple voltage divider following this video's instructions. I just used two 10K ohm resistors to divide the voltage to a cool 2.5V.

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

Return to “General Project help”