Skip to content

Latest commit

 

History

History
97 lines (70 loc) · 2.37 KB

File metadata and controls

97 lines (70 loc) · 2.37 KB

RFID Scanner

Overview

This section provides information regarding the RFID scanner component and its circuit, including assembly instructions.

Components
  • RFID-RC522

  • RFID key fob

  • 9 x Jumper Wires

  • Breadboard

  • Power source (3.3V)

Assembly Instructions
  • Put RFID scanner on breadboard as shown in the diagram below.

  • Connect the RFID ground to the ground on the Pi, and connect the 3.3V pin of the RFID scanner to the 3V3 pin of the Pi.

  • Connect the rest of the RFID pins to the corresponding pins on the Pi.

Circuit Diagram
rfid circuit
Schematic Diagram
rfid schematic
Functionality

RFID Scanner requires RFID tags to work with. We can read/write the data on to the tags using the scanner.

  • /write/{value} - Writes {value} to the RFID key fob

  • /read - Scanner will be ready to read the key fob

Testing the Circuit:

To write to the RFID fob:

$ curl -X POST http://localhost:8080/rfid/write/HelloThere

Scan the key fob to write the message to the fob.

To read from the RFID fob:

$ curl http://localhost:8080/rfid/read

Scan the key fob and the message on the fob will be printed.

HelloThere
Troubleshooting

Make sure everything is connected to the correct pins.

YAML Configuration

A BCM numbering system is used. More info can be found here.

The RFID scanner configuration as it appears in the application.yml:

spi:
   rfid:
      name: MFRC522
      address: 8
      baud: 500000
      reset-pin: 25
Constructors and Methods

To see the constructor and methods of our RFidHelper class see our javadoc here for more details.

An Example Controller
This controller uses the RFID scanner to write and read to a card
link:../../../../../../components/src/main/java/com/opensourcewithslu/components/controllers/RfidController.java[role=include]