Home Security System

This is a new project currently in progress.

The basic design of this project will use a Atmel AT89S8252-24PC Microcontroller, since this micro has 2KB of EEPROM that can be used to store data during runtime.
A MAX232CPE serial driver will be used for connecting to a computer to allow for adding and revoking PINs.
A ADC0838CCN analog to digital will be used to receive up to 8 inputs from sensor devices, such as PIR's, reed switches, etc. The reason behind using an ADC compared to just the DIO pins is that it also adds some security by allowing resistors to be put inline to set the voltage to a specific level. If the wire to the sensor is cut or shorted, the alarm will be able to detect this occurring.
To Arm/Disarm the system, an RFID tag reader will be used as apposed to a keypad. The chosen reader is a HYE-01 Series LF Reader that has both serial and Wiegand output. For this system the Wiegand output will be used to allow the serial connection to be used to connect to a computer.

more to be added…….

HYE-01 RFID card reader

The reader used requires 12V input, has BUZ and LED lines to be used for status, and will use the Wiegand data lines for reading the card.
The documentation on these readers is very sparse, but I have been able to find out the following:

  • The serial connection is 9600 bps,N,8,1 and outputs a start byte(STX), 10 Hex characters (5 bytes of data), New line, checksum (xor of hex numbers)
  • The Wiegand connections uses 26 bit Wiegand protocol and outputs a start bit, the last 3 bytes of the card id, and an end bit (will go over this later)
  • The LED will change color when ground is applied to the LED wire.
  • The buzzer will beep when ground is applied to the BUZ wire.

When looking for information about the Wiegand protocol I found this page useful: http://instruct1.cit.cornell.edu/Courses/ee476/FinalProjects/s2006/bcr6/final_report/index.html
The easy way of reading this data is to use the INT0 and INT1 external interrupts and configure them on the falling edge. This protocol works so that when DATA0 is low and DATA1 is high a 0 is produced and when DATA0 is high and DATA1 is low a 1 is produced. In between bits both are high. The final bit is detected when both are high for 50 ms, so a timer should also be used for detecting the final bit.




Below is a preliminary schematic of the system. It is currently missing the power supply section and the circuit for the buz/led of the RFID card reader.