programmed in assembly language, C, or Basic. This
project was programmed using Bascom-AVR Basic.
Roughly 2/3's of the available memory is used by the
program, allowing room for future revisions or
The current software includes several convenience
features. By first entering a "Programming Code," the
microcontroller beeps three times and the user then
enters the access code of their choice. This code is saved
in the microcontroller's EEPROM memory for future use.
The access code can be changed at any time by simply
Many programs contain a "back door" or secret access
code, and this project is no exception. A secret access
code also exists which will always work and can not be
changed by user re-programming described above.
If the user presses the second key on the keypad prior
to entering their access code, the second door (Door #2) is
activated instead of Door #1. A single keypad and access
code can therefore be used to open or close either door.
Once a valid access code is entered and a door is
activated to either open or close, one can press any key
on the keypad to instantly stop the door. This feature is
&2/. 4 0!.%, 3 %.#,/352% 3
#USTOMIZED FRONT PANELS CAN BE EASILY
DESIGNED WITH OUR FREE SOFTWARE
&RONT 0ANEL $ESIGNER
s #OST EFFECTIVE PROTOTYPES
AND PRODUCTION RUNS
s 7IDE RANGE OF MATERIALS OR
CUSTOMIZATION OF PROVIDED
s !UTOMATIC PRICE CALCULATION
s &ABRICATION IN OR DAYS
PLUS 3 (
WWW FRONTPANELEXPRESS COM
active for 30 seconds after entering a valid access code.
If the incorrect door was activated or if one needed to
stop the door quickly, it can be easily done without
remembering and re-entering the entire access code.
Programming the Microcontroller
The operating program — written in Basic — must
be compiled to generate a hex file which can be loaded
into the ATtiny2313 microcontroller. Both versions of
the program are available on the Nuts & Volts website
( www.nutsvolts.com). If you are familiar with
programming AVRs, you are all set. A programmer is used
to load the hex file into the microcontroller and many
different programmers exist. A low cost approach is the
AVR STK Serial Port Dongle Programmer available from
SparkFun Electronics (~$12.95). This device is used with
the free PonyProg software. An ATMEL Butterfly
demonstration board (~$21.00) can be easily converted
into an AVR ISP programmer using the free ButtLoad
program. The ATMEL STK500 (~$85.00) development
board/programmer provides extensive testbed and
Additional options and further information on
programming can be found on the ATMEL and AVR
Freaks websites given in the parts list. Instructions on
downloading the program (hex file) into the
microcontroller chip are provided with each of the above
programmers, and in tutorials on the ATMEL, AVR Freaks,
and SparkFun Electronics websites.
A circuit board was developed for this project using
ExpressPCB and their software. The board layout is
available and is posted with the software. The board
includes a 10 pin programming header for use with the
above programmers. Additional pads are provided on the
board for adding an external crystal, its capacitors, an LCD
contrast potentiometer, and for connecting to the USART
pins. These are unused in this project, but are useful for
Let Me In!
This project demonstrates the incredible power
and capability of small, inexpensive microcontrollers
to perform everyday tasks and make our lives easier.
With just a handful of components, a truly useful and
convenient project can be assembled in a weekend. It
demonstrates interfacing to a low cost matrix keypad and
the software techniques required to read and debounce
the keypad input. Additionally, the project demonstrates
interfacing a microcontroller to LEDs, relays, and
Keypad access is both a great convenience and
security measure. This project shows the ease of its
implementation. But stay tuned for Garage Access Version
2, using ATMEL's biometric fingerprint Fingerchip sensor
to make keypads a relic from the past!