members
Basics: Project 057c White 0.96" I2C OLED display module, Fingerprint Sensor Module FPM10A
of Acoptex.com in UNO
Basics: Project 057c
Project name: White 0.96" I2C OLED display module, Fingerprint Sensor Module FPM10A
Tags: Arduino Uno, Arduino, 0.96" I2C, White OLED display module, 128x64, 128x32, GMS096A, Adafruit Monochrome OLED, SSD1306, Fingerprint Sensor Module, fingerprint sensor module, FPM10A, Windows Fingerprint Capture, R305, FPM10
Attachments: library1, library2, library3, sketch, enrollsketch
In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):
1.Arduino Uno R3 (you can also use the other version of Arduino)
2. 0.96" I2C OLED display module 1 pc
3.Arduino IDE ( you can download it from here )
4.Jumper cables F-M, M-M
5. Breadboard 1 pc
6. Fingerprint Sensor Module FPM10A 1pc
General
We will learn how to connect 0.96" I2C OLED display module and Fingerprint Sensor Module FPM10A to Arduino board; use them to enroll two fingerprints from different persons and display a greeting message accordingly to the match found, on an OLED display.
Understanding the Fingerprint Sensor Module FPM10A
You can read more about it here.
Understanding the 0.96" I2C OLED display module
OLED (Organic Light-Emitting Diode) is a self light-emitting technology composed of a thin, multi-layered organic film placed between an anode and cathode. In contrast to LCD technology, OLED does not require a backlight. OLED possesses high application potential for virtually all types of displays and is regarded as the ultimate technology for the next generation of flat-panel displays.
OLEDs basic structure consists of organic materials positioned between the cathode and the anode, which is composed of electric conductive transparent Indium Tin Oxide (ITO). The organic materials compose a multi-layered thin film, which includes the Hole Transporting Layer (HTL), Emission Layer (EML) and the Electron Transporting Layer (ETL). By applying the appropriate electric voltage, holes and electrons are injected into the EML from the anode and the cathode, respectively. The holes and electrons combine inside the EML to form excitons, after which electro luminescence occurs. The transfer material, emission layer material and choice of electrode are the key factors that determine the quality of OLED components.
These displays are small, only about 1" diameter, but very readable due to the high contrast of an OLED display. This display is made of 128x64 individual white OLED pixels, each one is turned on or off by the controller chip. Because the display makes its own light, no backlight is required. This reduces the power required to run the OLED and is why the display has such high contrast and crisp.
It can be used with either an SPI or I2C interface (depends on the maker) - selectable by soldering two jumpers on the back. The design is completely 5V-ready, with an onboard regulator and built in boost converter. It's easier than ever to connect directly to your 3V or 5V microcontroller without needing any kind of level shifter!
The driver chip, SSD1306 can communicate in multiple ways including I2C (I²C, IIC or Inter-Integrated Circuit), SPI and 8-bit parallel. However, only the 128x64 display has all these interfaces available.
Features:
- Diagonal Screen Size:0.96"
- Number of Pixels:128 x 64
- Color Depth:White
- Dimension:27.8 x27.3x 4.3 mm
- Working Voltage: 3.3~ 5V DC
- Power: 0.06W Max
- Viewing Angle: >160 Degree
- Driver IC:SSD1306
- Brightness ( cd/m2):150 (Typ) @ 5V
- Interface: I2C
- Adafruit board/chip uses I2C 7-bit address between 0x3C-0x3D, selectable with jumpers
You can find the SSD1306 datasheet here.
Signals and connections of the Fingerprint Sensor Module FPM10A
RX (or RXD) - receive data input pin. Connected to Arduino board or USB to TTL converter TX pin.
TX (or TXD) - transmit data output pin. Connected to Arduino board or USB to TTL converter RX pin.
VCC - power supply. Can be connected to +5VDC or +3.3VDC pin of Arduino board.
GND (or -) - ground. Connected to Arduino board GND pin.
Signals and connections of the 0.96" I2C OLED display module
VCC - this is the power pin. Can be connected to +5VDC or +3.3VDC pin of Arduino board (depends on the display module). All OLEDs are safe to use with 3.3V logic and power.
GND - ground. Connected to Arduino board GND pin.
SDA - Serial Data Line. Connected to Arduino Uno SDA or Analog pin A4.
SCL - Serial Clock Line. Connected to Arduino Uno SCL or Analog pin A5.
Wiring
Step by Step instruction
- Do wiring.
- Open Arduino IDE.
- Plug your Adruino Uno board into your PC and select the correct board and com port
- Find your I2C address. Each device has an I2C address that it uses to accept commands or send messages. Load the sketch over at http://playground.arduino.cc/Main/I2cScanner and follow the instructions to use it. By opening up the Serial monitor window after you upload the sketch, Arduino will scan the address range looking for a reply. The scanner can detect it (0x78, 0x7A,0x3C,0x3D) (for example, in our case 0x3C)
- Modify the bold part in the line display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
- Enroll different fingerprints from two different persons. Upload the enrollsketch, and open the serial monitor at a baud rate of 9600. You should enter an ID for the fingerprint. As this is your first fingerprint, type 1 at the top left corner, and then, press Send button. Place your finger on the scanner and follow the instructions on the serial monitor. You’ll be asked to place the same finger twice on the scanner. If you get the “Prints matched!” message, as shown below, your fingerprint was successfully stored. If not, repeat the process, until you succeed.
- Modify the sketch so that the fingerprint IDs match the name of the persons enrolled.
- Verify and upload the sketch to your Adruino Uno.
- When a person with a saved fingerprint places the finger on the Fingerprint Sensor Module, it displays a greeting message
Troubleshooting
Sometimes the sensor has a hard time identifying the fingerprint if you don’t place your finger very similar way to when you’ve saved it. The sensor works better if you place your finger slowly on the scanner.
Summary
We learnt how to connect 0.96" I2C OLED display module and Fingerprint Sensor Module FPM10A to Arduino board; use them to enroll two fingerprints from different persons and display a greeting message accordingly to the match found, on an OLED display.
Code
The code starts by importing the needed libraries to write in the OLED display, and creates an Adafruit_SSD1306 object called display. We also need to import the libraries for the fingerprint sensor: Adafruit_Fingerprint.h and SoftwareSerial.h.
The following line sets software serial on pins 2 and 3. Pin 2 as RX, and Pin 3 as TX - SoftwareSerial mySerial(2, 3);
Then, we create a an Adafruit_Fingerprint object called finger on the serial pins we’ve set previously.The next two lines create variables to hold the fingerprint ID and the IDname: int fingerprintID = 0; String IDname;
In the setup(), both the fingerprint sensor and the OLED display are initialized. We also print a message on the serial monitor so that we know if the fingerprint sensor was found successfully.
In the loop(), the code displays the main screen on the OLED display – this is done in the displayMainScreen() function. Then, the code is continuously checking for incoming fingerprints. If the sensor founds a saved fingerprint, the Arduino saves the corresponding ID in the fingerprintID variable. Then, the code has an if/else statement to check the ID the fingerprint corresponds to. You should edit the following lines of code with the corresponding IDs and names.
Sometimes, the sensor will recognize a fingerprint better if it is saved several times in different IDs. After identifying the ID name, the OLED displays a greeting – this is done in the displayUserGreeting() function,
Libraries
- All libraries attached on the begining of the project description
- Adafruit_SSD1306 library. Download, unzip and add to libraries in our PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC. You can read about it here.The SSD1306 driver library is used to initialize the display and provide low level display functions.
- Adafruit_GFX library. Download, unzip and add to libraries in our PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC. You can read about it here.The GFX library provides graphics functions for displaying text, drawing lines and circles, etc.
- Adafruit Fingerprint Sensor library. Download, unzip and add to libraries in our PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC. You can read more about it here.
- SoftwareSerial library included in Arduino IDE. The library has the following known limitations:If using multiple software serial ports, only one can receive data at a time.Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).On Arduino or Genuino 101 the current maximum RX speed is 57600bpsOn Arduino or Genuino 101 RX doesn't work on Pin 13 The library has the following known limitations: If using multiple software serial ports, only one can receive data at a time;Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69);Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI);On Arduino or Genuino 101 the current maximum RX speed is 57600bps; On Arduino or Genuino 101 RX doesn't work on Pin 13. You can read about it here.
- Wire library included in Arduino IDE.
Sketch
- See attachments on the begining of this project
Other projects of Acoptex.com










Viewed: 2469 times