Project Idea
The project is about designing a smart lock for office drawers using a solenoid lock, controlled by an encrypted card and keypad. The goal is to enhance security and ease of access to stored items while allowing only authorized users to open the drawer.
Why is this project important?
Enhanced Security: Traditional drawer locks can be easily lost or duplicated. Using an encrypted card and PIN code ensures higher security.
Ease of Use: Instead of searching for a key, users can quickly unlock the drawer using a card or keypad.
Project Inspiration
The idea is inspired by smart locks used in modern office cabinets and electronic access systems in hotels and companies. The goal is to create a simple and practical solution for offices, workshops, or even home use.
Main Components
Solenoid Lock – Controls the locking and unlocking mechanism electronically.
Arduino – The main controller for processing commands.
RFID – Allows authorized users to unlock the drawer.
Power Supply – Powers the system.
For design
RFID Block
Relay Block
Solenoid Block
Mini Bread Board Block
Arduino Block
🦾You can get all blocks via grab cad website step file extension.
Source of inspiration
Step-by-Step Design Explanation
The first step was drawing a 15 cm square and defining it as fully constrained (fully defined) on frront plan.
Second step I extruted it 35 mm.
Third step fillet all corners 5 mm.
Fourth Step fillet front edge 0.2 mm
Fifth step converted sketch from back face with offsed 1mm and round cornners 5 mm.
The sixth step was performing an Extrude Cut with a value of 34 mm.
The seventh step was creating the Arduino jack hole on the side of the body.
The eighth step was performing an Extrude Cut with a depth of 1 mm.
The ninth step was creating the other Arduino hole.
The tenth step was performing an Extrude Cut with a depth of 1 mm.
The eleventh step was drawing rectangles to position the breadboard at the bottom of the inner box.
The twelfth step was performing an Extrude of 10 mm for them.
In the thirteenth step, I drew two triangles on each face of the extrusion to achieve a triangular shape that serves the purpose while reducing material weight.
In the fourteenth step, I performed an Extrude Cut of 10 mm and repeated this process four times for all protrusions, including both the sketches and extrude cuts.
In the fifteenth step, I applied a fillet of 0.5 mm to all the triangles.
In the sixteenth step, I created a quarter-circle in each corner to make space for the screw mounts that will secure the cover.
In the seventeenth step, I performed an Extrude of 7 mm.
In the eighteenth step, I created the screw holes.
In the nineteenth step, I created a Through Hole
In the twentieth step, I created the RFID symbol on the front face.
In the twenty-first step, I performed a Both Extrude inward by 0.5 mm.
In step 22, I created a sketch consisting of four circles to make mounting points for the inserted thread to fasten the component with screws.
In step 23, I performed an extrude operation with a value of 10mm.
In step 24, I created holes to fit the threaded inserts. I used M3, but the dimensions usually vary, so they should be checked before finalizing. Regarding this sketch, you can create the holes within the previous sketch to reduce steps. However, when I initially drew it, I didn’t have the exact dimensions of the threaded insert, so I modified it later.
In step 25, I marked all the mounting points for the remaining components until the interior was filled in this way.
In step 26, I sketched the solenoid hole.
In step 27, I created the solenoid hole using an extrude cut.
After that, I positioned all the components in their places and sketched the cover with its holes for screw fastening
3D Printer
PLA
Laser cutter
MDF 3 MM
Cura
Laser CAD
You designed this part using 3D modeling software Fusion 360.
The model was saved in .STL format and then imported into Cura for preparation.
A layer height of 0.2mm was used for standard quality.
Infill density was set to 10% using the Cubic pattern, reducing material usage while maintaining strength.
The selected printing material is PLA, with a printing temperature of 215°C.
After adjusting the settings, you performed slicing, which converted the design into G-code, the language the 3D printer understands.
The estimated printing time is 7 hours and 1 minute, consuming 53 grams of filament and 17.62 meters of material.
The G-code file was saved on an SD card or sent directly to the printer.
The printer started building the layers gradually until the final model was complete.
After printing was completed, the part was carefully removed from the print bed.
sanding or trimming was done to remove excess supports or improve the final finish.
The design was created using Fusion 360, where the shape and dimensions were precisely defined.
After completing the design, it was exported in DXF format for processing in the laser cutting software.
A. Layer Parameters Setup
Work Mode: Set to "Cut" to perform the cutting operation.
Work Count: Set to 1, meaning the machine will execute the cut only once.
Z-Up-Down: Not enabled, so the Z-axis will remain fixed during the process.
B. Power and Speed Settings
Max Power: Set to 60% to ensure a precise cut without excessive burning.
Min Power: Set to 60% to maintain a consistent power level during cutting.
Speed: Set to 10 mm/s, which provides a clean and accurate cut.
The file was imported into LaserCAD software and positioned correctly on the workspace.
The machine was connected via USB, and the file was sent using the Download button.
The Origin was set on the material surface.
The Run Box function was used to check the cutting position before starting.
After verifying all settings, the Start button was pressed to begin the cutting process.
Once the cutting was complete, the part was removed from the workspace.
The dimensions and edge quality were checked to ensure accuracy, with no excessive burns.
"I left the white plastic part to 3D print overnight in the lab... and picked it up the next day with a free layer of dust and mystery stains!" 😅
Used Electronics
Arduino UNO
Relay
RFID
threded insert m3
Mini Bread board
Jumper wires
USB Cable
12 v power supply
M3 screws *6mm
You can Follow this diagram to connect the circuit
Solenoid lock 12v
Input Components (Sensors & Modules)
RFID Module (RC522) – Reads RFID tags and sends data to Arduino for authentication.
Arduino (Uno) – Processes RFID data and controls the relay based on authentication results.
Breadboard – Used for prototyping and making circuit connections easier.
Action Components (Output & Control Devices)
Relay Module – Acts as a switch to control the solenoid lock based on Arduino’s command.
Solenoid Lock – Locks and unlocks based on authentication results from the RFID module.
Functionality & Working Principle
The RFID module scans an RFID tag and sends its unique ID to Arduino.
The Arduino compares the ID with pre-stored authorized IDs.
If the tag is authorized:
The Arduino activates the relay.
The relay powers the solenoid lock, unlocking it.
If the tag is unauthorized, the system remains locked.
After a few seconds, the relay turns off, re-locking the solenoid.
Circuit Connections
RFID Module → Arduino
VCC → 3.3V
GND → GND
SDA → Pin 10
SCK → Pin 13
MOSI → Pin 11
MISO → Pin 12
RST → Pin 9
Relay Module → Arduino
VCC → 5V
GND → GND
IN → Digital Pin 7
Solenoid Lock
Connected to the relay module and external power supply.
https://arduinogetstarted.com/tutorials/arduino-rfid-solenoid-lock
You can follow this link also
I used a 12V power supply because the solenoid lock operates at 12V and requires sufficient current to function properly.
🦾first I was searching for an RFID code coz I don't know how it works I downloaded the library for RFID .
So you can follow this steps in attached link😃
https://randomnerdtutorials.com/security-access-using-mfrc522-rfid-reader-with-arduino/
We have a lock (solenoid lock) connected to an Arduino, and this lock will open when we place a special RFID card in front of the RFID reader.
If the card is authorized, the lock will open for one second and then close again.
If the card is not authorized, it will print a message saying the card is not allowed.
SPI.h → Helps Arduino talk to other devices.
MFRC522.h → Helps Arduino communicate with the RFID card reader.
🔹 Defining Connection Pins :
We tell the Arduino where things are connected:
SS_PIN 10 → Connected to the RFID reader.
RST_PIN 5 → Resets the RFID reader.
RELAY_PIN A5 → Controls the lock (HIGH = open, LOW = closed).
🔹 Create the RFID Reader Object :
📌 We create an RFID object so the Arduino knows how to work with the RFID reader.
🔹 List of Allowed Cards :
📌 Each RFID card has a unique 4-byte ID number (UID).
Here, we store the UIDs of the cards that are allowed to open the lock.
🔹 Setup Function (setup()) :
📌 What happens here?
✅ Start communication between the Arduino and the RFID reader.
✅ Set the lock as an output.
✅ Keep the lock closed at the start.
✅ Show "Tap RFID Tag on reader" on the computer screen.
🔹 Main Code (loop())
📌 This loop runs forever, checking for new RFID cards.
🔹 Is a New Card Present?
📌 The Arduino checks if a new card is placed near the RFID reader.
If no card → It waits.
If a card is detected → It continues.
🔹 Print Card UID :
📌 The UID of the card is printed on the computer screen so we can see its number.
🔹 Check if the Card is Authorized :
📌 The Arduino compares the card's UID with the list of authorized UIDs:
✅ If the UID matches → The card is authorized.
❌ If the UID doesn't match → The card is not allowed.
🔹 Open the Lock (If the Card is Authorized) :
📌 If the card is authorized:
✅ Print "Authorized Tag".
✅ Open the lock.
✅ Wait 1 second.
✅ Close the lock again.
🔹 Reject the Card (If Unauthorized) :
📌 If the card is NOT authorized:
❌ Print "Unauthorized Tag".
❌ The lock stays closed.
🔹 Stop Communicating with the Card :
📌 This prevents the reader from continuously detecting the same card.
One of the main challenges I faced was the RFID module not working properly. Initially, I tried troubleshooting the wiring and checking the connections, but the issue persisted.
To solve this:
I asked for help from my peers: Kholoud provided me with her working RFID code.
I sought technical assistance: Mahmoud, the lab specialist, helped me solder the NEW RFID module properly.
I tried trial and error: Mohand and Yassin worked with me to debug the issue, trying different approaches to determine why the module only worked once or didn’t function at all.
I replaced the component: When the problem persisted, I decided to buy a new RFID module, which ultimately resolved the issue.
Unfortunately, I did not use a specific tutorial or article, but the debugging process was a mix of trial and error and peer assistance.
When I faced issues with the RFID module, I decided to buy a new one to troubleshoot the problem and ensure proper functionality.
I bought a new RFID module because the code was correct, and I had tested all the project components. However, whenever I tried to test the RFID in the Serial Monitor in the Arduino IDE, it wasn't reading. So, I had to try a new one to confirm the issue, and the new one was successfully detected in the Serial Monitor.
improvement would be designing a PCB instead of using many jumpers, which would make the wiring neater and reduce potential connection issues