I am making a water sensing system that uses a water sensor to activate a DC motor. I looked on the web but I could not find any tutorial or code for it. Can you pls help me code and make it pls.
Could you show us what sensor and motor you are using? Also a suggestion when using a DC motor: Because they draw a decent amount of current, the Arduino cannot always supply enough, so I would suggest using a H-Bridge or motor controller that can use the Arduino's signal activate the motor. If it is a small, low torque motor you might be able to connect it to the Arduino directly without hurting it (I wouldn't recommend this though).
Hello tiger-7052
Check this blockdiagram and post the information about the devices, like water sensor and motor, a.m. to continue.
Have a nice day and enjoy coding in C++.
As ep01526 said, you should provide details of what hardware you have. Or does your ask for help start before that, and you need help in finding / specifying the hardware first?
No coding can happen without knowing the hardware, but nor can coding start (even given the hardware) without knowing exactly what you require the system to do. To say "a water sensing system that uses a water sensor to activate a DC motor" is not enough, so perhaps you should share with us what you want the thing to do. Give it a try at least in pseudo-code; to my mind, asking for help means that you go first
The hardware is an analog Funduino water sensor a 12 volt dc motor and an arduino UNO
I have various "12 volt dc motors" that take anything from 0.1A to over 50A (and that's not counting the 12V starter motor in my car that can take 200A or more). Details are important. A link to a specification or at least to where you got the motor from might help.
Steve
.... of the sensor would be good too, to save us hunting it down at Funduino and then perhaps getting the wrong one and giving duff advice.
Your motor is certainly going to need a driver of some sort. Presumably it's actually a pump, so only needs to turn one direction? It will need at least a transistor and a fly-back diode, and be connected something like this:
I see btw there are a zillion hits for Funduino water sensor, so have you tried to get the sensor working just by itself, without worrying about the motor? That's always the way to go about these projects anyway: get the various parts working independently of one another before integrating them.
If I were you I would at least get that sensor sorted, and have it reliably reporting the presence or absence of water (or depth of water if that's what it's supposed to give) to you in the serial monitor.
Then when you have the parts needed to drive the motor, get that working in a sketch of its own too. You could conceivably run it with blink or blink without delay just to turn it on and off to check it's working.
(Does this mean you finished the other project you were asking about yesterday?)
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.