ESP32-Controlled Peristaltic Pump with Ultrasonic Sensing and IR Detection
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is designed to control a peristaltic pump using an ESP32 microcontroller, which also interfaces with an ultrasonic sensor (HC-SR04), an infrared sensor, and an LED indicator. The power supply for the circuit is a 12V source, which is stepped down to 5V using an LM2596 step-down module to power the ESP32 and other 5V components. The L298N motor driver module is used to drive the peristaltic pump and is also powered by the 12V supply. The ESP32 controls the motor driver inputs and reads signals from the sensors to perform its intended functions.
Component List
12V Power Supply
- Description: Provides the primary voltage source for the circuit.
- Pins:
+,-
LM2596 Step Down Module
- Description: Steps down the voltage from 12V to 5V for the ESP32 and other 5V components.
- Pins:
OUT-,OUT+,IN-,IN+
ESP32 - Expansion Board
- Description: Microcontroller board used for controlling the various components in the circuit.
- Pins:
+,-,EN,VP,VN,D34,D32,D33,D25,D26,D27,D14,D12,D13,D23,D22,TX0,RX0,D21,D19,D18,D5,D17,D16,D4,D2,D15,VCC,G,5V,3.3V,V
L298N DC Motor Driver
- Description: Drives the peristaltic pump motor.
- Pins:
OUT1,OUT2,12V,GND,5V,OUT3,OUT4,5V-ENA-JMP-I,5V-ENA-JMP-O,+5V-J1,+5V-J2,ENA,IN1,IN2,IN3,IN4,ENB
HC-SR04 Ultrasonic Sensor
- Description: Measures distance via ultrasonic waves.
- Pins:
VCC,TRIG,ECHO,GND
IR Sensor
- Description: Detects proximity using infrared light.
- Pins:
out,gnd,vcc
Peristaltic Pump
- Description: A type of positive displacement pump used for pumping various fluids.
- Pins:
Coil1,Coil2
LED: Two Pin (Red)
- Description: Acts as an indicator light.
- Pins:
cathode,anode
Wiring Details
12V Power Supply
+connected to LM2596IN+and L298N12V-connected to LM2596IN-and L298NGND
LM2596 Step Down Module
OUT-connected to ESP32GOUT+connected to ESP325V
ESP32 - Expansion Board
D32connected to L298NIN2D33connected to L298NIN1D27connected to HC-SR04ECHOD14connected to HC-SR04TRIGD12connected to IR SensoroutD2connected to LEDcathode3.3Vconnected to HC-SR04VCCand IR SensorvccGconnected to HC-SR04GND, IR Sensorgnd, and LEDanode
L298N DC Motor Driver
OUT1connected to Peristaltic PumpCoil1OUT2connected to Peristaltic PumpCoil2
HC-SR04 Ultrasonic Sensor
VCCconnected to ESP323.3VTRIGconnected to ESP32D14ECHOconnected to ESP32D27GNDconnected to ESP32G
IR Sensor
outconnected to ESP32D12vccconnected to ESP323.3Vgndconnected to ESP32G
Peristaltic Pump
Coil1connected to L298NOUT1Coil2connected to L298NOUT2
LED: Two Pin (Red)
cathodeconnected to ESP32D2anodeconnected to ESP32G
Documented Code
No code was provided for the microcontrollers in the circuit. The documentation of the code would typically include a description of the functionality, setup, and loop sections, along with any functions or libraries used to control the components and manage the logic of the circuit. Since no code is available, this section cannot be completed.