Introduction: Arduino to Cottonwood UHF RFID Reader: RSSI Command

Hi all, this tutorial was brought to you by the Openly Published Environmental Sensing lab at Oregon State University. To learn more about their work visit their website available at www.open-sensing.org.

In this tutorial, we will walk through how one can read RSSI values from an UHF RFID tags using the Cottonwood UHF Long distance RFID reader module. An RSSI value is a measurement of received signal strength. It's an acronym for "received signal strength indicator". It's often used for WIFI signals. Here is a good article from MetaGeek that explains it further: http://www.metageek.com/training/resources/unders...

RSSI values can be affected by many variables including, the distance between the tag and antenna, environmental interference, or moisture. Often, RSSI values can be used to determine which tag to isolate in the case that there are multiple tags picked up by the antenna.

Step 1: Parts List

  1. Cottonwood UHF Long distance RFID reader module
  2. Arduino UNO
    • Other models should work but might need a slight modification, see Code section for more information
  3. Antenna
  4. UHF RFID Tag
    • Any Class 1 Gen 2 tag should work
    • The ones I used and that are pictured are SMARTRAC DOGBONE

Step 2: Wiring Diagram

The wiring for this project is fairly simple compared to other DIY Arduino projects that I have worked on.

First off you will need to power the Arduino and cottonwood reader. Powering the Arduino can be done many different ways; here is a great resource to check out if you want to know everything about powering an Arduino. The Cottonwood is powered by a 5V 2A supply (one of the researchers in the lab tried to power it with 12V and it fried the Cottonwood, so I wouldn't recommend anything over 6V).

Next, you should attach wires to the pads shown in the picture shown. For our Cottonwood, we soldered 3 female header pins to the board for easy testing, although directly soldering wires into the pads would be more versatile for use in the field. If you don't know how to solder, check out this how-to guide.

Lastly, you will need to run GND, TX, and RX wires from the Arduino to the Cottonwood. For the example code provided, the TX pin from the Cottonwood should connect to pin 3 of the Arduino, the RX pin on the Cottonwood will connect to pin 4 of the Arduino, and the GND on the Cottonwood will be connected to any GND pin on the Arduino. The wiring diagram above should clear up any questions (image made with Fritzing) (my current wifi isn't able to download this tool so I will add the picture described as soon as I can).

Step 3: Code

The Arduino code for sending this command (and others) can be found here. It uses SoftwareSerial to emulate another serial output on pins 3 and 4 which connect to the Cottonwood.

The code as-is was designed for use on an Arduino UNO and has not been tested on other Arduino models. For the Arduino Mega, SoftwareSerial doesn't need to be used; instead, you can use one of the other existing hardware serial ports. This is better explained on the Arduino official website linked here. For an Arduino Leonardo or Micro, the pin for RX declared on line 3 might have to be changed to 8, 9, 10, 11, 14, 15, or 16, because these are the only pins with RX functionality on these boards.

Feel free to comment and contribute to the linked GitHub page. Please push any changes to the "public" branch.

https://github.com/stoddabr/arduino_cottonwood_RSS...

Step 4: Reading RSSI Value

Now you should have the Arduino code all loaded up, and the Cottonwood and Arduino wired together so it's time to send the command and identify the RSSI value in the Cottonwood's response.

It may take a few tries to get a response from the reader, so DON'T PANIC if it takes multiple commands.

Unfortunately, we do not have a picture what the Arduino's Serial monitor looks like when the command works, but it will look similar to the example above from an ordinary inventory command that didn't include RSSI values. If you can get the board communicating, the RSSI value will be found in the 4th bit from the right as a HEX value. Q and I values can be found using the calculation in the picture above. As of now, we're not sure exactly Q vs I values represent but we were able to confirm that it changes under different conditions (distance, moisture, ect).

Step 5: Resources

Microcontroller Contest 2017

Participated in the
Microcontroller Contest 2017