Hi we are a students and our project is water dispenser with soap dispenser, we are using 9v to arduino uno r3. When we ON the arduino the sensor can sense then the water pump is working well however after 3 attempt it's not working well. The water in pump would flow continuously, that's our concern. Why it's not working well after the 3rd attempt?
Also when our water pump is working the soap pump is also working, it's should not be like that, it's should work if the sensor has sense something.
the sanitizer is not included, and we're not using 12v in arduino because it's not available at the moment we also don't have 5v in pump, would it work if don't have power source in pump?
Go back to the beginning of project guidance. Now read this and other things you should have read before posting. Gee maybe the problem is in the code you failed to post or maybe the schematic you failed to post?
Do not power the relays with the arduino 5v power pin.
There should be kickback diodes across the pumps.
In the Arduino IDE, use CtrlT or CMDT to format your code then copy the complete sketch.
Use the < CODE / > icon from the ‘posting menu’ to attach the copied sketch.
You should use two dedicated power supplies (maybe three). Use one power supply for the Arduino (in this image, "12vdc") and at least one external power supply for peripheral devices - sensors, relays and pumps (in this image, "5vdc"). If needed, use two 5vdc power supplies for peripheral devices - one power supply for sensors and relays, the second power supply for pumps.