Parallax 29158, 29157 User Manual

599 Menlo Drive, Suite 100 Rocklin, California 95765, USA
Office: (916) 624-8333 Fax: (916) 624-8003
General: info@parallaxinc.com Technical: support@parallax.com Web Site: www.parallax.com Educational: http://www.parallax.com/html_pages/edu/
BASIC Stamp HomeWork Board
#29158 10-pack of Breadboard version #29157 10-pack of Through-Hole version
Introduction
It’s not often that we start technical documentation with a bit of marketing punch. If you like the low cost of a BASIC Stamp Rev. D (retails ~$34) and the idea of a half-price BASIC Stamp 2 / Board of Education (retails ~$109) then the BASIC Stamp HomeWork board is the ticket for your class. This is the least expensive way to get a large educational group started with the BASIC Stamp.
The HomeWork Boards were created exclusively for educators to send home with students with these uses in mind:
BASIC Stamp-related homework assignments
Dedicated science-fair, contest or hobby projects
Students who express personal interest in further developing their BASIC Stamp projects but can’t have
their own Board of Education / BS2 due to it’s higher cost
Since it’s less expensive than the Board of Education / BS2 module, can the board be used for Stamps in Class experiments? Possibly, with the following considerations:
Servo connection ports for robotics are not included on the HomeWork Board. It’s possible to use
male/male headers for servo connections with a second power supply jumpered to the HomeWork Board to control servos.
220 ohm resistors are built into each of the 16 I/O pins for current protection so the PBASIC interpreter
cannot be easily damaged. This protects the BASIC Stamp from over-current conditions but also slightly changes the behavior of the Stamps in Class experiments if used on this board based on the command being used.
Stamps in Class circuit pictorials do not match the HomeWork Board. Again, minor workaround once
you understand the difference between the power supply options.
Power supply is from a 9V battery, not the wall pack.
Current supply from the on-board regulator is limited to 50 mA versus the Board of Education’s amp or
more.
However, these cost-reducing limitations do not limit the use of the HomeWork Board for other projects. In fact, the minimalist design is simple to use and entirely flexible for most projects.
Parallax, Inc. • BASIC Stamp HomeWork Board ver 1.1 Page 1
Package Contents
The BASIC Stamp HomeWork Board is sold only in quantities of 10. The reason for this is that the board is intended for the educational market only, to be purchased by educators for use in their classrooms. The kit includes only the boards – nothing else.
BASIC Stamp HomeWork Board Hardware Design
BASIC Stamp HomeWork Board uses the BASIC Stamp 2 surface-mounted directly to the printed circuit board. The BASIC Stamp 2 has a wide variety of available support hardware, code examples and applications. Further, it performs most of the same functions of the newer BASIC Stamps though with less speed and memory. The BASIC Stamp 2’s technical specifications are shown below (Table 1). Also review the hardware (Figure 1) and schematic (Figure 2).
Table 1
BASIC Stamp
HomeWork Board
Specifications.
Microcontroller: PIC16C57 surface mount Speed: 20 MHz / ~4,000 instructions per second EEPROM: 2K bytes (program and data) Program Length: 500 lines of PBASIC RAM (variables): 32 bytes (6 for I/Os and 26 for variables) Input / Outputs: 16 (up to 17 RS-232 communication ports) Source / Sink Current: 50 mA / 50 mA Serial Communication: 300-50K baud I/O Current Requirements: 7 mA running, 50 uA in sleep PC Interface: Serial port
Power Supply:
Environment:
HomeWork Board Size: 3” x 4” Project Area: Built-in breadboard on StampLab Microcontroller: PIC16C57 surface mount Speed: 20 MHz / about 4,000 instructions per second EEPROM: 2K bytes (program and data) Program Length: ~500 to 600 lines of PBASIC
5 V through an LM2936 regulator from a 9V transistor battery 32 to 158° F (0 to 70° C), 70% non­condensing humidity
Parallax, Inc. • BASIC Stamp HomeWork Board ver 1.1 Page 2
Figure 1
B
StampLab printed
circuit board keyed
with part
identifications.
S
T
A
M
P
i
n
S
C
L
A
S
S
A
P15 P14 P13 P12 P11 P10
H
Power
GG
Reset
F
BASIC Stamp HomeWork Board
P9 P8 P7 P6 P5 P4 P3
E
P2 P1 P0
(916) 624-8333 www.parallaxinc.com www.stampsinclass.com
C
Vdd VssVin
X3
X4
D
© 2002
Rev A
A. BASIC Stamp 2 Module. The BASIC Stamp is comprised of several components: PIC16C57-20/SS
- a Microchip 2K 8-bit microcontroller programmed with the the BASIC Stamp “Interpreter” that runs the Parallax BASIC Stamp code like a mini operating system; the 24LC16B EEPROM - a Microchip 2K EEPROM (electrically erasable programmable read-only memory) with a user-modifiable read­only memory (ROM) that can be reprogrammed with your BASIC Stamp code; a 20 mHz resonator to provide an accurate clock source for the BASIC Stamp; 220 Ohm resistors across the I/O pins to provide current protection for mistake wiring; an LM2936 voltage regulator which provides 50 mA for the BASIC Stamp and your circuits powered from the breadboard’s Vdd connection.
B. DB-9 Female. The DB-9 port connects via serial cable to your PC’s serial port. This port is used to
download programs to your BASIC Stamp and for the BASIC Stamp to send data back to the PC.
C. Power and Ground Connections. Vdd is regulated 5V, Vin is 9V from the transistor battery, Vss is
ground.
D. Breadboard. Two areas of 5 column x 17 row breadboard project area. Connections are horizontal
separated by the trough.
E. Power Button. Illuminated when the BASIC Stamp is running a program only.
F. Reset Circuit. Reset the BASIC Stamp by pressing this button.
G. Battery Tie-Downs. If using the HomeWork Board Through-Hole Version for projects involving high-
vibration (on R/C airplanes, robots, etc.) a “zip-tie” can hold the battery firmly to the board if looped through these holes.
H. Power Supply. Accepts a 9V battery.
Parallax, Inc. • BASIC Stamp HomeWork Board ver 1.1 Page 3
Figure 2
BASIC Stamp
HomeWork Board
Schematic
Vin
Vdd
20 MHz
N/C
Vdd
A0A1A2
R1
R2
RN1-2
Dat
Clk
24LC16B
Vss
Vss
13 12 11
10 9 8 7 6 5 4 3 2 1
X3
X4
16
Vss
P9
P10
P11
P12
P13
P14
P15
10k
100
D2
0Ω
PowerLED
4.7k
P15
26
Vss
RC7
OSC1
OSC2
U1
VSS
RTCCI2VDD3VDD
1
4
Vdd
0Ω
RN5
RN4
22
22
P8
P9
P10
P11
P12
P13
P14
RC0
RC1
RC2
RC3
RC4
RC5
RC6
(PBASIC2/SS)
PIC16C57-20/SS
RA05RA16RA27RA38RB09RB110RB211RB312RB4
P0P1P2
Vss
Breadboard
123456789101112131415
P0P1P2P3P4P5P6P7P8
0Ω
RN3
22
P4
P5P6P7
15161718192021222324252827
RB5
RB6
RB7
VSS
13
14
Vss
P3
0Ω
RN2
22
µF
C1
10
+
Vdd
3
VOUT
VIN
VR1 LM2936
1
Vin
9V Transistor
RN1-4
4.7k
4.7k
RN1-3
Vdd Vdd
10k
10k
Vdd
2
VSS
Battery
PB1
Reset
1/2 UM11TN
DTA114EETL
1/2 UM11TN
RN1-1
4.7k
162738495
Vss
Vss
Vss
10k
10k
10k
10k
Vdd
U2
Vss
µF
µF
C4
C3
0.1
0.1
J2
DB9 Female
Power Consumption and Battery Life
Parallax normally designs BASIC Stamp boards with power jacks for wall transformers. Wall transformers provide plenty of power but they are not as portable for science fairs, robots and environmental datalogging. Considering that the BASIC Stamp draws only small amounts of current it could be deployed in a remote location and run from a battery for a long time.
The BASIC Stamp has commands for reduced power consumption, but what about the power indicator LED? It could drain the battery in a day or two by itself if being used to indicate a power supply! LEDs consume current, typically 10-12 mA. Removing the LED wasn’t an option since it discloses the common technical support problem of a missing power supply.
The solution was to connect BASIC Stamp HomeWork Board’s power LED to the “clock” line of the BASIC Stamp’s EEPROM. The EEPROM’s clock line is active only when the BASIC Stamp is actually running a program. Moreover, the BASIC Stamp HomeWork Board’s power LED is a low current LED consuming only about 2 mA.
Parallax, Inc. • BASIC Stamp HomeWork Board ver 1.1 Page 4
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.
Note: 1 mA is 1/1,000th of an Amp. 1 microAmp (µA) is 1/10,000th of an Amp.
PAUSE Mode
SLEEP Mode 40 µA 0 mA (565 mAh/(40 µA/1000
BASIC Stamp
Current
Draw 8 mA 2 mA (565 mAh/10 mA)
Power LED
Current
Draw
Possible Battery Life
= 56.5 hours
mA) = 14,125 hours
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
Parallax, Inc. • BASIC Stamp HomeWork Board ver 1.1 Page 5
With the SLEEP example the Power LED turns off when the SLEEP command is being executed because the EEPROM is inactive. Current consumption is 10 mA while the loop is being executed but drops to 40 µA during the SLEEP command.
' POWER DEMO - SLEEP.BS2 ' Demonstrating the power LED with SLEEP command STeve ' {$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 SLEEP 1 GOTO Start
Precautions
Be alert to static sensitive devices and static-prone situations. The BASIC Stamp, like other integrated circuits, can be damaged by static discharge that commonly occurs touching grounded surfaces or other conductors. Environmental conditions (humidity changes, wind, static prone surfaces, etc) play a major role in the presence of random static charges. It is always recommended to use grounding straps and anti-static or static dissipative mats when handling devices like the BASIC Stamp. Since you don’t have a dissipative mat, touch a grounded surface after you have approached your work area. This isn’t as critical as you might think but being prudent only protects your hardware.
Before building circuits, disconnect the battery.
Parallax, Inc. • BASIC Stamp HomeWork Board ver 1.1 Page 6
Loading...
+ 12 hidden pages