This is a great help in understanding what is really going
on with the circuits under test and it aids in computing
power and resistance, as well. To do this, probably the
most overlooked, most misunderstood, and possibly most
powerful operator in the entire Basic language repertoire
is employed; that is, the middle multiply operator known
by its “*/” symbol. What it does is impart floating point
math to Basic.
If you’ve ever wanted to multiply a number or variable
by an integer-fraction like 1.22 (i.e., a floating point
number), this is the operator to use. While it’s not a
full-bodied floating point that will multiply your number to
10 digits after the decimal point, it will certainly get the
job done in terms of what we need to do. And what we
need to do is multiply a raw binary A/D count by the
millivolts per count value that each bit represents. For
example, our 12-bit A/D converter resolves each bit to
1.22 millivolts per count with a five volt reference ( 5,000
mv / 4096 = 1.22 mv/count). So, to convert raw A/D
counts to millivolts, do the following:
this in their BASIC Stamp Manual, which is how I first
discovered it and began to use it. Other Basics need to
follow suit with clearer, more functional explanations
(I won’t mention any names). Do the same for our PICAXE
10-bit A/D converter that resolves each bit to 4.88
millivolts per count ( 5,000 mv / 1024 = 4.88 mv / count).
Hint: The answer is $04E1. Proof left to student.
• First, separate the integer part (1) from the fractional
part (. 22).
• Take the fractional part and manually
multiply by 256, as in 256 . 22 = 56. 32.
• Round up the 56. 32 to the closest
integer (or 56, in this case).
• Convert 56 decimal to 38 hex.
• Convert the integer part to hex,
as well as in 01 hex.
• Combine the two hex numbers into
a 16-bit Word variable as in 0138 hex.
• Multiply the A/D count by 0138 hex
as in 1000 */ $0138 = 1220 ($ hex).
• The answer is now directly in
I’ve devoted this article to more on the background of
battery technology and proper charging techniques than
to pure alternative energy, but the two are closely linked
since charging batteries this way obviously saves energy
and doesn’t create air pollution. Next time, we’ll build a
sun tracker-battery charger combination that will follow
the sun all day instead of you needing to adjust the solar
panel manually for maximum sunlight.
This is a cool experiment that I hope you will enjoy
and, of course, it uses the BS2 and 28X2 micros as the
main controllers. So, until next time, conserve energy and
“stay green.” NV
This is an example of
the simple battery
using the Parallax
BS2 inserted into the
Board of Education.
solar panel shown
here and referred to
in the parts list on the
is used in all of the
For its physical size,
voltage and current
series-parallel combinations, it is one of the most versatile solar panels
I’ve come across in a long time.
Parallax does a great job in explaining
Gizmos that bring your dreams to life!
Starting at $1.50
9V 1 Amp $4
12V 2 Amp $8.50
12V / 5V $15
How About Soldering Supplies?
Variable Temp Solder Iron w/ 3 tips $29.95
6 piece Tweezer sets $5.00
1000’s of LED in stock
1.8mm, 3mm, 5mm,
and 10mm from $. 40
1/2 watt $.95
1 watt Stars $3.60
UV 5mm $.95
(Want more? See our web store)
Intel USB Web Camera
Composite video in
Focus distance 10cm-up
3 meter USB cable
[ This space intentionally left blank]
$. 50 to $2.00
NIMH Battery Packs
8.4V 2000mAH $2.50
5797 NW Cornelius Pass Road
Hillsboro Oregon 97124
To see the best deals join our
online mailing list or stop by our
October 2009 51