Introduction: Smart Lock Using Intel Edison
In this project we have used an Intel Edison for making a smart lock box. This is mainly because we can integrate a sound card, finger print sensor and the solenoid lock in the easiest possible way. One other important use of using an Edison is that we can be online will with it 24/7 and the code can be written in python!!
Step 1: Components Required
Building a smart lock isn't a very hard task. It hardly requires a few components.
1. Intel Edison
2. A Relay
3. An electronic solenoid door lock
4. 12V supply
5. Finger Print Sensor (R305)
6. USB sound card
Step 2: Circuit
In the smart lock box, the lock opens when the finger print matches the data base stored in the module. We achieve this by connecting the lock to the Intel Edison through a relay.
If you haven't set your Edison yet follow the link below
Step 3: Code
In this project I use Yocto, so I can write the entire code in python!
So we access Linux on Edison using Putty. Mac/Linux users don't require Putty.
Set the COM port number to serial port. This can be found in Device manager>Ports>USB Serial Port.
The speed is also set to 115200. Now click open. This should show you a blank screen. Press Enter once.
It should now be asking for your login. Type root and press enter. You should now be able to access Linux.
Now use the code in the below link and you're good to go!
It contains 3 python files. The first one is for registering the Admin finger print. The second one is for registering a new employee in the data base. And the third one is for verification of the finger print, if verified the lock opens.
The code for the text to speech is present in these files also. We use a library called espeak.
Step 4: Text to Speech
You need to first configure your opkg repository
Do so by typing:
And now add the following code
src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32
Update the package manager and install the first package we need:
opkg install git
Now that packages have been downloaded, we have to install alsa utils and mpg123. Type this code to install it:
opkg install alsa-utils
opkg install mpg123
opkg install python-opencv espeak alsa-utils
Also read the following link
This will help in configuring the sound card.
After the sound is configured just connect an aux cable to a portable speaker and when the program is run we will get the speech output.
Step 5: Final Step
Finally bring them together by making a good enclosure. In this project I have used a laser cut box. You could also build your own 3D printed box too!!
And there you go, we built a smart lock box using Intel Edison.