Arduino Image Processing based Entrance lock Control System

(Last Updated On: July 17, 2019)

Arduino image processing

Description:

Arduino Image Processing- This Project is based on the Image Processing using Visual Basic 2010 Express Edition, Arduino Uno or Mega and a 12 Volt Electronic Lock. The purpose of this project is to automatically control the Entrance Lock using Human detection. The humans are tracked in RealTime using the frontal Face XML file, once the human face is detected, then we find the X and Y coordinates of the human face and then send a command to the Arduino Uno or Mega Board to open the Entrance Lock. These commands are sent serially from the Visual Basic application.



The same application can be used to track Eyes, nose, human body, hands and so on, depending on the type of the XML file we are using. All you need is just to replace the Frontal Face XML file with the one you want. This way you can use this Project to track almost anything you want.

You can also create your custom XML files for tracking a specific object. I will cover this in another Tutorial.

In this project, the EmguCV plays a key role. For the detailed discussions, application designing and program explanation watch a video at the end of this article.


The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Arduino Uno: https://amzn.to/2tVz1vu
Mega 2560: https://amzn.to/2ze1kdu
WebCam night vision supported: best deal on Amazon: https://amzn.to/2lZl23o
electronic lock: https://amzn.to/2tWDFta
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330-ohm resistors pack: https://amzn.to/2NtlAeh
female DC power jack socket: https://amzn.to/2KEo1gt
470 uf capacitors: https://amzn.to/2xDCOzf
5×7 cm Vero board: https://amzn.to/2OHGbvn
female headers: https://amzn.to/2zqmtiJ
connection wires: https://amzn.to/2DpBuW7
Super Starter kit for Beginners: https://amzn.to/2KJvmKG
Jumper Wires: https://amzn.to/2KMoVXs
Bread Board: https://amzn.to/2MS4q8X
12v Adaptor: https://amzn.to/2Ntr6h1
PCB plate: https://amzn.to/2IUwpCt
Variable Supply: https://amzn.to/2MT4Qfj
Digital Multimeter: https://amzn.to/2Nvft9i
Vero Board / strip board: https://amzn.to/2MTf9jD
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2zfoNuJ
Solder wire: https://amzn.to/2ufUMWf
Wire Stripper: https://amzn.to/2KOqxfU
Wire Cutter: https://amzn.to/2ucIq14
PCB small portable drill machine: https://amzn.to/2Nu62XF


Softwares used in the Arduino Image Processing:

  1. Visual Basic 2010 Express Edition
  2. Arduino IDE

About the Electronic Lock:

image processing

Electronic Locks come in different shapes and sizes. But the working principle of all the Electronic Locks is exactly the same. The difference can only be in the voltage and current it requires to energize the coil of the electronic lock. Inside the electronic lock is the coil which creates the magnetic field when the desired voltage is applied.

The Electronic Locks usually has two wires, the voltage wire, and the GND wire. The Electronic lock that we will be using in this project has two wires. The electronic lock can be checked by applying the voltage across the two wires of the electronic lock.


As this project is based on the Automatic entrance controlled system using image processing, in order to control this Electronic Lock automatically we will need a driver circuit for this Electronic Lock. This electronic Lock can be controlled automatically using a relay, an NPN transistor or a MOSFET. As in this project our only aim to open and close the electronic lock, and as we are not using any PWM or fast switching, so in this project Relay is the best choice. Using relay will also provide Isolation.

Circuit Diagram:

image processing

The circuit diagram as you can see is very simple. The electronic lock is controlled using an SPDT “Single Pole Double Throw” type relay, which is a 12v relay. As you can see in the circuit diagram the 12v wire from the power supply is connected with the electronic lock, it really doesn’t matter which wire you connect it to. The other wire of the electronic lock is connected with the normally open contact of the relay. While the ground of the power supply is connected with the common contact of the relay.


This relay is controlled using the relay driver. The relay driver simply consists of the 2n2222 NPN transistor and a 10k resistor.  The selection of the transistor depends on the coil current of the electronic lock. To find the current, first you will need to find the resistance of the electronic lock coil, the voltage is already known which is 12v, then using the Ohm’s law

V = IR

The current can be calculated. Now depending on the current value select any NPN transistor whose collector current is greater than the calculated value. For the best performance select a transistor whose collector current is 3 times greater than the calculated value.

As you can see in the circuit diagram above, this relay is controlled using the digital pin 13 of the Arduino, and make sure you connect the ground of the Arduino with the emitter of the 2n2222 NPN transistor.


Arduino Image Processing Controller Programming:

Vb.net Arduino Image Processing Application Programming:

For the Arduino Image Processing application designing, you will need to install the following two Softwares:

Microsoft Visual Basic 2010 express Edition and

EmguCv

The EmguCv installation and setup watch the video available at the end of this Article.

This is how the final form looks like.


image processing


Watch Video Tutorial:

 

Other Arduino Image Processing Based Projects:

Image Processing Based Eye Pupil Detection & Tracking:

Arduino image processing Eye Pupil Tracking, how to make Haarcascade XML file

 

Arduino Image Processing CCTV Camera system:

Arduino Image processing CCTV camera system

 

Arduino Image Processing Based OPTICAL Character Recognition using VB.net and EmguCv:

OCR Optical Character recognition using VB.net and Arduino

Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply