This is an old revision of the document!


Introduction

The objective of this project is to create a smart lock for doors using an ESP32 module acting as a asynchronous web server, which will receive HTTP GET commands from an android application.

Hardware

Main components:

ESP-WROOM-32s

5V Relay

Electromagnetic lock

12V Source

Components for NPN transistor switch:

10k resistor

2k resistor

NPN 2n2222 transistor

Circuit Diagram

Because in the relay needs 5V on the IN pin, the ESP32 GPIO pin (which uses only 3.3V) won't be enough to turn it ON/OFF. As a workaround, the whole Relay will be connected to the 5V Vout of the ESP32, but on the IN pin we will use a NPN 2n2222 transistor switch that will be controlled by the 3.3V GPIO in other to turn ON/OFF the 5V.

Circuit diagram of the NPN 2n2222 transistor switch:

Software

Arduino (ESP32 Coding)

Connecting ESP32 to WiFi and making it a webserver.

Android

Connecting the Android application to ESP32.

Sending HTTP requests

Conclusions

Bibliography

iothings/proiecte/2021/doorsmartlock.1643020853.txt.gz · Last modified: 2022/01/24 12:40 by mihai_florin.neacsu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0