Teensy 3.x Feather Adapter - Power switch?

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
DWJames
 
Posts: 2
Joined: Wed Aug 17, 2022 12:09 pm

Teensy 3.x Feather Adapter - Power switch?

Post by DWJames »

Hi, I have a project powered by a Teensy LC. Currently it requires USB power but I want to convert it to also run on a battery. It looks like the Teensy 3.x Feather Adapter provides a nice simple way for me to add a LiPoly battery and charging circuit to my Teensy, but how should I go about introducing a power switch?
Does the Teensy 3.x Feather Adapter include any way to turn the Teensy off whilst the battery still has power? How about having the Teensy powered off whilst charging the battery via the Teensy's USB port, is that possible somehow?
I guess I can just wire an inline switch to the battery cable, but was wondering if something more elegant was possible.
thanks,
James

User avatar
michaelmeissner
 
Posts: 1821
Joined: Wed Aug 29, 2012 12:40 am

Re: Teensy 3.x Feather Adapter - Power switch?

Post by michaelmeissner »

There is no way to do what you want directly with the feather adapter. But there is a way to do it. Note, I haven't done it within the feather adapter context, but with a little bit of soldering it should work. I've thought about it, but I just haven't done it so far.

If you look on the back of the Teensy LC pinout card, on the upper left hand corner, it shows two solder pads with a trace connecting them. If you cut this trace, it will cut the connection between the USB power (VUSB) and the Teensy input power (VIN). You can then add a switch between VUSB and VIN to enable the power from the USB cable.

If you don't connect the VIN pin on the Teensy to the featherwing, but instead solder a wire connecting VUSB on the Teensy to the the featherwing's VIN pin, it should allow you to use the switch to turn off the Teensy, no matter whether it is USB powered or battery powered. If it is USB powered, the featherwing would recharge the battery.

The only thing that I can think of that might be an issue is if you are using the Teensy to power neopixels, it is likely that the neopixels will still be powered when you flip the switch.

A simpler approach might be to just add a switch on the battery red wire to disconnect the battery. You would still be able to recharge the battery if the device is plugged into USB, but there isn't a way to turn off the Teensy when it is powered by USB. With cosplay stuff, I typically want to be able to recharge the battery without taking the battery off of the device, and without the device running the neopixels all night.

If you are not using the featherwing otherwise, there are a couple of other ways to do what you want/

One method is to use the Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy (https://www.adafruit.com/product/2124). Cut the VIN/VUSB trace on the Teensy. Connect VUSB to the 5V pin on the backpack. Connect the ground pin on the backpack to either ground pin on the LC. Connect the battery pin on the backpack to the VIN pin on the Teensy. On the backpack, cut the trace for the power switch, and solder in an on/off switch to give you the on/off capability. Unless you are going to use small batteries (under 1000mA), I would suggest soldering the trace pad on the back of the backpack to charge batteries at 0.5 amps instead of 0.1 amps so that your battery recharges faster.

A second method is to use a battery connector setup designed for the Teensy. If you go over to tindie.com, and look for "STBC08 High-Current LiPo Battery Charger" from a vendor called Pesky Products, that is made for the Teensy LC/3.x/4.x processors. It is soldered on top or underneath the Teensy (you do have to cut the VIN/VUSB trace on the Teensy first). It has a switch on the unit to turn off power to the Teensy, but it would still charge the battery if the USB is connected. I've used this in the past, but I have to be careful because soldering the JST connector to the unit is somewhat fragile and you can have the connector come off if there is too much force (BTDT). I prefer the JST connectors in the featherwing adapter and the backpack because they are much more secure and they won't come off.

A third method is to just get a powerbank and use that to connect to the Teensy. Use the switch on the powerbank to turn it on/off. You would have to recharge the powerbank externally.

While you can connect the Teensy's VIN/ground straight to the battery providing you never connect USB and battery at the same time. But for safety's sake, you likely want some circuitry to prevent the battery/USB from being connected at the same time.

Now, if you had a Teensy 4.0 or 4.1, those Teensys no longer have the DAT pin (A12 on the LC, A14 on the 3.2) to be able to play sounds. Instead that pin acts as an on/off pin, providing you press it for 15 seconds (by default). When you press the pin again, it powers the Teensy back on.

User avatar
DWJames
 
Posts: 2
Joined: Wed Aug 17, 2022 12:09 pm

Re: Teensy 3.x Feather Adapter - Power switch?

Post by DWJames »

wow, thank you Michael for such a comprehensive answer. That's exactly the info I needed.
This is for a portable midi controller which pulls 100ma over the USB, so I'll probably put a 1,200mah battery in.

I don't need Feather compatibility, so an Adafruit LiIon/LiPoly Backpack looks perfect.
thanks for the help,
James

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”