ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Microcontroller security device. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Safety and security The device offered to the attention of readers can be used to protect both an apartment or an office, and an entire enterprise, where the number of doors is in the many tens. It consists of five functional parts: four blocks of the microcontroller and the block of executive devices that are identical in scheme and work independently from each other. The block diagram of the microcontroller is shown in fig. 1. Its basis is the ATmega8535-16PI (DD1) microcontroller. The clock frequency is set by the quartz resonator ZQ1. The switches SA1 ("Security"), SA2 ("Sound") and the LED HL1, which serves as an indicator of the activation of the armed mode, are connected to the PD port. The signals from the lines of this port also control the sound emitter and the relay of the actuator unit. Limit switches SF1-SF24 installed on the doors and LEDs HL2-HL25 on the control panel of the device are connected to the ports РВ, РА, РС of the microcontroller. The user (operator, dispatcher) visually controls the state of each door by the state of the corresponding LED. If the controlled door is closed, the contacts of the limit switch mechanically connected to it are open and the LED corresponding to this door is off. When the door is opened, the switch contacts close and the LED starts flashing. Power is supplied to the HL2-HL25 LEDs through an electronic key on the VT1 transistor, which is controlled by a signal from the PD7 line (pin 21) of the microcontroller. Resistor R4 limits the current through the HL1 LED, resistors R6-R13, R16-R31 - the current through the HL2-HL25 LEDs. The supply voltage of 5 V is supplied from the actuator unit via pin 4 of the XP1 plug. Through its own contacts 1 and 2, this block receives the signals "Use device." ("Execution device") and "Sound", generated by the microcontroller. Capacitors C1 and C2 filter the ripple in the power circuit. The block diagram of the actuating devices is shown in fig. 2. Sockets XS1-XS4 are designed to connect microcontroller units. The functions of the block in question are the control of actuators using relay K1 and the activation of an audible alarm. Relay K1 is controlled by an electronic key made on transistors VT1, VT2. The relay is activated if the signal "Use device." in any outlet (pin 1) has a log level. 0. The audible alarm is activated if the same level acquires the "Sound" signal (pin 2). The supply voltage of 5 and 12 V is supplied through the contacts of the XP1 plug. Switches SA1, SA2 are used to disconnect from the control circuits, respectively, the relay K1 and the piezoelectric sounder HA1. The device as a whole can operate in two modes: control of the status of doors and protection. The operation algorithm in the door state control mode is as follows. Let all the doors of the protected object be closed (limit switches SF1 - SF24 in the microcontroller unit are open), switch SA1 ("Security") is in the "Off" position, SA2 ("Sound") - "On", set to the same position and switch SA2 ("Sound") in the block of executive devices. After the supply voltage is applied during the initialization of the microcontroller DD1, a log is written to all bits of the ports Pv, RA, PC. 1. All LEDs off, "Use device" signal. (at pin 14) has a log level. 1. At pin 21, a square wave signal (meander) is generated with a period of about 1 s. Let's agree that the limit switch SF1 and LED HL2 correspond to door No. 1, SF2 and HL3 correspond to door No. 2, etc. If you open door No. 1, the contacts of switch SF1 will close, LED HL2 will start flashing with a period of about 1 s, and sound emitter HA1 in the block of executive devices will give out an intermittent signal with a duration of approximately 3 s. Similarly, when door No. 2 is opened, the SF2 switch will close, the HL3 LED will start flashing, an audible signal of the same duration will sound, etc. Setting the SA2 switch ("Sound") to the "Off" position. will lead to the fact that when any limit switch is closed (i.e. when the door on which it is mounted is opened), the corresponding LED will only flash. The device enters the armed mode 10 s after setting the switch SA1 of the microcontroller unit to the "On" position. If the perimeter of the protected object is large and it is impossible to close all the doors within the specified time, then this must be done in advance, before the object is armed. When the contacts of any of the limit switches SF1-SF24 are closed in this mode (i.e., the appearance of a log. 0 signal on the corresponding line of the ports PB, RA, PC of the microcontroller), after 10 in the block of executive devices are in the "On" position). At the same time, the log level is set at pin 1 of the microcontroller DD2. 14 and the relay K1 is activated in the actuator unit. The alarm will also be activated if any of the limit switches is closed even for a short time (for example, if the corresponding door is opened and immediately closed). If a “friend” appears at the protected object, then in order to avoid triggering an alarm when any of the protected doors is opened, he needs to have time to switch the SA10 switch of the microcontroller unit to the “Off” position in 1 seconds. It is clear that access to this switch and switches SA1, SA2 of the actuator unit should be limited. Relay contacts K1 can be used to close control circuits or power various actuators, for example, door lock mechanisms or to turn on a siren (howler). A program written in assembly language takes only about 0,4 KB of the program memory of the DD1 microcontroller. Having understood it, you can change the blinking period of the HL1 LED, the duration of the sound signal in the door status control mode, the time until the device is armed, and the delay time for turning on the alarm. The device uses S2-33N resistors, but you can use any others with the same dissipation power and a permissible resistance deviation from the nominal value of not more than ± 5%. Capacitor C1 - oxide K50-35 or similar imported, C2-C5 - ceramic K10-17a (the first of them is mounted in close proximity to the power outputs of the DD1 microcontroller). Switches SA1, SA2 in all blocks - toggle switches MTD1, relay K1 - RES48B version RS4.590.202-01 (winding resistance - 85 ... 115 Ohm, operation current - not more than 52 mA). It is possible to use any other relays with an operating voltage of 12 V and contacts designed for switching loads (actuators). Limit switches SF1-SF24 - any suitable design. Opening or switching reed switches are very convenient to use (they are installed on the lintels of the doors, and the permanent magnets that control them are on the doors themselves so that the reed switches open when they are closed). The HA1 sounder is a piezoelectric HPM14AX with a built-in AF generator or similar with an operating voltage of 12 V. LEDs - any. Assembled from serviceable parts and without installation errors, the adjustment device does not require and is operational at the first power-up. Codes and source code of the security device microcontroller program (files ohran.hex, ohran.asm) can be downloaded from ftp://ftp.radio.ru/pub/2013/06/ohrana96.zip. Author: S. Shishkin See other articles Section Safety and security. Read and write useful comments on this article. Latest news of science and technology, new electronics: Machine for thinning flowers in gardens
02.05.2024 Advanced Infrared Microscope
02.05.2024 Air trap for insects
01.05.2024
Other interesting news: ▪ ASUS ZenPad 8 (Z380M) and ZenPad 10 (Z300M) tablets ▪ Revealed the secret of gait dinosaurs ▪ Samsung's new line of R8 TVs ▪ New material for the bone frame ▪ Chinese unnamed smartphones fell in price News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the website Electrotechnical materials. Article selection ▪ article Kapitsa Sergey Petrovich. Famous aphorisms ▪ article Which bird has the largest wingspan? Detailed answer ▪ article Planer from the corner. home workshop ▪ article Optoelectronic devices. Encyclopedia of radio electronics and electrical engineering ▪ article Familiar figures. Focus Secret
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |