I figure it'd be nice to teach people how to calculate all things associated with batteries. (Including me). As the saying goes, give the man a fish and he eats for a day, teach the man to fish and he eats for a lifetime. (Or something like that?)
Let's get one thing straight, the energy and battery calculators on this site are amazing, and you SHOULD try to use them before asking any questions.
http://www.societyofrobots.com/battery_calculator.shtmlhttp://www.societyofrobots.com/energy_calculator.shtml
First topic:
What kind of battery will be good for my robot? (NiCd, NiMH, Lithium etc.)That's an easy one. Visit the SoR battery tutorial...
http://www.societyofrobots.com/batteries.shtml for your answers.
Second topic:
How many batteries do I need?Another easy one. But before you know how many batteries you need, you need to calculate a few things.
1.) What voltage do my components run at? (Or what voltage CAN they run at.) This is always in the specs for the components.
2.) How many amps do my components draw?
- This is a tough one, I think as a general rule of thumb it's best to assume everything running at full power, if not your micro controller could get reset.
3.) How long do I want my robot to run? (Do you want the batteries to last 1 hour or 10?)
4.) How far do you want your robot to be able to go?
- This includes drive inefficiency. (Do I have gears, chains...etc.)
Third topic:
How do I build my power regulation circuit for my robot?This also depends on a few things.
1.) What batteries (and how many) are you using.
2.) What voltage do you need for you components? (Do you need 12v for your motors and 5v for your micro controller?)
3.) How many amps will they draw?
Once these things are determined, most people will build a power circuit that looks like the one on this site (no surprise there). Here's the schematic.
Now I will attempt to explain this schematic. Starting from the left. First you see the battery, then the fuse. The value for this fuse depends on your voltage and your amperage. (Those values seem to be important eh? None of these calculations can be done without knowing them.)
Next you'll see the switch. This is your simple On/Off switch.
Next, you see an LED with a resistor. This LED is your "Power ON" LED, it tells you when your robot is getting power. The resistor simply makes the LED not blow up.
Next you'll see a "Switching Regulator" Now some of you may be saying... "Why not just use a transistor or "5V regulator". Well, according to the robot power tutorial, if I had a 24v battery, and I used a 5v regulator to drop it down to 5v, and my 5v components drew .1mA. That's 1.9 W of wasted power. That's more than 3 times the amount in the tutorial!! All of this power would have to be lost as heat in your "5v regulator". Meaning, your 5v regulator would melt pretty quickly. (Without a very, VERY generous heatsink).
Switching regulators, on the other hand, only take a bit of energy at a time. Try to imagine it this way. If you had a bucket full of water, and you had a 5v regulator... that regulator would be trying to force all of that water through a very small hole constantly. This is obviously not possible and that's why there's a lot of heat. With a switching regulator, you'd simply have a valve at the hole in the bucket, and whenever you needed water (power) you'd simply turn it on then turn it off when you've had enough. See the difference?
Next you'll see the output to the 6v stuff (in this schematic's case. This could be any voltage depending on what you need. I need 24v for example.) and you'll see a capacitor. The value for this capacitor depends on... you guessed it, your voltage and amperage. Think of a capacitor like a sponge. It sucks up power when there's extra power, and when more power is needed it releases some of the power it's sucked up. Basically, it makes sure that you're always getting a constant voltage to your components.
Next you'll see the good old 5v regulator. This is fine here because we're only dropping a voltage of 1v. We're going from 6v to 5v, meaning that if I did the power calculation again.. (6-5)*.1 I'd get .01 W. That's much less than the 1.9 W I had before. This means that not as much heat will be generated (Depending on the amperage of course.)
Next you see another capacitor, and the output to the 5v components. Both are self explanatory.
Now, there are some other things you can incorporate into a battery regulation circuit, such as a battery monitor. How to do this (with calculations) can be seen on this page.
http://www.societyofrobots.com/images/schematics_batterymonitorcirc.jpgHere is the schematic for that page.
This schematic is much easier than the previous one.
Starting from the top, you see Vin. That get's connected to your battery (after the fuse and switch).
Next you'll see the 50K resistor. It's.. well.. a 50K resistor.
Next you'll see Vout. This gets connected to an analog port on your micro controller. This'll tell you when you battery is dying, and people usually program the micro controller to light up a light or something when the voltage coming from this is too low.
The second resistor, R, get's calculated using this equation. R = 50000 / (Vin / Vlog - 1)
Vlog is the voltage you want, meaning the voltage going to the "To Your Circuit" wire.
Next you'll see the "To Your Circuit" wire. This... obviously... goes to your circuit, and if you're using the schematic from above, it'd go right after the switch, before the LED and resistor.
Ok now obviously you're probably not going to know hot to interpret a lot of that stuff. So find out those pieces of information you need, and ask us a well prepared, planned question and we'd be happy to answer. OK, so there's the "Power Regulation" Portion of this thread.
Fourth topic:
Ok so I have my battery, but how do I charge it/build a charger?1.) Buy a charger that fits your batteries/voltage. (I have a 24v NIMH battery, I need a charger that'll charge 24v NIMH batteries)
2.) Build a charger that fits your batteries/voltage.
Here's a list of NiMH/NiCd chargers from
www.all-battery.com http://www.all-battery.com/chargersfornimhandnicdbatterypacks24vto60v.aspx -Now I believe Admin's had some problems with a site, but I can't remember which one it was.
Now, how to build one. This is where I'm going to need some help. I've found (I believe Soeren's) schematics for a smart NiMH and NiCd battery charger. Here are the links.
http://that.homepage.dk/PDF/NiMH_Tapered_Charger_Current_Limited.pdfhttp://that.homepage.dk/PDF/Charger_rev_b_(w_on_charge_relay_output).pdfI'm not really sure which one to use, or how to modify them for your own battery pack. So help me out here guys.
I think... for now.. that's it. If you guys help me out with the equations and stuff I don't know, maybe we can just refer people here when they have a battery question. I want to make everything generalized, so that anybody can come here and use the equations for their own projects. I see all too often someone ask "How do I get this to work for my project." while if someone just asked once "What equations do I use to modify this? Or "What parts are good for certain voltages." things would go a lot smoother. If we make lists here we won't have to continually answer the same questions.
I hope I didn't mess anything up TOO bad.
And feel free to correct me if I'm wrong, I'll continually update this thread.