values manually. Just click the Screen Capture icon
(Figure 7) and a snapshot of the screen is captured and
saved to the hard disk.
To view the snapshot, click on the Screen View icon
(Figure 8) and use the small arrow keys at the bottom of
the snapshot to scroll back and forth among the images.
This is a great way to do any of the experiments in this
series — especially the ones where data changes rapidly.
Figure 9 shows a typical captured screenshot overlaid
on the real-time plot.
Take a snapshot once every minute while the
battery discharges. Then, add up the power readings
and divide by the number of samples taken. The average
power is now in watt-minutes. To convert to watt-hours,
simply divide watt-minutes by 60. With either value, you
have a true indication of the amount of total energy
available in the battery – for the 10 ohm load, that is.
To be thorough about this, you should repeat the
charge-discharge cycle several times to verify your
findings, and in so doing, change the load resistance to
something like five ohms or three ohms. For new NiMH
batteries, it is necessary to cycle them three to five times
before they reach peak performance anyway. This will
show how well the battery performs under heavier loads
which are common in model cars with DC motors that
stop and start, go slow and fast, and travel up and down
as they do, the motor’s resistance changes which causes
more or less power to be absorbed from the car’s battery.
As my college professors used to say “Proof left to
student.” It got them off the hook for actually explaining
things and put the onus on the students to do the grunt
research work. Except this time it will be worth it to you to
charge and discharge the batteries with different loads to
fully understand the concept of battery capacity. Plus,
you’ll improve your battery’s overall performance, as well.
Part 3: Building an “On-Demand”
Solar Powered Battery Charger
Figure 7 – Screen Capture Icon.
Figure 8 – Screen View Icon.
By “on demand” I mean the firmware will first test
the battery for its voltage level and then decide whether
or not to turn Q1 ON. If the battery is above the “full
discharge” voltage (as indicated by a constant in both
firmware code versions), Q1 will remain OFF and the
battery will be allowed to discharge into the load. When
the battery reaches the full discharge voltage, Q1 is turned
ON and the battery is allowed to charge until it reaches
and maintains the “full charge” voltage for a period of
time. You will notice that the full charge and discharge
voltages are far apart enough so that “toggling” between
charging and no charging is avoided. The technical term
for this is called “hysteresis.” Plus, the firmware has a
timing loop to help prevent this, as well.
How the Code Works
The firmware that handles the battery charging is
explained next. You will need to refer to the code and
the algorithm in Figure 11 to follow along. Code files are
listed at www.learnonline.com and www.nutsvolts.com.
Test Battery Voltage
After initialization, the firmware enters the Test_
With all this background information, you can
now feel confident about knowing what to anticipate
in terms of how a NiMH battery will behave and
what an automatic battery charging circuit should
do. The front end of our version is illustrated in
You will notice that I added an NPN transistor,
Q1 (a 2N3904 or 2N2222 — your choice), between
the solar panel and battery that acts like an ON-OFF
switch to allow current to flow (or not) from the
solar panel into the battery. Q1 is turned ON by
setting the output pin connected to the 470 ohm
base resistor to a HIGH. This allows current to flow
from the solar panel into the battery in order to
begin the charging cycle. Q1 is turned OFF by
setting the output pin to LOW. I’ve also added an
LED and another 470 ohm current limiting resistor to
indicate when charging is taking place.
Figure 9 — Screen View Snapshot in
Main Screen Area.
October 2009 49