Teensy 4.0 & battery

frohr

Well-known member
Hi all,
I have Teensy 4.0 and LiPol battery 5000mAh, 3,7V and battery charger TP4056. I want use only Teensy USB connector to programm and charge battery.
How to do it in correct way?
Options:
Operation on battery = battery connected to 3V3 and GND?
Operation on USB cable and charging battery = USB cable from PC to Teensy and then 5V and GND to battery charger?
Is it OK or I am wrong?
Thank you.
Michal
 
No, you don't want to connect the battery to 3.3v, since the usual lipo battery produces 3.7-4.2 volts, and putting anything over 3.3v on the 3.3v line will probably damage the Teensy.

I haven't dealt with the TP4056 charger, but in general there are two different ways to set things up:

1) Cut the trace between VUSB and VIN on the Teensy. This means that the USB cable does not power the Teensy. Then set up the charger so that the VUSB pin is connected to the power input for the charger. The output from the battery would then be connected to VIN on the Teensy. Connect ground between the Teensy and charger. Look at the back of the card that came with the Teensy 4.0 to see where the trace is (or see https://www.pjrc.com/teensy/pinout.html).

2) Do not cut the trace. Connect VUSB to the charger power. Connect the charger battery output to the Teensy with a diode blocking the power coming from the battery if VUSB has power.

Typically if you use #1, the Teensy will run on the voltage that your charger produces (typically 3.7-4.2 volts) when you connect the USB cable. If you use #2, you run on 5v if the USB cable is connected.

I've typically used the following products to add charging:

I've thought about using the Adafruit trinket backpack (https://www.adafruit.com/product/2124), but I don't recall actually using it.

I've also thought of providing a 2 way switch. One switch connects VUSB to VIN. The other connects the battery output to VIN with VUSB connected to charge the battery.
 
Hi all,
I have Teensy 4.0 and LiPol battery 5000mAh, 3,7V and battery charger TP4056. I want use only Teensy USB connector to programm and charge battery.
How to do it in correct way?
Options:
Operation on battery = battery connected to 3V3 and GND?
Operation on USB cable and charging battery = USB cable from PC to Teensy and then 5V and GND to battery charger?
Is it OK or I am wrong?
Thank you.
Michal

Michal (frohr):

<This> link & <this> associated link & <this> associated link may have information useful in your situation. If you have any questions on the specific approach that successfully I used, please feel free to ask.

Mark J Culross
KD5RXT
 
Hi, this is ok or nonsense? Thanks.

wiring.JPG
 
@Michal (frohr):

I don't think shorting input & output on your TP4056 module would be a good idea. I would suggest connecting your cable to the input of the TP4056 module, connecting the output of the TP4056 module to the power & ground on the Teensy (as you show), & splitting your cable to allow routing the D+ & D- from the cable to the Teensy. This suggested setup would allow 1) running the Teensy from battery (with the cable *not* plugged in), 2) charging the battery & running the Teensy from battery/cable (with cable plugged into the TP4056 module), & 3) programming the Teensy (with the cable plugged into the TP4056 module).

Good luck & have fun !!

Mark J Culross
KD5RXT
 
@Michal (frohr):

I don't think shorting input & output on your TP4056 module would be a good idea. I would suggest connecting your cable to the input of the TP4056 module, connecting the output of the TP4056 module to the power & ground on the Teensy (as you show), & splitting your cable to allow routing the D+ & D- from the cable to the Teensy. This suggested setup would allow 1) running the Teensy from battery (with the cable *not* plugged in), 2) charging the battery & running the Teensy from battery/cable (with cable plugged into the TP4056 module), & 3) programming the Teensy (with the cable plugged into the TP4056 module).

Good luck & have fun !!

Mark J Culross
KD5RXT

I think this wiring will work - but Teensy will be powered only by battery, right?
Thanks for your help!

battery.JPG
 
@frohr
what is the purpose of the VUSB connection? it only goes to usb.

VUSB is power for TP4056 and there is cutted the trace between VUSB and VIN. So if I connect USB to Teensy, I will power only battery charger TP4056 (VUSB and GND). And Battery powers Teensy (GND and VIN).
Or am I wrong?
 
VUSB is power for TP4056 and there is cutted the trace between VUSB and VIN. So if I connect USB to Teensy, I will power only battery charger TP4056 (VUSB and GND). And Battery powers Teensy (GND and VIN).
Or am I wrong?

you're right, your wires should work
I use a MCP73831 to charge my portable teensy device, made with LC, connection is similar with your picture above,

However you can test the connections separately to make sure that works well :)
 
Back
Top