[beagleboard] LiPo power cape for Beagle Bone.

I’m trying to better understand the issue with the creation of a LiPo cape for the bone. Here’s my thinking:

With a nominal cell voltage of 3.7v it would take a 2 cell LiPo pack to light up the 5v rail no matter what you do. At this point you have 7.4v. Use a buck converter and produce 5v from 7.4v (or possibly a 6-13.8v source making it a rather useful general power supply cape useful for powering the bone in your car as well) with decent efficiency and feed that into the 5v line on the expansion connectors the same way that the battery cape does now. As for charging the lipo pack I’m not sure I’d really worry about that much, rather I’d simply supply a connector on the cape for a standard RC type lipo pack and optionally a decent sized cap for continuity when changing batteries. The user could then choose the type and size needed for the desired runtime. when it comes to charging, just disconnect the LiPo pack and plug it into a standard RC charger available from any decent hobby store where the pack was sourced from. How does this vary from the approaches previously looked at for a LiPo cape? What problems might I have missed?

Eric

Eric

Hi Guys;

I was doing a little research and found this at good old Sparkfun !

https://www.sparkfun.com/products/11359

Seems to me, you mount this on a Beaglebone proto-board, add an on/off switch and off you go !

You can use just about any crappy old wall wort to charge the battery J

Bill

Turns out they have a “solar” version too J

https://www.sparkfun.com/products/11496

I’ve seen these (they were featured in the friday new product post a week or so ago) they also have https://www.sparkfun.com/products/11360 which is a 6.6Ah version. sorta what I had in mind, but I’d like to avoid the issue with the bone running at a lower clock speed when running off of USB power and maybe be a bit more general purpose. a cape would also allow the bone to query time/charge remaining and shut down the cape circuitry as needed.

Eric

pleanty of solar chargers around try these guys:

http://www.powerfilmsolar.com/products/portable-remote

Hi,

not for a cape but some time ago I build a portable battery pack. A small buck converter for 1 amp and small usb charger ic (both from now ti) paired with a small 2S1P lipo. Due to the limited current from usb charging a large pack took rather long, but it was universal :slight_smile: There are many simple lipo chargers out there and because balancing and boosting the voltage for charging is a bit tricky I plan to rebuild that pack with a buck-boost converter that is somewhat simpler.

I look if I can find the schematics and post them. A small 1S2P should fit from size for a cape.

Use the battery connections within the P6 connector on the bone, then
you can run a single 3.7 V lithium pack, just note that USB won't work
when on battery power as it'll get battery voltage and most USB devices
don't like running much below 4.5 V.

A single 0.9 Ah 3.7 V lithium should get about 2 hours run-time, at
least without doing much in my testing. Under load or with capes
attached it'll reduce some. Sadly, the TPS65217 doesn't do gas gauging
so it's hard to tell how much is left in the pack without some
additional monkeying around. One option is to use the AD converters to
sense pack voltage, but that's annoying :slight_smile:

The TPS65217 will charge the pack when on AC or USB power when
current's available and switch to sourcing from the battery
automatically when it isn't. This was the design goal (as I interpret
the design) but sadly no one has yet made a lithium battery cape for
the bone.

-Andrew

Been looking at this further and a couple questions come to mind:

1. Am I correct from what's above that if I attach a single cell
lithium pack to P6 everything on the board except that which depends
upon the SYS_5V rail will function (i.e. USB host port and certain
capes requiring SYS_5V)?

2. Further would I be correct that if the USB client port is
connected to a PC and/or VCC_5V is connected to 5V external power and
a single cell lithium pack is connected to P6 then everything works
and the lithium pack will be charged?

3. The Bone SRM states, "there are no plans to add an extra
switcher to the BeagleBone to boost the 3.7V to 5V". Could all
necessary parts be put on a cape to provide such capability?

4. If a switcher were provided on a separate cape to boost the 3.7V
to 5V can the battery charging in the TPS65217B then be disabled such
that the battery is not then providing 5V, to power the TPS65217, to
charge itself, to provide 5V, to power the TPS65217, to charge itself
ad infintium!

Eric

OK, more reading of the data sheet indicates that charging of the pack
can be commanded on/off and the current source(s) of available power
may be queried over I2C0 (if someone can verify this it would be
appreciated). That said question 4 above would seem to be resolved.
So long as this is true Charging could be disabled when powered via
VDD_5V thus eliminating the problem. Only charge the battery when USB
powered. Anyone have a better way? (really the TPS65217B needs 3
inputs it would seem.)

Where may I find some good examples for reading and writing the
TPS65217B registers? specifically I'd like to read and determine the
where power is presently applied and turn battery charging on and off.

Eric

>
> Use the battery connections within the P6 connector on the bone,
> then you can run a single 3.7 V lithium pack, just note that USB
> won't work when on battery power as it'll get battery voltage and
> most USB devices don't like running much below 4.5 V.
>
> A single 0.9 Ah 3.7 V lithium should get about 2 hours run-time, at
> least without doing much in my testing. Under load or with capes
> attached it'll reduce some. Sadly, the TPS65217 doesn't do gas
> gauging so it's hard to tell how much is left in the pack without
> some additional monkeying around. One option is to use the AD
> converters to sense pack voltage, but that's annoying :slight_smile:
>
> The TPS65217 will charge the pack when on AC or USB power when
> current's available and switch to sourcing from the battery
> automatically when it isn't. This was the design goal (as I
> interpret the design) but sadly no one has yet made a lithium
> battery cape for the bone.

Been looking at this further and a couple questions come to mind:

1. Am I correct from what's above that if I attach a single cell
lithium pack to P6 everything on the board except that which depends
upon the SYS_5V rail will function (i.e. USB host port and certain
capes requiring SYS_5V)?

Basically, yes. SYS_5V will still be present when on lithium battery
(in fact, it's always present even with the TPS65217 in OFF or SLEEP
modes) but at battery voltage level instead of at 5 V.

2. Further would I be correct that if the USB client port is
connected to a PC and/or VCC_5V is connected to 5V external power and
a single cell lithium pack is connected to P6 then everything works
and the lithium pack will be charged?

Yes.

3. The Bone SRM states, "there are no plans to add an extra
switcher to the BeagleBone to boost the 3.7V to 5V". Could all
necessary parts be put on a cape to provide such capability?

Probably not due to the way the TPS65217 works as it expects the
battery to be a battery and operate at normal battery voltages.

4. If a switcher were provided on a separate cape to boost the 3.7V
to 5V can the battery charging in the TPS65217B then be disabled such
that the battery is not then providing 5V, to power the TPS65217, to
charge itself, to provide 5V, to power the TPS65217, to charge itself
ad infintium!

Charging can be disabled, yes.

I believe the TPS65217 assumes it's the only device interacting with
the battery, thus it feels that if it decides to charge that no other
device would be discharging the battery. This gets interesting as the
voltage output from a charger will inherently be higher than the
battery voltage and thus if you try to pull current from a battery
while it is charging, I'm not sure of the results. I would avoid
trying to charge and discharge at the same time if using the TPS65217.

The TPS65217 has circuitry to take care of multi sourced power for you,
hence the USB, AC, and battery inputs. Using them is probably
recommended.

-Andrew

>>
>> Use the battery connections within the P6 connector on the bone,
>> then you can run a single 3.7 V lithium pack, just note that USB
>> won't work when on battery power as it'll get battery voltage and
>> most USB devices don't like running much below 4.5 V.
>>
>> A single 0.9 Ah 3.7 V lithium should get about 2 hours run-time, at
>> least without doing much in my testing. Under load or with capes
>> attached it'll reduce some. Sadly, the TPS65217 doesn't do gas
>> gauging so it's hard to tell how much is left in the pack without
>> some additional monkeying around. One option is to use the AD
>> converters to sense pack voltage, but that's annoying :slight_smile:
>>
>> The TPS65217 will charge the pack when on AC or USB power when
>> current's available and switch to sourcing from the battery
>> automatically when it isn't. This was the design goal (as I
>> interpret the design) but sadly no one has yet made a lithium
>> battery cape for the bone.
>>
> Been looking at this further and a couple questions come to mind:
>
> 1. Am I correct from what's above that if I attach a single cell
> lithium pack to P6 everything on the board except that which depends
> upon the SYS_5V rail will function (i.e. USB host port and certain
> capes requiring SYS_5V)?
>
> 2. Further would I be correct that if the USB client port is
> connected to a PC and/or VCC_5V is connected to 5V external power
> and a single cell lithium pack is connected to P6 then everything
> works and the lithium pack will be charged?
>
> 3. The Bone SRM states, "there are no plans to add an extra
> switcher to the BeagleBone to boost the 3.7V to 5V". Could all
> necessary parts be put on a cape to provide such capability?
>
> 4. If a switcher were provided on a separate cape to boost the
> 3.7V to 5V can the battery charging in the TPS65217B then be
> disabled such that the battery is not then providing 5V, to power
> the TPS65217, to charge itself, to provide 5V, to power the
> TPS65217, to charge itself ad infintium!
>
OK, more reading of the data sheet indicates that charging of the pack
can be commanded on/off and the current source(s) of available power
may be queried over I2C0 (if someone can verify this it would be
appreciated).

Yes, you can disable charging via I2C. The data sheet has the register
listing in it, the CHG_EN bit of CHGCONFIG1 is the bit you're looking
for.

That said question 4 above would seem to be resolved.
So long as this is true Charging could be disabled when powered via
VDD_5V thus eliminating the problem. Only charge the battery when USB
powered. Anyone have a better way? (really the TPS65217B needs 3
inputs it would seem.)

I'd expect you'd need to disable charging before connecting 5V external
and then reenable after disconnecting. Be aware that the TPS will
favor AC or USB over battery, they're effectively the same (AC and USB,
that is). If either of the mains inputs (USB or AC) can't source
enough current, the battery will be used to source additional current.
This is useful when you have an undersized mains power source and a
battery connected.

For instance, the current bone PSP kernel limits the CPU to low clock
freq if on USB. If you have a battery connected this isn't needed as
the TPS will source extra current from the battery when it needs to
provided you set the TPS's USB current limit to match the USB host
providing power. The battery will soak up the peaks, until it runs to
the voltage threshold. This type of operation is very useful if you
have peak loads that occur rarely but want to run from 500 mA USB
source. Most phones that charge via USB probably do something similar.

Where may I find some good examples for reading and writing the
TPS65217B registers? specifically I'd like to read and determine the
where power is presently applied and turn battery charging on and off.

If you see [1], I've sent a hacky patch for the PSP kernel to basically
do this along with handle the TPS power button. I want to shutdown
when power button is pressed or AC is lost. Battery is just used for
the < 1 minute it takes to shutdown cleanly and then powers the RTC.

[1]:http://beagleboard.org/discuss?place=topic%2Fbeagleboard%2FumJLdbn4pkA%2Fdiscussion

-Andrew

I’ve experimented with powerfilm OEM for a couple of years. They need good UV protection when out in the sun, so look at the model to see if it is already protected, or you need to supply it with a secondary film.

Sorry for the late reply on this thread but it just popped back to the top of the list and caught my attention.

I’ve been powering my BeagleBone from RC batteries for some time now. The most versatile method that I’ve been using is a buck/boost power “bar” that attaches to the expansion connections and provides a stable 5V from a 3-14VDC input. It isn’t fancy, but it’s (relatively) inexpensive and doesn’t cover up the console port or I2C pins. I’ve released all of the files for anyone who wants to build one here.

I’m also working on a proper Li-Ion PowerCape that incorporates charging and power control circuitry. This allows for operation as a “mini UPS” or as a battery-powered “node” that can power itself up and down. I just built up the first full prototype yesterday and will post some pictures on the blog later this week. I’d really like to get feedback on the PowerCape, especially with regards to the connectors and placement that I’ve chosen.

-Ron

Hi Ron

Did you cater for inputs above 14V? If powering from 12V lead-acid batteries, they typically charge at 14.4-15V but I’d certainly expect spikes of higher and I wouldn’t want to plug in anything that couldn’t take up to 16V safely. I see you have a 15V zener on there so the regulator won’t receive more than that, but if this was sustained presumably your polyfuse would go soon after, correct?

Second, your chosen regulator will put out 2.25A - are the components sized to deliver all of that, and could I tap some of it to power a USB hub? Say by using the 2.1mm power socket on the beaglebone as a power source for the hub? If yes to both of these then you might have a customer if my board doesn’t work when it turns up from oshpark next week…

Finally, if you’re looking for other ideas, how about current measurement through I2C? Nice to have rather than essential, but if you’re redesigning the board a spot to solder an INA219 (or something like it) wouldn’t go amiss. If you haven’t got some way to signal the BeagleBone yet that it’s running on LiPo, this part will also tell you about input voltage so you could probably deduce it from that.

A couple observations on designing a Li-Po (or general power supply
cape, no matter what the power source)....

1. the charger can be separate and it makes the design much easier.
RC Li-Po packs are plentiful as are the chargers for them just build a
cape that allows running off one of those.

2. Current measurement could be useful and is a good idea.
Possibly via i2c or maybe via simply using one of the analog pins.

3. the input voltage for such a cape ought to be roughly 9-(15-20)
volts. the low end covering a reasonably well drained 6 cell lead
acid car battery and the high being above 15 for the charging voltages
sometimes seen in the same type of battery then rounded up from there
to whatever pack voltage is for a fully charged number of Li-Po cells
in series with a voltage higher than 15 or so. that would cover many
if not most applications I can forsee.

Eric

Mike,

The recommended max input is 12V on that regulator but the absolute is 17V. I haven’t had any issues above 12V yet but I also haven’t stuck it in my car. I’ve mostly been using it with 1S, 2S, and 3S LiPoly packs. You are correct, voltage above 15V will eventually trip the PTC but it’s nowhere near instant.

Honestly, I never thought of using the BB DC jack as an auxiliary power port! There is no reason that I can see for it not to work. The max current available from the regulator is going to depend on the input voltage. You won’t get 2A unless you’ve got at least 5V coming in and the components should handle it (but I’ve only drawn just under 1.5A max so far). In boost mode, you’re limited to just over 1A around 3.7V. If you’re looking at the TPS63060 datasheet, check out figure 2 on page 7.

I did have current measurement on the early PowerBar prototypes and I really like the INA219. But, I removed it for a couple of reasons. Cost, obviously. Then, in order to get at the I2C2 pins I had to cover the console port. I did a version that “reached around” it but didn’t like it so I eventually decided to retreat from those pins all together to leave them available for prototyping and such.

Eric,

Agreed, the PowerBar has allowed me to run from 1S, 2S, and 3S RC batteries which is what I originally intended. I decided to tackle the charger on the PowerCape just because it seemed to make it much more useful. Although, it does impose some limitations. For example, now the DC input power must be at least 4.4V or so in order to charge the Lithium cell. And, your battery is limited to just 1S (3.7V nominal). But, on the other side the input voltage range is now greater (4-16V) since there is another regulator in front of the buck/boost circuit.

The PowerBar does not have voltage measuring capability for form-factor simplicity. But, there is an INA219 on the PowerCape to monitor battery voltage and charge/discharge current.

Here is a picture of the latest PowerCape prototype. I will finish the write-up before this weekend.

Thanks for the comments!
-Ron