1.4 Pumping

The water pump is also a motor, which converts the mechanical energy of the motor or other external energy through a special structure to transport the liquid.

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

3 in 1 Starter Kit

380+

3 in 1 Starter Kit

You can also buy them separately from the links below.

COMPONENT INTRODUCTION

PURCHASE LINK

SunFounder R3 Board

BUY

Jumper Wires

BUY

L298N Module

BUY

Centrifugal Pump

-

Schematic

../_images/circuit_1.3_wheel.png

IN1~IN4 are the inputs of the L298N module, and OUT1~OUT4 are the outputs.

A simple way to use them is: input high level for INx, OUTx will output high level; input low level for INx, OUTx will output low level. Connecting the two ends of the motor to OUT1 and OUT2, inputting opposite level signals for IN1 and IN2 will make the motor rotate. OUT3 and OUT4 can be used in the same way.

Wiring

L298N

R3 Board

Motor

12V

5V

GND

GND

IN3

9

IN4

10

OUT3

one wire of the motor

OUT4

one wire of the motor

../_images/pumping_bb.jpg

Code

Note

  • You can open the file 1.4.pumping.ino under the path of 3in1-kit\basic_project\1.4.pumping.

  • Or copy this code into Arduino IDE.

  • Or upload the code through the Arduino Web Editor.

Add the tubing to the pump and place it in the basin. After the code is uploaded successfully, you can see that the water in the basin is drained after a while. When doing this experiment, please keep the circuit away from water to avoid short circuit!