Control Solenoid Valve Using Arduino
by hIOTron IoT in Circuits > Arduino
8388 Views, 10 Favorites, 0 Comments
Control Solenoid Valve Using Arduino
This project is how to control the solenoid valve for various applications that can be used to open or close water or gas pipelines.
Supplies
Arduino Uno
Solenoid 12v
IRF540 MOSFET
Pushbuttons
Register 10k ohm
1N4007 Diode
Breadboard
Connecting Wires
Project Story
The solenoid is generally used as an actuator in various process automation systems. There are solenoid valves that can be also used to open or close water or gas pipelines.
The Doorbell also has a plunger-type solenoid coil inside it, which when energized by AC power source will shift a small rod up and down.
This rod will hit the metal plates situated on either side of the solenoid to generate the soothing ding dong sound. It is also used as starters in vehicles or as a valve in RO and sprinkler systems.
As we all know solenoid converts electrical energy into mechanical energy that has a coil wound over the conductive material. Generally, we used a 12V solenoid valve which is used in controlling the flow of liquids.
Learn more about IoT Training in Pune which will helps to build Customized IoT Solutions with its practical implementations.
Controlling the Solenoid valve using Arduino:
After updating the complete code into the Arduino, we will be able to turn on and off the solenoid with the help of two pushbuttons. An LED is also connected with solenoid for indication purposes. When we press button 1, Arduino sends a HIGH logic to the gate terminal of the MOSFET IRF540, connected on the 9th pin of the Arduino.
IRF540 is an N-Channel MOSFET, so when its gate terminal gets HIGH, it enables the flow of current from drain to source and turns the solenoid on. Similarly, when we press the button 2, Arduino sends a LOW logic to the gate terminal of the MOSFET IRF540 which turns the solenoid off.
And after completion of all steps, this is the final outcome of the project.
Circuit Schematic
Run a Program
void setup() {
pinMode(9, OUTPUT);
pinMode(2, INPUT);
pinMode(3, INPUT);
}
void loop() {
if(digitalRead(2)==HIGH)
{
digitalWrite(9,HIGH);
delay(1000);
}
else if(digitalRead(3)==HIGH)
{
digitalWrite(9,LOW);
delay(1000);
}
}