Secret RFID Iphone box
Secret RFID Iphone box
Published 2018-09-11T20:12:10+00:00
Here's a video of it working: https://streamable.com/2jgh7
Make your own secret stash hidden as nothing more than an empty iphone box. Lock the box by sticking either of the two rfid tags over the reader (bottom left corner of the box). Unlock it by putting a specific pattern of, in my case, the blue rfid tag, wait two seconds, the white rfid tag, wait two seconds, and then the blue rfid tag again. This can be changed to any two of your own rfid tags in the code or just one instead of two.
I originally made this to be used in an escape the room I made for my friends, it worked flawlessly and it sure took them a while to figure out. Feel free to use it for whatever you like.
There are two models included, one for aligning the locking frame, and the actual locking frame itself
Materials:
- wires https://amzn.to/2x77Q1u
- arduino uno https://amzn.to/2OdlFCD
- 9 volt battery or alternative power source https://amzn.to/2Nzmqc9
- power source for arduino (a 9 volt battery, wire leading outside the box to a wall, etc.) https://amzn.to/2oYzmdO
- 1 or two rfid tags of any type https://amzn.to/2N9tKMf
- an rfid reader https://amzn.to/2oZx1iF
- mini servo motor https://amzn.to/2QkufRE
heres the code:
//Written by Neil Sawhney
#include
#include
#include
#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
Servo openServo;
int openPattern = 0;
void setup()
{
openServo.attach(7);
openServo.write(78);
Serial.begin(9600); // Initiate a serial communication
SPI.begin(); // Initiate SPI bus
mfrc522.PCD_Init(); // Initiate MFRC522
Serial.println("Put your card to the reader...");
Serial.println();
}
void loop()
{
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent())
{
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial())
{
return;
}
//Show UID on serial monitor
Serial.print("UID tag :");
String content = "";
byte letter;
for (byte i = 0; i < mfrc522.uid.size; i++)
{
Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");
Serial.print(mfrc522.uid.uidByte[i], HEX);
content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));
content.concat(String(mfrc522.uid.uidByte[i], HEX));
}
Serial.println();
Serial.print("Message : ");
content.toUpperCase();
if (content.substring(1) == "3D 29 83 B2") //change here the UID of the card/cards that you want to give access
{
if (openPattern == 0) {
openPattern = 1;
Serial.println("step 1");
if (openServo.read() == 78)
{
openServo.write(166);
openPattern == 0;
}
delay(1000);
}
else if (openPattern == 1) {
openPattern = 0;
Serial.println(" Access denied1");
if (openServo.read() == 78)
{
openServo.write(166);
openPattern == 0;
}
delay(1000);
}
else if (openPattern == 2) {
Serial.println("Authorized access2");
Serial.println();
openServo.write(78);
openPattern = 0;
delay(1000);
}
}
else if (content.substring(1) == "45 A7 D7 15")
{
if (openPattern == 0) {
openPattern = 0;
Serial.println(" Access denied3");
if (openServo.read() == 78)
{
openServo.write(166);
openPattern == 0;
}
delay(1000);
}
else if (openPattern == 1) {
openPattern = 2;
Serial.println("step 2");
if (openServo.read() == 78)
{
openServo.write(166);
openPattern == 0;
}
delay(1000);
}
else if (openPattern == 2) {
openPattern = 0;
Serial.println(" Access denied4");
if (openServo.read() == 78)
{
openServo.write(166);
openPattern == 0;
}
delay(1000);
}
}
}
Date published | 11/09/2018 |
Support Free | YES |