Hi there, I’m working on building an autonomous spraying system controlled using a Raspberry Pi 4 that consists of a water pump and solenoid valve. Many tutorials I have seen online use an Arduino to control the pump and I was wondering if both pump and valve can be activated on a single Raspberry Pi via a multi-channel relay. What would you suggest as the best approach for controlling the water flow rate in this system? (Interested if any HATs might be helpful!) My aim is to create a system that remains off until a short burst of spraying is triggered - repeating this process until the water tank empties. Any thoughts/recommendations are very appreciated! Thank you
Hi Greta, welcome to the forum!
Yep, you could do this, is there valve there to stop a leak when the pump is off? If you pick a pump and solenoid that call for the same voltage you could even do it on one relay. The main thing to keep in mind comparing Arduinos and Pis is that Pis have 3.3V logic, and older arduinos usually run at 5V.
With a MOSFET or motor driver, you could modulate the duty cycle of the pump to lower the flow. There are a ton of different options here that vary wildly in price and capabilities, we’ll need a bit more info on the pump and solenoid to give an accurate suggestion. Here’s an example:
Keen to hear/see more about the rest of your project!