Solenoid valve is small device which controls water or air flow.
Arduino can operate this valve using relay.
Relay works like switch.
Arduino gives signal to relay.
Relay turns valve ON or OFF.
This project for Solenoid Valve Control Circuit using Arduino is simple and useful.
Arduino Coding:
void setup() {
pinMode(7, OUTPUT);
}
void loop() {
digitalWrite(7, HIGH);
delay(5000);
digitalWrite(7, LOW);
delay(5000);
}
Coding Explanation:
- pinMode sets pin 7 as output pin.
- digitalWrite HIGH sends 5V signal to relay.
- Relay turns ON solenoid.
- delay 5000 keeps valve open 5 seconds.
- digitalWrite LOW turns relay OFF.
- Valve closes.
- delay is again for 5 seconds.
- Loop repeats.
Circuit Working:

Parts List:
| Item | Quantity |
|---|---|
| Arduino UNO | 1 |
| 5V Single Channel Relay | 1 |
| USB Cable | 1 |
| 12V DC Power Supply | 1 |
| 12V Connector | 1 |
| 12V DC Solenoid Valve | 1 |
12 volt solenoid valve needs high power.
Arduino cannot give this power.
So relay is used in middle.
Arduino sends low power signal to relay input pin.
Relay coil becomes active.
Relay connects 12 volt power to solenoid valve.
Valve opens.
When Arduino pin goes low then relay turns OFF.
Relay disconnects 12 volt supply.
Valve closes.
Arduino and relay share common ground.
Formula with Calculation:
Relay coil voltage = 5V from Arduino
Solenoid valve voltage = 12V from power adapter
Current of valve = around 300 mA typical
Arduino pin current = around 20 mA max safe
Relay isolates Arduino from high current load
Power of valve = Voltage x Current
Power = 12V x 0.3A = 3.6 Watt
How to Build:
To build a Solenoid Valve Control Circuit using Arduino follow the below steps:
- Gather all the parts as shown in circuit diagram.
- Arduino 5V to relay VCC.
- Arduino GND to relay GND.
- Arduino digital pin 7 to relay IN pin.
- 12V DC power positive connect to relay common terminal COM.
- Relay normally open terminal NO to solenoid valve positive wire.
- Solenoid valve negative wire goes to 12V DC power negative.
- The positive pin of the Connector goes to Relay module COM terminal.
- The negative pin of the Connector goes to Solenoid valve negative wire.
- Make sure Arduino GND and 12V negative join together for common reference.
Conclusion:
This Solenoid Valve Control Circuit using Arduino is easy for control system.
Arduino cannot drive solenoid directly.
Relay gives safe switching.
Circuit is simple and cheap.
Good for beginners.
Useful for water control, irrigation and automation.
Leave a Reply