ir sensor + mini water pump (3-6v) + specific time

Please help
I need control water pump with ir sensor but pump must work only 1 - 5 seconds regardless of the fact that the object is still in front of the sensor.

arduino NANO ( or UNO)
mini pump 3-6v
ir sensor
??

Can anyone help with the scheme and program?
I am new to arduino

best regards

You will need a driver for the pump. An Arduino output cannot supply enough current to run a motor. The driver can be a relay, transistor or motor driver. I recommend a logic level MOSFET. You will need to know the motor stall current to be able to intelligently choose a driver.

The state change detection tutorial shows how to detect switch transitions. That will help with the IR sensor activation part. Look in the IDE digital examples.

groundFungus

thank you

Iam exactly looking for a very similar project! Iam new to aurdino. If you've figured it out, kindly help me!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.