Using a fingerprint reader on Raspberry Pi

Imagine the thousand possibilities that having an optical fingerprint sensor connected to a Raspberry Pi gives us, We will be able to capture and identify the information of the fingerprints that interest us and take actions based on it. In my particular case I put it at the entrance to the house, If you find my footprint or those of my family, because it opens the door without the need for keys!

 


This is the material I used, one “DollaTek Green Light Optical Fingerprint Reader Sensor Module for Arduino Mega2560 UNO R3″ that we can find in Amazon for 16€ and optionally also at Amazon, one “IZOKEE CP2102 USB to TTL 6PIN Serial Converter Adapter, USB to TTL Module for STC 3.3V and 5V UART with Jumper Cables (2 Parts)” that for 9€ we have 2 USB TTL converters. So we will directly connect the reader to the USB TTL device and this to the Raspberry Pi to the USB directly.

 

Connection is quite simple, we will have to identify 4 wires on the Fingerprint Sensor, the VCC that will be connected to the 3v3 of the USB TTL device, Sensor TX to USB RXD, the RX to the TXD and we end up connecting the ground ones to each other, GND to GND.

Well, after connecting the cabling and USB device, we turn on the Pi, assuming that we have the Raspbian OS updated, with “ls /dev/ttyUSB*” we will be able to see if the serial converter has recognized us. We start by adding the PM Code Works repository to install a Python utility that is wonderful and gives us everything chewed:

[SourceCode]wget -O – HTTP://apt.pm-codeworks.de/pm-codeworks.de.gpg | Sudo apt-key add –
sudo wget http://apt.pm-codeworks.de/pm-codeworks.list -P /etc/apt/sources.list.d/
Sudo apt-get update
sudo apt-get install python-fingerprint –Yes[/SourceCode]

 

And after that, We'll have some examples to try, If we access “/usr/share/doc/python-fingerprint/examples/” We will have several samples,

To test if the device works and recognizes it satisfactorily, Tried:

[SourceCode]python2 /usr/share/doc/python-fingerprint/examples/example_index.py[/SourceCode]

 

To add a footprint to your collection, We'll run the following script, As we see, it will indicate that it recognizes the footprint and that we put it in another position:

[SourceCode]python2 /usr/share/doc/python-fingerprint/examples/example_enroll.py
Currently used templates: 0/300
Waiting for finger…
Remove finger…
Waiting for same finger again…
Finger enrolled successfully!
New template position #0[/SourceCode]

We can add as many footprints as we want, and the other way around, if we want to eliminate any traces, We will do it with “python2 example_delete.py” and finally if we want to run the script that will be running detecting the footprints, Use: “python2 example_search.py”.

With this simple example we will be able to work on our own scripts and with the needs we have, in my case when it detects the fingerprints, Run a Bash script that causes a relay to close a circuit and open the door using the intercom board, I'll tell you this part one day, There is no better than reading manuals and tutorials of the things we want to hack to mold them to our whim. I hope you found it interesting!

 

Recommended Posts

Author

nheobug@bujarra.com
Autor del blog Bujarra.com Cualquier necesidad que tengas, Do not hesitate to contact me, I will try to help you whenever I can, Sharing is living ;) . Enjoy documents!!!

Stellar Converter for OST

10 of May de 2019