Library Recommendation Kiosk A Robot That Suggests Your Next Book! 📚🤖
Build a smart Arduino kiosk that scans a book's tag and instantly tells you what to read next!
What Does This Kiosk Do?
Ever finish an awesome book and have no idea what to read next? This Library Book Recommendation Kiosk solves that problem instantly! Just hold any tagged book near the scanner, and it tells you a similar book you might love.
Each book in your library gets a tiny RFID tag sticker hidden inside its cover. When you scan a book, an RFID reader module reads its unique ID. Arduino looks that ID up in a list and shows the book's title, genre, and a recommended next read on an LCD screen, with a cheerful little chime to celebrate the suggestion!
How Does the Kiosk "Know" Which Book It Is?
This project teaches two powerful ideas used in real-world technology every single day. Let's break them down!
📡 RFID — Radio Frequency Identification
Each RFID tag has a tiny chip and antenna, with no battery needed! When the reader module gets close, it sends out a radio signal that powers the tag just long enough to send back its unique ID. This same technology is used in library check-out systems, contactless cards, and even pet microchips!
🔎 Lookup Tables — How Recommendation Systems Work
At its heart, even a giant recommendation system (like the ones used by huge bookstores or streaming services) starts with a simple idea: match an item to a related item. Our kiosk uses a simple lookup table — a list that pairs each book's ID with its title and a suggested next read. Bigger systems use millions of entries and clever math, but the basic concept is exactly the same!
Sensors (Input)
The RFID reader is the kiosk's "fingertip" — it senses which book tag is nearby.
Microcontroller (Brain)
Arduino matches the scanned ID to book data and decides what to recommend.
Actuators (Output)
The LCD screen and buzzer are how the kiosk shows you its answer.
🔄 The Sense → Think → Act Loop
What You'll Need to Build It
Arduino Uno R3
The brain that runs the whole recommendation kiosk.
RC522 RFID Reader Module
Scans the tag hidden inside each book's cover.
RFID Tag Stickers (set of 5+)
Thin, flat tags you stick inside each book.
16×2 I2C LCD Display
Shows the book title and recommended read.
Buzzer
Plays a happy chime when a recommendation appears.
LED (any color)
Lights up while the kiosk is "thinking."
220Ω + 100Ω Resistors
Protect the LED and buzzer.
USB Cable / 9V Power
Powers the Arduino — USB from a computer is easiest.
Breadboard + Jumper Wires
Connect everything together without soldering.
Small Box or Cardboard Stand
To build a cute little kiosk housing for your project!
How to Connect Everything
📡 RC522 RFID Reader → Arduino
| RC522 Pin | Arduino Pin | Wire |
|---|---|---|
| SDA (SS) | Pin 10 | Yellow |
| SCK | Pin 13 | Orange |
| MOSI | Pin 11 | Blue |
| MISO | Pin 12 | Green |
| RST | Pin 9 | Purple |
| GND | GND | Black |
| 3.3V | 3.3V (not 5V!) | Red |
🖥️ I2C LCD Display → Arduino
| LCD Pin | Arduino Pin | Wire |
|---|---|---|
| VCC | 5V | Red |
| GND | GND | Black |
| SDA | A4 | Blue |
| SCL | A5 | Yellow |
🔔 Buzzer & 💡 LED → Arduino
| Part | Arduino Pin | Resistor | Job |
|---|---|---|---|
| Buzzer (+) | Pin 8 | 100Ω | Happy chime sound |
| LED (+) | Pin 6 | 220Ω | "Thinking" light |
| Both negatives | GND | — | Common ground |
Setting Up Your Book Recommendations
Before uploading the final code, decide which books you want to include and what each one should recommend. Here's an example catalog to get you started — swap in your own favorites!
How to Find Each Tag's ID Number
Upload the code below first as-is. Hold each RFID tag near the reader one at a time and note down the unique ID number that appears in the Serial Monitor. You'll need these IDs to fill in your own catalog!
Let's Build It — Step by Step!
-
1Wire the RFID Reader 📡
Connect the RC522 to your Arduino exactly as shown in the circuit table — remember, it needs 3.3V, not 5V!
-
2Install the RFID Library 📚
Open Arduino IDE → Sketch → Include Library → Manage Libraries. Search for MFRC522 (by GithubCommunity) and click Install.
-
3Wire the LCD Screen 🖥️
Connect the I2C LCD's VCC and GND to power, SDA to A4, and SCL to A5. Then install the LiquidCrystal_I2C library through the Library Manager.
-
4Add the LED and Buzzer 🔔
Wire the LED (through a 220Ω resistor) to Pin 6 and the buzzer (through a 100Ω resistor) to Pin 8. Both negatives go to GND.
-
5Scan Each Tag's ID Number 🔍
Upload the code below as-is. Hold each RFID tag near the reader and write down its unique ID shown in the Serial Monitor — you'll need these in the next step!
-
6Build Your Book Catalog 📋
In the code's
library[]list, replace the example tag IDs, titles, and recommendations with your own books and their real scanned IDs. -
7Re-upload the Updated Code 💻
Once your catalog is filled in with real tag IDs and book titles, upload the sketch again to your Arduino.
-
8Stick Tags Inside Your Books 📖
With an adult's help, stick one RFID tag sticker inside the front cover of each book in your catalog.
-
9Build the Kiosk Housing 📦
Decorate a small box or cardboard stand to hold your Arduino, with the RFID reader on top and a window cut out for the LCD screen to show through.
-
10Test Your Kiosk! 🎉
Power on the kiosk, hold a tagged book near the scanner, and watch the LCD show the title and a recommendation — with a happy chime to celebrate!
The Complete Code
Copy this whole sketch into Arduino IDE. First upload it as-is to find your tag IDs, then come back and fill in your real book catalog!
/*
╔═══════════════════════════════════════════╗
║ LIBRARY BOOK RECOMMENDATION KIOSK ║
║ RFID book scan + LCD recommendation ║
╚═══════════════════════════════════════════╝
Parts:
- RC522 RFID Reader (SDA=10, SCK=13, MOSI=11, MISO=12, RST=9)
- 16x2 I2C LCD (SDA=A4, SCL=A5)
- LED (Pin 6), Buzzer (Pin 8)
Libraries needed:
- MFRC522 (by GithubCommunity)
- LiquidCrystal_I2C (by Frank de Brabander)
*/
#include <SPI.h>
#include <MFRC522.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// ── RFID Pins ─────────────────────────────────
#define RST_PIN 9
#define SS_PIN 10
MFRC522 rfid(SS_PIN, RST_PIN);
// ── LCD ────────────────────────────────────────
LiquidCrystal_I2C lcd(0x27, 16, 2); // try 0x3F if blank
// ── LED + Buzzer Pins ──────────────────────────
#define LED_PIN 6
#define BUZZER_PIN 8
// ── 📋 YOUR BOOK CATALOG — UPDATE THIS! ────────
Replace the example tag IDs with the real ones
YOUR tags show in the Serial Monitor, then fill
in your own book titles and recommendations. */
struct Book {
byte id[4];
String title;
String recommend;
};
Book library[] = {
{{0xAA, 0x11, 0x22, 0x33}, "Charlottes Web", "Stuart Little"},
{{0xBB, 0x44, 0x55, 0x66}, "Percy Jackson", "The Hobbit"},
{{0xCC, 0x77, 0x88, 0x99}, "Matilda", "The BFG"},
{{0xDD, 0xAA, 0xBB, 0xCC}, "Wonder", "Out of My Mind"},
{{0xEE, 0xDD, 0x12, 0x34}, "Holes", "The Westing Game"}
};
const int NUM_BOOKS = 5;
void setup() {
Serial.begin(9600);
SPI.begin();
rfid.PCD_Init();
pinMode(LED_PIN, OUTPUT);
pinMode(BUZZER_PIN, OUTPUT);
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Library Kiosk");
lcd.setCursor(0, 1);
lcd.print("Scan a book...");
Serial.println("Library Recommendation Kiosk ready! Scan a book...");
}
// ── Compare two 4-byte tag IDs ─────────────────
bool idsMatch(byte* a, byte* b) {
for (byte i = 0; i < 4; i++) {
if (a[i] != b[i]) return false;
}
return true;
}
// ── Play a cheerful little chime ───────────────
void playChime() {
tone(BUZZER_PIN, 1046, 120); delay(140);
tone(BUZZER_PIN, 1318, 120); delay(140);
tone(BUZZER_PIN, 1568, 200); delay(250);
}
void loop() {
// ── Look for a new tag ──────────────────────
if (!rfid.PICC_IsNewCardPresent() || !rfid.PICC_ReadCardSerial()) {
return; // no tag detected this loop, try again
}
digitalWrite(LED_PIN, HIGH); // "thinking" light on
// ── Print the raw tag ID (use this in Step 5!) ──
Serial.print("Tag scanned, ID: ");
for (byte i = 0; i < rfid.uid.size; i++) {
Serial.print(rfid.uid.uidByte[i] < 0x10 ? "0x0" : "0x");
Serial.print(rfid.uid.uidByte[i], HEX);
Serial.print(", ");
}
Serial.println();
// ── Look up this book in our catalog ────────
int matchIndex = -1;
for (int b = 0; b < NUM_BOOKS; b++) {
if (idsMatch(rfid.uid.uidByte, library[b].id)) {
matchIndex = b;
break;
}
}
lcd.clear();
if (matchIndex != -1) {
String title = library[matchIndex].title;
String rec = library[matchIndex].recommend;
Serial.print("Book found: "); Serial.println(title);
Serial.print("Recommending: "); Serial.println(rec);
lcd.setCursor(0, 0);
lcd.print(title.substring(0, 16)); // fit on 16 chars
lcd.setCursor(0, 1);
lcd.print("Try: ");
lcd.print(rec.substring(0, 11));
playChime();
} else {
Serial.println("Unknown book, not in catalog yet");
lcd.setCursor(0, 0);
lcd.print("Unknown book!");
lcd.setCursor(0, 1);
lcd.print("Add it to catalog");
tone(BUZZER_PIN, 440, 200);
}
digitalWrite(LED_PIN, LOW);
rfid.PICC_HaltA(); // stop reading this tag for now
delay(3000); // show result for 3 seconds
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Library Kiosk");
lcd.setCursor(0, 1);
lcd.print("Scan a book...");
}
0xAA, 0x11...) are placeholders! Run the sketch first, scan each real tag, copy the exact numbers the Serial Monitor prints, and paste them into the library[] list.Your Kiosk in Action!
🖥️ LCD Screen Display
📺 Serial Monitor Output
Uh Oh! Something Not Working?
No worries — every robot builder runs into these. Here's how to fix the most common ones:
| 😟 Problem | 🔍 Likely Cause | ✅ Fix |
|---|---|---|
| RFID reader never detects any tags | Wrong voltage or loose wiring | Confirm the RC522 is powered by 3.3V, not 5V. Double check SDA, SCK, MOSI, MISO, and RST pins match the table. |
| LCD screen is blank | Wrong I2C address or low contrast | Try 0x3F instead of 0x27 in the code. Turn the small dial on the back of the LCD module to adjust contrast. |
| Wrong recommendation shows up | Tag ID typed incorrectly in code | Re-scan that tag, copy the exact ID from Serial Monitor, and carefully retype it into library[] — hex values are easy to mistype! |
| Long book titles get cut off | LCD only fits 16 characters per row | Use shorter nicknames for long titles in your catalog, like "Percy Jackson" instead of the full series name. |
| Buzzer doesn't make a sound | Wrong pin or resistor missing | Confirm the buzzer's positive leg connects through a 100Ω resistor to Pin 8. |
Make It Even Smarter!
Multiple Recommendations
Store a short list of 2-3 recommendations per book and have Arduino randomly pick one each scan!
Star Ratings
Add buttons so readers can rate a book after scanning it, and store the ratings in code.
Most Popular Book Tracker
Count how many times each book gets scanned and display the "most popular book this week" on demand!
Bigger Screen Display
Upgrade to an OLED or larger LCD to show book covers as simple pixel art alongside the title!
Spoken Recommendations
Add a DFPlayer Mini module to read the recommendation out loud instead of just showing text!
Wi-Fi Catalog Sync
Upgrade to an ESP32 and store your book catalog online, so it's easy to add new books without re-uploading code!
Frequently Asked Questions
What is a Library Book Recommendation Kiosk?
It's an Arduino robotics project that scans the RFID tag inside a book and instantly displays a recommendation for a similar book on an LCD screen, the same way real libraries and bookstores use recommendation systems.
How does the kiosk know which book was scanned?
Each book gets a small RFID tag sticker placed inside its cover. An RC522 RFID reader module scans the tag's unique ID number. Arduino looks up that ID in a list and matches it to the book's title, genre, and a suggested next read.
What parts do I need to build this kiosk?
An Arduino Uno, an RC522 RFID reader module, RFID tag stickers, a 16x2 I2C LCD display, a buzzer for a friendly chime, an LED, and a breadboard with jumper wires.
Is this Arduino project good for beginners?
Yes! It uses straightforward RFID scanning and a simple lookup table in code, both great first steps into data-driven robotics. It also works wonderfully as a school library or classroom STEM project.
Can the kiosk recommend more than one book per scan?
Yes, with a small code upgrade! Instead of storing one recommendation per book, you can store a short list and have Arduino randomly pick one each time, so the kiosk feels fresh even for repeat scans of the same book.

Comments
Post a Comment