Sitemap / Advertise

Information



Tags



Share

How to use the DFRobot Optical Fingerprint Sensor with Raspberry Pi

Advertisement:


read_later

Read Later

Keywords



Keywords



read_later

Read Later

Information

Tags

Share





Advertisement

Advertisement




Definition

In this article, I will discuss using the DFRobot optical fingerprint sensor with Raspberry Pi, which detects and verifies fingerprints. It includes a high-powered DSP chip that does image rendering, calculation, feature-finding, and searching. Although these sensors were incipiently developed for Arduino, they can be connected to any microcontroller or system with TTL serial to enroll and detect fingerprints.

Code

I utilized a USB-to-Serial Converter (CP2102) to connect the fingerprint sensor (5V) to Raspberry Pi since the built-in UART on the Pi's TX/RX pins (pin 8 / GPIO 14 and pin 10 / GPIO 15) works with 3.3V.

article_image
Figure - 155.1

⭐ After connecting the sensor to Pi, download the Adafruit Fingerprint Library by entering this command to the terminal:

sudo pip3 install adafruit-circuitpython-fingerprint

article_image
Figure - 155.2

⭐ If you want to use the built-in UART, disable the serial console and enable the serial port hardware in raspi-config.

article_image
Figure - 155.3

After installing the library, to test the sensor and enroll fingerprints, I modified the example code provided by Adafruit - fingerprint_sensor_settings.py.

article_image
Figure - 155.4

⭐ First, run the fingerprint_sensor_settings.py that gives three options:

article_image
Figure - 155.5

⭐ Enter e to template a new fingerprint and store it in the given location (from 1 to 127) - that means assigning an ID number to the print.

article_image
Figure - 155.6

⭐ Enter f to test the fingerprint sensor by searching enrolled fingerprints and identifying which ID (if any) is currently being photographed.

⭐ Enter d to remove an enrolled fingerprint model from the sensor.

article_image
Figure - 155.7