I need to make a door lock that opens using RFID and QR. I've made a drawing and a list of where all the wires should go. Could someone help me figure out if this works, what could be improved, or what's missing?
The list:
Product specifications
ESP32 Dev Kit 4 (controller)
This controls everything
This runs on 5V
Programmed via Arduino IDE
Scanner
12V – Wiegand and UART
All wires to ESP32
WG-D0 to GPIO18
WG-D1 to GPIO19
TTL-TX to GPIO16
TTL-RX to GPIO17
GND to GND
All wires to battery
Red wire from 12V to +
Black wire from GND to –
Open button
Black wire from GND to – of the button
Red wire from GPIO14 to + of the button
12V to 5V USB Micro Adapter
Black wire to –
Red wire to +
USB-C to ESP32
Relay + slot
Relay 5V – slot 12V
All wires to ESP32
VCC to 5V
INL to GPIO25
GND to GND
All wires to the terminal
Red wire from COM to +
Red wire from NO to the terminal
Black wire from the terminal to –
Solar panel
*How much does it need?*
Red cable to + on the solar charge controller
Black cable to - on the solar charge controller
Solar charge controller
Red cable to + on the solar charge controller
Black cable to - on the solar charge controller
Battery 12V
QR scanner
How does UART work?
Create a QR code with text or URL
Scan the QR code with the correct text or URL and the gate will open.
You can create your own text and URLs.
How does Wiegand work?
You need a library (Wiegand).
It recognizes D0 & D1 pulses.
Data is converted into an ID, which I can use.
I need help making an esp32 door lock
-
ChosselLuc
- Posts: 3
- Joined: Wed Sep 17, 2025 12:53 pm
I need help making an esp32 door lock
- Attachments
-
- Schermafbeelding 2025-09-17 144634.png (655.27 KiB) Viewed 1223 times
-
ahsrabrifat
- Posts: 201
- Joined: Sat Jan 18, 2025 2:31 pm
Re: I need help making an esp32 door lock
Your scanner requires 12V, but the ESP32 only accepts 5V. You’ll need a buck converter (12V → 5V) to feed the ESP32 (not a USB micro adapter unless it’s rated properly). The relay must also match your logic: If it’s a 5V relay module, then power it from the buck’s 5V output.
-
ChosselLuc
- Posts: 3
- Joined: Wed Sep 17, 2025 12:53 pm
Re: I need help making an esp32 door lock
Okay, thanks for the explanation. I'll use a 12V to 5V buck converter and connect it to the 5V supply. However, the relay is already connected to the 5V supply. Is that possible, or not a good idea? Would I be better off using a 3V relay?Your scanner requires 12V, but the ESP32 only accepts 5V. You’ll need a buck converter (12V → 5V) to feed the ESP32 (not a USB micro adapter unless it’s rated properly). The relay must also match your logic: If it’s a 5V relay module, then power it from the buck’s 5V output.
-
ahsrabrifat
- Posts: 201
- Joined: Sat Jan 18, 2025 2:31 pm
Re: I need help making an esp32 door lock
Powering the 5V relay from the same 5V buck that feeds the ESP32 is fine. The buck converter simply produces a 5V rail. Any number of 5V devices (ESP32 via USB, a 5V relay module, QR module if 5V TTL, etc.) can share that rail if the buck can supply the total current simultaneously. All devices must share a common ground with the ESP32 and the buck.
-
microfoundry
- Posts: 4
- Joined: Tue Dec 19, 2023 3:06 pm
Re: I need help making an esp32 door lock
If you haven't seen this project, please take a look at ESP32 RFID. It seems to be a very complete project with a nice interface.
-Terry
-Terry
-
ChosselLuc
- Posts: 3
- Joined: Wed Sep 17, 2025 12:53 pm
Re: I need help making an esp32 door lock
i have this now.Powering the 5V relay from the same 5V buck that feeds the ESP32 is fine. The buck converter simply produces a 5V rail. Any number of 5V devices (ESP32 via USB, a 5V relay module, QR module if 5V TTL, etc.) can share that rail if the buck can supply the total current simultaneously. All devices must share a common ground with the ESP32 and the buck.
- Attachments
-
- TEKENING DEURSLOT - ACCU V3.png (1.3 MiB) Viewed 1142 times
Who is online
Users browsing this forum: Google [Bot], Qwantbot and 4 guests