Electronic door lock with Arduino UNO R4 WiFi and touch sensor
This project builds a basic electronic door lock with the Arduino UNO R4 WiFi. A touch sensor detects contact, a relay controls a solenoid lock, and an OLED display shows the system status. The principle is simple: touch the sensor, the door unlocks for 5 seconds, then locks itself again. It is a starting point for customizable smart locking systems.
The central board is the Arduino UNO R4 WiFi, which manages the whole flow. The touch sensor sends a signal to the board, which activates the relay to power the lock. The 128×64 pixel OLED display shows the startup, locked, and unlocked screens. The system uses a relay module to separate the control circuit from the power circuit, so the solenoid lock operates safely.
The circuit and components of the lock
Assembly requires few components: the Arduino board, the touch sensor, the OLED display, the relay module, and a solenoid lock. Everything connects on a breadboard with jumper wires. The relay is essential because the lock runs at 12 VDC, while the Arduino operates at 5 V. Without the relay, the lock’s current would damage the board.
The OLED display connects via I2C, using the SSD1306 and Adafruit_GFX libraries. The 128×64 pixel resolution is enough to show the system status with clear characters. The touch sensor connects to a digital pin: when it detects a touch, it sends a high signal to the Arduino. The response is immediate, and the relay trips right away.
The firmware and unlock time
The code is written in the Arduino IDE and uses the SSD1306, Adafruit_GFX, and Adafruit_SSD1306 libraries. The sketch reads the touch sensor state and, when it detects a touch, activates the relay. The display shows the unlock screen for 5 seconds, then the system locks the door again. The unlock time is fixed at 5 seconds, but it can be changed in the code.
The operation is cyclic: startup, waiting, unlock, relock. The OLED display updates the status in real time, so you always know whether the door is locked or unlocked. The project demonstrates the principle of a basic electronic lock, and the maker’s website collects the details for replicating it. It is a simple but complete system.
For assembly you also need a universal acrylic support to keep the Arduino and breadboard tidy. 15 cm male-to-female jumper wires help connect the modules without soldering. The project can be expanded with a numeric keypad, an RFID reader, or a Wi-Fi module for remote control.
In short, this project is an excellent base for anyone who wants to understand how an electronic lock works. The components are few, the code is essential, and the result is functional. With the Arduino UNO R4 WiFi you also have the option to add connectivity in the future, turning the prototype into a real smart lock.
Source: https://srituhobby.com/how-to-make-a-solenoid-door-lock-system-using-a-touch-sensor/
The post Electronic door lock with Arduino UNO R4 WiFi and touch sensor appeared first on Open Electronics.