How to use potentiometer to control water pump?

Hi, I'm new to Arduino. But how to use a potentiometer to display amount of water in a LCD screen that I want to output through a 12v DC Brushless water pump? Can you explain on how to do it and what is the code to it? Thanks in advance.

Things that I have:

Relay module
LCD screen
12v DC water pump
12v battery
Arduino Uno R3
Potentiometer

Your description of what you want to do is very vague.

  • What do you want to appear on the LCD screen - give us an example?
  • What is the potentiometer intended to do with the text on the screen?
  • How is all that related to the pump?

...R

Robin2:
Your description of what you want to do is very vague.

  • What do you want to appear on the LCD screen - give us an example?
  • What is the potentiometer intended to do with the text on the screen?
  • How is all that related to the pump?

...R

i) I want it to appear like : "Set an amount of water to output"

ii) So you can set the amount of water to output on the LCD screen.

iii) Use the LCD screen as display, use the potentiometer to set the amount of water to be outputted, use the water pump to output the water

I don't know what your experience is so I suggest you break your learning into a number of steps.

First, write a short program that allows you to store a value in a variable that is adjusted by the potentiometer and then display the value on the Serial Monitor.

Then write a separate short program to display "hello world" on the LCD. When you can do that extend that program a little so it can also display a value from a variable.

And write a third short program to learn how to make the pump go on and off.

You have not said how you propose to control the amount of water that gets pumped - if the plan is to run the pump for different amounts of time then include in your short pump program the ability to make it work for an amount of time that you set when compiling the program.

When you can do all the parts separately it will be time to think about bringing them together.

...R

You will also need a custom speed controller for a DC brushless motor

Assuming you know the pump's flow rate, an adjustable timer could work. Desired volume could be dialed with the pot, displayed and required run time computed and sent to a millis timer that switches the pump on/off.