ESP8266 NodeMCU – Fingerprint Optical Sensor (JM-101)

In this tutorial I am going to show how you can use JM-101 fingerprint optical sensor with ES8266 NodeMCU.

Parts Required

JM-101 Fingerprint Module

JM-101 fingerprint module is an integrated fingerprint processing module that integrates optical path and fingerprint processing. It has the characteristics of small size, low power consumption and simple interface. You can find more details about this module here.
JM-101 module supports USB and UART communication interfaces. In this tutorial we will be using the UART communication.

Building the Circuit and Schematic

Step 1: Start from connecting all together following the schematic bellow. And then connect your NodeMCU to your PC trough an USB cable.

Adding a fingerprint to the system

Step 2: Open your Arduino IDE and create a new project. If you are using Arduino IDE to program ESP8266 modules for the first time, please complete Step 1, Step 2, Step 3 and Step 4 from my previous tutorial “ESP8266 NodeMCU – Blinking a LED“.

Step 3: We wil be using the adafruit library about their fingerprint sensors. You can download the library .zip file from here. And then add this library to your project.

Step 4: Since NodeMCU only have one serial port that will be in use to debug with arduino terminal we need to use “SoftwareSerial” that will be using interrupts in order to react like a real serial port. To do this we will be using the “espsoftwareserial” library that you can download from here and install like in the Step 3.

Step 5: Once we have added this two libraries to our Arduino IDE we will paste the code bellow in our project and upload it to your NodeMCU. The code bellow is based on “enroll” example from adafruit library.

Step 6: After uploading the code open the serial monitor. You will be asked to enter a number between 1 and 127 (this number will be the identifier of your fingerprint). Write number “1” and click “Enter”. Now the system will be waiting to you to put your finger in the sensor…

Step 7: Put the finger you want to save the fingerprint in the sensor. Then you will be asked to put the same finger in the sensor again (to check if it match). If the prints match your fingerprint will be stored with the respective ID 1 that you enter previously.

Step 8: Repeat the Step 6 and Step 7 to store a different fingerprint with the ID “2”.

Using the added fingerprints to switch ON/OFF a LED

Step 9: Create a new arduino project, paste the code bellow and upload it to your NodeMCU. The code bellow is based on “fingerprint” example from adafruit library.

Step 10: After uploading the code open the serial monitor. The system should inform you that sensor contains 2 templates (the 2 fingerprints saved previously) and will be waiting for you to put one of the saved fingerprints on the sensor.

Step 11: If you use the finger saved with ID 1 and the sensor recognize it with a confidence above 100, the built-in LED of the NodeMCU will turn ON. If you use the finger saved with ID 2 and the sensor recognize it with a confidence above 100 the built-in LED will turn OFF. For example, you can replace the switch of the LED by an electrical door lock, using a relay like we used on previous tutorial.

André Martins

Author: André Martins

Born in Azores. Electrical Engineer interested in Automation, Robotics and Embedded Systems subjects. With a degree in Electrical and Computer Engineering in the field of Energy and Automation. Currently in Master's degree in Electrical Engineering.

16 thoughts on “ESP8266 NodeMCU – Fingerprint Optical Sensor (JM-101)

  1. Howdy! This post couldn’t be written any better!
    Reading this post reminds me of my old room mate! He always kept chatting about this.

    I will forward this post to him. Fairly certain he will have a good
    read. Thank you for sharing!

  2. Compiler Error:

    Arduino: 1.8.1 (Windows 10), Board: “NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200”

    sketch_may14b:6: error: ‘amp’ was not declared in this scope

    Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

    ^

    sketch_may14b:6: error: ‘mySerial’ does not name a type

    Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

    ^

    Multiple libraries were found for “SoftwareSerial.h”
    Used: C:\Users\ASUS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\SoftwareSerial
    Not used: C:\Users\ASUS\Downloads\arduino-1.8.1\libraries\espsoftwareserial-master
    exit status 1
    ‘amp’ was not declared in this scope

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

  3. I am getting an error, the finger.verifyPassword() always fails hence we get “Did not find fingerprint sensor” , if I comment this section we are getting Communication error in the looping statement. Can anyone help me ?

  4. Hi, question! does anyone have an idea what’s wrong if jm-101 needs to reconect vcc after reading 1 finger.

  5. Im getting this “Unknown error”:
    Place same finger again
    ………………Image taken
    Image converted
    Creating model for #1
    Unknown error

    Can someone please help me?

    Anyway thank you for the tutorial!

Leave a Reply

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