Pages: [1]   Go Down
Author Topic: Arduino + SM-630 Fingerprint Verification Module!!  (Read 1506 times)
0 Members and 1 Guest are viewing this topic.
Chennai, India
Offline Offline
God Member
*****
Karma: 0
Posts: 752
Peace!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I got interested in fingerprint verification and ordered this module. Now the user guide is unlike any datasheet i've used so far (i'm a starter with electronics and arduino) I see a set of functions and response codes. now i'm unable to figure out how to communicate to this from the arduino? It uses serial communication. Can someone look at the user manual and help me create sample code for one of the functions and then i can build on top of it?

http://www.4shared.com/file/80936450/bda5b19d/SM-630_USER_MANUAL.html

Cheers,
pracas
Logged

Be The Change...

Earth
Offline Offline
Sr. Member
****
Karma: 13
Posts: 312
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll try to look at this later for you. I'm actually building something with a fingerprint scanner so I've already gone through this recently.
Logged

Chennai, India
Offline Offline
God Member
*****
Karma: 0
Posts: 752
Peace!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks AdderD i've figured out the working now after having read it 3 times. All i need is some help in terms of how to send the data packets? there seem to be Hex codes for all commands so how do i serial print them? Serial.print(0x4D); - is this right?
and how do i read them Serial.read returns an integer while the manual talks of Hex values? Finally, should i read each byte as i receive it or should i store all the bytes till i reach the last packet and then compare the whole set of instructions?
Logged

Be The Change...

Earth
Offline Offline
Sr. Member
****
Karma: 13
Posts: 312
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Thanks AdderD i've figured out the working now after having read it 3 times. All i need is some help in terms of how to send the data packets? there seem to be Hex codes for all commands so how do i serial print them? Serial.print(0x4D); - is this right?

When they show you a hex code they mean to send that actual value as a byte. If you just put Serial.print(0x4D); then the actual number will be output as a string. In this cause you'll print 77. Printing 77 requires two characters. (7, then 7.) But you want to print the byte correspoding to ascii code 77. You do that like this: Serial.print(0x4d, BYTE);

Quote
and how do i read them Serial.read returns an integer while the manual talks of Hex values? Finally, should i read each byte as i receive it or should i store all the bytes till i reach the last packet and then compare the whole set of instructions?

This is a snippet of the code I'm using in my project:

   for(d=0;d<MAXTRIES;d++) {
      if (Serial.available() > 0) { //anything waiting?
         in_byte = Serial.read();
         didavail=1;
         delay(50);
         if (in_byte == 0x7E) break; //if it's the right character then drop through
      }
      delay(75);
   }

What that does is use Serial.available() to see if any bytes are waiting to be read from the serial port. If not delay a bit and check again. You'll also see that you can directly equate hex numbers and decimal numbers. In this case I read a byte with Serial.read() and then see if that byte equals 0x7E (which for my fingerprint scanner is always the first byte sent back from the unit).

Finally, if you know that the reply should be, say, 20 bytes then use Serial.available to see if there is 20 or more bytes waiting. Then grab them all at once. You can do this so long as the reply you are expecting is less than the buffer length of the chipset. The serial buffer is 128 bytes.
« Last Edit: January 16, 2009, 11:26:42 am by AdderD » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello ,
I am student and I  have a fingerprint door based lock as graduation project and I am using sm630 as finger print scanner I have connect the circuit and write the code in mikrobasic but unfortunately its dose not work  can you help me plz because you have experience in this project type ....
to test the code before we connect the sm630 we simulate the sm630 using PIC micro controller communicate with the other pic through Rx , Tx serial port and the simulator is worked correctly but when we replace the pic with sm630 its does not work

can you help me this is my e-mail f you can I will send to you both circuit diagram and code
a.mslam@hotmail.com
Logged

Central Europe
Offline Offline
Edison Member
*
Karma: 6
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello student,

welcome to the Arduino forum, a forum dedicated to the discussion of problems, solutions and projects around the Arduino platform.

Could you please be a bit more precise in what way you have problems connection your scanner to an Arduino?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

than you ...
yes this the likke for the simulated curicute
http://www.mediafire.com/i/?e2gk9bb1100eu0q
I will replace the second PIC with sm630 through RX,TX
Logged

Pages: [1]   Go Up
Jump to: