Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The system is
DTMF Automated Door System approximated to cost $500 to implement.
D. PIC Microcontroller
F. LCD Display
The chosen LCD has a TTL level serial link to the PIC
microcontroller. Although most LCD’s receive data
through a parallel data bus, the LCD from Parallax
incorporates an onboard microcontroller to allow for serial
transmission. Data is sent to the LCD using ASCII
characters encoded as hex values. The display contains
preset values for turning on and off the backlight and
clearing the display. The LCD requires 5 Vdc and 80 mA
to operate.
G. 12-Button Keypad
As mentioned earlier, the system user will have an option Figure 9 DS1307 Real-Time-Clock
to view call information and access maintenance menus.
The user interface will be a 12-button keypad (shown in The DS1307 employs the 2-wire I2C serial protocol for
figure 8) by Grayhill mounted to the main system box. transmitting and receiving data. (One wire is used for the
The link between the keypad and the PIC is a 7-pin header system clock and synchronization, the other is used as the
that conforms to a row-column matrix configuration. serial data bus). The clock/date data contained in the
Since all of the keys on the keypad represent valid DS1307 is stored in registers. In order for the data to be
numbers and symbols in the DTMF system, each of the retrieved, the specific register address must be known. The
seven pins had to be connected to the microcontroller. A I2C protocol defines a data packet format to access the
scanning routine was programmed into the PIC that registers. The data packet contains a “control-word” that
determines whether a read/write operation is being devices will be accomplished through a simple TTL level
performed; as well as the address of the device to be serial interface. The data transmission speed is
accessed. (The I2C serial interface allows multiple devices configurable up 19.2 K baud. The data to be sent through
to be connected to the same serial bus. Each device must the RF modules will consist of an address byte and a
have a unique address). The data packet also includes an control byte. The address byte will be used to distinguish
“address-word” used to read the data registers in the between the multiple doors, and the control byte will be
device from a specific location. Since the DS1307 used to communicate door action to be performed.
contains registers for the year, month, day, hour, minute,
and second, multiple read operations had to be
programmed into the PIC to retrieve all the necessary
time-stamp data. (The only port on the PIC16F877A
capable of implementing the I2C protocol is Port C). The
DS1307 clock and data pins were connected to RC3 and
RC4 on the PIC, respectively. The retrieved data will be
stored in the serial EEPROM for later use. The DS1307
requires 5 Vdc to operate; the required current is
insignificant. (The DS1307 also has a battery back-up to
retain data in the case of power failure).
I. Serial EEPROM
The DTMF systems allows the user to access call log data
that contains the time of day called and the actions
performed. The log information needs a storage medium.
As mentioned earlier, the PIC18F877A only has a 256
byte internal EEPROM. If the DTMF system is to store
data of a substantial size, an external memory module is Figure 10 Parallax RF Tx/Rx
required. The component chosen for the memory device is
the 24FC1025 1MB I2C Serial EEPROM from Microchip. The devices operate on 5 Vdc and 5 mA of current. Both
The EEPROM will be connected to the PIC using the the Tx and Rx have a power down pin that can be used to
same I2C data bus as the RTC. Since the device uses the command the devices to enter power-save mode.
I2C protocol, a different data packet with the specific
EEPROM address had to be programmed into the PIC. A K. Remote Microcontroller Modules
1 MB capacity was chosen in order to store an extensive
call log. For example: Each data register from the RTC is The DTMF system will access the doors via a remote
1 byte. The clock data is stored in 6 registers: (6 bytes). microcontroller module. The module will contain the
Assuming the system is accessed 20 times per day: (6 following components: An RF Receiver (discussed
bytes X 20 = 120 bytes of data per day). 1 MB / 120 bytes earlier), a PIC microcontroller, an address circuit, a power
= 8333 days or approximately 23 years !!! In the event supply, and a solid state relay.
that the EEPROM is filled, the next data string will simply
overwrite the first memory location. The 24FC1025 - PIC Microcontroller:
requires 5 Vdc to operate; the required current is
insignificant. The device chosen for the microcontroller is the
PIC16F87. The specifications for the PIC are as follows:
J. RF Tx/Rx System
Program Memory: 7168 Bytes
In order for the DTMF system to open a door, a signal has Data SRAM: 368 Bytes
to be sent to the remote control modules. The link between EEPROM: 256 Bytes
the DTMF system main box and the remote modules will I/O Pins: 16
be accomplished through an RF communication path. The 10-bit ADC: 0
devices chosen to provide the RF link is the 433.92 MHz PWM Channels: 1
Tx/Rx matched pair from Parallax (shown in figure 10). SPI Capable: Yes
The devices have a transmission range of approximately I2C Capable: Yes
500ft. The link between the PIC16F877A and the RF Onboard UART: Yes
8/16 bit Timers: 2/1
Comparators: 2 The door latch will be controlled by a door solenoid
distributed by SmartHome (shown in figure 12). The
The PIC16F87 has an internal 8 MHz oscillator that solenoid requires 12 Vdc and 900 mA to operate. The
eliminates the need for an externally connected clock. solenoid will be molded into the door frame and will
receive a 5 second pulse during which the door can be
- Address Circuit: opened.
- Power Supply:
Figure 11 LM7805 Voltage Regulator C. The PIC seizes control of the phone line by
pulling the /OH pin low on the XE0092.
- Solid State Relay:
D. The PIC energizes the EMIC voice module to
The device used to control the flow of current to the door play the welcome greeting and voice prompting the user
solenoid (to be discussed later) is a solid state relay. The for an access code.
relay had to be carefully chosen to allow the switching of
a DC load (Solid state relays usually switch AC loads). E. The user presses buttons on the phone keypad
Additionally, since the PIC16F87 can only source 25 mA which sends DTMF tones to the MT8870 DTMF decoder.
per pin, the relay coil had to have a small turn-on current.
The chosen component is the MPDCD3 from Crydom. F. The DTMF decoder validates the tones and
The relay contacts can switch 60 Vdc up to 3 amps and produces a 4-bit binary word at its outputs corresponding
have a turn on current of 3 mA. to the decoded DTMF tone.
L. Door Solenoid: G. The PIC receives the binary word and compares
it to stored user data. If the data is correct, the PIC
energizes the EMIC to play the menu options. If the data
is incorrect, the PIC energizes the EMIC to play an error The previously described components and operational
message. If the user enters three incorrect access codes, overview encompass the Senior Design project to be
the PIC will energize the EMIC to play an “Unauthorized implemented by the authors.
user” message and will pull the /OH pin on the XE0092
high. (When the /OH pin is pulled high. The phone line is Acknowledgements
released).
The authors wish to acknowledge the assistance of Don
H. If the access code was correct, the PIC instructs Partin BSEET, Brian Walters BSEE, William Moore
the EMIC to play the menu options. BSCS, and Paul Gunnels BSCE PE.
I. The PIC waits for the user to select from the Biography
menu. (While the PIC is waiting, the RTC is checked
periodically to determine the time between subsequent
user entries. If the user waits more than 30 seconds David Marchetti is currently a
between entries, a “time-out” message is played to warn senior at the University of
the user. If the user continues to wait before entering more Central Florida and will receive
data, the PIC will instruct the EMIC to play an exit his Bachelor’s of Science in
greeting and the phone line will be released). Electrical Engineering in May
of 2007. He will be taking the
J. The user presses keys on the phone to select FE in October 2007
options from the voice prompted menu.
IV. Conclusion