Relay with Solenoid valve

Thread Starter

mdvrajkot

Joined Jun 13, 2013
8
I have interfaced the electro-mechanical relay with the controller and also used the optoisolator. The diode is also connected across the relay. When I run the circuit with out any load, the circuit works perfectly. But when I connect the AC load ( Solenoid Valve - 230 V, 2A), I found some problems. The problems are

1. LCD displays some garbage value
2. Program restarts ( It restarts from while loop !!!! )

I have tried the decoupling capacitors on power supply section. Please suggest me to solve this problem
 

Thread Starter

mdvrajkot

Joined Jun 13, 2013
8
I will check this by tomorrow. But I am still not getting the reason as the program restarts from while loop. If the controller restarts then it should start from the first line of the program.
 

THE_RB

Joined Feb 11, 2008
5,438
Your two symptoms show it is crashing/glitching etc.

Instead of trying to guess exactly what is glitching inside the controller (the symptom), it is better to just fix the cause.

If you post your schematic we can suggest ways to make it more immune to spike glitching. :)
 

John P

Joined Oct 14, 2008
2,025
This must be a monster valve--that is over 400W of power feeding it.

I suspect that the valve is causing a huge spark when you turn it off, but this would be erratic as it may happen at any point in the power line cycle. That'll be very bad for the relay contacts unless you use a special type, and the radiated interference will have bad effects on any electronics in the vicinity. A snubber would help, but you would do much better to use a solid-state relay, which wouldn't cost much for a couple of amps capacity.
 

Thread Starter

mdvrajkot

Joined Jun 13, 2013
8
Hello,

The specification of the solenoid is Voltage=220V AC, Power=6VA & Duty cycle=100%.

I have used the snubber circuit ( 47 uF/1000V, 200ohm/10W) across the coil of the solenoid. Still I am getting the same problem.

I have attached the schematic for the further reference so please suggest me the proper solutions for the problem
 

Attachments

t06afre

Joined May 11, 2009
5,934
Some things you can do. First try to shield the controller board better. Use a separated power for the controller board. As long as the controller board and the Solenoid valve share the same ground. Using optos has little effect. The filter cap after the rectifier is to small. Go for 2200uF. Put 100uF/100nF in parallel very caps close to the 7805 regulator output. And use 10uF/100nF the same way close to the PIC VCC. It could also be that your power supply is to week to drive the Solenoid valve. So you see a power dip every time the Solenoid valve is activated. If you must run all from the same power. Use separated and proper VCC and GND cables for the controller board and the Solenoid valve. These cables should only meet very close to the 7805 output.
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
I assume in India a similar 240v 1ph system is used as Europe, with one side of the 240v at earth ground?
Also if you have a service earth conductor supplied you could try grounding the logic 5v common to the service ground at a central star point where they all come together.
You have used the earth ground symbol already on your logic circuit so it is a bit misleading as to whether it is presently isolated?
Max.
 

Thread Starter

mdvrajkot

Joined Jun 13, 2013
8
Some things you can do. First try to shield the controller board better. Use a separated power for the controller board. As long as the controller board and the Solenoid valve share the same ground. Using optos has little effect. The filter cap after the rectifier is to small. Go for 2200uF. Put 100uF/100nF in parallel very caps close to the 7805 regulator output. And use 10uF/100nF the same way close to the PIC VCC. It could also be that your power supply is to week to drive the Solenoid valve. So you see a power dip every time the Solenoid valve is activated. If you must run all from the same power. Use separated and proper VCC and GND cables for the controller board and the Solenoid valve. These cables should only meet very close to the 7805 output.
Hello,
In this application I have to use the same power supply for both controller board and for solenoid. But in this circuit, the supply to the AC Solenoid is directly provided before the transformer. And I have taken care of the same which is mentioned in your message. I am also using the snubber circuit having C = 0.1 uF & r = 100 ohm. but the problem remains the same. I am not getting the reason of the problem. So please share the experience for the application.
 

THE_RB

Joined Feb 11, 2008
5,438
You have a heap of problems, some mentioned by Max already but I will go through all the ones I see.

1. put a 22uF TANTALUM cap right across the micro power pins 11-12. Right at the micro.
2. The cap on your MCLR pin 1 is a 1uF 63v electro, that is no good! You need a very fast cap there, try a 1uF tantalum or 0.1uF ceramic/mono.
3. You have the cost and hassle of using optoisolators but then still connect your relay coils to the +5v Vdd rail! Your optos are useless.
4. Your relay coils driven from 5v Vdd are inserting high spike energy into Vdd. Put a large cap (330uF electro 16v) from the relay coil bottom pin (was the coil Vdd pin) to ground, then decouple that from the Vdd +5v supply by putting a 10 ohm resistor in series between Vdd and the cap+ (cap mounted close to the relay).
 

John P

Joined Oct 14, 2008
2,025
If the valve actually draws 6VA, the originally quoted power figure was wildly wrong.

I'll say it again--use a solid state relay. You're knocking yourself out solving a problem that doesn't need to be solved.
 

Thread Starter

mdvrajkot

Joined Jun 13, 2013
8
Hello,

I have used the varistor across the load and the snubber circuit across the switch of the relay. But Due to leakage current There is some problem in the solenoid, I tried the same by removing the snubber everything works fine except the LCD. I had provide the separate power supply for Microcontroller part and the AC part. But still displayed the garbage value on the LCD.
 

Thread Starter

mdvrajkot

Joined Jun 13, 2013
8
As a solution for this problem I have worked with the DC solenoid valve (24 V). In that circuit I am using the same power adaptor (24V) for the valve and microcontroller circuit and again found few problems.

1. When I turn ON or OFF other device (which is connected with the same AC supply board but not connected with the circuit), the controller gets restarted !!!! I am using the readily available 24V DC adaptor as a supply for the controller & Solenoid valve.
2. The LCD garbage problem remains the same in DC again. As a protection of back emf, I have use the Diode+Zener across the relay switch.

So please suggest the solution for this problem in DC circuits.
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
If using the relays and 24vdc solenoids, use 1n4003/7 diodes across each coil.
You have less than 5ma supplying the opto diodes for a max of 60ma.
Your Opto's are not isolating as the ULN is re-referencing to common.
May be an omission in the dwg, but I do not see the feed to the relay coils?
Max.
 
Last edited:

Thread Starter

mdvrajkot

Joined Jun 13, 2013
8
If using the relays and 24vdc solenoids, use 1n4003/7 diodes across each coil.
You have less than 5ma supplying the opto diodes for a max of 60ma.
Your Opto's are not isolating as the ULN is re-referencing to common.
May be an omission in the dwg, but I do not see the feed to the relay coils?
Max.
Hello,

The circuit diagram is far improved as the previous one.
In the new diagram, there are few things which is mentioned below.

1. isolated the both part relay & microcontroller.
2. 1N4007 diodes are also placed across each coil.
3. Use of 100nF at proper places
4. Bridge circuit at power supply and providing the voltage regulated output to the microcontroller.

But the main problem is

1. When I turn ON or OFF other device (which is connected with the same AC supply board but not connected with the circuit), the controller gets restarted !!!! I am using the readily available 24V DC adaptor as a supply for the controller & Solenoid valve.
2. I am getting the Garbage value on LCD after some time. It may work well for 5 minute or for 50 minute.
 
Top