need help!! using analog sensor out to control 12v dc motor

i need to control the water level for a project, using uno, water level sensor and a 12v dc pump. need to use the water level reading to control the on/off of the motor.

What have you tried?

@OP

Try this tutorial.

If you really want help you will need to supply more information. Read the how to use this forum-please read sticky to get an idea of the information that we need to help you.

valdr28:
i need to control the water level for a project, using uno, water level sensor and a 12v dc pump. need to use the water level reading to control the on/off of the motor.

We know what an Arduino uno is, but what are you using for a water level sensor? What are you using for the 12v dc pump? What are you using to control the pump on/off? Are you pumping water into the container or are you pumping it out of the container? What are using to power all the components?

Paul

is it a good idea to use pwm pins to control the 12v motor without any shield/driver?

(deleted)

Paul_KD7HB:
We know what an Arduino uno is, but what are you using for a water level sensor? What are you using for the 12v dc pump? What are you using to control the pump on/off? Are you pumping water into the container or are you pumping it out of the container? What are using to power all the components?

Paul

the analog water level sensor I'm using works as in the above mentioned code. was thinking of using the if condition statements to use the pump to fill water into the container and stop it once it reaches the required level. since the motor is 12v, i was thinking of using a relay maybe, want to know if its possible to do this without motor drive

spycatcher2k:
Good luck running your 12V pump with a 40mA 5V output. :slight_smile:

yeah, figured I'd use a relay for the 12v

You will need a driver for the relay as most relays require more current than the 20mA recommended* maximum current from a pin. That is often done using a logic level MOSFET. So, why not just drive the motor with a MOSFET. You will need to know the stall (starting) current of the motor to, intelligently, choose a driver.

*40mA is the absolute maximum pin current.

(deleted)