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

Thread: Portable Power Supply

  1. #1
    Senior Member
    Join Date
    Feb 2013
    Posts
    118

    Portable Power Supply

    I am wondering if anybody has experience with using a portable powerpack to power the teensy 3. I recently purchased a Portable powerpack made by Verbatim, it works to turn the teensy on, however after about 10 minutes it stops sending power. I am not sure why it does this, maybe it is looking for some sort of signal from a device like a cell phone, that indicates it is actually charging. So, if anybody has another device that they have used in the past and works that would be great. I need something people can wear while walking around, so can't be too bulky, and only needs to last 8-10 hours at most. Thought this would be any easy solution since already has a usb port and not bulky. Thanks for your time and any suggestions are appreciated.

  2. #2
    Senior Member MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussets
    Posts
    695
    You should have gotten a lot longer on the Verbatim. Maybe you got a dud, or maybe it wasn't fully charged up. What is the rating on the pack?

    I've used an EVO Powerbank 5000 maH with 1 amp max power USB charger on both the Arduino Uno and the Teensy 3.0. I haven't done an endurance test with the Teensy, but I did get several days with the Uno running the blink program. On the Teensy, I did run the Teensy with 2 neopixel rings for several hours and the rings are faily power hungry. However, it is a little larger than my 430 pin breadboard, or a 6 AA battery pack, so it isn't ultra small. http://www.amazon.com/EZOPower-Unive...opower+5000maH.

    I recently got some 5v step-up converters to use with 2 AA battery pack, but I haven't done much testing with it. http://www.ebay.com/itm/DC-DC-5V-1-5...item3f116ad0e8
    Last edited by MichaelMeissner; 11-05-2013 at 04:03 AM.

  3. #3
    Senior Member
    Join Date
    Feb 2013
    Posts
    118
    It is 2200maH, so lots of juice. It just turns off on its own. This pack has a button to turn it on, so maybe it is looking for something to indicate a device is charging. However, if the teensy is plugged in, it should be drawing power. I just assumed any pack would work. Guess I can try to buy another one and see if I get different results. If I need to bypass the usb plug and power it directly, do I need to cut those pads, or can I just make sure to not plug it in while having external power? Thanks for your help.

  4. #4
    Senior Member MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussets
    Posts
    695
    That reminds of a similar issue I saw over on the Adafruit forums. Adafruit sells a product called Power Bank, and one of the users noticed it wasn't giving any power for his Trinket (Adafruit ATtiny85) in a minimal configuration, but it lasted all Halloween evening with power to spare if he was running all of the lights. So maybe the Teensy 3.0 is too efficient for your battery. Here is the thread for reference: http://forums.adafruit.com/viewtopic...erbank#p227527.

  5. #5
    Senior Member Jp3141's Avatar
    Join Date
    Nov 2012
    Posts
    326
    These USB power packs use a DC/DC converter to generate the 5 V USB from the ~ 4 V Li-Ion inside. However the DC/DC 'wastes' some power, even if there is no load, so the packs detect if there is no (significant) load and turn off the whole thing.

    If your Teensy isn't consuming enough current to retrigger it, it will turn off. You could use a meter and try different resistive loads (be careful with the power in the resistors) to determine its threshold...

    I haven't investigated in detail, so I don't know what threshold current they use (perhaps 10-100 mA ?) -- and it's time-consuming to experiment and discover. Perhaps you could have a Teensy drive a transistor every 5 mins which generates a 100 mA load for 10 ms to reset the pack's circuits ?

  6. #6
    Senior Member
    Join Date
    Feb 2013
    Posts
    118
    Thanks for all the info, I am going to assume I am not drawing enough current. Sorry for the noob question, but how would I set it up to draw 100mA for a short period, or at least tell me what to google so I can learn how to do it for my self. I have already made the circuit board for my device, so would have to jimmy rig something up for a quick fix. Thanks again.
    Last edited by turtle9er; 11-05-2013 at 02:25 PM.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    4,997
    Quote Originally Posted by Jp3141 View Post
    I haven't investigated in detail, so I don't know what threshold current they use (perhaps 10-100 mA ?) -- and it's time-consuming to experiment and discover. Perhaps you could have a Teensy drive a transistor every 5 mins which generates a 100 mA load for 10 ms to reset the pack's circuits ?
    That's a great idea!

    I have one of those battery packs here too. I quickly discovered it automatically shuts because Teensy doesn't draw nearly enough power. Turning on a heavy load for only a brief time, if it works, seems like a great way to keep the thing going without actually draining its batteries too much.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    4,997
    Just did a quick test. Mine shuts off in 13 seconds with no load. It's 19 seconds with a 27 ohm load. A 22 ohm load seems to keep it on. So far, it's been running for over 3 minutes.

  9. #9
    Senior Member
    Join Date
    Feb 2013
    Posts
    118
    Hi Paul,

    Can you let me know how to set up my teensy to draw a load. Searching on the web, but don't not sure exactly what I need.

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    4,997
    Ok, I wired up a little NPN transistor circuit that puts a 230 mA load on the battery. I'm experimenting with a Teensy to pulse the transistor. With 8 ms pulses separated by 1 second, it ran for 45 seconds. Now I'm trying 9 ms and it's run for about 2 minutes so far... oh, looks like it just shut off about 2:20. Trying 10 ms pulses now....

    Edit: 10 ms pulses ran only about 1:30. Trying 20 ms now...

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    4,997
    Here's what I've got hookup up right now, just 3 parts, a red LED (approx 2V drop), a 2N2222 transistor, and a 10 ohm load.

    When Teensy drives the pin high (to 5 volts), current flows through the LED (dropping about 2 volts) and base-emitter junction (dropping another 0.7V), for 2.3V on the 10 ohm resistor, for a load current of approx 230 mA. Of course, the transistor has high current gain, so if the load is providing 5V on the collector, most of that 230 mA flows from collector to emitter (the load on the battery). Only a tiny fraction flows from base to emitter. Pretty simple analog circuitry.

    Click image for larger version. 

Name:	battery_load_pulser.jpg 
Views:	97 
Size:	207.8 KB 
ID:	1073

    Edit: 25 ms pulse seem to be working very well.
    Last edited by PaulStoffregen; 11-05-2013 at 03:18 PM.

  12. #12
    Senior Member
    Join Date
    Feb 2013
    Posts
    118
    Along similar lines, if I have 4xAAA batteries and the measured voltage is 6.05 fully charged, can I connected these directly to the teensy, or is this too high of a voltage.

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    4,997

  14. #14
    Senior Member
    Join Date
    Jun 2013
    Location
    Orange County California
    Posts
    151
    Quote Originally Posted by turtle9er View Post
    Along similar lines, if I have 4xAAA batteries and the measured voltage is 6.05 fully charged, can I connected these directly to the teensy, or is this too high of a voltage.
    Strictly speaking, no. 6.0V is the maximum input voltage.

  15. #15
    Senior Member MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussets
    Posts
    695
    Also, note that alkalines only put out 1.5 volts when they are fully charged (and in fact may be higher depending on the battery construction). http://en.wikipedia.org/wiki/Alkaline_battery.

    Over time the voltage will degrade (which is how most battery fuel gauges work on alkaline batteries, they measure the voltage). Nimh batteries tend to have a much flatter curve, and spend more of their time putting out 1.2 volts. So 4 rechargeable batteries would give you 4.8v most of the time. http://en.wikipedia.org/wiki/Nickel%...ydride_battery.

    If you are wanting to feed your Teensy 5 volts through the USB socket, you might want to look at a step-up/step-down converter that will either boost or reduce the power to match the voltage level, such as this one that does 5v: http://www.pololu.com/product/2123. If you were bypassing the USB connector, I assume you would want a 3.3v vesion: http://www.pololu.com/product/2122. Finally, this one has a tiny potentiometer in it, so you can set the voltage you want: http://www.pololu.com/product/2118.

    I believe if you know the voltage is always going to be higher or lower than you need, you can get the appropriate step-up/step-down converter, and can be more efficient. But the step-up/step-down converters will work with a mixed voltage level.

    Note, I just bought the adjustable one (primarily to power an LCD that wanted a bit more than 5v), but I haven't used it other than hooking up a multimeter to see that it produced the voltage.
    Last edited by MichaelMeissner; 11-05-2013 at 07:40 PM.

  16. #16
    Senior Member MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussets
    Posts
    695
    Quote Originally Posted by PaulStoffregen View Post
    It may be a useful thing for PJRC to sell, if you combine it with a USB male pin. So you would plug your unit into the battery, and then plug the normal cable into your unit so you could power your Teensy. Digispark has this kit that has an on/off button so they don't have to keep inserting/removing the spark. I would imagine adding the components to keep the battery charged, perhaps adding a second switch to keep power, but don't do the auto discharge: http://digistump.com/products/42.

  17. #17
    Senior Member
    Join Date
    Feb 2013
    Posts
    118
    From looking at the circuit board, it looks like it is made to plug into the power pack to keep it on. But what if I need to also power the teensy, would I just connect my own usb cable to the 5v and ground on the circuit board? Also, thanks Michael for those links....I actually forgot I ordered some cheap converters from ebay a long time back, I will have to see how they will perform at stepping down the voltage, however I am not sure if they will step the voltage up to 5v when the batteries get low.

  18. #18
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    4,997
    Quote Originally Posted by turtle9er View Post
    From looking at the circuit board, it looks like it is made to plug into the power pack to keep it on.
    Yes, exactly.

    But what if I need to also power the teensy, would I just connect my own usb cable to the 5v and ground on the circuit board?
    My battery pack has 2 USB ports. That little board plugs into 1 to keep it on. I can plug a USB cable into the other to use the power.

    If you had a pack with only 1 port, then yeah, you'd need to modify the PCB to give you a way to easily access the power. To be honest, I didn't think of that. I did this whole thing from start to finish in just a couple hours. It was only a quick hack, and it might only be compatible with the one and only battery pack I own. it's not not a well thought out product design. If someone were to make some more general purpose one (eg, to sell as a product), it's be good to test on other battery packs and design in features like access to the power.

    I don't intend to do anything more with this, other than build one of the 3 PCBs when they arrive from OSH Park. I'll probably give the other 2 away.

  19. #19
    Senior Member
    Join Date
    Feb 2013
    Posts
    118
    Thanks for the info. I just need to pick up some PNP (whole drawer of NPN) transistors and I will see what I can come up with. This at least heads me in the right direction and had taught me some new tricks.

  20. #20
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    1,441
    I have one of these
    http://www.frys.com/product/7309724?...H:MAIN_RSLT_PG

    runs the T3 without premature issues (shutoff!)

Posting Permissions

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