3. Hardware Part

3.1 Circuit Diagram

The heart of the unit is ATMEGA 16/32 microprocessor (U1) running at 3.6864 MHz (Y1 oscillator). This frequency provides required accuracy to clock serial communication between the unit and GSM modem at 57600/115200 bps. Y2 oscillator has standard 32768 kHz frequency for real time clock and used to invoke everyday routine procedures such as daily report sending, switching on/off external devices etc. CONN1 is used to connect up to four PIR detectors (or any other normally shorted sensors). CONN2 is used to control external devices. J2 connector is reserved as an extension. It might be used to connect external display or extra sensors. J3 connector allows to perform in-system firmware flashing, J4 allows to connect 1Wire devices such as iButton identifiers, thermosensors etc. LED1, LED2 LEDs are for unit mode indications. LED2 is preferably green (or blue) and LED1 is red. LED2 indicates alive GSM modem/phone connection by one short flash in case of simple mode (SMS mode) or by two short flashes in case of advanced mode (recognised mobile phone model with embedded camera supporting Java and keypad emulation is connected). LED1 indicates alarm or disconnected sensors by long flashes in case of inactive mode. If all sensors are in normal state LED1 won't blink in inactive mode. In case of active mode (guarding) LED1 blinks with short single flashes regardles of sensor states. SB1, SB2 are used to change unit mode manually (the same might be done by sending SMS command). Pressing SB1 forces the unit to toggle its mode (simple to advanced and vice versa). Pressing SB2 toggles the unit from inactive to active mode and vice versa. J5 connector is used to connect to GSM module/mobile phone. R4 and R5 resistors are voltage divider as long as some mobile phones as Siemens switch off if the level of input signal is higher than certain value (may vary for different vendors and models therefore R4, R5 values might require to be adjusted). C3, C4, C5 and U2 voltage regulator supplies the unit with 5V, input voltage is applied via J1 connector. R1 and R2 form 'power good' signal which allows the program be aware when the main power failed and the system was switched to the battery. Battery source is connected to J7 connector. D1 and D2 diodes are very simple solution performing seamless switch from one power source to another.

The circuit diagram is done by means of gEDA tool, please see below:

Figure 3.1. Main Circuit Diagram