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.


Video
Hardware Required
PinOut


Circuit


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)


- Now click the +Add Gerber File button.
- Then choose the file from your computer and upload.


- 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.


- 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


- 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.