RFID Read Block

This block enables you to read RF transponder data and to write commands to the RFID sensor (via the I2C bus at hardwired address 4) connected to a selectable port.

The transponder must be of type EM4102. The ID number of a transponders has 40 bits, which are transferred as 5 bytes and provided as text string at the wire hub with a prefixed 0x. The block also converts the 5 bytes into decimal values at the outputs Raw Value 0 to 4.

The typical read distance is between 5 and 30 mm depending on the size and the orientation of the transponder.

You must drag at least one output data wire from this block’s data hub to another block for any information to be sent.

RFID Sensor and keyfob transponder

General Information about RFID

RFID stands for Radio Frequency IDentification. The RFID Sensor is transmitting a low frequency radio signal (125 kHz) via its integrated ferrite antenna. This electromagentic wave is activating the transponders by inducing energy into the transponder's coil. The transponder then starts modulating this signal according to its number which is stored in a non volatile memory. This modulated signal can be detected (demodulated and decoded) by the RFID sensor.

There are some advantages and restrictions of the RFID technology. A major advantage is that the transponders are passive, meaning that they do not need any internal battery, giving them an almost unlimited lifetime. Another advantage is the identification without line of sight, even with material (non metallic) in between the RFID Sensor and the transponder.

One restriction is the limited reading distance, due to the fact that the energy for activating the transponder has to be transmitted from the RFID Sensor. Also the orientation of the transponder versus the ferrite antenna is a limiting factor for the achievable reading distance. Look at the picture below to see optimal transponder orientation:

The circles represent the transponder's coil. If the coil is oriented like the blue circles show, reading distance is optimized. The read circles orientation result in low or no even no reading distance.

In your application you have also to keep in mind, that the modulated transponder signal can be disturbed by any electrical noise (coming from motors, fluorescent lights, electrical switches, a.o.). In this case the RFID Sensor may not decode the signal properly resulting in bad or no reading. The bigger the distance of the transponder from the sensor is, the more critical is the noise influence.

You can minimize this effect with repeated reading and reducing the distance between RFID Sensor and transponder.

Display Settings

  1. The number on the top shows which of your NXT’s port is connected to the RFID sensor. You can change this number in the configuration panel.
  2. In the configuration panel the commands to the RF sensor can be selected! The selected command will be shown also in the block icon!
  3. Following commands are available:

    - 0 Reader Stop: The RFID sensor stops any reading and goes into power saving Sleep Mode!
    - 1 Single read: With this command you can force the RF sensor to do a single read. If a transponder is close enough to the antenna, the transponder data will be read and information provided to the corresponding wires! The maximum read rate is app. 3 reads per second! After execution of a single read command the RFID sensor will enter the Sleep Mode!
    - 2 Continuous read: This command forces the RF sensor to continuously reading available transponders. In this mode you achieve the highest read rate. You can read up to app. 10 reads per second by repetitive use of the block in a loop! If there is no read or any other command on the I2C bus for app. 2 seconds, the RFID sensor will automatically enter the power saving Sleep Mode!

  4. The data hub will open automatically when the block is attached to a sequence beam. You can control the RFID Read block dynamically by connecting data wires (from other blocks’ data hubs) to the RFID Read block’s data hub. Open a block’s data hub by clicking the tab at the lower left edge of the block after it has been placed on the work area. For more details about the RFID Read block's data hub see explanations below.

Configure the RFID Sensor

  1. Select the operation of the RFID Sensor.
  2. You can activate the Live Update function, which continuously reads the available transponder number.
  3. You can also select a comparison of the actual transponder number with any predefined number. If you have activated the Live Update function you can copy the actual number into the comparison field. You can also type in the number manually. Please type always the full number of 10 digits (5 bytes)! The selectable operations are "equal to" or "not equal to"!
  4. You have to activate the Live Update function for reading general RFID Sensor information
  5. Every RFID Sensor has a unique 8 digit serial number. You can only read this number with Live Update function activated. Please make sure, that there is no transponder close to the antenna during reading the serial number. Make sure to read the correct number by repeated reading! You do need the serial number for any firmware upgrade, which you may want to do. More info about firmware versions and how upgrades are done is available at the Codatex homepage under www.codatex.com.

Complete Data Hub of the RFID Sensor





(A) Port (Input/Output)

(B) Command (Input/Output): Available commands: 0,1,2 (see above)

(C) Transponder Number In(Input/Output): You can wire a transponder number to this input for the comparison operation

(D) Inverse Comparison? (Input/Output): You can wire the operand of the comparison operation to this input.

(E) Transponder Number Out(Output): Here you get the text string of the full 5 byte transponder number.

(F) Yes/No (Output): This wire provides the result of the comparison operation.

(G) Raw Values 0 to 4 (Outputs): The decimal values of every byte. Raw Value 0 is MSB.

(H) Error (Output): Will be set in case of bus errors!