GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsSchools and workshops often have a mix of card types. 13.56 MHz NFC cards and tags (MIFARE, NTAG) need a reader like the PN532, while older 125 kHz EM4100 cards need a reader like the EM-18. This logger reads both, prints the card ID and beeps, ready to send to a sheet or SD card.
Tell people what is logged and keep attendance data private.
Tick anything you already have and the total updates.
125 kHz cards for the EM-18
Follow the colours: red is power, dark grey is ground, blue is a signal.
dual_rfid.inoVerify & upload in Electrolark#include <Wire.h>
#include <Adafruit_PN532.h>
#include <SoftwareSerial.h>
Adafruit_PN532 nfc(2, 3); // IRQ, RESET (I2C mode)
SoftwareSerial em18(8, 9); // RX from EM-18 TX
const int BUZZ = 6;
void beep() { digitalWrite(BUZZ, HIGH); delay(80); digitalWrite(BUZZ, LOW); }
void setup() {
Serial.begin(115200);
em18.begin(9600);
pinMode(BUZZ, OUTPUT);
nfc.begin();
if (!nfc.getFirmwareVersion()) { Serial.println("PN532 not found"); while (1); }
nfc.SAMConfig();
}
void loop() {
uint8_t uid[7], len;
if (nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &len, 100)) {
Serial.print("NFC ");
for (uint8_t i = 0; i < len; i++) { if (uid[i] < 16) Serial.print('0'); Serial.print(uid[i], HEX); }
Serial.println(); beep(); delay(800);
}
if (em18.available() >= 12) { // 10 ID characters + 2 checksum characters
char id[13] = {0};
em18.readBytes(id, 12);
Serial.print("125k "); Serial.println(id); beep();
while (em18.available()) em18.read();
}
}
The sketch above runs here on a simulated Arduino Uno. Move the sliders for the sensors and buttons it reads, and watch the Serial monitor, display and outputs change.
Check the DIP switches are set to I2C and SDA/SCL are on A4/A5.
It reads only 125 kHz cards; NFC tags will not work on it.
Increase the delay after a read.
No, UIDs can be copied. Use it for attendance, not for locks.
Yes, NTAG tags can store a URL or text.
Use an ESP32 instead of the Uno and post each ID to a web app.
8 parts: Uno R3 CH340G ATmega328p Compatible Development Board, PN532 NFC RFID Reader Writer Module V0.0.1 – I2C/SPI/HSU Interface, EM-18 RFID Reader Module, 125 kHz, RFID / NFC Cards and Tags, Generic T5577 EM4305 125KHz Reproducible RFID Induction Card – PVC, Buzzer Module 3.3–5V, Solderless Breadboard and Dupont Jumper Wires (40 pcs). On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 2 hours. The build on this page has 5 steps.
No. This page has the complete, tested code (dual_rfid.ino).
Yes. The Run it panel under the code runs this exact sketch on a simulated board. Move the sliders or press the buttons for the sensors it reads, and the Serial monitor, display and outputs react as they will on the real build. It is a simulation, so real readings depend on your parts and wiring.
About ₹939 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
The two common RFID frequencies; I2C and UART readers; Why a card UID is not a secure key.
Tell people what is logged and keep attendance data private.
Ideas that reuse this build: Modbus RS485 reader. They are listed under Take it further on this page.
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Records where you went every five seconds, ready to open on a map.
Two boards, two radios: press the button at the gate and it rings indoors.
Check temperature, humidity and pressure from any phone on your Wi-Fi.
Learning project. Check every circuit and the datasheet of each part before you power it up.
PN532 not found
A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.