You are on page 1of 5

Circuit diagram

Circuit diagram

+5V

U1
MAIN U3 U2 7805
1 4 2 5
ACN +VOUT -INPUT -OUTPUT
2 3 1 4 1 3
ACL -VOUT +INPUT COMMON VI VO
3
+OUTPUT

GND
DC Adaptor
MB102

2
LCD1
LM016L

Q3
VDD
VSS

VEE

RW
RS

Q1
D0
D1
D2
D3
D4
D5
D6
D7
R3 R5
E

TIP41
1k 1k
1
2
3

4
5
6

7
8
9
10
11
12
13
14

RV1 TIP41

D0 D25 Q4
D1 D24
+88.8
D2 D23
R4 Q2 R6
D3 D22 TIP41

10k
D4
D5
NODEMCU D21
D20
1k 1k
D6 D19
D7 D18 TIP41
D8 D17
D9 D16
D10 D15
D11 VCC
D12 GND

HC1 HC2
ULTRASONIC SENSOR ULTRASONIC SENSOR
ECHO

ECHO
TRIG

TRIG
GND

GND
VCC

VCC
Circuit diagram

Description:

The circuit consists of power supply unit, display, control and logic unit as well as motor driving unit.

Power unit of the circuit comprises of dc adapter, MB102 dc power module and LM7805 voltage regulator. Dc adapter is plugged to socket outlet to provide
constant voltage of 12V and maximum of current of 3.0 Ampere. The output of the DC adapter is connected to the MB102 dc module through DC jack of on
the module. MB102 power module regulates the 12V from the DC adapter to 5V and 3.3V respectively. Esp32 microcontroller module, both front and back
ultrasonic sensors and LCD are powered from the output of the MB102 module. However, in other to protect our delicate components, DC motor was not
power from the output of MB102. Instead, a separate regulator was used to regulate 12V from DC adapter to 5V to power the power and to biased the
motor driver unit.

U1
MAIN U3 U2 7805
1 4 2 5
ACN +VOUT -INPUT -OUTPUT
2 3 1 4 1 3
ACL -VOUT +INPUT COMMON VI VO
3
+OUTPUT

GND
DC Adaptor
MB102

2
Control unit consists of ESP32 microcontroller whose responsibility is to execute the instructions(program or code) stored in its program memory
accordingly. It sends necessary information to the LCD for display and signals to the motor driver unit for controlling the motor rotation in different
Circuit diagram

directions. It has built-in WIFI module that allows it to be configured as a client that can communicate with a server and another client through internet
connection. Server sits in between ESP32 and user device( mobile phone). Any data or command a user sends to the server, it will be relayed to the
corresponding ESP32 microcontroller and vice versa. Thereby allowing the user to control and view the status of the gate from anywhere in the world as
long as there is internet access.

Display unit is responsible for decoding what microcontroller sends to its for display.

Motor driving unit ensures current flow through the DC motor based on the signal applied to its input. The flow of current causes rotation of motor in either
clockwise or anticlockwise directions. It has 4 transistor connected to H-bridge such that saturating two transistor along a diagonal(the other 2 transistors
on the other diagonal being cut-off) will make the motor rotate in a given direction and vice versa.

Principle of operations:

When the circuit is powered, ESP32 tries to connect to the WIFI whose named(ssid) and password matches the preconfigured credentials( through code).

If it successfully connects to the desired WIFI, it will continually searches for presence of objects within the specified range of object detection. When an
object is detected within the range, gate will be opened through motor driving unit and notification will be sent to the server through the internet.
Otherwise the gate remains closed. User(i.e. an operator) can view the notification using the Blynk application installed on mobile phone.

Through Blynk application, user can change the mode of operation of the system to either manual or automatic. In manual mode, sensors are deactivated.
Hence, operator has to manually open and close the gate using the control button in the application. On the other hand, if the mode of operation is set to
automatic, sensors will be activated and pressing of the control button in the application will be ignored.
U3
U2
LCD1
DC
VI
A
MB102
-C
+
LM016L
+5V
8
0
7
6
W
5
R
4
S
1
D
2
V
E
3VOUT
OUTPUT
INPUT
VOUT
OUTPUT
INPUT
CL
CN
OMMON
Adaptor

Circuit diagram

ESP32 microcontroller and user’s mobile phone( with Blynk application installed) are clients in a communication that is manged by a server hosted by Blynk
company somewhere. User and ESP32 microcontroller do not directly communicate. Their communication is through the Blynk server.

You might also like