Skip to content
esp-labsESP32-S3 bench guide

ESP32-S3 track guide · 8 hands-on labs

ESP32-S3 RC522 RFID & NFC Labs: SPI, MIFARE Memory & Web UI

Eight progressive labs covering the MFRC522 13.56 MHz reader on ESP32-S3: sharing the SPI bus with a TFT screen, ISO14443-A anticollision for multiple cards, MIFARE Classic Key A/B sector authentication, value blocks, RF range testing, and a full React web dashboard.

Hardware needed for this track

Browse full parts library

Base requirement: ESP32-S3-DevKitC-1 board and a USB-C data cable.

  • 1.9″ ST7789 screen
  • RC522 card reader
  • MIFARE card and key fob
  • 2.4 GHz Wi-Fi network

All labs in this track

  1. Prove that the ESP32 and the reader chip talk to each other reliably over SPI, before any card is involved. Keep the card and the tag away for now.

    • SPI address byte
    • registers
    • FIFO
    • datasheet self-test
    • two SPI buses
    • reading a bus fault
  2. See a card wake up and answer, read its identity, and find your reader's range.

    • 13.56 MHz near field
    • inductive coupling
    • 100 % ASK pauses
    • load modulation
    • REQA · WUPA · ATQA
    • a polling task
    • sniffing frames
  3. Find both cards at once, and point to the exact bit where their UIDs collided.

    • bit collisions
    • binary tree walk
    • NVB
    • BCC
    • cascade levels
    • SAK
    • HALT · WUPA
  4. Dump your own card's whole memory and explain block 0 and one sector trailer byte by byte.

    • sectors & blocks
    • sector trailers
    • access bits (stored twice)
    • 3-pass authentication
    • encrypted frames
    • manufacturer block
  5. Write text to your card and keep a credit counter on it that the card itself updates.

    • block writes · ACK / NAK
    • read-back checks
    • value block format
    • INCREMENT · DECREMENT · TRANSFER
    • backup blocks
    • guard rails
  6. Measure where your own bench breaks, and compare it with the datasheet.

    • measured vs datasheet
    • SPI signal integrity
    • timeouts & reply time
    • IRQ vs polling
    • offloading
    • reliability statistics
  7. Run your two tags as a small access system: one resident, one guest, and see each rule decide a tap.

    • REST API + WebSocket
    • server-side decisions
    • rule order
    • fail closed
    • NVS storage
    • admin token via a dev proxy
    • React + zod
    • backup, restore, verify
    • a copy is not a clone
  8. Give the white card and the key tag a friend each, then tap them and watch both friends play.

    • UID as a key
    • auto-enrolment
    • state on the board, show in the app
    • WebSocket push
    • drag and drop with pointer events
    • three.js toon shading
    • Web Audio
    • accessible alternatives (tap, keyboard)

ESP32-S3 peripherals covered

Check all 17 ESP32-S3 hardware gotchas
  • SPI

    Fast four-wire bus for screens, card readers and flash

  • GPIO and IO MUX

    45 pins, and a matrix that routes almost any signal to almost any pin

  • Wi-Fi

    2.4 GHz 802.11b/g/n, as a station, an access point or both

Frequently asked questions

How can I share one SPI bus between the ST7789 screen and RC522 reader?
Both devices share MOSI, MISO, and SCK lines while each uses its own Chip Select (CS) pin. Keep the unused CS high and never overlap transactions.
What does RC522 Version 0x92 mean in Lab R1?
Reading register 0x37 (VersionReg) and getting 0x92 (or 0x91) proves your SPI wiring, 3.3 V power, and clock polarity between the ESP32-S3 and MFRC522 chip work reliably.
Can I permanently brick a MIFARE Classic 1K card by writing sector trailers?
Yes—writing invalid access bits to block 3 of a sector can lock that sector permanently. Labs R4 and R5 explain the trailer bytes and safe non-trailer data blocks first.