Hello! On this project, I'll show how to make a door lock system using RFID module, stepper motor and OLED display. This all controlled by one Arduino.
The StepsFor this section, you will need to pay attention, because here I'll show the components used and some connections to Arduino.
Step 1-Take your breadboard and ArduinoUsing some jumpers, you will connect Arduino's 5v and GND to breadboard, like this:
We are going to use now the green and red LEDs, two 220 ohms resistors and jumpers. Check the schematics below:
They are going to be attached from pins 6 to 7.
Real life circuit looks like:
For the RFID, I will use this module:
How the connections for the RFID module looks like:
- SDA- D10
- SCK- D13
- MOSI- D11
- MISO- D12
- IRQ- Not used here
- GND- GND
- RST- D9
- 3.3v- 3.3v of Arduino
Real life circuit so far:
For the lock, I will use this stepper motor:
The motor will be attached to the driver like this:
For driver, I will use this one:
Connections:
- IN1-D2 of Arduino
- IN2-D3 of Arduino
- IN3-D4 of Arduino
- IN4-D5 of Arduino
- Connect the "-" signal to GND of the Arduino, and "+" to 5v
After that, the circuit will be like:
This is the OLED Display that we are going to use here:
This OLED Display has a I2C comunication, then, we are going use the analog pins A4 and A5. It supports from 3v to 5v.
- SCL - A5 of Arduino
- SDA - A4 of Arduino
The circuit now is like that:
To control the RFID module, we will need one library, you can get it Here, download the.zip file, open the Arduino IDE, go to Sketch >> Include Library >> Add.ZIP library. Then add the rfid-master.zip to Libraries.
To use the OLED Display, we need two libraries. Open your IDE, go to Tools >> Manage Libraries. A new window will be opened.
Search for "adafruit ssd1306":
Install the first library. Note that you need another library, that is a dependence, install it too.
Step 7-Discovering TAG's codeBefore we start programming the final sketch, we need to get our TAG's code, then you will paste it in the final program. Go to the code section, copy the test program, get the TAG's code, then you will replace in the line where is the TAG's code.
Let's program!After all these steps, we are ready to go to the IDE and start programming!
Project working
Comments