ESP8266 NodeMCU – Fingerprint Optical Sensor (JM-101)

In this tutorial, I am going to show how you can use a 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 UART communication.

Building the Circuit and Schematic

Step 1: Start by connecting all together following the schematic below. And then connect your NodeMCU to your PC through 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 will 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 has 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 Step 3.

Step 5: Once we have added these two libraries to our Arduino IDE we will paste the code below in our project and upload it to your NodeMCU. The code below is based on “enrol” 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 the 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 matches). 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 below and upload it to your NodeMCU. The code below is based on the “fingerprint” example from adafruit library.

Step 10: After uploading the code open the serial monitor. The system should inform you that the 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 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 confidence above 100 the built-in LED will turn OFF. For example, you can replace the switch of the LED with an electrical door lock, using a relay as we used in the previous tutorial.

25 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!

  6. Oi boa tarde como faço para usar biometria com sensor de presença para acionar uma bomba d´água e uma válvula solenoide passando num sensor de fluxo no tempo de 5 minuto no máximo por cada digital? consegue ajudar nesse projeto?

  7. Hello
    I made it with wemos r1 mini on D5 (gpio14) and D6 (gpio12) pins and 5V
    I had the same issue with communication error and unknown error.
    Just add delay(100); after each Serial.Println in Loop part of the sketch.
    good luck

  8. Good web site! I truly love how it is simple on my eyes and the data are well written. I am wondering how I could be notified whenever a new post has been made. I’ve subscribed to your feed which must do the trick! Have a great day!

  9. para los interesados en el codigo publicado aparece un &mySerial lo que provoca un error
    en el compilador y esto se debe a que en html & es el & osea hay que cambiar & por &

Leave a Reply

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