POWER SUPPLY CONSIDERATIONS
It is a given that most mobile robots will be powered by Ni-Cad battery packs due to their relative availability and low cost. Ni-CAD battery packs are readily available at hobby stores such as "Wings and Things" in Lubbock, or at Radio Shack outlets.

Typical supply circuit
Figure: A typical supply circuit.

The above simple supply circuit illustrates some important concepts. For good regulation filter capacitors should be inserted at the input and output sides of the regulator. With the LM7805, the output capacitor should not exceed 1mf, as larger values could damage the 7805 due to backfeeding of current when power is switched off. When driving larger loads, a larger output capacitor can be used, provided that a diode is placed between the IN and OUT terminals of the 7805, with the diode's ANODE tied to the OUT terminal, and the diode's CATHODE tied to the IN terminal (so that the diode will normally be reverse biased). Also note that a color-coded twisted wire pair connects from the regulator output to the load (in this case a 68HC1x micro-controller). When driving higher current loads, it may be advisable to also attach a heat sink to the regulator. Remember that the power dissapated by the regulator is: Pdiss = (Vin - Vout) x Iout.

Ni-Cad batteries (under typical load) supply approximately 1.2V per cell. Also available are Ni-Cad "packs" which are composed of series wired "AA"
cells. Thus the packs are available, e.g., in 3.6V, 4.8V, 6.0V and 7.2V configurations. (Note all are multiples of 1.2V). All packs composed of series "AA" cells will have about the same "Amp-Hour" rating. Students should measure the current consumption of their motors under typical load conditions and attempt to estimate, based on the Amp Hour Ratings, how long their fully charged Ni-Cad pack can power the motors/servos etc..



Another relatively economical battery is the popular alkaline battery. These batteries offer roughly (3) times the energy density of a similar sized NiCAD cell. The obvious disadvantage is that alkaline batteries are(supposedly) non-rechargeable, thus in the long run it is likely that the NiCAD will be a better investment.



Trivia facts: I have read that alkaline batteries can in fact be recharged - at least 20 times!
The following applies however:
(1)Recharging an alkaline battery will be more successful if you recharge it before it is fully discharged. This will add to the "cycle life" of the battery (i.e. how many times it can be discharged/charged before it fizzles out).
(2) Its probably safer to "trickle charge" it. A rule of thumb to define trickle charging is to design your charging circuit to charge with a current well under 10% of the battery's amp-hour rating. At the10%charging rate, a typical charging time (for recharging a fully discharged battery) is about 14 hours.
(3)ALKALINE BATTERIES ARE NOT DESIGNED TO BE RECHARGED. IF YOU DO RECHARGE THEM YOU MUST CHARGE THEM SLOWLY TO AVOID POSSIBILITY OF EXPLOSION! DO NOT INSERT AN ALKALINE BATTERY INTO A NICAD CHARGER, AS MANY NI-CAD CHARGERS ARE DESIGNED FOR "FAST CHARGE";, (i.e. charge time of 3-4 hours), AND ALKALINE BATTERIES CANNOT HANDLE SUCH A CHARGE RATE!

NiCAD trivia fact: Most NiCAD "D-cells" are actually "C-cells" placed in a D-cell sized package. Thus they have no more amp-hour reserve than a C-cell NiCAD! Radio Shack does sell a true NiCAD D-cell, which has a 4 amp-hour rating. But I also recall that these are very pricey!



Caring for Ni-CADS:
Ni-CAD batteries are relatively robust, however several items should be mentioned:

(1) Shelf-life - Do not leave Ni-CADS lying around for long periods of time(i.e. months) without recharging them. If you must store them I recommend that you first charge them, then keep them in a refrigerator. Their shelf life will be extended considerably if you keep them cool. This applies in general to practically all batteries.
Typical sealed NiCADs lose their charge rapidly (circa months) even when not used (i.e. when in storage). Under these conditions it is said that they will form crystalline "whiskers" inside the cells which may "short" (aka "ruin") the cells permanently!
If you want to retain your substantial investment, try to periodically recharge your shelved NiCAD batteries - especially when you're not using them!

(2) When frequently charging Ni-Cad battery packs, it is good to occasionally fully discharge, then recharge the Ni-CAD pack. The reason behind this is beyond the scope of this discourse. Discharge can be accomplished, e.g.:
by attaching an appropriate resistive element across the pack. Be sure your resistive load has sufficient power dissipation ratings! One book recommends that regularly used NiCADs should be fully cycled two or three times at least every six months. That is, every six months you should discharge them, then charge them, then discharge them, then charge them again. PROPERLY TREATED NI-CADS ARE TOUTED TO BE ABLE TO HAVE A "USABLE" CYCLE LIFE OF UP TO 1,000 (discharge/charge) CYCLES!

(3) Ni-Cads will last longer if you generally avoid excessive depletion. I.e., in normal use, you might have your microcontroller (A/D input) monitor the NiCad battery voltage, and either shut down the system, or turn on a warning LED, when the Ni-Cad voltages (under normal load) drop to about 1.0V per cell.
(4) Be careful not to "overcharge" Ni-CADS. The safest way to charge Ni-CADS is probably to buy an approved charger. For the "budget challenged" student, a "cheapo" alternative is to make a simple "trickle" charger. This can be done by simply wiring a current-limiting resistor (R) in series with a regulated DC power supply. Let Vcc be the voltage of the power supply, and let Vbatt be the nominal voltage of the NiCAD cell or battery pack (figure on ~1.4V per cell while charging). Let BATT_Ah be the amp_hour rating of the NiCAD cell/battery pack. Then choose:

R >= [(Vcc - Vbatt) / (0.10 x BATT_Ah)] Ohms.


Such a circuit, however, contains no protection against overcharging, which can shorten the NiCAD battery life. Thus one should be careful to avoid overcharging! To reduce the chances of seriously damaging the battery, lest you forget to disconnect the charger, you should limit Vcc to perhaps 1.45V per NiCAD cell [e.g. for a 7.2V NiCAD pack (6 cells), use Vcc = 6 x 1.45V = 8.7V ] .
Note however, that this will likely increase the charging time. Assuming the battery was originally fully discharged, do not charge more than 14 hours. If the battery was originally "partially discharged", the charging time should be reduced.
Another way is to increase R to, say, R = (Vcc - Vbatt) / (0.04 x BATT_Ah) which will truly trickle charge the battery, but will require up to 1 full day to recharge the battery cell/pack. There are ways of making an "intelligent" charger which can sense when the battery is fully charged and can then shut off the charger. This is beyond our scope for the time being.



Isolating motor/servo/relay supplies from microcontroller supplies:
Given the noise generated by inductive loads(aka motors & servos) it is considered common practice to use separate supplies (batteries) for motors/servos/relays and microcontrollers. This will prevent "back EMF" spikes from glitching the microcontroller. When driving motors, it is even possible for back EMF energy to damage/destroy the microcontroller. Thus any prudent design must take this into account!

Power supply wiring (see e.g. the "Wiring Practices" link on the home page) must also be taken seriously. Pay particular attention to all wiring carrying large currents(e.g. motor supply). Heavier gauge wire (to reduce resistance) should be used for circuitry carrying high currents, and attention must be paid to avoid poor connections in circuits carrying high currents. In addition, in order to reduce inductance, it is customary to use twisted wire pairs for motor/servo supply wires, and to avoid use of unnecessarily long wires.

Note: Inductance becomes particularly important in switching circuitry - SUCH AS PWM (i.e. Pulse Width Modulation). Why? Because the abrupt rising/falling edges of the pulses contain very high frequency Fourier components, and inductance becomes increasingly significant at higher frequencies. [Recall that the magnitude of the impedance of an inductor is proportional to frequency (f), i.e.:
|Z| = wL = 2pf L].
PWM(pulse width modulation) is often used as a power efficient means of controlling motor speed. But one must recognize that rapid switching of relatively large currents, through an inductive load, (such as a DC motor or a relay) is bound to induce large EMF spikes [recall that the voltage across an inductance is given as V = L dI(t)/dt] as an "ideal" switch tends to instantaneously turn off the current [i.e. dI(t)/dt approaches minus infinity].




Calculating Amp-Hour Ratings:

Disclaimer:
If available, use supplied amp-hour ratings. These calculations will only give a "ballpark figure", as actual Amp-hour ratings vary by manufacturer due to subtle differences in manufacturer design and continuing improvements in production processes.

The following figures allow one to "roughly" estimate the amp-hour reserve of common batteries. This becomes useful as many commercial batteries are not provided with an amp-hour rating by the factory. These figures are derived based on the "energy density" (ED) of various common batteries, where ED has units of "Watt-hours per cubic inch". Thus if you know the nominal voltage and the volume (in3 of a battery), you can calculate the amp-hour rating as:
Ah = ED*VOLUME/VOLTAGE.


[These figures are from "Circuit Cellar Ink" - Issue #55, February '95, Battery-operated Power Supplies, by David Prutchi.

Non-rechargeable batteries:

TYPEEnergy Density
(WattHr/in3)
Max. Volt./Cell
Alkaline3.51.5V
Lithium84V
Zinc Carbon
(Standard)
21.5V
Zinc Carbon
(Heavy Duty)
2.51.5V


Re-Chargable Batteries:

TYPEEnergy Density
(WattHr/in3)
Max. Volt./Cell
NiCAD1.21.35V
Sealed Lead
Acid
11.35V
Nickel-Metal
Hydroxide
2.51.4V


Physical Volume of various cells (as roughly measured):


TYPEApproximate
Dimensions
Approximate
Volume(in3)
AAA(5/16" Diam. x 1-5/8" Length) p(D/2)2 x L = 0.125 in3
AA(0.5" Diam. x 1.8" Length) p(D/2)2 x L = 0.35 in3
C(13/16" Diam. x 1-5/8" Length) p(D/2)2 x L = 0.78 in3
D(1.25" Diam. x 2-1/8" Length) p(D/2)2 x L = 2.6 in3
9V1"W x .5"D x 1-5/8"L W x L x H = 0.81 in3


Approx. Amp-hour Ratings of common batteries:
[Calculated using above figures - AH=ED*VOLUME/VOLTAGE]

TypeAAAAACD9V
Alkaline0.3Ah0.82Ah1.82Ah6.1Ah0.31Ah
NiCAD-0.35Ah0.78Ah2.6Ah*0.12Ah
NiCADs
As Published by
Vinnic Co.
0.18Ah0.55Ah1.8Ah 4.0Ah---
*-Note: Most commercial NiCAD "D" cells are actually "C" cells in a D package!

To emphasize that these are rough estimates, compare the fact that typical actual ratings (see last row of above table - published Ah ratings of "Vinnic" co. cells) are about 50% higher than our estimated ratings - yet we're at least in the ballpark. However, the spec'd Amp Hour ratings may be inflated as well -- there are several accepted standards for measuring Amp-Hour ratings! Be aware that under higher current loads (e.g. when driving DC motors!!!) the "usable" Amp-Hour rating of a battery will diminish! The best way to gauge how long your robot can operate on a recharged NiCAD pack is to simply try it out under normal operating conditions, and time it.

Typical constant current battery charger
Typical constant current battery charger

The above circuit will work for charging most NiCADs. The +12V could be supplied by an easily available wall transformer with a (unregulated) DC output. You can then purchase a cheap 120V timer (at Builder's square, e.g.), and set it up to turn off after 14 hours. Choose the resistor "R" appropriately. I noticed that Radio Shack NiCads always give you the recommended charging current. E.g., I just purchased some "AA" NiCads at Radio Shack, and they recommend charging at 45mA for 14 hours. In this case, I would choose R=5V/45mA = 110 Ohms. After the timer turns the +12V supply off, the series diode protects the 7805 so that backfed current from the battery will not destroy the 7805 regulator and discharge the battery. This circuit will charge up to 3V NiCad packs. If, e.g. you want to recharge a 9V NiCad cell or a 7.2V NiCad pack, you should use a +18V DC power supply to source the 7805 instead of a +12V supply.

Remember - if you ever run your robot in an actual contest, Confucius say: "A wise man always has an EXTRA SET of fully charged NiCADS lest the first set endure an untimely demise". Another option is to do your prototyping and testing using NiCADs, but replace them with new Alkaline batteries for the actual contest. (Alkaline batteries have about 3 times the energy capacity of NiCADS).



Back to Home Page