It's now time for the last part of the project: actually connecting the electronic lock. This is quite complex, and you could perfectly use the project as it is, for example by connecting a relay instead of the LED.

To actually connect the door lock, you'll need a bunch of additional components. You will first need a 12V power supply, and a breadboard-friendly DC barrel jack. 

You will also need a power transistor (I used an IRLB8721 power MOSFET, but you can also use a TIP102 bipolar transistor for example.) You'll also need a 1K Ohm resistor in case you are using a bipolar transistor. Finally, you will need a rectifier diode.

For the assembly of all these components to the ESP8266 board, it's better to look at this schematic:

Note that if you are using a MOSFET transistor, you don't need the resistor between the pin number 5 of the ESP8266 board & the transistor.

This is the completely assembled project:

When the project is assembled, power up again the ESP8266 using the FTDI module for example, and then connect the 12V DC power supply. You don't need to change anything in the code: it should work out of the box, as it's using the same pin as before.

Now, try again placing your finger on the fingerprint sensor: you should see the lock reacts nearly immediately.

The following video shows the project in action:

Temporarily unable to load embedded content:

This guide was first published on Sep 17, 2015. It was last updated on Mar 08, 2024.

This page (Setting Up the Electronic Door Lock) was last updated on Sep 08, 2015.

Text editor powered by tinymce.