Introduction: Fingerprint Lock - Unbreakable Garage Door (Electronic and Mechanic System)
This system is quite complex, I will do my best to make it simple to understand and, for those who have the courage, I tried to put as much details on the photos.
(PS: I'm a french teenager, I hope my English is not to bad :)
Step 1: Some Explanations About the System ...
This system consists of 2 main parts:
An electronic part that is composed of power electronics, control electronics and programmable electronic: an Arduino
The program is not necessarily the most optimized, free to modify it. If you want details on how the system works, you will find them in the program comments.
The second part of the system is exclusively mechanical. I have a swinging garage door like this one. So I was inspired by the existing locking system that I decided to "modify". In the base system, there are two axes hanging on the door that slide behind the door frame, left and right to prevent it from tipping. So I imagined an electrically controllable system, with stepper motors, that can take in or out steel stem in soil.
I will detail the electronic part of the system and explain briefly the reasoning I had to create the circuit ...
This system was designed for a garage door. The bistable relay serves to disable the communication between the sensor and the Arduino in case there are more than 3 false scanner fingerprints, or if the box containing the sensor Box that contains the electronic system) had to be opened or torn off. (Well yes, if the evil thieves open the sensor box and reprogram to accept their fingerprints, it's not very secure!)
This is where the interest of using a bistable relay comes into play. A bistable relay, unlike a conventional relay, retains that switching position even if it is no longer powered. If the current is turned off, then nothing works, but if the current returns, then the Arduino "Reset" and if there was not a bistable relay then the communication between the sensor and the Arduino would be restored, and there, the Nasty thieves can go home if they reprogrammed the sensor and closed the box!
Note that it is possible to add a piezo sensor on the door to trigger this relay in case the door undergoes vibrations (this sensor could be triggered if we tried to cut the door or something like that ...) You can also add an alarm associated with this relay, if you have a smoke detector that is dedicated to the trash, you can undoubtedly recover the piezo inside (be careful! The circuit that I will propose to you later for Piloting the piezo has only been tested for a 3-wire piezo! (See photos))
As you can imagine, the Arduino is the brain of this lock system. The program is available in this tutorial. It is very interesting to use an Arduino Micro because it is not bulky and adapts perfectly to the project. I mean that all pins "Digital" (14) and "Analog" (6) are used.
The Arduino manages various detectors:
1 Push button that manages the opening request (BPO)
1 Push button that manages the closing request (BPF)
1 Pushbutton that manages the fingerprint sensor (BPV) standby output (Do not leave the sensor turned on day and night when used only a few times a day!)
2 "Limit switch" sensors that allow the Arduino to know if the garage door is open or closed (PO, PF)
4 other "limit switches" that allow the Arduino to know whether the bolt of the locks are in the upper or lower position (2 per lock) (FDCF1, FDCO1, FDCF2, FDCO2) (End of Course "Closed" lock 1 ...)
The last 2 "limit switches" and a magnetic sensor (connected in series) are used to check that the sensor and electronics boxes remain closed and that the door does not open Not meant to be ... (pin 0 on the arduino)
Step 2: The Electronic Circuit
Let us now return to the heart of the matter:
The circuit consists of a 220V-12V transformer 2A which opens on a fuse and finally arrives on a control stage composed of an LM317 calibrated to leave the 9V. This first output will feed the Arduino on its input "V-in", the circuit of the alarm, and most important: stepper motor drivers. The output of this LM317 and also connected to the input of a 7805 to have 5V which supplies biometric sensor relay as well as power supply drivers in 5V. (There is a power input that powers the 9V motors and a 5V input to power the driver electronics) Pololu A4988
Never solder the motor drivers, the Arduino or the chips (NE555 - CD4011). It is necessary to weld such brackets in which the circuits are inserted, at least, if like me, you are to grill a driver, it is much simpler to pull to remove them than to desolder them ...
In the circuit diagram, you can see a thermostat. This is used to control the temperature in the housing but especially the voltage regulators. If their temperature exceeds 50 ° C, then the power supply to these controllers is switched off via a relay, and an orange LED lights up to prevent the problem. Once power is turned off, the controllers can cool down and after the temperature has dropped back to 40 ° C, power is restored. An overheating may be due to a "too long" power supply of the motors, if they do not go to standby for example ... (High current consumed = heating of the regulators) For safety, if the thermostat did not work, put a thermal fuse in series ... We're never too careful.
I first realized this circuit on a Vero Board, for the continuation it is convenient to have a soldering iron with a small pan to weld the cables that connect the different parts of the circuit between them. Be careful, do not go head down in the realization of circuit, test it all on test boards without welding before welding! Another thing ... If like me you want to place your "BPO" and "BPF" on the box that protects the circuit, be careful that there is not a big circuit element that is just below at the risk not to be able to close your box (see photos with red rectangles)
PS: it almost happened to me, fortunately I was able to remove NC contact from my BPO which was enough to solve the problem ... I can only advise you to put the components relatively "high", like regulators and The heatsinks on the sides, for example ... (which I did not do at the beginning of the manufacture of my circuit ^^)
Step 3: Component List
1 Power supply 220V -> 12V 2A
1 Arduino Micro
1 Optical fingerprint sensor like this one
2 Stepper motors (0.5 Nm minimum)
2 Pololu A4988
2 100μF capacitors (electrolytic, polarized)
1 Piezo which will act as sensor (see pictures)
1 Resistance 1M (Brown Black Green)
1 Fuse 2A + fuse holder
1 Controller LM317 (or other) capable of delivering 2A at 9V
To set this controller, you will need:
1 potentiometer 10k
2 capacitors 100nF (ceramic, 104)
1 resistance 10k (Brown Black Orange)
2 resistors 1.2k (Brown Red Red)
And 1 volt meter!
1 Controller 7805 with:
1 Capacitor 100nF (ceramic, 104)
Regulators heat up a lot when they run a lot of current, so it's very important to cool them. To do this, use suitable heat sinks (the one you see in the pictures is not enough to cool the system. Use one for each or a bigger one for both.)
1 Bistable relay type RT314F03 or RT314F05
(There are modules (be careful this is a 12V, not more than 5V) with these relays which are supplied with the control electronics, ready to use) If you have only the relay, you will have need of :
2 transistors BC517
2 Diodes 1N4001 (or 1N4007)
4 resistances of 10k (Brown Black Orange)
Components for the alarm:
1 Piezo (about 100dB, with 3 wires, see picture)
1 CD4011 and its 14-pin holder
1 NE555 (rectangular oscillator) and its 8-pin holder
1 Resistance 1M (Maron Black Green)
3 Resistors 2.2M (they may vary, the lower the resistances the higher the beep frequency)
1 Resistance 150k (Brown Green Yellow)
1 Resistance 1.5M (Brown Green Green)
1 Capacitor 1nF (ceramic, 102)
1 Capacitor 10nF (ceramic, 103)
1 Capacitor 100nF (ceramic, 104)
1 Relay 5V (2 orders)
1 Diode 1N4001 (or 1N4007)
For the fire alarm module:
1 Transformer 230 - 24VAC
1 Diode bridge
1 Capacitor 400V 100uF
1 Capacitor 470uF
1 Relay 5V
1 Transistor BC547
1 Transistor P60NF06 (or equivalent)
1 Diode 1N4148
1 Resistance 2.2k(Red Red Red)
1 Resistance 22k(Red Red Orange)
1 Resistance 33k (Orange Orange Orange)
You will also need small screw terminals, 2.54 pitch female connectors (not to have the Arduino to be soldered), insulated cross-section 0.5 single strand wire, multi-strand wire with a suitable motor section (which supports Of the 12V 2A), a "Vero Board", a small contactor (see box of the cavity sensor), two pushbuttons for the opening and closing controls, and a small number of "limit switch"
It can be interesting to install a key-operated emergency stop button ...
Step 4: Biometric Sensor Box
I needed a tailor-made enclosure for the sensor to be in the best possible conditions. I measured with a callipers all the dimensions I needed to draw the case, then I drew what I wanted on a 3D design software (Solidworks).
A plexo box was not enough, because it needed like a kind of high wind to prevent the rain from touching the sensor and to seep into the box. Moreover, for aesthetic reasons, I wanted the "BPV" to be activated at the same time as we put the finger on the sensor (I did not want a button next to the sensor), so it was necessary that it is guided in vertical translation to press a small contactor located under the circuit of the sensor (see photos).
It is also necessary to think of the humidity and the insects (because the insects and the electronics, it does not make good housekeeping!) For the moisture, I left enough space on each side of the box to be able to slip there, On one side an anti-tear "limit switch" and on the other a small sachet of silica gel which is a very good moisture absorber.
In the case of insects, the entire interior part containing the electronics is insulated from the outside by small partitions which surround the surface of the sensor which faces outwards. (See photos // digital model).
Once drawn, it is enough to print the case with a 3D printer (density = 30% for me). If you do not have one, you may be able to go to a FabLab or something.
Step 5: Mechanical Locks
There will be a little less text in this step, the pictures speak for themselves. Some explanations on the choice of components.
A lock consists of a ball slide, a rack and pinion, a 35NCD16 steel pin, which is an extremely strong steel and a stepper motor with its support. And in option you will need a landing applique ...
Explanations ... If the evil thieves want to cut the axes (which is already very difficult in normal times), well, by applying their cutting tools on the axis (saw, diskette or other) Axis which turns on itself thanks to the bearing. As a result, the spindle will never be damaged by the disk drive!
Rack: 15 * 15 * 250 module 1
Pinion: module 1 - 12 teeth - diameter bore = 5mm (same diameter as those of the motor shafts)
Stem: diameter 16mm - length = 300mm
Ball bearing slide: 250mm long - 15mm wide
Bearing: internal diameter = stem diameter = 16mm
Motors: 0.5N.m - shaft diameter = 5mm
Something to remember, security first! It is almost mandatory to add a system that releases the door maneuver in the event of a breakdown, a system like this. It is also necessary to attach an eye bolt to the top of the rack to connect the cable. (see photos in the last step)
It must of course 2 times this list of hardware to make the 2 lock blocks.
Step 6: Installation and Commissioning
This part is the most exciting. It's time to take out big arms and drill holes everywhere ...
We started by fixing all the tubes and the main box on the wall.
Then all cables must be routed through each duct. Once this step is done, the door frame must be drilled as close as possible to its joint (see pictures)
Before passing the cables through the frame of the door it is necessary to drill the holes that will accommodate the axes. This is done with a conical drill bit. Then a piece of copper pipe is inserted to solidify the door sheet.
Once the stem moves freely inside the copper tube, trace and drill the hole in the ground, then ad a piece of plastic tube (not metal because of oxidation due to rain on the ground!) and add concrete to hold it in place.
Then you can pass the cables through the door and make connections; then the locks are fixed on the door. It was necessary to use spacers to fix the plate. (see photos)
Once the mechanical part was resolved, it was necessary to make all the electrical connections in the main box. You have to be very organized because otherwise we get a lot of knots and we do not get any more ... (1 day to do this work) (cf photos!)
Check the connections and activate the current carefully!
I hope you liked this project, if you have any question, don't be shy and let me a comment!