Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP32-Controlled Peristaltic Pump with Ultrasonic Sensing and IR Detection

Image of ESP32-Controlled Peristaltic Pump with Ultrasonic Sensing and IR Detection

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 LM2596 IN+ and L298N 12V
  • - connected to LM2596 IN- and L298N GND

LM2596 Step Down Module

  • OUT- connected to ESP32 G
  • OUT+ connected to ESP32 5V

ESP32 - Expansion Board

  • D32 connected to L298N IN2
  • D33 connected to L298N IN1
  • D27 connected to HC-SR04 ECHO
  • D14 connected to HC-SR04 TRIG
  • D12 connected to IR Sensor out
  • D2 connected to LED cathode
  • 3.3V connected to HC-SR04 VCC and IR Sensor vcc
  • G connected to HC-SR04 GND, IR Sensor gnd, and LED anode

L298N DC Motor Driver

  • OUT1 connected to Peristaltic Pump Coil1
  • OUT2 connected to Peristaltic Pump Coil2

HC-SR04 Ultrasonic Sensor

  • VCC connected to ESP32 3.3V
  • TRIG connected to ESP32 D14
  • ECHO connected to ESP32 D27
  • GND connected to ESP32 G

IR Sensor

  • out connected to ESP32 D12
  • vcc connected to ESP32 3.3V
  • gnd connected to ESP32 G

Peristaltic Pump

  • Coil1 connected to L298N OUT1
  • Coil2 connected to L298N OUT2

LED: Two Pin (Red)

  • cathode connected to ESP32 D2
  • anode connected to ESP32 G

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.