It all started one lazy Sunday evening. You were reading your favorite mystery novel - "The Arduino who coded at midnight" then Mom called: "Dinner's ready!"
You did what every book lover does - placed the book on the bed, promising your inner conscience
"I'll put it back after dinner."
Spoiler: You didn't
The next morning your book was lost somewhere between the blanket, the pillow, and a dimension known as "Where did I put that?"
So, you decided to engineer your way out of guilt and mess.
Welcome to the Smart Book Holder - powered by Arduino UNO R4 Wi-Fi, 3 IR Sensors, a real-time clock (RTC), and a buzzer that just won't stop until you put that book back where it belongs. Because sometimes, technology needs to scream louder than your mom.
Components RequiredArduino UNO R4 Wi-Fi x1: The Brain of the project featuring built in RTC
IR Sensor Modules x1: Detects book presence or absence of books
Active Buzzer x1: Alerts continuously until book is returned
Jumper Wires (As Needed): For sensor & Buzzer connections
How It Works1. Each of the 3 IR Sensor monitors one section of your shelf.
2. When any sensor goes CLEAR (book removed), the Arduino immediately asks you (via Serial Monitor):
Enter return time (HH:MM, 24-hour).
4. If yes - Buzzer activates and screams continuously until you return the book.
5. Once all books that were removed are back - Buzzer stops automatically.
Step by Step Build ProcessMake sure you have:
- Arduino UNO R4 Wi-Fi
- 3 IR Sensors
- 1 Buzzer
- Jumper Wires
- Connect sensor 1, 2 and 3, outputs to Arduino pins 2, 3 and 4.
- Connect all sensor VCC to 5v, all GNDs to GND
- Connect buzzer +ve to pin11, buzzer -ve to GND.
- Ensure all grounds are common (Arduino, sensors, buzzer).
- Open the Arduino IDE
- Install the UNO R4 Wi-Fi Core (Board Manager - Search UNO R4 Wi-Fi)
- Select Boards Arduino UNO R4 Wi-Fi
- Select the correct COM port.
- Open a new sketch and paste your provided code
- Click Upload (Right arrow icon).
- Once uploaded, open Serial Monitor at 115200 baud.
- You'll see:
UNO R4 WiFi - Continuous buzzer until IR returns to DETECTED
Sensor polarity: ACTIVE LOW (LOW = detected)
When any sensor is CLEAR you'll be asked to enter HH:MM.
If you see RTC.begin() failed, make sure your board drivers and core are properly installed.
Step 5: Mount the IR SensorsMount one IR sensor per section on the bookshelf:
- The sensor should point directly at the book's spine or edge.
- When a book is there - sensor reads DETECTED (LOW).
- When removed - sensor reads CLEAR (HIGH).
Test each one using the Serial Monitor - it prints sensor status every second.
Step 6: Remove a BookNow test it:
1. All books in place - all sensors show DETECTED.
2. Remove a book - you'll see something like:
Sensors clear now: S1:CLEAR S2:DETECTED S3:DETECTED
Enter target time (HH:MM, 24-hour):
Time>
3. Type a time, e.g. 18:45, then press Enter.
That's the time by which you must return your book.
Step 7: RTC Alarm in ActionWhen the clock reaches your target time:
- The RTC alarm triggers.
- Arduino checks if that book's sensor still reads CLEAR.
- If yes - The buzzer start buzzing continuously:
One or more sensors that were CLEAR are STILL CLEAR -> starting continuous buzzer!
The buzzer will not stop until all those sensors detect their books again.
Step 8: Returning the BookPut the book back in it place.Once the IR sensor detects it, you'll see
All previously-clear sensors are now DETECTED -> stopping buzzer.
And the sound stops automatically.
Step 9: Try Multiple SensorsYou can remove multiple books before setting the alarm.The Arduino keeps track of which sensors were CLEAR when you entered the time - and check all of them at the alarm moment.
So if you removed two books, both must be returned before the buzzer stops. No shortcuts.
Step 10: Cancel a PromptIf you changed your mind while setting a time, just press Enter without typing anything. Arduino will respond:
Cancelled (empty).
and reset the waiting state.
Step 11: Code Behavior Overview- readSensor(i): Reads whether the IR sensor I detects a book
- printCurrentTimeAndStatus(): Displays time + sensor state every second
- parseTimeString(): Validates and extracts HH:MM input
- startContinuousBuzzer(): Turns buzzer ON until manually stopped
- stopContinuousBuzzer(): Turnbuzzer OFF
- alarm_cbk(): Called automatically when RTC alarm time hits
- loop(): Main logic loop controlling all the above.
RTC not starting: Ensure UNO R4 Wi-Fi core installed; reconnect board
Sensors reversed: Change Sensor_ACTIVE_LOW to false
Buzzer silent: Test buzzer with simple tone(11, 2000) sketch
No Serial Output: Check Baud rate (115200) and COM port
Buzzer never stops: Verify sensors are aligned and working correctly.
Step 13: Optional Improvements- Add LEDs: Green when book present, Red when missing.
- Wi-Fi Alerts: Send phone notification using UNO R4 Wi-Fi features.
- Voice Module: Use Player to say "Put your book back!"
- Logging: Store missed returns in EEPROM or SD Card.
- Physical Input: Add keypad or buttons for entering time directly.
You breadboard prototype may work perfectly, but looks like a tech spaghetti bowl. When you want to impress at a science fair, competition, or investor meeting, presentation is everything.
That's where JUSTWAY comes in.
JUSTWAY helps you transform your DIY project into a professional-grade prototype, complete with a custom enclosure, metal finish, or injection-molded body - ready for the world to see.
Why JUSTWAY is the Perfect PartnerRapid Prototyping: 24-hour turnaround, real-time order tracking
CNC Machining: Aluminum 6061 or stainless steel 304 - strong, premium enclosures
Sheet Metal Fabrication: Laser-cut, CNC-bent, and powder-coated finishes
Injection Molding: Ideal for moving from prototyping to mass production
Urethane Casting: Perfect for small batches or display models
3D Printing (SLA/HP-PA12): SLA resin for clear aesthetic display, HP-PA12 nylon for durable, matte finish
How To Order in 4 Easy StepsStep 1: Upload Your CAD files- Wi-Fi notifications directly to your smartphone
- Book database with names and return logs
- OLED display showing real-time status of all shelves
- RGB lights indicating which section is overdue
- Mobile App integration for remote tracking
You built something truly useful - and a little bit hilarious. You Smart Book Return Reminder uses Arduino UNO R4 Wi-Fi's RTC, IR Sensors, and a relentless buzzer to keep your shelves organized (and your mom happy).
It's practical, fun, and a great example of combining sensors, real time logic, and creativity. And when you're ready to make it look as good as it works, remember...
JUSTWAY - Turning Your Ideas Into Real ProductsFrom DIY to Display-Ready JUSTWAY is your best ally in transforming prototypes into professional masterpieces.
"Return your books. Respect your shelves. Save your sanity - with Arduino and JUSTWAY."
Comments