Item Quantity
13
21
31
41
51
61
71
81
94
10 1
11 1
12 1
13 1
Reference
C1,C2,C4
C3
D1
D2
D3
P1
P2
P3
R1,R2,R3,R4
S1
U1
U2
U3
Description
Capacitor, 0.1uF, 50V ceramic, 0805
Capacitor, 10uF, 16V tantalum, size A
LED, Red, 1206
LED, Green, 1206
LED, Blue, 1206
Connector, BS2 programming interface (do not populate)
GPS Receiver Module, Parallax #28146
Connector, 9V battery
Resistor, 470 ohm, 5%, 0805
Switch, SPST pushbutton, PCB mount, SKHHAQA010
BASIC Stamp II microcontroller, DIP24W
900MHz RF transceiver, Laird Technologies AC4490-200A
Linear regulator, L78M05ACDT 5V 500mA, DPAK
Table 1. Bill of Materials.
GOSUB GPS_Get_Lat
GOSUB GPS_Get_Long
Then, the coordinates are
transmitted to the base station in a
single stream of serial data. The ASCII
'A' and 'B' characters serve as a header
and footer, respectively, for the data
packet. This makes it easier for the
base station receiver to know where
the actual start of data is.
contains an on-board gigaAnt chip antenna. Refer to the
schematic (Figure 4) and bill of materials (Table 1) for
details.
The AC4490 module, U2, is a frequency hopping
spread spectrum (FHSS) transceiver that operates in the
unlicensed 900 MHz ISM (industrial, scientific, medical)
band. It is designed as a drop-in replacement for wired
connections and takes in TTL-level serial data, packetizes it
as necessary, and broadcasts it wirelessly. Once the
module is properly configured, all you need to do is send
and receive serial data as you would if two devices were
directly connected together — no need to worry about any
of the underlying wireless protocols or theory (unless you
want to, of course). You can achieve distances upwards of
four miles with the right conditions, such as line-of-sight
and proper antenna selection. The module provides
advanced control via an AT command set, and has
optional DES encryption and a choice of wireless network
architectures (point-to-point, point-to-multipoint, client-server, or peer-to-peer). D1, D2, and D3 serve as LED
indicators. The blue LED, D3, is the power indicator. The
green LED, D2, illuminates when the GPS receiver has
acquired satellites and is ready to go. D2 will blink if the
GPS receiver has not yet acquired the minimum number
of satellites. The red LED, D1, illuminates when the GPS
coordinates are being transmitted.
A single 9V battery connected through a ubiquitous
5V linear regulator, U3, provides power for the system.
The Firmware
Like the hardware, the code required for the
wristband GPS transmitter is straightforward.
Upon power-up, the system initializes itself which
consists of configuring the input and output pins, waiting
for the GPS receiver to attain a lock on the satellites, and
then waiting in a loop until the "distress" button (S1, noted
as the "save me" button on the schematic) is pressed.
Once the button press is detected, the system
retrieves the current GPS coordinates (using function calls
borrowed directly from the stock demonstration code on
Parallax's GPS receiver web page).
50 December 2010
SEROUT RF_TX, RF_Baud, ["A", degrees, minutes,
minutesD.HIGHBYTE, minutesD.LOWBYTE,
dir, long_degrees, long_minutes,
long_minutesD.HIGHBYTE, long_minutesD.
LOWBYTE, long_dir, "B"]
After that, the system sets the "transmitting" LED indicator.
LOW LED_Active
PAUSE 1000
What happens next is a bit confusing and written
primarily for ease-of-use during filming. In most real-world
cases, once the person presses S1, he would want his
coordinates to be transmitted continuously until he was
rescued. However, in my case, I wanted to be able to start
and stop the coordinate transmission at will using the
single button. If S1 is quickly pressed and released, the
GPS coordinates will be transmitted over and over again. If
S1 is still held down after the coordinates have been sent,
the system will reset and the transmission will stop. So,
quick push to start, long push to stop.
IF (Alarm_Trigger = 1) THEN
' keep transmitting until button is pressed
' GOTO SendGPSAgain
ELSE ' if button is held down after
' transmitting, reset system
WaitForDepress:
IF (Alarm_Trigger = 0) THEN GOTO
WaitForDepress
' wait for button to be released
GOTO Init
ENDIF
To remove my start/stop feature and change the code
to transmit coordinates repeatedly after a single press of S1,
you can just call GOTO SendGPSAgain immediately after the
PAUSE command and erase the check of Alarm_Trigger.
The Design Process
After sketching the design on paper, I built a quick