In this project, we are going to build an RFID based solenoid lock.
When we show the RFID card we assigned for the lock then the lock will get unlocked for 5 seconds and automatically will get locked again.
![](https://diyusthad.com/wp-content/uploads/2020/07/New-728x90-2.gif)
![](https://diyusthad.com/wp-content/uploads/2020/07/New-728x90-2.gif)
Video
Hardware Required
PinOut
![](https://diyusthad.com/wp-content/uploads/2020/08/pinout_web-1-1024x508.jpg)
![](https://diyusthad.com/wp-content/uploads/2020/08/pinout_web-1-1024x508.jpg)
Circuit
![RFID Lock using Arduino nano by diyusthad.com](https://i1.wp.com/diyusthad.com/wp-content/uploads/2020/03/RFID-Lock-using-Arduino-nano-by-diyusthad.com_.jpg?fit=1024%2C570&ssl=1)
![RFID Lock using Arduino nano by diyusthad.com](https://i1.wp.com/diyusthad.com/wp-content/uploads/2020/03/RFID-Lock-using-Arduino-nano-by-diyusthad.com_.jpg?fit=1024%2C570&ssl=1)
Arduino | RFID | Solenoid | TIP120/122 | Diode (1n4007) | 12v Power Supply |
---|---|---|---|---|---|
D11 | MOSI | ||||
D12 | MISO | ||||
D10 | SDA | ||||
D13 | SCK | ||||
D9 | RST | ||||
GND | GND | Emitter | GND | ||
3.3 | VCC | ||||
VIN | Terminal 1 | Anode | +12v | ||
Base(via 2.2k resistor) | |||||
Terminal 2 | Collecter | Cathode |
PCB Prototyping From PCBWay
Step 1: Download Gerber Files
Step 2: Upload in PCBWay
- Go to https://www.pcbway.com/orderonline.aspx
- Click on Quick-order PCB(Autofill parameters)
![](https://436140-1366194-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2020/05/1-2.png)
![](https://436140-1366194-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2020/05/1-2.png)
- Now click the +Add Gerber File button.
- Then choose the file from your computer and upload.
![](https://436140-1366194-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2020/05/2-2.png)
![](https://436140-1366194-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2020/05/2-2.png)
- After uploading you can view an image of the PCB
- There are a lot of settings to choose from, I just left everything to default except the color to black.
![](https://diyusthad.com/wp-content/uploads/2020/08/PCBWay-order.png)
![](https://diyusthad.com/wp-content/uploads/2020/08/PCBWay-order.png)
- Now choose your shipping method and country and click on save to cart button.
- Then create an account or login if you already have an account in PCBWay.
- Make the payment and your PCB will reach you in a few days
![](https://diyusthad.com/wp-content/uploads/2020/07/New-728x90-2.gif)
![](https://diyusthad.com/wp-content/uploads/2020/07/New-728x90-2.gif)
- Upload the code and open the serial monitor.
- Now show your RFID card above the Reader.
- Now copy the values printed in the serial monitor and paste it in the code where mentioned and upload the code again.
- Show the same RFID card gain and the lock will get unlocked for 5 seconds and get lock again automatically.