How to interface EM18 RFID Module to CloudX M633 CloudX

  • img
Project Details

 

Overview

RFID stands for Radio Frequency IDentification and it’s a non-contact technology that’s broadly used in many industries for tasks such as personnel tracking, access control, supply chain management, books tracking in libraries, tollgate systems and so on.

 

How RFID Works

An RFID system consists of two main components, a transponder or a tag which is located on the object that we want to be identified, and a transceiver or a reader.

RFID How It Works

The RFID reader consist of a radio frequency module, a control unit and an antenna coil which generates high frequency electromagnetic field. On the other hand, the tag is usually a passive component, which consist of just an antenna and an electronic microchip, so when it gets near the electromagnetic field of the transceiver, due to induction, a voltage is generated in its antenna coil and this voltage serves as power for the microchip.

RFID Working Principle

Now as the tag is powered it can extract the transmitted message from the reader, and for sending message back to the reader, it uses a technique called load manipulation. Switching on and off a load at the antenna of the tag will affect the power consumption of the reader’s antenna which can be measured as voltage drop. This changes in the voltage will be captured as ones and zeros and that’s the way the data is transferred from the tag to the reader.

There’s also another way of data transfer between the reader and the tag, called backscattered coupling. In this case, the tag uses part of the received power for generating another electromagnetic field which will be picked up by the reader’s antenna.

 

RFID and CloudX

 

COMPONENTS

1. CloudX M633

2. EM18 Reader Module

3. 16x2 Lcd Display

4. 1k ohm resistor

5. Usb cable

  1. 6. Red & Green Led

 

 

CIRCUIT

EM18 reader module pinCloudX M633 Pin
5+VCC
GroundGND
SELVCC
TxRx

 

LCD 16x2CloudX M633
VSSGND
VDDVCC
V0GND
RSP1
RWGND
ENAP2
D4P3
D5P4
D6P5
D7P6
ANODEVCC
CATHODEGND
Red LedP8
Green LedP7

 

Source Code

#include <CloudX\LCD.h>
#include <CloudX/RFID_EM18.h>
//------------------------------------------------------------------------
//The array takes in valid RFID-tag ID numbers.
//The available authorized tag numbers are all to be entered here as the
//working database.
//------------------------------------------------------------------------


#define greenLed   pin8
#define redLed     pin7   
          

          const char validTag[][13] = {
            
              "0200E995FA84",     // Valid Tag
              // "03001BD7B57A"    // Invalid Tag
            };


setup()
      {
            EM18_begin(9600);
            LCD_setting(1, 2, 3, 4, 5, 6); //RS, EN, D4, D5, D6, D7
            LCD_cmd(clear); 
     
            pinMode(8, OUTPUT);
            pinMode(7, OUTPUT);
            greenLed = LOW;
            redLed   = LOW;
            LCD_writeText(1, 1, "EM18 SYSTEM...");
            delayMs(1500);
           
            
   loop() {
            
                if(EM18_available())
                if(EM18_authenticate(validTag, 10)) //Tag-Array, Array-Size
                {
                    LCD_writeText(2, 2, "Access Granted!");
                    greenLed = 1;
;                   redLed = 0;
                }
        
                else 
                {
                    LCD_writeText(2, 2, "Access Denied!");
                    greenLed = 0;
                    redLed   = 1;
                }
     }
}

Project Testing

For Valid Tag 

 

For Invalid Tag

 

 

EM18 LCDGetTag

It fetches the ID Number of a test Tag, and proceeds to display it on the LCD 
for further use by the end-user. 
It not only showcases the ID Number, but additionally tells how valid the 
Number is (with respect to general standards).

 

CODE

This code allows you to print the RFID tag number on the LCD screen, it is an extra feature in the cloudx rfid library.

 

#include <CloudX/RFID_EM18.h>


setup()
{
            EM18_begin(9600);
            LCD_setting(1, 2, 3, 4, 5, 6);
            LCD_cmd(clear);
            LCD_writeText(1, 1, "RFID-EM18 Access");
            delayMs(1500);
    
    
loop()
    {
        if(EM18_available())    
            EM18_LCDGetTag();

    } 
}

 

Project Testing

I hope you enjoyed this tutorial and feel free to ask any question in the comments section below.

 

Share this with friends