Battery and charger add on for 3.2

Status
Not open for further replies.

Peter2708

Member
Hi,

I'm working on a project involving a teensy 3.2, the prop shield and an audio speaker. Can anyone suggest a battery and charging solution for this? The project should end up in a hand held, stand alone device that is capable of making a reasonable amount of racket for hours at a time.

Thanks
 
Onehorse has designed two Teensy specific chargers. The new one (STBC08 based) can charge the batteries at 300mA, 500mA, or 800mA (i.e. you want to use batteries at least 500mAh or larger). The original one (MAX1555 based) only charges batteries at 100mA, and is better for smaller batteries. The original charger uses pin 0 to indicate whether the battery is being charged (which means you can't use Serial1 without using the alternate RX pin at pin 21/A7). The STBC08 charger does not use pin0. Both chargers have an on/off switch, which gives the Teensy a badly needed on/off switch.


To use these with the prop shield, you have to decide whether to mount the prop shield underneath the Teensy and the charger on top of the Teensy (which is what I typically do), or mount the prop shield on top, and the charger underneath. The LEDs on the chargers are meant for mounting it underneath the Teensy and assume that you don't have anything under the final assembly, but you can typically see the LEDs when they are mounted on top.

Note, the prop shield does not have a hole for the VUSB pin that the charger needs.

<edit>
The lipo backpack charger that Hersoft mentions above also works well. You do need to run wires from VUSB, ground, and 3.3v to the charger.

In using either the Onehorse or the Adafruit backpack chargers, you need to cut the VIN/VUSB trace underneath the Teensy, so that the USB power connection (VUSB) is isolated from the Teensy external power connection (VIN). See this early post:

Another alternative is the Adafruit feather adapter, which provides its own charger. Note, you would need to mount the Prop shield above the Teensy, using tall headers, so the prop shield can clear the lipo battery port at the back. Or you need to mount the prop shield underneath the feather adapter. If you want to use the feather wings, you would probably need to mount the prop shield underneath the Teensy. You do not need to cut the VUSB/VIN trace for the feather adapter (there is a diode, so that if there is external USB power, it charges the battery, but blocks power from the battery). However, there is no provision for an on/off switch.
 
Last edited:
While charging the battery is the teensy also receiving power and therefore powered on?

It does with the onehorse unit - and I suspect the other also maintains the needed power to the Teensy while charging. This can increase charge time.
 
Oddly, I'd like the teensy to do nothing while the battery is charging. Is there a way to detect when it is charging? Like hooking it up to one of the pins and checking for voltage high?
 
As indicated the onehorse unit provides feedback on charge state. You could use that and do WFI or use the SNOOZE library to go into a low power mode during charging. Not sure if the Adafruit and other units provide similar charge feedback to a pin - if so the same would apply. It won't put the Teensy at ZERO power - but would allow it to reduce power and slow or stop processing.
 
ok cool, I don't need it to go off entirely, just need it to know that it's charging so it stops making lights and noise and things
 
Glad I found this post! Was using the Adafruit but really wanted something that would mount to the Teensy. So if I am reading this correctly (I could tell from the Tindie page) the STBC08 does not have a monitor pin for battery charging?
 
Glad I found this post! Was using the Adafruit but really wanted something that would mount to the Teensy. So if I am reading this correctly (I could tell from the Tindie page) the STBC08 does not have a monitor pin for battery charging?

That is correct. The STBC08 does not have a charging monitor, but it charges batteries at 300mA, 500mA (default) or 800mA.

The MAX1555 does use pin 0 as a charging monitor, but only charges batteries at 100mA.
 
Hello Michael
Could you please post some picture of the current way you have connected STBC08 to Teensy? I already bough STBC08 and want to see how it looks like before connecting to teensy
 
If im going to connect STBC08 with Teensy 3.2,
1.Cut Vin and VUSB trace
2.Solder VIN, GND and VUSB pins of the STBC08 with Teensy 3.2.
Am i correct ???(Not sure whether VUSB pin of Teensy and STBC08 needed to connect)
 
Hello Michael
Could you please post some picture of the current way you have connected STBC08 to Teensy? I already bough STBC08 and want to see how it looks like before connecting to teensy
There are two schools of thought of how to connect it to the Teensy.

Onehorse, who created the charger tends to prefer to mount it underneath the Teensy.

I tend to have my Teensy's attached to protoboards, and I tend to mount it on top of the Teensy. Sometimes I have it soldered on, sometimes I have male pins sticking up, and use a charger with small female headers to mount the charger. With the old charger, I tended not to connect pin 0, so that I could use Serial1 (though I rarely use Serial1 in practice, but I try not rule out using it). Generally, I setup my Teensys with male header pins underneath, and I plug it into a protoboard with female headers.

Here is a picture of the Teensy 3.2 with prop shield setup for uncanny eyes. The back of the Teensy is a small protoboard that has 2 sets of 8 columns of 3 rows of interconnected pins (48 pins), that I use to bring out A10 and A11 for use with potentiometers, and button 3. I wanted to keep the height down, so I moved the JST connector to the protoboard:
2017-11-12-13-00-014-uncanyeyes.jpg


I've also mounted it underneath the Teensy, typically when I have Frank B's little PCB that brings out the 10 pins underneath the Teensy in the back, and I put the Onehorse charger up front, putting the JST elsewhere, so I can stack the Teensy in headers.

If im going to connect STBC08 with Teensy 3.2,
1.Cut Vin and VUSB trace
2.Solder VIN, GND and VUSB pins of the STBC08 with Teensy 3.2.
Am i correct ???(Not sure whether VUSB pin of Teensy and STBC08 needed to connect)

You have to connect the VUSB pin of the Teensy to the charger. The charger takes the 5 volts from VUSB and uses it to charge the battery.
 
Thanks alot for the information.
One more thing when teensy is connected to usb, LiPo will charge right? So at the same time can i program teensy??? When programming teensy nothing going to affect right? (either charging or programming)
Or else when i need to program do i need to turn of LiPo charger ?
 
Thanks alot for the information.
One more thing when teensy is connected to usb, LiPo will charge right? So at the same time can i program teensy??? When programming teensy nothing going to affect right? (either charging or programming)
Or else when i need to program do i need to turn of LiPo charger ?

Note, I am not the designer of the charger, nor I do know the details of the STBC08 chip, just a user of onehorse's charger. You can leave the lipo battery connected while reprogramming the Teensy. I often do this.

However, if you need more details, you need to contact onehorse. He hasn't posted on this forum in two months. You could send him a private message via this forum, and hope that he is still monitoring the forum. Or you can contact him through his tindie.com store.
 
Just for posterity, Adafruit's Teensy Feather adapter has a LiPo charger on it:
Teensy 3.x Feather Adapter

Yes. I wish the enable pin (not used for Teensy) could be used as an on/off switch for the lipo battery. On the feather shield, you do not have to cut the VIN/VUSB trace. I believe if you have the USB cable connected, it will use power from the USB cable, and it will only use the battery if there is not USB power.
 
FWIW, I measured the voltages with my STBC08 (made by Onehorse) with a Teensy 3.2 running the uncanny eyes program (display on some TFT screens, the Teensy is writing to 2 screens as fast as possible, but I only have one screen connected). I'm measuring the voltage on the VIN line:

  • Voltage from USB source (from a A/C powered USB 3.0 hub plugged into a computer): 5v - 4.9v;
  • Voltage measured on VIN with battery plugged in and USB power: 4v;
  • Voltage measured on VIN with battery removed, and USB power: 4.1v;
  • Voltage measured on VIN with battery (mostly charged), no USB power: 3.8v;

So, the STBC08 drops the input USB voltage down to 4-ish volts. Presumably this is because the VUSB voltage always goes through the STBC08 and/or has a diode in it.

I also uploaded the program to another Teensy with the Adafruit Feather adapter (which includes a lipo battery charger):

  • Voltage from USB source: 5v - 4.9v;
  • Voltage measured on VIN with battery plugged in and USB power: 4.4v;
  • Voltage measured on VIN with battery removed, and USB power: 4.9v;
  • Voltage measured on VIN with battery (mostly charged), no USB power: 3.6v;

The Adafruit Feather adapter does make the Teensy somewhat bigger, and it doesn't have an on/off switch on the board. I find the JST connector on the Feather adapter to be easier to remove the battery cable because the JST connector is more firmly attached than a JST connector attached to the Onehorse adapter or on a prototype board, where the JST connector is connected only by 2 pins soldered in. The Adafruit feather adapter is cheaper than the Onehorse adapter before shipping (but the Adafruit shipping is higher, so it is not much of a difference if you are only ordering one thing).
 
Last edited:
When i connect my LiPo battery to charger and when i plugged to USB Yellow and Red both lights up. Cant figure out the issue

20171116_010329.jpg
 
Status
Not open for further replies.
Back
Top