4.2 Pumping

In this intriguing project, we will delve into controlling a water pump using the L293D.

In the realm of water pump control, things are a bit simpler compared to controlling other motors. The beauty of this project lies in its simplicity - there’s no need to worry about the direction of rotation. Our primary goal is to successfully activate the water pump and keep it running.

Required Components

In this project, we need the following components.

It’s definitely convenient to buy a whole kit, here’s the link:

Name

ITEMS IN THIS KIT

LINK

ESP32 Starter Kit

320+

ESP32 Starter Kit

You can also buy them separately from the links below.

COMPONENT INTRODUCTION

PURCHASE LINK

ESP32 WROOM 32E

BUY

ESP32 Camera Extension

-

Breadboard

BUY

Jumper Wires

BUY

Centrifugal Pump

-

L293D

-

Available Pins

Here is a list of available pins on the ESP32 board for this project.

Available Pins

IO13, IO14, IO27, IO26, IO25, IO33, IO32, IO15, IO2, IO0, IO4, IO5, IO18, IO19, IO21, IO22, IO23

Schematic

../../_images/circuit_4.1_motor_l293d.png

Wiring

Note

It is recommended here to insert the battery and then slide the switch on the expansion board to the ON position to activate the battery supply.

../../_images/4.2_pump_l293d_bb.png

Code

Note

  • You can open the file 4.2_pump.ino under the path of esp32-starter-kit-main\c\codes\4.2_pump.

  • After selecting the board (ESP32 Dev Module) and the appropriate port, click the Upload button.

  • Always displaying “Unknown COMxx”?

Connect the tubing to the pump and place it inside the water-filled container. Once the code has been successfully uploaded, you will observe the water in the container gradually being drained. During this experiment, please ensure that the electrical circuit is kept away from water to prevent short-circuiting!