I know there's a dedicated backpack built for this (Product ID: 5397), but it's out of stock shortly after more are made, so I'm looking for alternatives.
I have the QT Py - SAMD21 (Product ID: 4600) that I need to run off a battery for a model kit. I chose this because it will both run the lights and it can do sound effects without an external board added. I want one or two sounds to play from buttons.
At the same time, I got one of the LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy (Product ID: 2124). I'm hoping that the output of this board is compatible. It won't be the neat little flush mount, but I'm fine with that. I also need the option of an external power switch as the boards will be inside the model housing.
Has anyone else tried this before? the part that makes me pause is that the QT Py has one 5v pin for both input and output. It seems unsafe to have that one pin both charging the battery and taking power from it. The QT Py backpack is made for this, but the trinket one has two pins. Does it just need a diode to prevent charge from going up the battery out pin? What about another diode going the other way on the other pin?
Is there another way to rig this to work? I couldn't find a circuit diagram of the QT Py backpack to see if I could figure out a method that way.
Powering the QT Py
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15662
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Powering the QT Py
You seem to be right on all counts. A diode from the Vbat output of the backpack to the 5v pin of the QtPy (as well as the 5v pin powering the backpack for charging). If there was a schematic available for the BFF (I'm surprised there isn't) it would be easier to figure out. Other than that output diode the two boards should be pretty much identical. But there is, as you point out, the issue of the battery powering the charger due to input & output being the same connection.
Dave
Dave
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Powering the QT Py
guide will be up soon but there's a big diode on the BFF to protect the battery so that 5V can be used for both input and output. its worked pretty well in our testing!
- DanKramer
- Posts: 10
- Joined: Sat Feb 04, 2017 12:13 am
Re: Powering the QT Py
Thanks folks! That gives me the confidence that I can start breadboarding this without worrying about blowing out my boards. They're not expensive, but I still don't want to waste them.
- lambtor
- Posts: 21
- Joined: Tue Apr 10, 2018 10:09 am
Re: Powering the QT Py
looking forward to the bff documentation, so i can figure out what pins are unavailable as gpio when one is connected.
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Powering the QT Py
just A2 (but you can cut the jumper for battery monitoring)
- armatronix
- Posts: 6
- Joined: Mon Mar 12, 2012 9:29 pm
Re: Powering the QT Py
Hi, should I be able to monitor battery level using A2, as well as determine the plugged in/not plugged in state of the USB-C? Or do I need to use a fuel gauge to do that?
Thx
Thx
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Powering the QT Py
yep! if its over 4V its probably on USB power
- armatronix
- Posts: 6
- Joined: Mon Mar 12, 2012 9:29 pm
Re: Powering the QT Py
Ah ok thank you, I got it - the voltage divider on A2 devides the battery voltage in half, so that it can then be compared to 3.3V.
so, for posterity:
battV = 2 * 3.3 * analogRead(A2) / 4095.;
so, for posterity:
battV = 2 * 3.3 * analogRead(A2) / 4095.;
- armatronix
- Posts: 6
- Joined: Mon Mar 12, 2012 9:29 pm
Re: Powering the QT Py
* I noted that as the battery falls lower than ~3.4V as measured by a meter, the analog reference voltage presumably starts to decrease, and the reading above never goes below 3.33V until battery approaches 3.0V and either its protection circuitry shuts the battery off, or the circuit browns out.
So there's some portion of the lower end of the battery's usable voltage range that can't be measured directly using the above.
So there's some portion of the lower end of the battery's usable voltage range that can't be measured directly using the above.
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Powering the QT Py
yep its very rough - a fuel gauge will be able to measure more and better
https://www.adafruit.com/product/4712
but is bigger!
https://www.adafruit.com/product/4712
but is bigger!
- armatronix
- Posts: 6
- Joined: Mon Mar 12, 2012 9:29 pm
Re: Powering the QT Py
Yes the reading seems to float around a lot, I had to average many many samples to get a steady value.
The Fuel Gauge also gives the advantage of seeing the battery level as it's charging, although the indicator LED on the BFF turns off when it's done charging so I think this isn't a bad solution. I'll call anything under 3.4V "reserve" battery.
The Fuel Gauge also gives the advantage of seeing the battery level as it's charging, although the indicator LED on the BFF turns off when it's done charging so I think this isn't a bad solution. I'll call anything under 3.4V "reserve" battery.
Please be positive and constructive with your questions and comments.