Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

iButton Electronic Lock

Status
Not open for further replies.

tpetar

Advanced Member level 7
Joined
Sep 27, 2010
Messages
6,417
Helped
1,713
Reputation
3,456
Reaction score
1,673
Trophy points
1,393
Location
Pancevo-Belgrade, Serbia
Activity points
37,363
iButton Electronic Lock
Web address: https://www.electronics-lab.com/projects/sensors/001/index.html
Authors: Leonid Ridiko, Victor Lapitskiy

This electronic lock designed to work stand-alone and it's easy to construct. What the user sees (outside of the door for example) is a iButton socket and a led. From inside the door, we can open it using a simple push button. For the actual lock of the door a solenoid and a bold are used. Solenoid must be rated at 12Vdc. iButtons serial numbers stored in memory can be removed and updated when needed. One master key is used to manage the rest of them. Totally a number of 9 different keys can be stored in memory.

Schematic diagram is shown at figure 1. The circuit is build around an Atmel AT89C2051(U1) microcontroller. The port 1 (P1) of mcu is used to connect a 7-segment common anode led display. This led display will be used on the programming of additional keys. For the same reason a push-button labelled SB1 is connected on P.3.7. Storage of iButtons serial numbers is done on a 24C02 EEPROM (U3). It is connected on P3.4 (SDA) and P3.5 (SCL) of U1. The external iButton socked is connected on port P3.3 via XP2 pin array. The rest of components VD4, R3, VD5 and VD6 are used for protection of mcu ports. One pull-up resistor R4 is used as required from 1-wire protocol. An additional iButton socket is connected parallel with the predefined at pins XS1. This one is used for programming the keys. The door OPEN button is connected on P3.2 through XP1 connector, using the same protection components as above. The solenoid that does the lock is connected on XT1 connector. Solenoid is controlled from a power MOSFET IRF540 (VT3). Diode VD7 is added to protect MOSFET from voltage strikes due to solenoid inductance. Transistor VT3 is controlled from VT2, which reverses the logic state that's appears on P3.0, so on VT3 we have output 0V and 12V. This additional transistor is useful as it translates the mcu logic levels to 0V and 12V, capable to drive the solenoid.

Sch.gif


A led is used to indicate the state of the electronic lock, which is controlled from the same pin as the solenoid, using transistor TV1. This led is connected to the board using the same pin array XP2. But we need to ensure that the circuit will always work without supervision. For that reason we added ADM1232 (U2) that does the mcu reset pin control. This chip have a counter and voltage test circuits inside it. On pin P3.1 mcu produces pulses when it works right. If for a reason mcu freeze then U2 send it a reset pulse and work is resumed.

This electronic lock has it's own power supply on board, consisting of transformer T1, bridge rectifier VD9-VD12 and voltage regulator U4. As power backup an array of 10 AA batteries is used (BT1-BT10). Total capacity is 800mAH. When the circuit is connected on main voltage the battery pack is charged via R10 with a current of 20mA. This current is equal to 0.025C (where C is the batteries capacity) and that's a very small current depending on total capacity. That's put the battery on a steady charge to compensate losses among time and no charge completion detection is needed. That can be done as the excess energy is consumed in heat, that can not harm batteries as its low.

Overall board dimensions are 150х100х60mm. The most components are placed on the board, including the transformer. Batteries are placed on battery holders. In the place of AA batteries we could use a 12V sealed Lead - Acid battery. External components are connected on board with 2 or 3 pin connectors. Part numbers HG1, SB1 and XS1 are used only in programming mode so can be placed inside the plastic enclosure. Led VD3 can be placed on the face of enclosure, to indicate proper powering of board. A connection diagram is show on figure 2.

Block.gif


When the door goes open, a 3 sec pulse is triggering the solenoid. When we press the door open button the door remains open as long as we push it.

The electronic lock can register 9 keys, plus one master key. Master's serial number is stored inside mcu. The rest of keys are stored on the external memory under slot 1 to 9. To add or remove a new key you should have the master key. Also master key can be used to open the door.

Man_P.gif


.
.
.
.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top