I built a servo valve (AKA proportional solenoid valve) using a simple ball valve and a high torque RC servo. Total cost ~$35. This valve can control the flow rate of water through it via an Arduino or any other microcontroller.
If you don't have a 3D printer yet, you should probably get one, only costs $200!
Ender 3 3D Printer: https://amzn.to/3nmuJId
Ball Valve: https://www.supplyhouse.com/Bluefin-BVT050-NP-1-2-Full-Port-Threaded-Ball-Valve
High Torque 20kg RC Servo: https://amzn.to/3u217Sm
High Torque 30kg RC Servo: https://amzn.to/3w7CZiY
Arduino Uno: https://amzn.to/3mbxmvL
Jumper Cables for Arduino: https://amzn.to/3fjvdfW
PLA 3D Printed Parts: https://www.thingiverse.com/thing:3496770/files