the Propeller’s multi-processor capability. It consists of the
“Debug LCD” object and the “servoEngine” object. Both
objects are run in separate cogs (processors) and can be
operated independently and/or simultaneously. The way
the software works is that the program launches the
objects and then checks for a button press. It then displays
on the LCD “Lockdown in 10 seconds.” It counts down
and if the button is not pressed in 10 seconds, the servo
moves 90 degrees (for continuous rotation, this took a lot
of trial and error). The box is then locked and the device
must be reset to use the RFID card. To turn the device on
and off, you (obviously) use the power switch on the
front.
When the button is pressed, the LCD displays
“Lockdown Cancelled” and the Propeller switches to the
RFID scan loop. The RFID code is from a demo posted in
the Propeller Object Exchange but has been modified to
fit the needs of this project. The one notable part of the
program is the small section in between a servo on and a
servo off command:
Waitcnt ((clkfreq/20)*4 + cnt)
This line is for repositioning the servo after startup.
Upon startup, the servo would give a little “twitch” caused
from the sudden spike of the power supply. The servo
didn’t turn more than two degrees, but it was enough to
lock the box (locking because it was always twitching
clockwise). This waiting period (also a matter of trial and
error) was designed to twitch the servo back into its
leave the negative intact. Strip and tin the wires.
Separate the positive and negative wires, and pull them
apart so they’re easier to work with. Connect the
positive from the battery side to one of the contacts on
the SPST switch. Solder the positive wire from the barrel
connector to the other contact on the SPST switch. Plug
the barrel connector into the board. For a permanent
solution, solder the wires directly to the board. See
Figure D and Figure E for a view of the connections.
■ FIGURE C.
BILL OF MATERIALS
QTY DESCRIPITION
1 Wooden box
1 Pistol lock and key
1 Servo
1 RFID reader (serial)
1 LCD 2x20 backlit
1 14” LCD extension cable
2 Three-pin header
1 Propeller protoboard (USB or not, doesn’t matter)
10 Three inch wires
1 Normally open pushbutton
1 10K resistor
1 SPDT switch
About 12” of wire
12” x 12” sheet of sheet metal
Hot glue
(Optional) a breadboard and four 10-pin female headers
RESOURCES
A board and pre-programmed microcontroller
will be available soon at
www.gadgetgangster.com.
The Arduino blog that inspired
this: http://arduini
ana.org/projects/the-reverse-geo-cache-puzzle.
For more information
on RFID technology,
check out these links:
http://electronics.howstuff
works.com/gadgets/high-tech-gadgets/ rfid.htm and
http://en.wikipedia.org/wiki/
Radio-frequency_identification.
Corbin Adkins
microcontrolled@gmail.com
■ FIGURE D.
■ FIGURE E.
July 2010 31