Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

Seven-channel electronic key. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Safety and security

Comments on the article Comments on the article

The main function of the device, which is described in the article, is access restriction, limiting the circle of people who have access to an object (product, device, etc.). These can be, for example, cells of a bank safe or components of a complex electronic product, access to which can be limited both by power supply circuits and by control circuits.

A single-channel combination lock, perhaps, can be considered as a special case of such an electronic key. The software and hardware resources of the ATtiny2313A microcontroller make it possible to develop a simple multi-channel dongle with a simple and user-friendly interface. The secret code stored in the non-volatile memory (EEPROM) of the microcontroller will not be "lost" when the power is turned off, it is always easy to reprogram it using only the hardware resources of the microcontroller itself (i.e., a device based on it).

The diagram of a seven-channel electronic key (hereinafter referred to as the key) is shown in fig. 1. It is assembled on the basis of the ATtiny2313A (DD2) microcontroller and the K555IR23 (DD1) eight-bit synchronous register. Consider its main functional units. The operating frequency of the microcontroller is set by a ZQ1 quartz resonator to a frequency of 10 MHz. The PB port controls dynamic indication made on digital seven-element indicators HG1-HG5 and transistors VT1-VT5. Resistors R3-R10 - current-limiting for indicator elements. The PD4 line (pin 8) of the PD port of the microcontroller is used for the keyboard to function.

Seven-channel electronic key
Rice. 1. Scheme of a seven-channel electronic key (click to enlarge)

The +5 V supply voltage is supplied to the device through the XP1 plug. Capacitor C6 filters the ripple in the +5 V voltage circuit. Blocking capacitors C4, C5 are included in the power circuit of the DD1 register and the DD2 microcontroller, respectively. Register DD1 is used to increase the number of output lines. The device has seven independent channels. To turn on channel 1, you need to enter secret code No. 1, channel 2 - secret code No. 2, etc. The output signals of the channels are taken from pins 1-7 of the XS1 socket. Immediately after power-up, all signals have a log level. 1.

The device interface includes a five-digit display of digital seven-element indicators HG1-HG5 and a keyboard containing buttons SB1-SB8. The first four indicators display the entered code, the fifth - the number of the activated channel. As can be seen from the diagram, the hardware resources of the microcontroller are fully utilized.

In the algorithm of the device, 14 modes of operation can be distinguished. The first seven of them are modes for entering working codes (No. 1 - code No. 1, No. 2 - code No. 2, etc.). If the working (entered from the keyboard) and the secret codes match, the corresponding channel number of the XS1 socket contact is set to log 5 for 0 s (signal "Channel N", where N is its number). Modes No. 8-No. 14 - modes for entering (writing) secret codes in the EEPROM of the microcontroller (mode No. 8 - for channel 1, mode No. 9 - for channel 2, etc.).

Keyboard buttons assignment:

  • SB1-SB6 - buttons for entering the access code. They are numbered from "1" to "6". The entered code is indicated on the display of the device;
  • SB7 ("K") - button for selecting channels 1-7 (if channel 1 is selected, the HG5 indicator displays the number "1", if channel 2 is selected, the number "2", etc.);
  • SB8 ("Z / R") - button for selecting the operating mode ("Record" or "Working mode") for channels 1-7. In the "Record" mode, the fourth digit of the display (indicator HG4) displays the decimal point h.

The device operation algorithm is as follows. Immediately after the power is turned on, the R1C1 circuit generates a system hardware reset signal at the microcontroller input. The number 00001 appears on the display. The DD2 microcontroller is waiting for a four-digit code to be entered. But first you need to write down the secret code for each channel. By pressing the button SB8 ("З / Р") we select the "Record" mode and enter the code for channel 1 from the keyboard. The microcontroller indicates it on the display and writes it to RAM. on the display, the code is written to the EEPROM of the microcontroller, becoming secret for channel 1. After that, zeros are again displayed in the digits HG6-HG1. Press the SB1 ("K") button to select the next channel and perform similar operations for channel 4, etc. To exit the recording mode, press the SB7 button, while the decimal point h on the HG2 indicator goes out. The device is ready to work.

In operating mode, the microcontroller also waits for a four-digit code to be entered. It displays the code entered from the keyboard on the display and writes it to RAM. After entering the fourth digit and then pressing one of the SB1-SB6 buttons, the microcontroller byte-by-byte compares the entered code with the one written in its EEPROM and, if they match, sends a signal for 5 s to turn on the corresponding channel (sets log. 0 at its output) and sends signal to turn on the sound emitter BF1. After 5 s, the microcontroller turns off the signal (sets the channel output to log. 1), de-energizes the sound emitter and resets XP1 wf-2 on the display the digits of the entered code. If the entered code did not match the secret one, the microcontroller still resets the display (the number 00001 is displayed on it), but does not change the state of the channel output signal. It is advisable that access to the SB8 button be limited.

The program uses two interrupts: Reset and a TO timer interrupt whose handler starts at TIM0. When switching to the Reset label, the stack, timer, ports, as well as flags and variables used in the program are initialized.

In the interrupt handler of the timer T0, the procedure for polling the buttons SB1-SB8, the operation of dynamic indication, the conversion of a binary number into a code for displaying information on seven-element indicators, and the formation of a time interval of 5 s necessary to change the output signals of the channels (setting the signal level log 0 on the pins of the XS1 socket), and the procedures for writing and reading the typed code in the EEPROM of the microcontroller.

In the RAM of the microcontroller from addresses $60 to $64, a display buffer is organized for dynamic indication (at address $60 there is a number that determines the channel number, and from address $61 to address $64 - the input code).

The secret code from the EEPROM of the microcontroller is rewritten to its RAM at addresses from $66 to $69. The flags involved in the program are in registers R19 (flo) and R25 (flo1). On fig. Figure 2 shows a fragment of the program for writing the secret code for channel 7.

Seven-channel electronic key
Rice. 2. A fragment of the program for writing the secret code for channel 7

The developed program in assembler takes only about 0,7 Kb of microcontroller program memory.

In the manufacture of the device, resistors s2-33N-0,125 were used, but any others with the same dissipation power and a permissible deviation from the nominal ± 5% are also suitable. Capacitors C1-C5 - ceramic K10-17a, C6 - imported oxide. Capacitor C4 is mounted in close proximity to the power outputs of the register DD1, C5 - as close as possible to the power outputs of the microcontroller DD2. Socket XS1 - HU-10 (mate - plug WF-10), plug XP1 - WF-2 (mate - socket HU-2). Indicators HG1-HG5 - HDSP-F501 (green glow). If there is no need for visual control of the dialed code, then the indicators HG1 - HG4, transistors VT1-VT4 and resistors R3-R18 can be excluded, this will not affect the operation of the device.

The circuit for switching on the solenoid for retracting the bolt (valve) of the lock is shown in fig. 3. When contact 1 of the XP3 plug is logged. 0, the emitting diode of the optocoupler U1 is turned on and the phototransistor built into it opens. This opens the transistor VT1 and the voltage of 24 V from pin 1 of the XP2 plug goes to pin 1 of the XP1 plug and then to the solenoid, as a result of which the lock bolt is drawn into it. Resistors - any ratings and power dissipation indicated on the diagram, capacitor C1 - oxide K50-35 or an imported analogue In the general case, the circuit design of this node is determined by the specific parameters of the actuators connected to the key.

Seven-channel electronic key
Rice. 3. Scheme of switching on the solenoid for retracting the bolt (valve) of the lock

The described device does not require adjustment. If serviceable parts are used and there are no installation errors, it starts working immediately after the supply voltage is applied. To increase the degree of protection (increase the bit depth of the reference code), you can modify the software. In this case, only the four least significant (or the same number of most significant) digits of the entered code will be displayed on the display.

Author: S. Shishkin

See other articles Section Safety and security.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

Catch the neutrino 05.07.2011

Possible messages from extraterrestrial civilizations are usually searched for in the radio range, and lately in the optical range (hoping that we can be signaled by powerful lasers). However, American astrophysicists John Learn and Anthony Zee believe that it is necessary to listen to neutrino fluxes.

Unlike electromagnetic waves, these particles are hardly absorbed or scattered by interstellar gas and dust. True, it is very difficult to catch them. On Earth, physicists use the so-called neutrino telescopes for this - huge reservoirs of water or other liquid, or an array of ice. A small part of the neutrino, flying through liquid or ice, nevertheless reacts with matter and gives itself away.

But it is possible that higher civilizations already possess much more advanced means of capturing and generating or modulating neutrino fluxes. Perhaps, Lernd and Zee say, it makes sense to look at the data already available on neutrino fluxes: could there be encrypted messages from aliens among them?

By the way, the idea is not so new: the plot of Stanislav Lem's science fiction novel "The Voice of the Lord" (1968) is based precisely on attempts to decipher the message of another civilization that came in a stream of neutrinos.

Other interesting news:

▪ Hydrogen sailboat Nemesis Yacht

▪ Invisibility film for transmitting secret messages

▪ New power supplies for LEDs

▪ Microbes against caries

▪ Hamster sleeps - telomeres grow

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Application of microcircuits. Article selection

▪ article Assembly workshop for beginners. video art

▪ article Who and how taught dogs to drive a car? Detailed answer

▪ article Convulsions. Health care

▪ article Direct amplification radio receiver. Encyclopedia of radio electronics and electrical engineering

▪ article Postcard-boomerang. Focus Secret

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024