The idea was to create a door with an RFID-controlled lock.
We started out making the physical door using the laser cutter. We printed hinges in mat board with the laser cutter and covered these with vinyl pieces with the same shape to stregthen the hinges.
The door was printed in 3 equally sized pieces of mat board, and a frame was cut by hand in mat board to support the door. We glued the lot to the existing closet.
Our next step was to build a locking mechanism based on arduino schematics wit a RFID sensor. We had some trouble getting the stepper motor running, we tried different codes and settings, but we weren't able to identify the problem. Although we managed to get the RFID part of assembly and the rfid code to work though.
- Parts used for arduino RFID and locker mechanism assembly :
o Arduinoboard (Uno) x2
o Stepper motor (39bygs202)
o RFID tag kit
o RFID-antenna and reader(Grove125KHz RFID reader)
o Driver chip for stepper motor (a4982)
We used this tutorial for connecting the arduino and RFID:
Serial.print("What TAG do you wanna grant access?: ");
msg += c;
Serial.println("\nAccess already granted for this card.");
ID += msg;
ID += ",";
Serial.println("Access granted for this card.");
Serial.print("What TAG do you wanna deny access?: ");
msg += c;
Serial.println("TAG found. Access for this card denied.");
msg += ID.substring(0,pos);
msg += ID.substring(pos+15,ID.length());
ID += msg;
} else Serial.println("\nTAG not found or already denied");
The motor was connected to its driver through a bread board and from that to the Arduino board.
The motor needed a power supply of at least 8V so we measured the actual voltage of a 9V battery and it turned out that it supplied only about 4V so we connected a bunch of 3 batteries to give the required voltage supply for the motor.
As mentioned earlier we didn't manage to get the motor running, but followed instructions from the data sheet of the driver chip a4982. we used the LP package.
We used the following code:
//simple A4988 connection
//jumper reset and sleep together
//connect VDD to Arduino 3.3v or 5v
//connect GND to Arduino GND (GND near VDD)
//connect 1A and 1B to stepper coil 1
//connect 2A and 2B to stepper coil 2
//connect VMOT to power source (9v battery + term)
//connect GRD to power source (9v battery - term)
int enable = 13; //connect pin 13 to enable
int sleep = 12; // connect pin 12 to sleep
int reset = 11; //connect pin 11 to reset
int stp = 10; //connect pin 10 to step
int dir = 9; //connect pin 9 to direction