Pages created and updated by Terry Sturtevant Date Posted: March 28, 2018


CP480 Wireless Communication and Networks Laboratory

Serial RFID Reader (UART)

Overview

This week's laboratory investigates RS-232 (or EIA 232) communication.

Background

A simple example of a serial device is an RFID reader, since it only requires communication in one direction. Since you've already used the Arduino built-in UART, RS-232 communications with the RFID reader should be straightforward. One of the limitations of the Arduino is that if two devices need serial communication, there is a problem. Fortunately, there is a SoftwareSerial library that allows a UART to be simulated on other pins. You'll use this for the RFID reader since you still need to connect to the console using the serial monitor. Note: The RFID reader is designed for "TTL serial" operation, which means its pins will be at TTL levels, not at acceptable RS-232 levels. Since the UART pins on the Arduino are also at TTL levels, this makes the interfacing simpler than it would be otherwise.

Objectives

  1. Become familiar with real serial communication using the SoftwareSerial library emulating a UART with an external device.
  2. Become familiar with the Arduino serial monitor for interacting with the Arduino.

Equipment

Exercise

  1. Questions to ask before you start (Consult the data sheet to answer these.):
    1. What Arduino pins will you use for the software serial port?
    2. What baud rate does the RFID reader use? How many data and stop bits?
    3. What pin has data coming out of the RFID reader? Does that need to go into the TxD or RxD pin on the Arduino? In other words, when connecting to serial devices, do TxD and RxD of both match, or do they reverse?
  2. Connect the Arduino to the RFID reader. Notice there is an additional signal input to the RFID reader that you can simply jumper to power or ground as appropriate to start.
  3. Modify the NewSerialPassthrough sketch as needed so you can communicate with the RFID reader.

  4. Once you have it working, create a sketch that incorporates the LCD software as well so you can display the RFID information to the LCD display instead of to the hardware UART. It would be good to use an output pin of the Arduino to replace the jumper above, so that the RFID operation is totally handled by the sketch.
    Hint: remember the Blink sketch has an example of this.
Demonstrate and explain your results to the lab instructor

Resources

To view pdf documents, you can download Adobe Acrobat Reader .
get Acrobat Reader
If you need to update a browser, you might try Firefox which is Get Firefox!
Since this page uses cascading style sheets for its layout, it will look best with a browser which supports the specifications as fully as possible.

If you are looking for an office package, with a word processor, spreadsheet, etc., you might try LibreOffice which is Get LibreOffice!

Go to the main page for the Department of Physics and Computer Science.

Valid XHTML 1.1

Valid CSS!

WCAG
2.0
(Level AA)

Wilfrid Laurier University