Extension board · Sensors and inputs

RFID reader

A carrier that connects a common RC522 RFID module to an SPI socket, so a controller can identify a tag on a user, tool or material. The radio and antenna are on the bought module. Reading tags needs your own driver.

Top view of the RFID carrier: an eight-way socket for the reader module on one edge, a small buffer chip and sockets on the left and right edges.
Top view, drawn from the board’s design files. This is a drawing, not a photograph.
13.56 MHzISO 14443A tags
≈ 50 mmmaximum read distance per module data
10 MHzmaximum SPI clock
26 mAmodule maximum
Shared busdata out released when idle
60 × 55millimetres, four M3 holes
3.3 V only: never power the module from 5 V. Tag identity is easy to copy. Do not use it as access control for anything related to safety.

Tech specs

PurposeIdentifying a tagged person, tool or material
ModuleRC522 eight-pin module, order SDA, SCK, MOSI, MISO, IRQ, GND, RST, 3.3V; bought separately
InterfaceSPI with 100 Ω series resistors; MISO driven through an SN74LVC1G125 only while chip select is low
Extra linesInterrupt on contact 3, reset on contact 4 with 10 kΩ pull-up
Supply3.3 V from the socket, module 13 to 26 mA
ConnectorsRight-angle eight-way 2.54 mm socket; two Gadgeteer type S sockets (Samtec SHF-105, 1.27 mm)
Size60 × 55 mm, four M3 holes on a 50 × 40 mm pattern; the module overhangs
Works withSmoothieboard V2 Prime header GE electrically; no firmware driver
LicenceOpen hardware, CERN-OHL-S-2.0

Every figure with its basis is in the electrical specifications appendix; hole positions are in the mounting dimensions appendix.

Board tour

The numbers on the drawing match the list below it. The board is shown from the component side.

  1. 1
    Module socket (J3) — Match the module’s printed pin names to the board printing.
  2. 2
    Input socket S IN (J1) — Select 6, MOSI 7, MISO 8, clock 9, interrupt 3, reset 4.
  3. 3
    Chain socket CHAIN (J2) — SPI data and clock continue.
  4. 4
    Bus buffer (U1) — Releases MISO when this board is not selected.
  5. 5
    Series resistors (R1 to R6) — 100 Ω on module signals.
  6. 6
    Pull-ups (R7, R8) — Hold reset released and select idle.
  7. 7
    Supply capacitors (C1, C2) — On the module supply.
  8. 8
    Chain links, open (JP3, JP4, JP6) — Interrupt, reset and select.
  9. 9
    Chain links, closed (JP7 to JP9) — SPI data and clock.
  10. 10
    Mounting hole — One of four M3 holes.
Point at a number, or tap it, to read what the part is; the same text is in the list. On a small screen, scroll the drawing sideways.

Pinout

Check the module’s pin order before plugging it in: copies differ.

J1: input socket (S IN)

ContactSignalUsePrime header GE
13.3 VBoard and module supply3.3 V
25 VPassed to the chain only5 V
3IRQ_HOSTInterruptPE8
4RST_HOSTLow resets the modulePJ7
5Passed throughNot usedPJ8
6CSChip selectPD15
7MOSIData to modulePB5 (SPI1_MOSI)
8MISOData from modulePA6 (SPI1_MISO)
9SCKClockPA5 (SPI1_SCK)
10GNDGroundGND

J3: module socket

PinModule name
1SDA (chip select)
2SCK
3MOSI
4MISO
5IRQ
6GND
7RST
83.3V

What you need

An RC522 moduleWith an eight-way pin strip.
An SPI portPrime header GE.
A ten-way cable1.27 mm Gadgeteer ribbon cable.
A supportFor the overhanging module.
Your own driverNone is supplied.

Get started

Minimum wiring: contact 1 to contact 1, 3.3 V; PD15, contact 6 to contact 6, chip select; PB5, contact 7 to contact 7, MOSI; PA6, contact 8 to contact 8, MISO; PA5, contact 9 to contact 9, clock; contact 10 to contact 10, ground. Prime header GE (J36) RFID board J1 contact 1contact 13.3 V PD15, contact 6contact 6chip select PB5, contact 7contact 7MOSI PA6, contact 8contact 8MISO PA5, contact 9contact 9clock contact 10contact 10ground
Minimum connections; interrupt and reset are optional.
  1. Fit the module

    With power off, align its pin names with the order above.

  2. Mount

    Support the module and keep metal away from its antenna.

  3. Connect and power

    Plug J1 into header GE.

    The module’s own power light should be on if it has one.

  4. Read the chip

    Your driver reads the version register, then looks for a tag.

    A sensible version value confirms the SPI path.

Configuration

You wantModuleExample
Read tagsNoneNo SmoothieV2 driver for the RC522

There is nothing to add to config.ini.

How it works

SPI reaches the module through resistors; its answer returns through a buffer. J1 SPIcontroller 100 ohmseries J3 moduleRF reader Tag13.56 MHz Module MISOanswer U1 bufferonly if selected J1.8shared bus
Commands above, replies below.

Many RC522 modules keep driving their data output even when not selected, which would block other devices on the bus. The buffer passes it on only while chip select is low. The antenna stays on the module, clear of the carrier copper.

Solder links

A further SPI device needs its own chip select.

Solder links as delivered: JP3 open; JP4 open; JP6 open; JP7 closed; JP8 closed; JP9 closed. JP3 · openchain interrupt JP4 · openchain reset JP6 · openchain chip select JP7 · closedchain MOSI JP8 · closedchain MISO JP9 · closedchain clock
The links as delivered. Close one with a small blob of solder across both pads; open it by removing the solder or cutting the copper between the pads.
LinkWhat it doesAs delivered
JP3Joins the interrupt to the chainOpen
JP4Joins reset to the chainOpen
JP6Joins chip select to the chainOpen
JP7Continues MOSIClosed
JP8Continues MISOClosed
JP9Continues clockClosed

Chaining

SPI data and clock continue to another device.

The controller's ribbon cable goes to the connector S IN of the RFID reader board. Inside the board each of the ten pins runs through a solder link to the connector CHAIN, where a second ribbon cable continues to the next board. A closed link passes its pin on, an open link stops it. Controller one ten-pin port RFID reader board S IN CHAIN pin 6, select stops here pin 7, MOSI passed on pin 9, clock passed on one solder link per pin Next board sees what is passed on
Chaining: one port of the controller serves two boards. Pin 1 of S IN leads to pin 1 of CHAIN, pin 2 to pin 2, and so on, each through its own solder link. The three lines stand for the ten pins and show the links as delivered. Two boards must never drive the same pin, and a pin that one board uses for a signal is not free for the next. Data and clock continue; select stops here.
ContactSignalOn CHAIN
1, 2, 10Power and groundPassed on
3, 4, 6Interrupt, reset, selectStopped by open links
5FreePassed on
7 to 9SPIPassed on through closed links

Troubleshooting

SymptomLikely causeWhat to check
No replyModule pin order wrong or reset held lowCompare names; test points
Reply is all zeros or onesChip select or clock problemTest points M_SS and M_MISO
Tag not detectedWrong tag type or metal near antennaUse a 13.56 MHz tag; move metal
Errors at speedLong cableLower the SPI clock

The carrier has no indicator lights of its own; use the test points.

Still stuck? Read how to ask for help or see the general troubleshooting guide.

Downloads

FileWhat it is
Schematic (PDF)The circuit diagram
Parts list (CSV)Every component with its value, footprint and part number where one is chosen
Board drawing (PNG)The top view used on this page
3D view, top (PNG)Rendered from the design files; the reader module is not shown
3D view, angled (PNG)Rendered from the design files; the reader module is not shown

Appendix: mounting dimensions

For drilling a mounting plate or designing an enclosure. Positions are hole centres, in millimetres, measured from the top-left corner with the board seen from the component side. Support the overhanging module with a non-metal spacer.

Mounting drawing of the RFID reader board, component side: outline 60 by 55 millimetres with 4 mounting holes. Hole positions are listed in the table below. COMPONENT SIDE · millimetres 60 55 0, 0 X Y 1 5.00, 5.00 2 55.00, 5.00 3 5.00, 45.00 4 55.00, 45.00 Numbered rings are mounting holes. Positions are hole centres, X then Y, from the marked corner.
Board outline 60 × 55 mm, corners rounded to a 1 mm radius, board thickness 1.6 mm. Drawn from the design files, component side up, in the same orientation as the board tour.
HoleX (mm)Y (mm)DiameterUse
15.005.003.2 mm, not platedMounting, M3 screw
255.005.003.2 mm, not platedMounting, M3 screw
35.0045.003.2 mm, not platedMounting, M3 screw
455.0045.003.2 mm, not platedMounting, M3 screw

Appendix: electrical specifications

Every figure is a design value, a calculated or simulated value, or a manufacturer’s data sheet value, as the last column says. A dash means no figure is given.

ParameterApplies toLowerNominalUpperBasis
SupplyJ1 contact 12.5 V3.3 V3.3 VModule data sheet
Module current3.3 V13 mA—26 mAModule data sheet
SPI clockJ1——10 MHzModule data sheet
Read distanceAntenna——50 mmModule data sheet, depends on tag
Clock rise time at moduleSCK—14 ns20 nsSimulated
High level at moduleSCK2.9 V3.30 V3.35 VSimulated

Component stress limits

PartLimitUse on this board
Supply and signals3.3 VNo 5 V anywhere on J3
Capacitors10 V and 16 V3.3 V

Appendix: simulation

The clock line through its series resistor was simulated with ngspice.

Each simulated value (yellow mark) against its allowed range (green band). Clock rise time at the module (10 MHz limit about...14.4 ns High level reached3.3 V
Simulated value (yellow) against the limit used for it (green). Each bar has its own scale.
ResultSimulated valueLimitOutcome
Clock rise time at the module (10 MHz limit about 20 ns)14.4 nsat most 20 nsWithin
High level reached3.3 V2.9 V to 3.35 VWithin

Not simulated: the radio module, antenna and read distance.

Appendix: datasheet

The first page of each data sheet. Click a page to open the PDF. The module data sheet is a reseller document.

First page of the RC522 RFID module datasheet
RC522 RFID module — Handson Technology, 9 pages.
First page of the SN74LVC1G125 bus buffer datasheet
SN74LVC1G125 bus buffer — Texas Instruments, 52 pages.

See all boards on the extension boards page.

This is a wiki! If you'd like to improve this page, you can edit it on GitHub.