Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 10 of 10

Thread: Teensy 3.2: powered by battery. How to?

  1. #1
    Junior Member
    Join Date
    Jan 2016
    Posts
    17

    Teensy 3.2: powered by battery. How to?

    Hi,
    I need to power my Teensy 3.2 with a battery, but i don't know what kind of battery use, and how to connect it to Teensy? Anyone can help me?

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    4,100

    Cool

    It sort of depends on how much power you need (how long you need to run and how much power is needed at any particular point in time), what kind of form factor you want to use, whether you want the battery to be rechargeable (either in place, or by removing the battery, etc.).

    The simplest approach is to use a cell phone charger battery that can deliver 5v via the USB cable. If you aren't going to power a lot of LEDs or motors, these batteries often can deliver 500mA of power.

    Alternatively, you can use a lithium poly battery, and just connect it to ground and VIN. The li-po battery delivers 4.2-3.7v, which the Teensy will work with. If you are doing some LEDs (ws2812b/neopixels or apa102/dotstars), the 3.7v is within the lower bounds of the power needed. If you don't do any modifications to the Teensy, you have to make sure you don't connect the battery and the USB at the same time. You can cut the trace between VUSB and VIN (https://forum.pjrc.com/threads/19228...4024#post44024) which means the Teensy has to be powered by external power. FWIW, I've run for about 24 hours from a 1200mA li-po battery, with the processor and 16 LEDs (note, power level of the LEDs was tuned down). The 1200mA battery I used (https://www.adafruit.com/products/258) is roughly Teensy sized.

    Onehorse has a board you can solder underneath the Teensy (https://www.tindie.com/products/oneh...ttery-charger/) that allows you to charge the li-po battery from USB, and if USB is not connected, it runs off of the battery (you will need to cut the VUSB/VIN trace and solder the board to the Teensy). If you don't get something like Onehorse's board, you will need to get some method of charging the li-po battery.

    If you have rechargeable AA or AAA batteries lying around, you can wire up a 3 pack of AA batteries to VIN/ground. A 3 pack of batteries would deliver 5.1-3.6v.

    If your batteries are variable in voltage, or you want to use different batteries at different times, you can get a buck/boost converter that will boost 3-5v up to 5v or reduct 5-12v to 5v (https://www.adafruit.com/products/2190). Note, this particular converter is better at reducing voltage than boosting it.
    Last edited by MichaelMeissner; 04-27-2016 at 05:21 PM.

  3. #3
    Junior Member
    Join Date
    Jan 2016
    Posts
    17
    Quote Originally Posted by MichaelMeissner View Post
    It sort of depends on how much power you need (how long you need to run and how much power is needed at any particular point in time), what kind of form factor you want to use, whether you want the battery to be rechargeable (either in place, or by removing the battery, etc.).

    The simplest approach is to use a cell phone charger battery that can deliver 5v via the USB cable. If you aren't going to power a lot of LEDs or motors, these batteries often can deliver 500mA of power.

    Alternatively, you can use a lithium poly battery, and just connect it to ground and VIN. The li-po battery delivers 4.2-3.7v, which the Teensy will work with. If you are doing some LEDs (ws2812b/neopixels or apa102/dotstars), the 3.7v is within the lower bounds of the power needed. If you don't do any modifications to the Teensy, you have to make sure you don't connect the battery and the USB at the same time. You can cut the trace between VUSB and VIN (https://forum.pjrc.com/threads/19228...4024#post44024) which means the Teensy has to be powered by external power. FWIW, I've run for about 24 hours from a 1200mA li-po battery, with the processor and 16 LEDs (note, power level of the LEDs was tuned down). The 1200mA battery I used (https://www.adafruit.com/products/258) is roughly Teensy sized.

    Onehorse has a board you can solder underneath the Teensy (https://www.tindie.com/products/oneh...ttery-charger/) that allows you to charge the li-po battery from USB, and if USB is not connected, it runs off of the battery (you will need to cut the VUSB/VIN trace and solder the board to the Teensy). If you don't get something like Onehorse's board, you will need to get some method of charging the li-po battery.

    If you have rechargeable AA or AAA batteries lying around, you can wire up a 3 pack of AA batteries to VIN/ground. A 3 pack of batteries would deliver 5.1-3.6v.

    If your batteries are variable in voltage, or you want to use different batteries at different times, you can get a buck/boost converter that will boost 3-5v up to 5v or reduct 5-12v to 5v (https://www.adafruit.com/products/2190). Note, this particular converter is better at reducing voltage than boosting it.
    Thank you very much for your answer Michael!!!

  4. #4
    Junior Member
    Join Date
    Mar 2018
    Posts
    16
    Quote Originally Posted by MichaelMeissner View Post
    It sort of depends on how much power you need (how long you need to run and how much power is needed at any particular point in time), what kind of form factor you want to use, whether you want the battery to be rechargeable (either in place, or by removing the battery, etc.).

    The simplest approach is to use a cell phone charger battery that can deliver 5v via the USB cable. If you aren't going to power a lot of LEDs or motors, these batteries often can deliver 500mA of power.

    Alternatively, you can use a lithium poly battery, and just connect it to ground and VIN. The li-po battery delivers 4.2-3.7v, which the Teensy will work with. If you are doing some LEDs (ws2812b/neopixels or apa102/dotstars), the 3.7v is within the lower bounds of the power needed. If you don't do any modifications to the Teensy, you have to make sure you don't connect the battery and the USB at the same time. You can cut the trace between VUSB and VIN (https://forum.pjrc.com/threads/19228...4024#post44024) which means the Teensy has to be powered by external power. FWIW, I've run for about 24 hours from a 1200mA li-po battery, with the processor and 16 LEDs (note, power level of the LEDs was tuned down). The 1200mA battery I used (https://www.adafruit.com/products/258) is roughly Teensy sized.

    Onehorse has a board you can solder underneath the Teensy (https://www.tindie.com/products/oneh...ttery-charger/) that allows you to charge the li-po battery from USB, and if USB is not connected, it runs off of the battery (you will need to cut the VUSB/VIN trace and solder the board to the Teensy). If you don't get something like Onehorse's board, you will need to get some method of charging the li-po battery.

    If you have rechargeable AA or AAA batteries lying around, you can wire up a 3 pack of AA batteries to VIN/ground. A 3 pack of batteries would deliver 5.1-3.6v.

    If your batteries are variable in voltage, or you want to use different batteries at different times, you can get a buck/boost converter that will boost 3-5v up to 5v or reduct 5-12v to 5v (https://www.adafruit.com/products/2190). Note, this particular converter is better at reducing voltage than boosting it.
    I am researching this same topic. I'm working with a Teensy 3.2 and using a bunch of touch sensors as a midi controller driving Ableton. I'm having a crazy grounding issue. The sensors only work when I disconnect the laptop power supply. But the laptop body triggers sound too. Also it goes on a wild triggering spree when I plug into the audio out jack on the laptop (macbook pro).
    I'm wondering if using external battery power would help. I only have this problem when I use sensors that have a long lead. It doesn't happen when I have just short wires attached to the touchPins. In this case do I need to cut the trace between VUSB and VIN?
    Thanks in advance for any thoughts on this issue.
    Terry

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,274
    This won't help with a solution - but cutting VUSB<>VIN won't disconnect the common ground to the laptop so the behavior likely to persist as the laptop will be attached.

    I was doing a matrix display externally powered and when PC connected to program a large amount of current ( near an AMP ) was measured taking the PC cable ground path.

  6. #6
    Junior Member
    Join Date
    Mar 2018
    Posts
    16
    Do you always need to cut the VUSB<>VIN when using an external battery or only when tethered to a computer? Why is this?

  7. #7
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,274
    Anytime two power sources hit a common point something can happen with one pushing harder than the other - the battery will get incoming current or the battery will try to push back on the USB - either one could be bad. So best to not connect both at once unless VIN<>VUSB is cut.

  8. #8
    Senior Member
    Join Date
    Feb 2017
    Posts
    423
    I've used this Boost Converter successfully to run my Teensy POV Project off a LiPo battery. It may be a little over kill, but the converter gives a nice strong +5V for the APA102 LEDs and it can recharge the LiPo with a USB cable.

  9. #9
    Junior Member
    Join Date
    Mar 2018
    Posts
    16
    Quote Originally Posted by gfvalvo View Post
    I've used this Boost Converter successfully to run my Teensy POV Project off a LiPo battery. It may be a little over kill, but the converter gives a nice strong +5V for the APA102 LEDs and it can recharge the LiPo with a USB cable.
    Hmmm, I'm not sure if this will solve my grounding problem. I'll be honest, the specs are a bit over my limited electronics knowledge. Thanks for the input however. I'll try to investigate it further.

  10. #10
    Senior Member
    Join Date
    Feb 2017
    Posts
    423
    Quote Originally Posted by saxdame View Post
    Hmmm, I'm not sure if this will solve my grounding problem.
    Perhaps not. I was answering the question in the title of this thread: "Teensy 3.2: powered by battery. How to?"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •