ActuatorsSolenoid
5V Mini Solenoid Water Valve
Compact solenoid valve for automated watering and dosing.
Wiring & code for
Solenoid Valve 5V practical reference
A small normally-closed solenoid valve used in automated plant watering, beverage-dispensing, and liquid-dosing projects.
Key specifications
- Operating voltage: 5 V DC (12V variants are also common — check your specific valve's rating before powering it)
- Current draw: ~400-650 mA while energized
- Valve type: Normally-closed (NC), 2-way — opens only while powered, closes automatically when power is removed
- Max working pressure: ~0.02-0.8 MPa typical for small hobby valves, model-dependent
Pinout and connection notes
The coil is an inductive load — always include a flyback diode across it, in parallel with the transistor/MOSFET switching it, or the switching transistor will fail from the voltage spike on turn-off.
- +: Coil positive lead — through a transistor/MOSFET, never straight from a GPIO pin
- -: Coil negative lead
Integration checklist
- Confirm the exact part number and breakout-board revision.
- Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
- Check controller pin assignments and bus address or interface mode against the example code.
- Power up with external loads disconnected, then test signals before full integration.
- If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.
Troubleshooting and reproducibility
Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.