Arduino, Sensors

Interfacing R307 Fingerprint Sensor With Arduino

In this tutorial, we will be interfacing the R307 fingerprint sensor with  Arduino. The R307 fingerprint sensor is an optical fingerprint sensor that can be used to capture and store fingerprint data.

The sensor has a resolution of 512×288 pixels it can store up to 1000 fingerprint templates. The sensor is interfaced with Arduino using a UART interface.

Required Material

Before we begin, let’s figure out the necessary materials:

  • R307 Fingerprint Sensor
  • Arduino Uno or similar board
  • Jumper wires
  • USB cable

R307 Fingerprint  Scanner Sensor

The R307 fingerprint sensor module captures and recognizes fingerprints. It uses an optical sensor to capture fingerprints and has a powerful image-processing algorithm that can quickly and accurately recognize fingerprints.

The R307 Sensor can store up to 1000 fingerprints in its built-in memory and has a UART interface that can be used to interface with microcontrollers like Arduino, Raspberry Pi, and other microcontrollers that support UART communication protocol.

The R307 Sensor is commonly used in applications such as security systems and access control systems.

How R307 fingerprint scanners work

The R307 fingerprint sensor works by scanning a person’s fingerprint and creating a digital image of unique patterns of the fingertip. This image is then processed and converted into a mathematical algorithm that is stored on the sensor.

When a fingerprint is scanned again, the sensor compares the new image to the previously stored algorithm to confirm if there is a match. If the print and algorithm are both the same, the sensor will send a signal indicating that the fingerprint is valid.


Pinout R307 Fingerprint Sensor

The R307 Fingerprint Sensor module has 6 pins, with 4  of them used for r communication and power supply. see below the pinout of the R307 Fingerprint Sensor.

Specifications of R307 Fingerprint Sensor

  1. Model: R307 Fingerprint Sensor
  2. Sensor Type: Optical
  3. Resolution: 500 DPI
  4. Image Capture Area: 15.4mm x 18.2mm
  5. Image capture time: <1.0s
  6. Operating Voltage: 3.3V – 6V DC
  7. Operating Current: <100mA
  8. Interface: UART/TTL
  9. Baud Rate: 9600 bps (default), can be changed to other rates19200 bps
  10. Fingerprint Capacity: Up to 1000 fingerprints
  11. False Acceptance Rate (FAR): <0.001%
  12. False Rejection Rate (FRR): <0.1%
  13. Operating Temperature: -20°C to 50°C
  14. Operating Humidity: 40% to 85%
  15. Dimensions: 56 x 20 x 21.5 mm (L x W x H)
  16. Weight: 12g

Applications of R307 Fingerprint Sensor

The R307 Fingerprint Sensor is widely used in different industries. Here are some of the common applications of the R307 Sensor:

  • Access control systems
  • Time and attendance systems
  • Security systems
  • Door locks
  • Employee identification systems
  • Banking and financial applications
  • Healthcare applications
  • Government applications
  • Smart homes and Internet of Things (IoT) applications.

Difference Between R305 and R307 Fingerprint Sensor

DescriptionR305 SensorR307 Sensor
Storage Capacity (Fingerprints Capacity )2501000
3.3V OperationNoYes
USB OperationNoYes
Finger Detect OutputNoYes

Interfacing Fingerprint sensor with Arduino

Firstly connect the Fingerprint Sensor to the Arduino board using jumper wires. Make sure to connect the sensor’s VCC pin to 5V on the Arduino, GND to GND, RX to 3, and TX to 2.

  • VCC pin to 5V pin of  Arduino
  • GND pin  to GND pin of Arduino
  • TX pin to 2 pins of Arduino
  • RX pin to 3-pin Arduino

(You can also refer to the connection diagram above)


Setting up the Adafruit fingerprint sensor R307 Arduino library

For the Fingerprint sensor  scanner and the Arduino Nano, you will need to download and install the Adafruit Fingerprint Library in Arduino IDE.

Go to Sketch > Include Library > Manage Libraries and search for “Adafruit Fingerprint“. Install the library and include it in your sketch.

Once the library is installed you have the capability to use the Adafruit Fingerprint Library to capture fingerprints and compare the new ones with pre-stored fingerprints in the chip.


Uploading Code to Arduino Board

Open the Arduino IDE and navigate to the “File” menu, select “Examples” and navigate to the Adafruit fingerprint library. Select the “enroll” example from the list of available examples code.

Upload the enrollment example.


Fingerprint enroll Code

Connect your  Arduino board, and then upload the “enroll” example to your board.

Once the upload is complete, open the Serial Monitor in the Arduino IDE to view the output, In the Serial Monitor select a baud rate of “9600″.


Enroll Fingerprint :

  • Set the fingerprint ID number according to the code.
  • Place an enrolled finger on the sensor
  • Place the finger again on the sensor for confirmation.

Final Code :

Since we have enrolled the fingerprints in the last step, now we can test if this sensor is working, or let’s check for a match using the

  • Choose the fingerprint example.
  • Upload the fingerprint example.

Once the fingerprints have been registered, the example fingerprint can be loaded, the sketch reads the fingerprint from the sensor and it tells us how constant the result is with its database.

Leave a Reply

Your email address will not be published. Required fields are marked *