Basic stamp homework board manual
Parallax, Inc. • BASIC Stamp HomeWork Board ver 1.1 Page 5
MilliAmp hours is a statistic measuring the amount of energy stored in a battery. For
example, if you have a 1 mA-hr battery and a project drawing 0.5 milliamps, the battery
will last for two hours. A typical 9V Duracell alkaline transistor battery provides about
565 milliAmp hours of energy.
If the BASIC Stamp is being used in a project where at least some small amount of time is spent doing nothing
you can put it in a low-power mode to extend battery life using the SLEEP command (Table 2). The duration
which you put the BASIC Stamp to SLEEP is accurate to ± 1% at 75° F and can ranges from 2.3 seconds to 18
hours (you can “wake up” and go back to sleep after 18 hours). By comparison, the PAUSE command is simply a
delay in a PBASIC program yet the BASIC Stamp continues to draw full operating current. See the BASIC Stamp
Windows Editor on-line help for all the details on the SLEEP and PAUSE commands.
Table 2
BASIC Stamp 2
and Power LED
current draw
during different
modes of
operation.
BASIC
Stamp
Current
Draw
Power LED
Current
Draw
Possible Battery Life
PAUSE Mode
8 mA 2 mA (565 mAh/10 mA)
= 56.5 hours
SLEEP Mode 40 µA 0 mA (565 mAh/(40 µA/1000
mA) = 14,125 hours
Note: 1 mA is 1/1,000
th
of an Amp. 1 microAmp (µA) is 1/10,000
th
of an Amp.
Maybe putting a BASIC Stamp to SLEEP permanently only demonstrates that a 9V battery can last almost two
years if you wake the BASIC Stamp once in a while. In reality, projects need to wake up and provide current to
“loads” like LEDs and other chips used in your project. If you know the current draw of the individual components
and how long they are activated you can make an educated guess at total current consumption and battery life. If
you’re only visiting your North Pole weather station annually even a small battery can provide a long lifespan for
the BASIC Stamp, not to mention larger batteries with more milliamp hours.
To clarify the BASIC Stamp’s different power consumption operating scenarios and their effects on battery life
review the following two programs in conjunction with Table 2. Downloading and understanding these programs
will require a look ahead to future chapters, so be prepared to re-visit this section.
Both programs have the same result. The BASIC Stamp will send numbers to the BASIC Stamp Windows Editor
debug window and then go into a period of inactivity for a second. With the PAUSE example the power LED
remains on because the EEPROM is still communicating with the BASIC Stamp interpreter chip, but with the
SLEEP example the EEPROM is shut down and the power LED is off.
With this example the Power LED remains on when the PAUSE command is executed. Current consumption
remains at 10 mA.
' POWER DEMO - PAUSE.BS2
' Demonstrating the power LED with SLEEP command
' {$STAMP BS2}
' I/Os, Constants and Variable definitions
loopCounter VAR Byte
' Main Program
Start:
FOR loopCounter = 0 to 99
DEBUG Home, "loopCounter =", dec loopCounter
NEXT
PAUSE 1000
GOTO Start