Pages: [1]   Go Down
Author Topic: Sunion RFID RFM-003 with Arduino  (Read 733 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All, I'm new to the Forum and also VERY new to Arduino.

I've been doing Software Programming for ages, and recently discovered Arduino.
I've worked through 90% of the examples and get most of them to work as expected.
I need some help Please on the following please
I have a bunch of these RFID Module lying around:
Sunion RFM-003 Modules/with Antennas and  with about thousand+ tags
So I need to get it going for some project I think of for the past year :-)
http://www.futurel.bg/datasheets/3/RFM003.pdf
I have the Gnd, 5V Figures out (Pretty simple he)
But the SCLK and DATA I have no idea what to do or even where to start
I've tried some of the RFID examples found on the web, but no luck.

If anyone is willing to help, they can PM met at danieATleznadsoftwareDOTcoDOTza. I'm even willing to pay if I have to

Thanks a Mil
Danie
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I found a bit of interface information.  Unfortunately it is in Chinese:

http://www.sunion.com.cn/webFiles/files/RFM-003%20UM_V1_CH-070131.pdf

If you print that out and then print out the Google translation:
http://translate.google.com/translate?hl=en&sl=zh-TW&u=http://www.sunion.com.cn/webFiles/files/RFM-003%2520UM_V1_CH-070131.pdf&ei=KsbLTtynBYfm0QGjr8QI&sa=X&oi=translate&ct=result&resnum=6&ved=0CGUQ7gEwBQ&prev=/search%3Fq%3DSunion%2B%2522RFM-003%2522%2Bclock%26hl%3Den%26client%3Dsafari%26rls%3Den%26biw%3D1203%26bih%3D1032%26prmd%3Dimvns

You may get enough data to talk to the device.  It appears that you use one output pin to clock the data and one bi-directional data pin.  You'll have to switch the pinMode() on the fly.

There is a section in the document about "Manchester Encoding" which is a way of sending asynchronous serial data... but the data interface is synchronous (you provide a clock for each bit).  Maybe they are discussing the protocol between the reader and the transponder which you won't have to worry about.

If you have an engineering friend who reads Chinese you should be in luck.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

Hi John

I have this so far... Don't laught, it's my first attempt... lots to learn
****************

int InoutPin=3;
int SclkPin=2;
int valreceive=0;
int incomingByte = 0;

void  setup(){

  Serial.begin(9600);
 
}

void loop(){
 
  if (Serial.available() > 0) {
      incomingByte = Serial.read();
      if (incomingByte == 114 || incomingByte == 82) {
          Serial.println(" >> Reset RFID");
          ResetRFID();
      }

      if (incomingByte == 101 || incomingByte == 69) {
          Serial.println(" >> EnteringRFIDdata");
          EnteringRFIDdata();
      }
 
      if (incomingByte == 115 || incomingByte == 83) {
          Serial.println(" >> Prepare Scanning");
          ResetRFID();
          ResetRFID();
          ResetRFID();
          EnteringRFIDdata();
          delay50ns();
          Serial.println("Reading RFID");
          pinMode(InoutPin,INPUT);
          for (int x=1; x <= 3; x++){
          valreceive=digitalRead(InoutPin);
          Serial.print(valreceive);
          }
      }
        delay200ns();
          pinMode(InoutPin,INPUT);
        delay200ns();
          digitalWrite(InoutPin,'01001000');       
        Serial.println("Done Reading Header");
        delay200ns();
          pinMode(InoutPin,INPUT);

          for (int x=1; x <= 8; x++){
          valreceive=digitalRead(InoutPin);
          Serial.print(valreceive);
//        Serial.println(incomingByte);
          }
        Serial.println("Done Reading RFID");

  }

 
 
}

void delay200ns(){
 delay(0.0002);
 //delay(1000);
}

void delay50ns(){
 delay(0.00005);
 //delay(500);
}

void ResetRFID(){
 
  pinMode(SclkPin,OUTPUT);
  pinMode(InoutPin,OUTPUT);
  digitalWrite(SclkPin,HIGH);
   delay50ns();
  digitalWrite(InoutPin,HIGH);
   delay200ns();
  digitalWrite(SclkPin,LOW);
   delay50ns();
  digitalWrite(InoutPin,LOW);
   delay200ns();
}

void EnteringRFIDdata(){
  pinMode(SclkPin,OUTPUT);
  pinMode(InoutPin,OUTPUT);
  digitalWrite(InoutPin,HIGH);
   delay50ns();
  digitalWrite(SclkPin,HIGH);
   delay200ns();
  digitalWrite(SclkPin,LOW);
   delay50ns();
  digitalWrite(InoutPin,LOW);
   delay200ns();
 
}
********

But nothing really happens :-)

Cheers
Danie
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't bother with the small delays.  By the time you call the function to do the delay the 200 nanoseconds is already over.  Also, the delay() function takes an integer number of milliseconds.  For delays shorter than 1 millisecond, use delayMicroseconds() which takes an integer number of microseconds.

The assembler example at the end of the document is probably as close as you will get to a real specification.  The main difference for the Arduino is that you probably can't treat a pin as both output and input like the assembler does.  You have to use pinMode() to switch modes.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

Hi John
Thanks for the tip on delayMicroseconds.
No luck so far for me. I think my Initialization to the unit is not correct.
The way I do the Bit and send to the unit an the timing delay.
I'll search some more.
Thanks
Danie
Logged

Pages: [1]   Go Up
Jump to: