Problems with the GT511C1 Fingerprint Scanner

Status
Not open for further replies.

Mr Karoshi

New member
Hi guys, first post, here goes.

I've been trying to get the Teensy 3.0 working with a GT511C1 fingerprint scanner and having really no luck, to the point where I thought I'd fried it - only to solder on a USB cable and find it worked perfectly with the supplied demo software.

The scanner is here:https://www.sparkfun.com/products/11836

Comes with some example code which compiles fine for the Teensy but I get no response from the other device.

My hardware setup is pretty simple: Pin 1 (scanner Tx) <-> Pin 9 (Teensy Rx), Pin 2 (scanner Rx) <-> Pin 10 (Teensy Tx) and then the 3.3V and GND required are connected to the bottom row of the Teensy by the reset button.

I originally thought that the Serial/UART would need some pull up resistors to 3.3V so tried that, but then read that that's only required for I2C on the Teensy 3, is that correct?

I thought about level conversion but used my o'scope on both devices and found they're both functioning off of 3.3V perfectly fine, I'm assuming obviously that the TTL communication uses 3.3V as Vref and not 5V!

Here is the code I'm using, also pretty basic:
Code:
#include "FPS_GT511C3.h"
#include "SoftwareSerial.h"

FPS_GT511C3 fps(9, 10);

void setup()
{
	Serial.begin(9600);
	fps.UseSerialDebug = true; // so you can see the messages in the serial debug screen
	fps.Open();
}


void loop()
{
	// FPS Blink LED Test
	fps.SetLED(true); // turn on the LED inside the fps
	delay(1000);
	fps.SetLED(false);// turn off the LED inside the fps
	delay(1000);
}

As you can probably tell, it's just blinking the backlight of the GT511C1 and nothing more, yet there is no blinking from the scanner at all, just the power LED with it's steady bright green. I'm also using this library to back the previous code:https://github.com/sparkfun/Fingerprint_Scanner-TTL

As for my platform setup I'm running the Arduino (IDE?) on Mac OSX, but I have Ubuntu and Windows 7 VM's to help with the scanner's demo software.

I've spent literally days trying to sort this and my brain is soup, I'm convinced it's something extremely simple but I need a sounding board, does anyone have any ideas/questions?

Thanks in advance.
 
I tried changing all instances of the word with uint16_t but the result was same. The scanner is still not working. I have attached the .cpp and.h files of the library. Could you please tell me exactly what changes should i make? Your help would mean a lot.
 

Attachments

  • FPS_GT511C3.cpp
    22.9 KB · Views: 1,338
  • FPS_GT511C3.h
    13.3 KB · Views: 142
Hmmm, perhaps just rewrite the init and ledon commands from scratch. The datasheet seems pretty clear
 
Can softwareserial be the problem? Maybe the softwareserial is interfaring with hardware serial:\ is there any way to edit the library such that it can use hardware serial??
 
Yes SoftwareSerial can be problematic on Teensy...

I make zero promises here, but I took a quick edit pass through, where I defined a serial port to use in the header file:
#define FTS_SERIAL Serial1

In this case Serial1, I then edited the library to use this instead of calls to SoftwareSerial and verified I could build, at least the FPS_ID...
sketch...

So on Teensy you can define this for Serial1 or Serial2 or Serial3... But of course you need to make sure it is connected up to the right IO pins associated with that Serial port.

If I were doing it for real, I would probably put under some form of Ifdefs or the like, but In case anyone wishes to try it out, I zipped up the library and included it here.
 

Attachments

  • FPS_GT511C3.zip
    12.8 KB · Views: 251
Hi Akash,
Good to hear that you resolved the problem. I am also facing the similar problem. Please let me know how can I fix this.

The problem is at fps.open() - That is first while loop in Response_Packet* FPS_GT511C3::GetResponse() function goes in a infinite loop. firstByte is always 255.
I am using H/w GT511C3

Code is as below (FPS_Blink
#include "FPS_GT511C3.h"
#include "SoftwareSerial.h"

FPS_GT511C3 fps(9, 10);

void setup()
{
Serial.begin(9600);
fps.UseSerialDebug = true; // so you can see the messages in the serial debug screen
fps.Open();
}


void loop()
{
// FPS Blink LED Test
fps.SetLED(true); // turn on the LED inside the fps
delay(1000);
fps.SetLED(false);// turn off the LED inside the fps
delay(1000);
}
 
I believe he had luck using the hacked up version of the library I did in posting #10, the hacked up version assumes Serial1 and uses hardware serial and not software serial. It also ignores the IO pins passed in.

If you wish to use pins 9 and 10 this is Serial2...
So go into the header file FPS_GTC511C3 and edit the line:
Code:
	#define FTS_SERIAL Serial1
And change Serial1 to Serial2 and see if that helps.
 
I believe he had luck using the hacked up version of the library I did in posting #10, the hacked up version assumes Serial1 and uses hardware serial and not software serial. It also ignores the IO pins passed in.

If you wish to use pins 9 and 10 this is Serial2...
So go into the header file FPS_GTC511C3 and edit the line:
Code:
	#define FTS_SERIAL Serial1
And change Serial1 to Serial2 and see if that helps.

Thanks KurtE for the reply.
I used the hacked up version of the library (posting #10) but no luck. By the way, I am using NodeMCU 1.0 (from Espressif). Does your hacked up version work for NodeMCU too?

The code (FPS_Blink) is as below.
#include "FPS_GT511C3.h"
#include "SoftwareSerial.h"

FPS_GT511C3 fps(3, 1);//In NodeMCU, Rx is pin 3, Tx is pin 1

void setup()
{
Serial.begin(9600);
fps.UseSerialDebug = true; // so you can see the messages in the serial debug screen
Serial.println("fps open");
fps.Open();
}


void loop()
{
// FPS Blink LED Test
fps.SetLED(true); // turn on the LED inside the fps
delay(1000);
fps.SetLED(false);// turn off the LED inside the fps
delay(1000);
}
 
Sorry, As mentioned earlier in this thread, I don't have any of these, I just simply did the hack to see if it would help out Akash Mittal...

Hopefully others who use these sensors can give you additional help.

Edit: One note: make sure you have the RX and TX pins going to the right signals and that you have some form of common ground...

And in all cases like this, showing a picture of your setup can help.... For example have seen several cases where people did not solder in the IO pins to the Teensy and were expecting just the friction to be enough for good electrical connections...
 
Dear KurtE,

Thanks for the quick reply.
Please find below the picture of the connections. Please let me know if I need to make any corrections.
FPS_NodeMCU_Connections.PNG
 
That is not a picture of a Teensy board? So I have no idea. If you are not using a Teensy (PJRC), you should maybe ask as a forum that is geared around your processor board and/or one geared to your device.

But if you are using a Teensy, a picture of the actual setup would help... Often times diagrams like this miss what actually is setup.
 
Status
Not open for further replies.
Back
Top