0

members

Easy Basics: Project 071c 12V solenoid valve

of Acoptex.com in UNO

Basics: Project 071c

Project name: 12V solenoid valve

Tags: Arduino Uno, solenoid valve,  Plastic Water Solenoid Valve, electromagnetic valve, 12V solenoid valve, Gravity Feed Electric Solenoid Valve DDB-CD-12VDC

Attachments: sketch

In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):

1.Arduino Uno R3 (you can also use the other version of Arduino)

2.Arduino IDE ( you can download it from here  )

3.Jumper cables M-M, F-M

4.Breadboard 1 pc

5. Electromagnetic valve (solenoid valve) 12V 1pc

6. 9VDC external power supply for Arduino Uno board 1 pcs

7. Diode 1N4007 or 1N4001 1 pc

8. TIP120 Darlington Transistor 1 pc

9.  Resistor 1KOhm 1 pc

General

We will learn how to connect 12V solenoid valve to Arduino board and use it.

Understanding the electromagnetic valve (solenoid valve)

Solenoids

Electric solenoids work on similar electromagnetic principles to those of DC motors, however, solenoids can use the magnetic energy to push or pull something rather than turn it. Solenoids are found in paintball guns, pinball machines, printers, valves and even automobiles.

A Solenoid is a coil that when energised, produces a controlled magnetic field down through its centre. By placing a magnetic armature inside that field, the armature can move in or out of the coil. Team this with our Arduino and we open up a number of interesting applications.

The solenoid's strength (the force it can push or pull) is directly proportional to windings of the coil and the current applied. This means that more coils equal greater magnetic fields and greater force. A small design specification for this type of coil is that it must be longer than it is wide, ensuring the magnetic field runs through the centre and allows the in/out movement discussed above.

Common characteristics of solenoid:

  • Throw – This refers to the length of the armature that will be moving in and out of the solenoid.
  • Mounting options – Most solenoids have mounting holes in the case so that your armature can actually push and/or pull its load. Otherwise, the solenoid would likely push itself around instead of the load!
  • Duty cycle – This is expressed as a percentage of time the solenoid is switched on for. For example, if a solenoid is energised for 30 seconds before switching off for 30 seconds, its duty cycle is 50%.
  • Operating Voltage – Similarly to DC motors, this refers to the ideal voltage needed for the solenoid to run optimally. If you apply a lesser voltage you can expect a slower and weaker throw.
  • Starting Force – Measured in Newtons, this is the force the solenoid will have at the beginning of its movement.
  • Actuation Time – The time taken from switch-on to completion of the stroke.

Solenoid valves

A solenoid valve is an electromechanical valve which is normally used for the fluid control of water, air, oil or gas.

They are made up of two components:

i) the solenoid (essentially consisting of a coil, core, core tube, shading coil and spring)

ii) the valve (the body containing orifices in which the disc, diaphragm or piston is positioned).

The solenoid is a coil which has a current passed through it when it is energised. The current causes a magnetic field which moves the core up or down. This movement is what essentially opens or closes the solenoid valve body. If the valve is opened, fluid is allowed to pass. If the valve is closed, fluid will be blocked.

Now for some terminology explanations:

  • Solenoid Coil – the coil is the electrical part and consists of a spool wound with insulated copper wire. A magnetic field is created when the coil is energised.
  • Core – a soft magnetic plugnut which is moved by magnetic forces.
  • Core Spring – the spring is used to keep the core in its fixed position.
  • Disc, Valve disc – the sealing material on the disc holder which shuts the seat orifice.
  • Disc Holder – part of the valve which is actuated by the core.
  • Pilot Orifice – this is located in the centre of the diaphragm and is opened or closed by the core.
  • Seating or Valve Seat – this is a specially formed boarder of the valve seat.

There are many valve design variations. Ordinary valves can have many ports and fluid paths. A 2-way valve, for example, has 2 ports; if the valve is open, then the two ports are connected and fluid may flow between the ports; if the valve is closed, then ports are isolated. If the valve is open when the solenoid is not energized, then the valve is termed normally open (N.O.). Similarly, if the valve is closed when the solenoid is not energized, then the valve is termed normally closed.[1] There are also 3-way and more complicated designs.[2] A 3-way valve has 3 ports; it connects one port to either of the two other ports (typically a supply port and an exhaust port).

There are many valve design variations. Ordinary valves can have many ports and fluid paths. A 2-way valve, for example, has 2 ports; if the valve is open, then the two ports are connected and fluid may flow between the ports; if the valve is closed, then ports are isolated. If the valve is open when the solenoid is not energized, then the valve is termed normally open. Similarly, if the valve is closed when the solenoid is not energized, then the valve is termed normally closed. There are also 3-way and more complicated designs. A 3-way valve has 3 ports; it connects one port to either of the two other ports (typically a supply port and an exhaust port).

Solenoid valves are also characterized by how they operate. A small solenoid can generate a limited force. If that force is sufficient to open and close the valve, then a direct acting solenoid valve is possible. When high pressures and large orifices are encountered, then high forces are required. To generate those forces, an internally piloted solenoid valve design may be possible. In such a design, the line pressure is used to generate the high valve forces; a small solenoid controls how the line pressure is used. Internally piloted valves are used in dishwashers and irrigation systems where the fluid is water, the pressure might be 80 psi (550 kPa) and the orifice diameter might be 3⁄4 in (19 mm).

In some solenoid valves the solenoid acts directly on the main valve. Others use a small, complete solenoid valve, known as a pilot, to actuate a larger valve. While the second type is actually a solenoid valve combined with a pneumatically actuated valve, they are sold and packaged as a single unit referred to as a solenoid valve. Piloted valves require much less power to control, but they are noticeably slower. Piloted solenoids usually need full power at all times to open and stay open, where a direct acting solenoid may only need full power for a short period of time to open it, and only low power to hold it.

A direct acting solenoid valve typically operates in 5 to 10 milliseconds. The operation time of a piloted valve depends on its size; typical values are 15 to 150 milliseconds.

The solenoid valve would make a great addition to your robotic gardening project or drip irrigation system. There are two 1/2" or 3/4" (Nominal non-taped National Pipe) outlets. Normally, the valve is closed. When 12VDC is applied to the two terminals, the valve opens and water can push through. The valve has a gasket arrangement inside, so there is a minimum pressure requirement of 0.02 Mpa (3 PSI). Also, liquid can only flow one direction.

You need to remember that:

  1. Water can only flow in one direction through this valve.
  2. There is a 3 PSI minimum pressure requirement on the inlet otherwise the valve will not shut off.
  3. This solenoid valve is not rated for food safety or use with anything but water.

Specification:

  • Type: Solenoid Valve
  • Material: Metal, Plastic
  • Color: White
  • Voltage: DC 12V
  • Pressure: 0.02 - 0.8 Mpa
  • Max. Fluid Temperature: 100°C
  • Operation Mode: Normally Closed
  • Inlet and Outlet: Hose Barbs for 1/2" (Outer Diameter) Hose
  • Usage: Water and Low Viscosity Fluids
  • Valve Type: Diaphragm
  • Features: 1/2" 
  • Screw Diameter: 2cm/0.79" (Approx.)
  • Size (L x H): 84mm x 57mm/3.31" x 2.24" (Approx.)
  • Coil Size (W x H): 34mm x 23mm/1.34" x 0.91" (Approx.)

TIP120 Darlington Transistor datasheet is here.

Wiring

The solenoid works with anywhere between 6-12V which is too high to use with the standard Arduino 5V. To get around this problem we will be using a 9V power supply – the solenoid will operate at 9V while the Arduino’s built in voltage regulator will turn that 9V into the 5V that it needs to operate. To gain access to the raw voltage going into the DC barrel jack on the Arduino Uno we will use the “Vin” pin located next to the ground pin on the Arduino.

This solenoid does not have a wire harness and instead relies on 0.250″ Quick Connects. These are the best way to connect the solenoid. If you do not have Quick Connects laying around, Alligator Clips or even soldering wires to the tabs will work.

The connections on the solenoid do not matter, the coil does not care which side is positive or negative.

Since a solenoid is an inductive load we need to include a snubber diode across the contacts. Snubber diodes help eliminate transient voltages caused when a magnetic coil (such as those found in a motor, relay, or solenoid) suddenly loses power. Without this diode in place the transient voltage spikes can damage other elements of the circuit. The snubber diode is placed from the negative side of the coil to the positive side. Since diodes only allow current to flow in one direction we need to make sure we get this right, otherwise it will be a dead short between power and ground. Ensure the side with the White stripe is connected to power/positive side of the solenoid.

The solenoid gets constant power because we will using low side switching to turn on and off this solenoid. Low side switching means we will be interrupting the circuit between the negative side of the solenoid and the ground rather than between the power and the solenoid. This seems a little counter intuitive, but we do this because switching the high side is a lot more difficult with a transistor when the voltage being switched is higher than the Arduino’s 5V logic.

The current draw of this solenoid is higher than a standard transistor can handle so we will be using a TIP120 Darlington Transistor. A Darlington transistor is actually a pair of transistors that act as a single transistor with a high current gain. The pin output is still the same as a standard transistor so (for now) just think of this as a transistor with a higher current rating.

Resistor, placed on the base pin of the transistor, limits the current going to the base (control line) of the transistor; no resistor would result in no current limit, and could result in a transistor blowing up. connect the solenoid’s negative terminal to the collector on the transistor. The collector is one side of the “switch” in a transistor, this is connected to the emitter (other side of the “switch”) when the base pin is has a voltage applied. An easy way to remember what goes where on a transistor is:

 

“The Collector collects whatever the Emitter will emit when the Base commands it to”
So in this case we are going to “collect” the negative from the solenoid and “emit” it to the ground of the circuit. So let’s run a wire from the solenoid negative to the middle pin (collector) of the transistor.

Connect the solenoid’s negative terminal to the collector on the transistor. The collector is one side of the “switch” in a transistor, this is connected to the emitter (other side of the “switch”) when the base pin is has a voltage applied. An easy way to remember what goes where on a transistor is: “The Collector collects whatever the Emitter will emit when the Base commands it to”.
So in this case we are going to “collect” the negative from the solenoid and “emit” it to the ground of the circuit. So let’s run a wire from the solenoid negative to the middle pin (collector) of the transistor. Connect the transistor’s emitter to the ground rail on the breadboard.

 

The following picture shows the needed connections with the Arduino Uno 

Step by Step instruction

  1. Do wiring.
  2. Open Arduino IDE.
  3. Plug your Adruino Uno board into your PC and select the correct board and com port
  4. Verify and upload the the sketch to your Adruino Uno
  5. if we want the solenoid to allow water to flow, set the pin high. When we want the water to stop flowing, set the pin low. In this project it will turn the water on for 1 second and then off for 1 second, looping forever (or at least until it is unplugged).

Summary

We learnt how to connect 12V solenoid valve to Arduino board and use it.

This solenoid valve could easily be used with the water flow sensor to create a system that only allows a certain volume of water to flow before shutting off.

Libraries:

  • No libraries required for this project

Sketch:

  • See attachment on the begining of this project


Other projects of Acoptex.com
Medium Basics: Project 083w Sipeed Maixduino board - Using PlatformIO IDE of Acoptex.com in Sipeed Maixduino 08-08-2019
Medium Basics: Project 083e Sipeed Maixduino board - Uploading MaixPy of Acoptex.com in Sipeed Maixduino 04-08-2019
Medium Basics: Project 083f Sipeed Maixduino board - Using MycroPython of Acoptex.com in Sipeed Maixduino 04-08-2019

Published at 19-05-2018
Viewed: 2812 times