Published:2011/7/28 0:39:00 Author:Li xiao na From:SeekIC
Design by I. Joostens
Schematic diagram
The full schematic diagram of the system is shown in Figure 3. The functional blocks shown in Figure 2 can be recognized here without too much effort. The most important elements are described in more detail below.
Microcontroller, user interface, RS232 interface and programming port
Microcontroller IC1, an AT89S8252, is used here in a quite conventional manner. No external program memory is used; all of the firmware is located in the microcontroller’s 8-KB Flash memory. A fully programmed version of the microcontroller can be purchased from Readers Services, but the source code and executable software are also available from the Elektor Electronics website or on a pair of diskettes (see the Components List).
The microcontroller can be programmed via connector K4 using a standard 1:1 serial cable (not a null-modem cable) and a computer running the Elektor Electronics MicroFlash program. The microcontroller must be held in the reset state while it is being programmed. This is done using pin 4 of K4 (DTR), with the necessary level adjustment being provided by R9, R12 and D4, in combination with IC10, a 74HC126 quad tri-state buffer.
During programming, IC10 causes the signals on pins P1.5-P1.7 of the microcontroller (SPI bus) to be connected to K4. Here IC2 (MAX232) acts as a combined level adapter and RS232 driver. When the DTR line on pin 4 of K4 again goes low, the outputs of IC10 go into a high-impedance state, which isolates the programming interface from the rest of the circuit. In this state, SI acts as a normal reset button (in combination with Rl, R2 and CI).
The serial port (RS232) is built around an MAX232 in a conventional manner and is available on connector K3. BZ1 is a miniature piezoelectric buzzer that can be driven directly from a microcontroller I/O output.
Real-time clock
The real-time clock is formed by a PCF8573 (IC3) in combination with a watch crystal (X2) and a trimmer capacitor (C22). The IC, which can be completely controlled via an I_C interface, accurately maintains the date (day and month) and time of day (hours and minutes). R3 and R4 are included because the microcontroller PO port does not have internal pull-up resistors.
1-wire interface
The 1-wire interface is connected to microcontroller interrupt pins INTO (P3.2) and INT1 (P3.3) via several resistors and Zener diodes. When an iButton is held against a key reader, the associated I/O pin of the microcontroller is briefly pulled to ground. This generates an interrupt, which triggers an interrupt routine that ultimately reads the data from the iButton for further processing by the main program.
As the internal pull-up resistors in the microcontroller have fairly high resistances, R5 and R5 are included to provide additional current for the 1-wire bus. According to the 1-wire protocol specification, R5 and R6 normally have a value of at least 1.5 k_, but if the distance between the key reader and the access control system is relatively long, better performance can be obtained by using a somewhat lower value. From experimental tests, a value of 820 Q will allow the system to easily handle a distance of more than 100 metres between the access control system and the key reader.
R7, R8, Dl and D2 protect the I/O pins against high voltages from electrostatic discharge or attempted sabotage. For instance, they enable the microcontroller to survive someone holding a 9-V battery against the contacts of a key reader.
Reprinted Url Of This Article: http://www.seekic.com/blog/project_solutions/2011/07/28/iAccess__an_intelligent_access_control_system_(2).html
Print this Page | Comments | Reading(1124)
Author:Ecco Reading(32821)
Author:Ecco Reading(3526)
Author:Ecco Reading(3246)
Author:Ecco Reading(3801)
Author:Ecco Reading(5331)
Author:Ecco Reading(3315)
Author:Ecco Reading(3462)
Author:Ecco Reading(3604)
Author:Ecco Reading(4009)
Author:Ecco Reading(3807)
Author:Ecco Reading(3748)
Author:Ecco Reading(3780)
Author:Ecco Reading(6094)
Author:Ecco Reading(3764)
Author:Ecco Reading(4579)