Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Problem in RFID Hardware Connection

Status
Not open for further replies.

vinothksr08

Member level 3
Member level 3
Joined
Jun 18, 2013
Messages
66
Helped
7
Reputation
14
Reaction score
7
Trophy points
8
Location
Tamilnadu, India
Visit site
Activity points
367
Hai friends

am doing door accessing system using RFID. I have problem with hardware connection. i have RFID Reader module that i have attached in image. i don't know how to use that module with microcontroller board. can anyone help me

i can get output when i directly connected with PC Serial port.
RFID.jpg
than you people....
 

hai jinzpaul

I have completed my coding section. i cant get output in hardware.. i couldn't receive data from RFID module., am sure there is no problem in RFID Module. i think there is a problem in communication between RFID & Microcontroller. i don't know exactly whats the problem. can u explain??

thnaks
 

Hello there,

Try RFID with PC Hyper terminal and MCU with Hyper terminal ..check the output is coming or not?

Update me.

Best regards

- - - Updated - - -

check circuit here

- - - Updated - - -

Check the circuit here

- - - Updated - - -

Check the circuit here
 

Attachments

  • Circuit to interface GSM Module with 8051 microcontroller (AT89C51) using PC and LCD circuit.gif
    Circuit to interface GSM Module with 8051 microcontroller (AT89C51) using PC and LCD circuit.gif
    32.8 KB · Views: 111
  • Circuit to interface RFID with 8051 microcontroller (AT89C51).gif
    Circuit to interface RFID with 8051 microcontroller (AT89C51).gif
    35 KB · Views: 117
  • EM-18 application circuit.jpg
    EM-18 application circuit.jpg
    178.4 KB · Views: 146
  • rf interface example.JPG
    rf interface example.JPG
    18.3 KB · Views: 152
  • rf interface example.JPG
    rf interface example.JPG
    18.3 KB · Views: 148
  • EM-18 application circuit.jpg
    EM-18 application circuit.jpg
    178.4 KB · Views: 146
  • Circuit to interface RFID with 8051 microcontroller (AT89C51).gif
    Circuit to interface RFID with 8051 microcontroller (AT89C51).gif
    35 KB · Views: 124
  • Circuit to interface GSM Module with 8051 microcontroller (AT89C51) using PC and LCD circuit.gif
    Circuit to interface GSM Module with 8051 microcontroller (AT89C51) using PC and LCD circuit.gif
    32.8 KB · Views: 115
Please Post your code here,

Which MCU are you using ?? compiler??

Have tried to send a byte of data from hyper terminal to MCU?? check your Hardware connection fully. verify your receiver code with Hyper terminal

Update me
 

i am using at89c51... am sure about my code there is no error in this code... i have checked all my simulation in hyper terminal... but i don't know what to do with that module i attached earlier... please help i attaching my code also

Code:
#include<reg51.h>
sbit output=P3^0;
void door_open();
void lcd_command(unsigned char comm);
void lcd_data(unsigned char disp);
unsigned int data_out,command=0x80,temp;
sfr lcd_data_pin=0xA0;
sbit rs=P1^0;
sbit rw=P1^1;
sbit en=P1^2;
unsigned char card_id[12];
unsigned char current_byte = 0;

void delay(unsigned int count)
{
     int i,j;
     for(i=0;i<count;i++)
     for(j=0;j<1275;j++);
}
void lcd_command(unsigned char comm)   //Lcd command funtion
{
     lcd_data_pin=comm;
     en=1;
     rs=0;
     rw=0;
     delay(1);
     en=0;
}
void lcd_data(unsigned char disp)  //Lcd data function
{
     lcd_data_pin=disp;
     en=1;
     rs=1;
     rw=0;
     delay(1);
     en=0;
}
lcd_string(unsigned char *disp)     //Lcd string function 
{
     int x;
     for(x=0;disp[x]!=0;x++)
    {
         lcd_data(disp[x]);
    }
}
void lcd_ini()                  //Function to inisialize the LCD
{
    lcd_command(0x38);           
    delay(5);
    lcd_command(0x0F);        
    delay(5);
    lcd_command(0x80);
    delay(5);
} 

void display()     			   // Function to display the unique id
{
    unsigned char count;
    lcd_command(0xC1);        //Place cursor to second position of second line
    for(count=0;count<12;count++)
     { 
          lcd_data(card_id[count]);
      }
    current_byte=0;
}
void compare()
{
int m;
for(m=0;m<12;m++)
{
if(card_id[m]=='a' && card_id[m+1]=='b' && card_id[m+2]=='c' && card_id[m+3]=='d' && card_id[m+4]=='e' && card_id[m+5]=='f' && card_id[m+6]=='a' && card_id[m+7]=='b' && card_id[m+8]=='c' && card_id[m+9]=='d' && card_id[m+10]=='e' && card_id[m+11]=='f'
|| card_id[m]=='1' && card_id[m+1]=='2' && card_id[m+2]=='3' && card_id[m+3]=='1' && card_id[m+4]=='2' && card_id[m+5]=='3' && card_id[m+6]=='4' && card_id[m+7]=='5' && card_id[m+8]=='6' && card_id[m+9]=='7' && card_id[m+10]=='8' && card_id[m+11]=='9')
{
display();
door_open();
}
}
}
void door_open()
{
lcd_command(0x01);
lcd_command(0x84);
lcd_string("WelcomE");
lcd_command(0xC0);
lcd_string("The door opened");
}
void recieve() interrupt 4     
{
          card_id[current_byte]=SBUF;
          RI=0;                // Reset the serial interrupt after recieving the byte
        current_byte++;    
}
void main()
{
	output=0;	
   TMOD=0x20;                            //Enable Timer 1
   TH1=0XFD;
   SCON=0x50;
  TR1=1;
   EA=1;
   ES=1;                                // Trigger Timer 1
   lcd_ini();
   lcd_command(0x81);                    //Place cursor to second position of first line 
   lcd_string("UNIQUE CARD ID:");
   delay(200);
    while(1)
    {
        while(current_byte!=12);    
     
		compare();
    }
}


thank you..!!!
 

Hello there,

Are you trying this code?? **broken link removed**

i have uploaded the c code for interfacing 8051 and RFID
 

Attachments

  • rfidprojectccode.zip
    5.4 KB · Views: 147

if(card_id[m]=='a' && card_id[m+1]=='b' && card_id[m+2]=='c' && card_id[m+3]=='d' && card_id[m+4]=='e' && card_id[m+5]=='f' && card_id[m+6]=='a' && card_id[m+7]=='b' && card_id[m+8]=='c' && card_id[m+9]=='d' && card_id[m+10]=='e' && card_id[m+11]=='f'
|| card_id[m]=='1' && card_id[m+1]=='2' && card_id[m+2]=='3' && card_id[m+3]=='1' && card_id[m+4]=='2' && card_id[m+5]=='3' && card_id[m+6]=='4' && card_id[m+7]=='5' && card_id[m+8]=='6' && card_id[m+9]=='7' && card_id[m+10]=='8' && card_id[m+11]=='9')

There is a problem with the condition here. I guess the operator precedence will create a problem for you.
Put both your conditions in parenthesis before you OR them.

if((card_id[m]=='a' && card_id[m+1]=='b' && card_id[m+2]=='c' && card_id[m+3]=='d' && card_id[m+4]=='e' && card_id[m+5]=='f' && card_id[m+6]=='a' && card_id[m+7]=='b' && card_id[m+8]=='c' && card_id[m+9]=='d' && card_id[m+10]=='e' && card_id[m+11]=='f')
|| (card_id[m]=='1' && card_id[m+1]=='2' && card_id[m+2]=='3' && card_id[m+3]=='1' && card_id[m+4]=='2' && card_id[m+5]=='3' && card_id[m+6]=='4' && card_id[m+7]=='5' && card_id[m+8]=='6' && card_id[m+9]=='7' && card_id[m+10]=='8' && card_id[m+11]=='9'))

I guess it should work.
 
Did you figure out what was the problem...??
You can share it here so that, if in future if someone searches he can get useful guidance.
 

Yaah sure my problem was with my RFID Module... in that module i have to received data from TTL pin & i should connect Male to male DB9 Connector between controller board and RFID Module... till now i didn't do it... now i only i found that
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top