Teensy 3.0 + Battery supply + USB recharge

Status
Not open for further replies.

tmp

New member
hi!

i want to use the teensy board to control 12 led's.
for the led's i need 5V so i have to use 4 AA batteries (1.2V) to power them.

the teensy itself should be powered by the 4 batteries too. what do i have to do? i can only find some notes about teensy2 + batteries here: http://www.pjrc.com/teensy/external_power.html

what i also want to achieve: when the teensy is plugged in via USB i want to recharge the 4 batteries. how can i do that?

thanks in advance!
 
Hi Tmp

Battery circuit design is an art in and off itself and is a closed book to me, but a couple of thoughts:

Teensy 3 is a 3.3V board so quite possible your 5V supplied LEDs will glow faintly with output set to high (3.3v). You could play games toggling input/output modes to control the LEDs instead but you still have 5V being applied via LEDs to a 3.3V micro controller. They are robust but that's on the 'be thankful when you get away with it' list of ways to abuse electronics. Changing your LED layout to run off 3.3V would be the right choice in a design environment, but if your LED type is fixed and it's working for you then carry on.

The dodgy way to wire up the charge circuit is to put your batteries on the vin pin. This is where the USB 5V normally comes out, and in the absence of USB you can feed 5V in to supply the onboard regulator. Bad things:
a. You are not controlling current to the batteries at all, so you will be hammering your USB socket power supply and reducing battery life. A dumb high capacity charger will quite happily heat them to the point they catch fire. This would be unlikely with AA but still a possibility. Again, for a circuit that you will watch charge up might get away with it enough times for what you need.
b. You will not be fully charging your batteries, since they will charge to something less than your USB input voltage.
c. If you separately charge your batteries (or put 1.6v alkalines in it) they will be higher than 5V and try to feed power back to your USB host. Can vouch that PC's do not like this! Thankfully good PC design includes protective devices (in my case cycling power reset everything).
d. Similarly fresh batteries or non 1.2V chemistry will push your input past 6V and exceed the Teensy's onboard regulator spec, again on the 'might work sometimes' list, depending on actual current draw.

Options for making this work better are:
Change your layout to be all 3.3v and us a LiPo battery and appropriate charger. http://www.adafruit.com/index.php?main_page=adasearch&q=lipo . These manage charge current and avoid excessive discharge as well. Depending on your choices you can then charge and supply power through the Vin pin or complicate things if it provides a 3.3V out by supplying that direct to the 3.3V teensy pin to bypass the onboard reg.

Use a 5V boost reg like the minty boost to produce 5V from 2 or 3 batteries to your existing circuit. Not very efficient (3v to 5V to 3.3v) but will give you a fixed 5V if that's what your LEDs need. Doesn't give you a simple charge solution though and need to keep it out of circuit when connected to USB (or use ORing diodes).

For an off the shelf solution buy a mobile phone USB booster battery pack http://www.kogan.com/au/buy/universal-11000mah-power-bank/ (not recommending this source but it was in my inbox this morning).

In all of the above be aware that this is not going to be a particularly efficient way to battery power LEDs. If the plan is to squeeze the maximum life out of each charge and you will be making multiples of them then you will need to dig into sleep modes and achieving very low standby consumption from your supporting hardware and that's a whole other topic. If this is for Halloween than go for it, since buying a spare set of AAs will almost certainly be cheaper than the time taken to tweak a one off circuit.

David
 
Status
Not open for further replies.
Back
Top