Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help 2. Wiring a Solenoid Valve

Status
Not open for further replies.
Hello。

I want to say thank you for the help with the first part of my project. "wiring the potentiometer"

Now. The second part. the potentiomer is the input for a Microcontroller.
The output (digital) of my PIC will go to control a device called a Solenoid Valve

this solenoid valve functions with 12 V. and it has two wires. I suppose one of them will go to "ground"??

Do I need a Transistor to do this??

What is the simplest way to wire this?

If any of you has experience with Solenoid Valves, some help will really appreciated.

Kansαi.
 
Hello。

this solenoid valve functions with 12 V. and it has two wires. I suppose one of them will go to "ground"??

Do I need a Transistor to do this??

What is the simplest way to wire this?

If any of you has experience with Solenoid Valves, some help will really appreciated.

Kansαi.

hi,
The solenoid will require a transistor or FET driver, connected between the output of the PIC and the Solenoid.

This will enable the solenoid to be powered from 12Vdc and the transistor will supply the higher current required for a typical solenoid.

What is the current rating of the solenoid.?
 
Thank you very much for the response.

Actually as I said in my previous thread, I have almost zero experience in this, so forgive me to ask but what do you mean by "What is the current rating of the solenoid.? "

The solenoid valve I am using is the GA010E1-25 from Koganei (3-port)

**broken link removed**

**broken link removed**

so the valve has

operatin voltage range 12V(10.8~13.2)
current 84 mA
power compsumption 1.0 W
insulation resistance over 100 MΩ


I am thinking something like:

circuit2.JPG

but I dont know what is the appropriate value of the resistor (or if I have to use one) and even less what kind of transistor I have to use.

Any help will be deeply appreciated

Kansai
 
Try this.
Diode. If current is small 1N4148. If current is larger 1N4001.
 

Attachments

  • Image2.jpg
    Image2.jpg
    13.5 KB · Views: 334
Thank you. I suppose L1 refers to the solenoid valve. am i right?

I ll try that.

By the way, what for is the diode??

Kansai
 
With out the diode....When current is flowing through the coil (solenoid) the current wants to continue. When the transistor opens up the current tries to continue to flow. The voltage across the solenoid “kicks up” to maybe hundreds of volts, breaking the transistor. With the diode the voltage is clamped at 12 (actually 12.7) volts. The current flows back into the 12 volt supply and then stops.
 
. With the diode the voltage is clamped at 12 (actually 12.7) volts. The current flows back into the 12 volt supply and then stops.

Its a free wheeling diode, when transistor opens, the voltage actually reverses, but not the current. the voltage across would be 0.7 and the current would become zero gradualy. the current(energy) never flow back to the source in this case.

check the solenoid, is it for AC or DC? there are AC solenoids too in applications. in that case you need a relay to switch it.
 
Hello. and thanks for the help.

I was told I must use a opto-isolator to isolate my 5V circuit (Microcontroller) from the 12V solenoid circuit.
So in the end it came to this:

However I am not sure, it seems it does not work. I measured the voltage in both sides of the solenoid. (it must be 12V when a 5V output is applied from the PIC, no?)


Can anyone comment on this circuit? and how to check if it works or not?

Thank you again in advance

Kansai
 

Attachments

  • circuit3.JPG
    circuit3.JPG
    26 KB · Views: 587
Hello. and thanks for the help.

I was told I must use a opto-isolator to isolate my 5V circuit (Microcontroller) from the 12V solenoid circuit.
So in the end it came to this:

However I am not sure, it seems it does not work. I measured the voltage in both sides of the solenoid. (it must be 12V when a 5V output is applied from the PIC, no?)


Can anyone comment on this circuit? and how to check if it works or not?

Thank you again in advance

Kansai

hi,
You do not need an opto-isolator.

Look at this modified circuit.

circuit3.JPG
 
Thank you very much.

Dont I have the risk of frying my microcontroller since I am using 12V for the solenoid???

Kansai

hi,
What path do you see on the circuit that will apply 12V to the PIC pin.????
 
I doubt you will fry your u-controller. However, driving soleniods directly from digital electonics is usually not a good idea. I've seen too many systems driven like that that cause the digital portions to be "upset" by the transients produced by the coil switching. The free wheeling diode helps, but the very best way to do this is to use isolation and totally separate power supplies and grounds, along with the diodes to insure there is no interference between the solenoid and digital system.

You do realize that in your schematic, the opto-device is configured as an inverter, right? A 5-V signal from your u-controller will de-energize your soleniod. Also, look at the data sheet for the opto. You're operating the diode at the edge of the forward current transfer curve. Try to find some schematics that uses your part, or a similar one.
 
Last edited:
My solenoid specs are

Operating Voltage Range 10.8~13.2 V
Current(when rated voltage(12V) is applied: 84mA
Allowable leakage current 2.0 mA
Insulation Resistance Over 100 MΩ

So I am guessing that I dont need any resistance in the path from the 12V to the transitor (C-E) to ground cause the solenoid valve has a huge resistance after all. I was thinking I needed the classical resistor but I guess not. I wonder what you think about this..
 
Everybody. Thank you very much for your help.I finally constructed a circuit that works. (upper side of the figure)I am just checking it for safety.

my supervisor asked me if it were possible to avoid using the transistor and just use the photocouple as switch.(lower side) Any opinion on this???
 

Attachments

  • circuit 4.JPG
    circuit 4.JPG
    49.7 KB · Views: 244
Everybody. Thank you very much for your help.I finally constructed a circuit that works. (upper side of the figure)I am just checking it for safety.

my supervisor asked me if it were possible to avoid using the transistor and just use the photocouple as switch.(lower side) Any opinion on this???

hi,
That circuit is too complex for driving that transistor/solenoid.

As I said earlier you dont need an opto-isolator from the PIC output to the transistor base.
Why does your supervisor consider that an opto-coupler is required.?

A standard opto-coupler output transistor would not be able to drive a 84mA solenoid directly.
 
hi, you must have been referring to the PIC book by Mazidi, am I correct?
The optoisolator is not necessary, just use a diode which goes into the base of the solenoid driver transistor. The diode is good enough to provide protection. I am referring to the circuit ericgibbs provided, just add a diode to the base series with the resistor.
Your second option in your diagram is not going to work, the internal impedance of a phototransistor will limit the current for the solenoid to function. The output current of a phototransistor barely turns on an LED with a Vcc of 9V.
 
Last edited:
I would leave the circuit as it is. Why mess with something that's working? I would also leave the opto in.
 
my supervisor asked me if it were possible to avoid using the transistor and just use the photocouple as switch.(lower side) Any opinion on this???
The opto coupler absolute maximum current is 50mA, the solenoid draws 84mA. Operating beyond its ratings is guaranteed trouble.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top