Powering Grand Central with Batteries

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
autonym
 
Posts: 37
Joined: Thu Oct 31, 2013 12:42 pm

Powering Grand Central with Batteries

Post by autonym »

Hey folks,

I found this previous posting from a while ago talking about powering a Grand Central using Lipo batteries.

In it, adafruit_support_mike responded by mentioning:
You can use a small charge pump to provide 5V, and connect a regulated 3.3V to the Grand Central's 3.3V pin
Does this mean you can power the Grand Central with a regulated 3.3V source to the output of the GC's 3.3V regulator?

I ask because I have my own battery-powered CircuitPython project that I need LOTS of I/O for, and have a pair of Grand Central's on the way to try it out.

I'll be using 4x 12V cordless drill batteries (Milwaulkee M12's) in parallel to power the project, but they're dumb batteries that if I run too low/hot, they'll break, so I'm adding voltage, current (INA219), and temperature (DS18B20) monitoring to them, and also the ability to shut each battery in the array off with an N-channel power MOSFET (IRLB8721PBF) if they get too low. I plan to be able to hot-swap individual batteries out, or even round-robin them a bit to share the load.

This is probably overkill, but the parts are already ordered. :)

The problem, naturally, is how to I kick-start the board to boot-up if all the batteries in the array are off because the MOSFETs don't have power to trigger them on.

I thought maybe I could simply use a USB battery pack to plug in to the GC's micro USB until the code could initialize one of the batteries to keep it going, but that seems problematic/janky.

I would love it if the Grand Central had a JST-PH port for a L/Ion battery with a charger, but alas it does not.

I have a PowerBoost 500 Charger coming that I hope can solve the problem by allowing me to have it charge an attached L/Ion battery from the 12V array that would only be used to provide power to the Grand Central when it was booting up - I could have it set the EN pin low on the PowerBoost once it had booted and found at least one 12V battery to initialize. It would then continue to keep the L/Ion battery topped off for the next boot.

I thought I could connect the 5.2V from the PowerBoost to the USB power line on the Grand Central but I'm worried about back-pushing voltage from the PowerBoost to my computer's USB when I connect it to write updates to my code. I could add a hard-switch for the 5.2V connection but I'd hate to forget to switch it off and blow my USB port.

Connecting to the 3.3V would solve that problem, but the PowerBoost doesn't have a 3.3V regulator.

Worst-case scenario for using the PowerBoost would be to run it's USB-A port out to a cable I could plug in to the Grand Central's micro-USB port for the kick-start.

Does anyone have a better idea?

Bonus Question:

If I send more than 3.2A of current through a stock INA219 with the 0.1Ω resistor, will it hurt the sensor, or simply max out the value reported?

User avatar
autonym
 
Posts: 37
Joined: Thu Oct 31, 2013 12:42 pm

Re: Powering Grand Central with Batteries

Post by autonym »

Oh, one more question - the Grand Central power regulator is mentioned at 7-9V, but I've seen people mentioning it can take 12V.

Do I need to buck my 12V down to 9V before giving it to Grand Central?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering Grand Central with Batteries

Post by adafruit_support_mike »

autonym wrote:Does this mean you can power the Grand Central with a regulated 3.3V source to the output of the GC's 3.3V regulator?
Yes, though it's a case of using an external regulator instead of the onboard one.
autonym wrote:I'll be using 4x 12V cordless drill batteries (Milwaulkee M12's) in parallel to power the project, but they're dumb batteries that if I run too low/hot, they'll break, so I'm adding voltage, current (INA219), and temperature (DS18B20) monitoring to them, and also the ability to shut each battery in the array off with an N-channel power MOSFET (IRLB8721PBF) if they get too low. I plan to be able to hot-swap individual batteries out, or even round-robin them a bit to share the load.
The only part of that list that doesn't sound like a good idea is putting the batteries in parallel.

All power sources can be modeled as a perfect voltage source (capable of holding the same voltage no matter how much current it takes) connected to the load through a resistor. The source's ability to maintain its output voltage under load depends on the value of that theoretical resistor.. coin cells get up near 100 Ohms when you draw more than a couple of milliamps from them, while LiPos can stay down in the milliohm range when delivering several amps.

So when you put two power sources in parallel, you have the equivalent of two perfect voltage sources connected through two resistors.. low-value resistors if you're working with LiPos. That's fine if both power sources have exactly the same voltage at all times, but that never happens in reality.. there's always some small difference. And since LiPos have such low internal resistance, even a few millivolts of difference can make the higher-voltage LiPo try to push a large amount of current backwards through the lower-voltage one.

At first glance that looks like the higher-voltage LiPo is just recharging the lower-voltage one, but LiPos are picky about their charging process. Running normally, they skate along the line between 'energy storage' and 'incendiary device'. There's no clearly observable change between a LiPo that's charging and one that's overcharged to the point where it's about to catch fire, so their charging has to be managed by a circuit that maintains tightly controlled conditions.. a charger whose voltage sensor is off by a few millivolts can wreck your day (and insurance premiums).

You can put circuits between the LiPos that manage them properly, including step-down voltage converters. Even then, putting step-down converters in parallel can cause weird problems if they aren't designed to work that way. Round-robin sequential sharing or straight switchover when one LiPo is mostly discharged are good strategies.
autonym wrote:The problem, naturally, is how to I kick-start the board to boot-up if all the batteries in the array are off because the MOSFETs don't have power to trigger them on.
That's a logic problem: control the first battery's connection with a NAND gate that reads all the other battery connections. If no other source has a connection to the Grand Central, connect the first one. If any other battery is connected, disconnect the first one.

You can use the gate voltages of the mosfets instead of the battery voltages themselves.
autonym wrote:I have a PowerBoost 500 Charger coming that I hope can solve the problem by allowing me to have it charge an attached L/Ion battery from the 12V array
Don't do that.. the PowerBoost doesn't know how to handle battery voltages higher than 5V. Higher voltages equal property damage.

You could use a Verter instead:

https://www.adafruit.com/product/2190

because that one knows how to switch between being a step-up converter and a step-down converter, and can handle 12V input.
autonym wrote:I thought I could connect the 5.2V from the PowerBoost to the USB power line on the Grand Central but I'm worried about back-pushing voltage from the PowerBoost to my computer's USB when I connect it to write updates to my code
The Grand Central has a circuit that isolates the USB-5V line from the 5V power bus if external power is connected, but it's still a good idea to use a 3.3V external supply.
autonym wrote:If I send more than 3.2A of current through a stock INA219 with the 0.1Ω resistor, will it hurt the sensor, or simply max out the value reported?
It would max out the readings, but wouldn't damage the INA219.
autonym wrote:Oh, one more question - the Grand Central power regulator is mentioned at 7-9V, but I've seen people mentioning it can take 12V.

Do I need to buck my 12V down to 9V before giving it to Grand Central?
'Need' is a strong word. 'Greatly prefer' covers the situation better.

The underlying problem is that the energy from any voltage you don't use has to go somewhere. If you run it through a linear regulator like the NCP1117 connected to the Grand Central's Vin pin, it gets burned off as heat in the regulator.. linear regulators are basically smart resistors that adjust their own resistance to keep the voltage at their output pin stable.

If you send 12V in and get 5V out, 60% of the power from your battery is lost making the NCP1117 hot before it ever gets to the microcontroller. Then you lose another 35% going through the 3.3V regulator. Only about 27% of the power that leaves the battery reaches the SAMD51. That isn't fatal, but the efficiency sucks.

Switching regulators can convert voltage to current and vice versa by temporarily storing the energy in a magnetic field. Converters that reduce voltage and increase current are easier to design and optimize than ones that reduce current and increase voltage, to the point where most step-down converters are better than 95% efficient these days.

So instead of drawing 100mA @ 12V (1.2W) and burning off 700mW of it as heat to get 100mA @ 5V (500mW) from a linear regulator, a 95% efficient switcher will draw about 44mA @ 12V (525mW) and give you the same 100mA @ 5V (500mW) output. To get 100mA @ 3.3V (330mW), the switcher would draw about 29mA @ 12V (347mW) from the LiPo.

With good step-down converters being so easy to find and use these days, the balance of design choices has shifted to having to justify the decision to use a linear regulator for any large difference between the input and output voltages. If you're only using 10mA, you can say, "enh, what the heck", but if you get much higher than that, it's worth weighing the pros and cons of a switcher.

User avatar
autonym
 
Posts: 37
Joined: Thu Oct 31, 2013 12:42 pm

Re: Powering Grand Central with Batteries

Post by autonym »

Thanks for the detailed response.

For context, the project will be a custom-made Star Wars-style "jetpack" that conceals an air cooler/filter system I can wear at conventions to keep me cool and safe.

I'll be using the 12V batteries to natively power some 12V things on the project (PC fans, Peltier cooler, 12V-native UV LED's) which will be drawing most of the current - just the Peltier can go up to 5A, plus another 1A or so for fans, lights, etc.

The M12's are ~3k mAh each, so I'm wanting more than a half-hour or so of runtime (max cooling) before dealing with a battery swap, which is why I was looking at parallelism for the battery array - lower current draw from each battery I understand also increases battery efficiency and keeps them cooler (and more in-range for the INA219).

The Milwaukee M12's use Lithium-Ion cells, which are a bit more stable for avoiding the "set the house on fire" situation, but naturally I still need to be very careful. If I put power diodes after the MOSFET on each battery to the array, that should keep the power flowing forwards and not backward to lower-voltage batteries, correct?

I'll have some NeoPixels I was going to drive at 5V from the 12V using an LM2596-based adjustable power regulator/buck board that I got off Amazon. I believe this is a switching regulator, so I should be relatively good for efficiency, correct?

I have a few of these and was considering using one to step down the 12V to 7V for the GC - it sounds like this would be more power-efficient/cooler than throwing a full 12V to the GC's power in and letting the onboard NCP1117 deal with the 12V -> 5V drop.

As for the power logic problem, I think I'm going to opt for "simple" for my Mark 1, Mod 1 design and simply have one battery bay have a momentary-press bypass switch (one that can handle higher current) for the MOSFET - I can press-and-hold until the GC boots, sees the battery, and takes over energizing the MOSFET to keep the power flowing. I'll add an LED showing when the MOSFET is energized, which will look cool anyways.

Appreciate the assistance so far and any responses to my ideas here.

This is the Way. :)

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering Grand Central with Batteries

Post by adafruit_support_mike »

autonym wrote:If I put power diodes after the MOSFET on each battery to the array, that should keep the power flowing forwards and not backward to lower-voltage batteries, correct?
That will prevent back-powering at the cost of some additional heat. A silicon diode with 1A flowing through it might have a forward voltage of 1V, which translates to 1W of heating through the diode.

Use low-forward-voltage Schottky diodes to keep that loss low. They have higher reverse-leakage current than other diodes, but the leakage is low enough to be safe.. usually 1mA or less.
autonym wrote:I have a few of these and was considering using one to step down the 12V to 7V for the GC - it sounds like this would be more power-efficient/cooler than throwing a full 12V to the GC's power in and letting the onboard NCP1117 deal with the 12V -> 5V drop.
Yes.
autonym wrote:I'll have some NeoPixels I was going to drive at 5V from the 12V using an LM2596-based adjustable power regulator/buck board that I got off Amazon. I believe this is a switching regulator, so I should be relatively good for efficiency, correct?
Looks like it. I found datasheets from a couple of different manufacturers, which means it's a mature and reasonably popular device. Going from that, I'd guess you'll see at least 70% efficiency. That's better than a linear regulator for the voltage difference in question.

User avatar
autonym
 
Posts: 37
Joined: Thu Oct 31, 2013 12:42 pm

Re: Powering Grand Central with Batteries

Post by autonym »

Thanks again, Mike.

I've a pack of 15SQ045 Schottky's (15A) arriving tomorrow.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Powering Grand Central with Batteries

Post by adafruit_support_mike »

Those should be good.. the datasheet I found lists them at <420mV @ 5A, which is reasonable.

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

Return to “Arduino”