Teensy 4.0 power by LiPoly

rsh50

Member
Hi, I have few question regarding powering teensy 4.0 with LiPoly battery.

1) I have this mini LiPoly charger from adafruit (Charger link) and is it possible to use the 5V, GND and Bat to connect to teensy to power teensy 4.0 and also read the charge state of the battery? The reason i am asking is teensy 4 is hooked to Audio shield and so 5V pin is connected to audio shield. So, should I just solder wires to 5V and GND of teensy (If at all this is possible)?
2) Also I am not very clear about which pin to connect to teensy 4 the Bat option to read the battery state (if this could be done).

So, any help with this would be helpful.
If the adafruit charger is not a power source then can you please guide or help how to power the teensy and also measure the battery state with teensy 4 connected to audio shield. I have attached pictured of my current setup.

Thank You.
 

Attachments

  • F14045C7-7EC2-4F5B-8A49-110136C01EF4_1_201_a.jpeg
    F14045C7-7EC2-4F5B-8A49-110136C01EF4_1_201_a.jpeg
    1.5 MB · Views: 59
I might suggest using <this> product instead. It includes a low battery out (LBO) signal that can be used to detect when the battery needs to be charged. NOTE: the LBO signal is a 5VDC level signal, so you will need some kind of level converter (resistor divider, transistor level converter, or IC level converter) between this signal and the T4.x (which is NOT 5V tolerant). The nice thing about this product is that it not only transforms the 3.x voltage of the LiPo to USB-compatible 5VDC to power the T4.x, but it also can be used to manage/charge the battery as well.

Mark J Culross
KD5RXT
 
I might suggest using <this> product instead. It includes a low battery out (LBO) signal that can be used to detect when the battery needs to be charged. NOTE: the LBO signal is a 5VDC level signal, so you will need some kind of level converter (resistor divider, transistor level converter, or IC level converter) between this signal and the T4.x (which is NOT 5V tolerant). The nice thing about this product is that it not only transforms the 3.x voltage of the LiPo to USB-compatible 5VDC to power the T4.x, but it also can be used to manage/charge the battery as well.

Mark J Culross
KD5RXT
Thanks for suggestion. I see this product is out of stock will try searching from other sites.
So, does this product allow teensy to read the charge state of battery. If so what are the pin connections?
 
Thanks for suggestion. I see this product is out of stock will try searching from other sites.
So, does this product allow teensy to read the charge state of battery. If so what are the pin connections?

kd5rxt-mark said:

I might suggest using <this> product instead. It includes a low battery out (LBO) signal that can be used to detect when the battery needs to be charged. NOTE: the LBO signal is a 5VDC level signal, so you will need some kind of level converter (resistor divider, transistor level converter, or IC level converter) between this signal and the T4.x (which is NOT 5V tolerant).

Mark J Culross
KD5RXT
 
My bad i didn't get that. So the connection from LBO from board to teensy is through some level converter but what pin of teensy 4 reads this as i want to log the results to sd card plugged to teensy 4.
The LBO outlet will be a 0 or 1, not an indication of battery voltage but of the need to charge the battery.
I use one of these for battery charging and 5V supply voltage. Considerably cheaper than the adaFruit device.
 
Last edited:
There are many different ways to set this up.

One thing to note is what speed is the battery charged at. A lot of the lipo chargers are made for smaller batteries, and if you use a large lipo battery, it will take longer to recharge. On the other hand, if you use 1A charging, you need to use a large battery.

Another thing to think of is the power boosted from 3.7-4.2 volts to 5 volts? The Teensy can run at 3.7 volts, but some things like neopixel lights might want 5 volts. However, if you boost the power, you reduce the runtime with the battery.

Given you have a Teensy 4.0, one option is to use the Teensy to feather adapter from Adafruit. This was made for the Teensy 3.2, but the Teensy 4.0 will mostly work with it. I like the JST battery connector on the board, which is solidly attached to the board (on some, the JST connector can come off if you attach/remove the battery). Note, in this board, you don't have change the solder jumper on the Teensy that connects the USB power to the VIN pin. If there is USB power, it will be used to power the Teensy and recharge the battery. If there is no USB power, then the battery will supply the power. It charges the battery at 500mA. The adapter has a voltage divider on the power feeding into A7, so you can do an analog read to get a rough idea of what the battery voltage is, to figure out how much capacity is remaining. A side benefit is you can attach the headers to attach various feather wings that Adafruit sells. If you have a Teensy 4.1, you may need to attach it via female headers to raise the Teensy 4.1 high enough that that the back of the Teensy clears the JST battery plug.

Adafruit also sells two other boards that you can use wires to attach the VIN and ground to the Teensy, and it will provide battery power if there is no USB power. You would have to use wires to adapt these boards to connect to the Teensy. The QT PY BFF board also has a voltage divider you could attach to an analog input pin:

I've used the boards BriComp mentioned and they work. I typically just glue them to the back of each lipo battery. It can be useful not to have to use the Teensy USB connector for powering the battery. You would either need some diodes to prevent the battery from being connected if the Teensy is powered, or you cut the solder jumper in the Teensy, and connect VUSB and ground to the board.

Here is an old post about cutting the solder jumper:

If you need boosting to 5 volts, I like the SEEED Lipo rider plus charger/booster. It can charge up to 2 amps, and it has an on/off switch for controlling the power. You could either use a short USB A to USB micro B cable to power the Teensy, or you could just connect the power output to the Teensy. If you connect the board to the Teensy, you would need diodes in case you also attach a USB connection to the Teensy.

Another way is just to use a USB power bank and connect it to the Teensy via the USB cable. Many power banks are geared towards charging phones, and they will cut off power if the Teensy isn't drawing enough power. One way is to run some neopixel lights every so often to use enough power to prevent shutdown. I did purchase this 'PowerEver' board that claims to prevent power banks from shutting down, but I haven't used it yet:

I tend to dislike the JST connector used with a lot of lipo batteries. There are 2 different sizes, and you have to check whether the power/ground wires are the same on the battery and the JST connector. As I mentioned earlier in the feather adapter, a lot of times the JST connector is not firmly attached to the PCB, and it might come out. I also find it can be hard to remove the JST battery wire from the JST connector on the board. Finally, I've had several times where the wires have come out of the JST connector, and I have to resolder a new connector for the battery.

IIRC, the Audio shield does not actually use the 5v input. It only uses the 3.3v pin.
 
Last edited:
Back
Top