Arduino + Fingerprint Module Interface

I hope this topic finds you well rested and everything is going well.

I have a fingerprint reader (http://www.sparkfun.com/products/8881) and i need some confirmation in the interfacing of this fingerprint reader to an arduino UNO.

I would like to know if this is correct and would not fry any components

Fingerprint Arduino Board

Pin 1 (GND) GND pin
Pin 2 (reset)
Pin 3 (TXD) RX<-0 pin
Pin 4 (RXD) TX->1 pin
Pin 5 (PowerEN) *not sure where to plug this
pin 6 (VCC 5v) 5V pin

Can I do that and then communicate normally with serial library of Arduino?

Thanks in Advanced

Wow, this is the first part I've seen with a "Humility" rating!

You'll need a 5V to 3.3V level converter for the signals. Power En is either pulled to 3.3V or to Gnd, hard to say which from the 2 specs Sparkfun offers up.

I think you want device TX to connect to Arduino TX, and device RX to connect to Arduino RX:

TXD to Serial sender RXD to Serial receiver

UART 3.3V CMOS level Baud rates up to 921.6kbps (factory default is 115.2kbps) RS232/422/485 supported via additional level converter

Digital I/O 3.3V CMOS level 8 ports separately configurable 26bit Wiegand I/O supported via additional level converter

Nice find! A bit expensive as a toy though. I wonder if any of the following can be hacked for a fraction of the price:

http://www.ebay.com/sch/i.html?_nkw=fingerprint+scanner&_sacat=0&_odkw=hp+fingerprint+scanner&_osacat=0&_trksid=p3286.c0.m270.l1313

The original fingerprint scanner suggest to be used with LCD and keypad ;)

Hello again,

I cannot seem to get it to work as described above nor modified as shown below

Pin 1 (GND) GND pin
Pin 2 (reset) 5V pin
Pin 3 (TXD) RX<-2 pin (software serial) (the 3.3V from the fingerprint scanner is directly connected to the arduino RX)
Pin 4 (RXD) TX->3 pin (software serial) (the 5V from arduino is brought down to 3.3V by a voltage divider)
Pin 5 (PowerEN) 5V pin
pin 6 (VCC 5v) 5V pin

I been playing around with the code below (in arduino 1.0 IDE) but i cannot get anything back from the scanner.

when i send the ‘cmd’ data to the scanner i should get back the ‘ack’ data but i get nothing.

how would i go about debugging the TX and RX pins to see if anything is being sent or received on both the arduino and fingerprint scanner?

#include <SoftwareSerial.h>
SoftwareSerial FS(2,3);

byte cmd[]={0xEF,0x01,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x03,0x01,0x00,0x05};		//register first print
byte ack[]={0xEF,0x01,0xFF,0xFF,0xFF,0xFF,0x07,0x00,0x03,0x00,0x00,0x0A};           //ACK
int cnt = 0;
byte buffer[12];

void setup()
{
  Serial.begin(9600);
  FS.begin(9600);
  delay(200);
}

void loop()
{            
      FS.write(cmd,12); //slide finger to store a fingerprint
      delay(100);
      
      for (int i=0; i< 12; i++)
      {    
           if ((cnt < 12) && FS.available()) buffer[cnt++] = FS.read();      //store the data received from the fingerprint scanner
      }      
      
      for (int i=0;i<12;i++)
      {
        Serial.print(buffer[i], HEX);             //print the data received from the scanner
        Serial.print(" ");
      }
      
      Serial.print("\n");
      delay(1000);
      cnt = 0;
}
      for (int i=0; i< 12; i++)
      {    
           if ((cnt < 12) && FS.available()) buffer[cnt++] = FS.read();      //store the data received from the fingerprint scanner
      }

This probably isn’t doing what you want it to do. The serial interface is quite slow compared to the speed at which the processor is running, so you’ll probably zip through your loop of 12 without there every being any data ready to read (i.e. FS.available() will always be zero). Add some Serial.print() debugs in so you can see what’s happening.

Suggest you to get a logic level converter. Works nicely for me with a 3.3V I2C device on 5V arduino:

http://www.sparkfun.com/products/8745

You can make one yourself with 2 MOSFETS and 4 resistors but this one is ready to use.

Update:

So after spending 12hours+ tweaking with the code, connection and getting no response back from the fingerprint scanner i decided to go to school and attach an oscilloscope to the tx and rx on the arduino and fingerprint scanner to monitor the data transmitted.

the oscilloscope show that the arduino is sending data to the rx of the scanner and the scanner is receiving the data by the series of high and lows shown on the oscilloscope. however the fingerprint scanner is not sending anything back because there is no series of high and lows shown on the oscilloscope and it sits at around 100mV.

I do not seem to figure out why the fingerprint does not respond to the command sent in. the command im sending has been used by various ppl's code for this scanner around the web and it should work.

possible reason the scanner is not working correctly: 1. the serial communication is not set correctly (the scanner requires 1 start bit, 8 bit data, 1 stop bit, and no check bit) i am not sure if the arduino stock softserial settings satisfy these condition. 2. the scanner has not been initiated correctly (due to no baud rate set due to serial communication being wrong, etc) 3. the tx pin of the scanner does not work?

i need help figuring out if the arduino serial com satisfy my scanner's condition.

edit:

One thing im not sure about, do i need to pull-up the tx pin of the scanner?

i am not sure what the CMOS level in the datasheet (UART - 3.3V CMOS level) means