Skip to content

Commit b9944f9

Browse files
authored
Update FPS_Blink.ino
- added a description for this example - updated the hardware hookup - added option to adjust software serial for other Arduino microcontrollers (i.e. ATmega32U4, ATmega2560, etc.) due to limitations with the library. - added some a little bit more comments. =) - changed resistors used in voltage division: __Logic Level Conversion__ I tested the setup with the previous resistors. I was not able to get it working with the GT511C1R model. However, I was able to get it working when using a voltage divider (with 10kΩ and 20kΩ) similar to the setup used in our previous logic level converter’s application circuit [ [https://cdn.sparkfun.com/assets/b/0/e/1/0/522637c6757b7f2b228b4568.png](https://cdn.sparkfun.com/assets/b/0/e/1/0/522637c6757b7f2b228b4568.png) ]. I believe the IC used in the GT511C1R requires a slightly higher logic level for the input voltage in order for the signal to be considered a logic HIGH by the fingerprint scanner [similar to this general explanation of 3.3V CMOS Logic Levels – [https://learn.sparkfun.com/tutorials/logic-levels#33-v-cmos-logic-levels(https://learn.sparkfun.com/tutorials/logic-levels#33-v-cmos-logic-levels) ]. Doing a stress test (with the original 560Ohm and 1000Ohm resistor) and measuring the voltage with a multimeter, I noticed that the divided voltage was about 3.14V. When the GT511C1R was connected, the voltage dropped to about 2.97V. This is probably not high enough for the fingerprint scanner to recognize a logic HIGH. _Replace Resistors for Higher Logic Level Threshold_ I was able to get the Arduino example code working by replacing the 560Ohm resistor with the 10kΩ resistor and replacing the 1000Ohm resistor with two 10kΩ resistors in series for 20kΩ. Testing the circuit with the resistors replaced, my multimeter read a divided voltage of 3.3V. When the GT511C1R was connected, the voltage dropped to about ~3.18V-3.04V. This was sufficient enough for the fingerprint scanner to receive the commands from the Arduino. I tested this with the blink examples and there were no problems.
1 parent 546686b commit b9944f9

File tree

1 file changed

+54
-9
lines changed

1 file changed

+54
-9
lines changed

FPS_GT511C3/Examples/FPS_Blink/FPS_Blink.ino

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,73 @@
55
basically, Feel free to hack away at it, but just give me credit for my work =)
66
TLDR; Wil Wheaton's Law
77
8-
This simple sketch turns the LED on and off similar to the Arduino blink sketch.
8+
Description: This simple sketch turns the LED on and off similar to the Arduino blink sketch.
99
It is used to show that communications are working.
10+
11+
This code should work with the any model of ADH-Tech's FPS as long as
12+
you are within the minimum logic level threshold for the FPS serial UART.
13+
This code has been tested with these models:
14+
15+
GT-511C3 [ https://www.sparkfun.com/products/11792 ]
16+
GT-511C1R [ https://www.sparkfun.com/products/13007 ]
17+
1018
*/
1119

1220
#include "FPS_GT511C3.h"
1321
#include "SoftwareSerial.h"
1422

15-
// Hardware setup - FPS connected to:
16-
// digital pin 4(arduino rx, fps tx)
17-
// digital pin 5(arduino tx - 560ohm resistor fps tx - 1000ohm resistor - ground)
18-
// this brings the 5v tx line down to about 3.2v so we dont fry our fps
23+
/*-------------------- HARDWARE HOOKUP with 5V Arduino --------------------
24+
1.) Dedicated Bi-Directional Logic Level Converter (LLC)
1925
20-
FPS_GT511C3 fps(4, 5);
26+
It is recommended to use a dedicated bi-direcitonal LLC
27+
[ https://www.sparkfun.com/products/12009 ] for a reliable connection if you
28+
are using a 5V Arduino microcontroller:
29+
30+
Fingerprint Scanner (Pin #) <-> Logic Level Converter <-> 5V Arduino w/ Atmega328P
31+
UART_TX (3.3V TTL)(Pin 1) <-> LV1 <-> HV1 <-> RX (pin 4)
32+
UART_RX (3.3V TTL)(Pin 2) <-> LV4 <-> HV4 <-> TX (pin 5)
33+
GND (Pin 3) <-> GND <-> GND <-> GND
34+
Vin (3.3V~6V) (Pin 4) <-> HV <-> 5V
35+
LV <-> 3.3V
36+
37+
2.) Voltage Division w/ 3x 10kOhm Resistors
38+
39+
Otherwise, you could use 3x 10kOhm resistors [ https://www.sparkfun.com/products/11508 ]
40+
to divide the voltage from a 5V Arduino down to 3.3V FPS similar to the
41+
"Uni-Directional" application circuit on our old logic level converter
42+
[ https://cdn.sparkfun.com/assets/b/0/e/1/0/522637c6757b7f2b228b4568.png ]:
43+
44+
Voltage Divider <-> Fingerprint Scanner(Pin #) <-> Voltage Divider <-> 5V Arduino w/ Atmega328P
45+
<-> UART_TX (3.3V TTL) (Pin 1) <-> <-> RX (pin 4)
46+
GND <-> 10kOhm <-> 10kOhm <-> UART_RX (3.3V TTL) (Pin 2) <-> 10kOhm <-> TX (pin 5)
47+
GND <-> GND (Pin 3) <-> GND <-> GND
48+
<-> Vin (3.3V~6V) (Pin 4) <-> <-> 5V
49+
50+
Note: You can add the two 10kOhm resistors in series for 20kOhms. =)
51+
52+
--------------------------------------------------------------------------------*/
53+
54+
// set up software serial pins for Arduino's w/ Atmega328P's
55+
// FPS (TX) is connected to pin 4 (Arduino's Software RX)
56+
// FPS (RX) is connected through a converter to pin 5 (Arduino's Software TX)
57+
FPS_GT511C3 fps(4, 5); // (Arduino SS_RX = pin 4, Arduino SS_TX = pin 5)
58+
59+
/*If using another Arduino microcontroller, try commenting out line 57 and
60+
uncommenting line 66 due to the limitations listed in the
61+
library's note => https://www.arduino.cc/en/Reference/softwareSerial . Do
62+
not forget to rewire the connection to the Arduino*/
63+
64+
// FPS (TX) is connected to pin 10 (Arduino's Software RX)
65+
// FPS (RX) is connected through a converter to pin 11 (Arduino's Software TX)
66+
//FPS_GT511C3 fps(10, 11); // (Arduino SS_RX = pin 10, Arduino SS_TX = pin 11)
2167

2268
void setup()
2369
{
24-
Serial.begin(9600);
70+
Serial.begin(9600); //set up Arduino's hardware serial UART
2571
fps.UseSerialDebug = true; // so you can see the messages in the serial debug screen
26-
fps.Open();
72+
fps.Open(); //send serial command to initialize fps
2773
}
2874

29-
3075
void loop()
3176
{
3277
// FPS Blink LED Test

0 commit comments

Comments
 (0)