RFID Book for Treasure Hunt Clues
by amachinetech in Circuits > Arduino
202 Views, 1 Favorites, 0 Comments
RFID Book for Treasure Hunt Clues
Another in the series of Treasure Hunt clues that From my collection. A hidden clue within a upcycled book. RFID cards trigger the LCD screen to display clues that are coded to each card. Arduino powered with a 4x20 I2C LCD screen. Power saving magnetic start up trigger and auto off ability.
This was recently used in a treasure hunt that I did that needed a whiz bang element that would be placed inside of a mini library. If you are not aware of what a mini library is then click here for the whole story.
This clue was placed inside of a mini free library next to a fire station in a small town that the treasure hunt would be passing through. It needed to blend in with the rest of the books and not draw attention to itself. I chose a book that has sustained some water damage and the pages were all stuck together to make this. Relax book fans I didn't trash a perfectly good book.
The pages were surgically removed leaving the cover intact enough to pass muster as an innocent book on the shelf that isn't that interesting. A wooden insert was created to take the place of the pages and glued in place. When the book is closed and sitting on the shelf, only a very close inspection would show that this is not really a book. When opened, you are greeted with a blank page with a blank LCD screen. When a magnet is waved just below the LCD screen the unit starts up and the instructions to use the unit are displayed. When a RFID object is waved over the sensor then a pre-programmed message is displayed on the LCD screen. The message then goes back to a "present RFID object" screen with a 10 second count down. When the count down completes the unit shuts down to save power.
I used this to present clues and information for the next step in the treasure hunt. I also programmed it to recognize several cards so not only the one that was directly used on this clue work but others as well.
Clue Book, Arduino powered, RFID controlled, 4x20 LCD display with reed switch start and auto shutoff
Supplies
You will need:
1 donor book at least 5 1/2 x 8 x 1 1/2 thick
1 Arduino Nano or clone
1 Pololu 2808 power control board
1 4X20 lcd display with I2C backpack
1 RC522 RFID board
RFID cards 13.5mhz AMAZON
9 volt battery with adapter
1 push button micro micro switch (6mm x 6mm x 12mm)
1 magnetic reed switch
The Donor Book
You will need a donor book that is at least 5 1/2 x 8 x 1 1/2 inch thick to be able to fit everything in comfortably. You can go smaller if you are thicker but I have found that this is the best size for this project. Very carefully using a razor knife separate the pages from the cover. If you can leave the thick front cover page and the thick rear cover page it will give you something to glue your wood block to. The insert is made up of two pieces. Only the lower one is glued to the book. The top one is screwed to the back by a screw in each corner.
The Wood Insert
The wood that I used was two pieces of pine 5 1/2 x 8 1/4 x 3/4 thick. They need to be flat and free of knots as you will be drilling out the center of the boards. You can also use fiber board. I chose the pine as a quick glance make the grain of the wood look like pages but use what you have. As you can see in the picture I used a 2 inch forstner bit to hollow out the front section half the thickness of the board. I did this with the rear section as well. This created a void inside the sandwich of the two boards of about 3/4" +/-. Using a router I further removed the cavity that the RFID board sits in that puts about 1/8 of an inch of wood between the sensor and the front of the front piece. I found out that any more wood than that and the sensor had difficulty reading the RFID objects. The LCD display has a rectangle hole cut all the way through so the LCD sets just below the surface of the face of the top board. I had plans of laminating a piece of paper over the top of the face but ended up printing a sticker to place over the face then cutting out the LCD screen. You will also note that there is a micro switch that is glued into the bottom corner of the void. This also is all the way through and also sits just below the surface of the face piece. if you cover the face with paper it will cover the location and the existence of the button to the user. Then you can use a sharp pin to press the button through the paper if you need to reset the unit.
The Wiring
Caution: there are three different voltages in this diagram; the 9 volts from the battery, the 3.3 volts that is used by the RFID sensor and the 5 volts that is used by everything else. Make sure not to mix that up.
How Does It Work
The entire idea of this is to read an RFID object and deliver a clue thru the LCD screen. But what happens when an unknown RFID object is presented? Good question. The program will display the HEX number that is associated with the RFID object with the tag line "object not recognized"
If the object matches any of the RFID ID numbers that are preprogrammed in the sketch then it will display the message that is attached to that object
After any object is scanned and the message is delivered there is a 10 second count down before the unit shuts off. If the message needs to be repeated then the object is simply scanned again.
This RFID sensor will work with any 13.5 MHZ RFID object. My favorite is to use recycled hotel key cards. They are more or less free (with your hotel stay) and a sticker can be printed to cover the hotel logo. This is a very basic usage of this setup. Your imagination can expand this to require more than one RFID object to be able to trigger the message that is played.
The Programming
The programming has areas that you may need to change to adapt to your use.
First you will need to alter the I2C address of the sketch to match your display
Second you will need to change the baud rate of your serial monitor to 115200 for that is the speed of the RFID module.
Third you will need to alter the RFID ID numbers in the sketch to match your objects. If you only have one object then only alter the first ID bracket and leave the others blank. If there is no number there then they wont react to anything.
If you don't know what the RFID ID number of your object is then load the sketch and scan the object. The RFID ID number will be displayed in the LCD screen.
Fourth you will need to alter the screen displays to say what you want to say. I have left some of the code that I used for my treasure hunt still intact so you can see how the screen works in stages.
you will see that the lcd.print(F("displayed text")); has the F in it. This transfers the string that is to be printed to the LCD from active memory to flash memory. This will allow you to have more programming space. It will slightly slow down the update rate of the screen but not enough that you will notice it in this application.
You will also need to find a couple of libraries at github.
LiquidCrystal_I2C.h
MFRC522.h
The other two libraries are part of the Arduino IDE and just needed to be added to the sketch.
Good Luck, build something cool and share
AMachineTech