| Author |
Message |
|
|
Posted: Mar 22, 2012 - 03:19 PM |
|

Joined: Dec 18, 2010
Posts: 82
|
|
Hi guys,
I'm making closed cabinet electronic systems and there is about 5-10 pieces of 24V dc solenoid valves, 1 OMRON PLC to make these valves work and an alphanumeric lcd with its controller circuit based on atmel.
All embedded codes are mine. (PLC and Atmel).
While the plc opens or closes the valves, it tells the situation to the mcu circuit with 4 of it's relay outputs. mcu's 4 pins are connected to these 4 relay outputs. all relays are connected to 5V.
But when the situation change (any valve is open or closed) while the message is changing, alphanumeric lcd screen gets confused (RARELY BUT ANNOYING).
I'm thinking this problem is about the noise that is being produced by solenoid valves. Because i need to make this 4 wire binary code cable set, a little long about 1'.
I'd be very happy if anyone can advise some noise filter for this circuit. (I can change any part of it.)
Thanks lot.
~Elessarsst
here is my configuration and code:
Code:
CHECK = (B1 + B2*10 + B3*100 + B4*1000);
delay50;
if(CHECK==10){
sprintf(empty1,"text1");
sprintf(empty,"text");
}
.
. //Same checking for different combinations..
.
if(CHECK!=T1) {action=1;T1=CHECK;}
if(action==1) {
lcd_init(40);delay5;
}
action=0;
delay5;
lcd(0,0,empty);
lcd(0,1,empty1);
delay50;
|
|
|
| |
|
|
|
|
|
Posted: Mar 22, 2012 - 03:33 PM |
|


Joined: Aug 04, 2004
Posts: 1822
Location: Davie, FL
|
|
| Either the AVR could be getting hit with the noise or the LCD. One way around this might be to update the LCD periodically rather than just once when something changes. Also run the LCD off a separate 5 volt regulator to keep spikes off the power line. If you have a long run of cable between the LCD and controller use a cable with ground wires between each signal. |
|
|
| |
|
|
|
|
|
Posted: Mar 22, 2012 - 03:44 PM |
|

Joined: Dec 18, 2010
Posts: 82
|
|
a- I am updating periodically in this code. Just using LCD_init() function if there is a change. if i use LCD_init() (lets say every 1 sec) it will blink periodically. I don't want this.
b- I already have an lm2575-5 circuit. What is you opinion about this circuit.
c- I'm using 16 pin flat ribbon cable from lcd to controller card. But i'm using it every lcd displayed systems. There isn't any problem with other systems but this solenoid valved system. |
|
|
| |
|
|
|
|
|
Posted: Mar 22, 2012 - 04:11 PM |
|

Joined: May 27, 2002
Posts: 737
Location: Alabama USA
|
|
Is the 24 VDC the same as the PLC 24 vdc?
I think a previous post suggesting a 'separate' 5 Volt PS for the Atmel might be the way to go.
Some PLC's have a serial port and that might work as an interface from the Omron to the Atmel.
I have used a AutomationDirect (DL260) serial port to interface to a AVR .
Also, what if you use a battery (temp setup)
to see what if any difference is . |
|
|
| |
|
|
|
|
|
Posted: Mar 22, 2012 - 05:27 PM |
|


Joined: Aug 04, 2004
Posts: 1822
Location: Davie, FL
|
|
| Solonoid's can generate a nasty reverse emf when switched. Do you have a diode in shunt with the coil (in the reverse direction) to absorb the back emf? Can also have a diode in reverse direction to ground to shunt the back emf to ground. Would also need a cap to snuff it out. |
|
|
| |
|
|
|
|
|
Posted: Mar 22, 2012 - 07:30 PM |
|


Joined: Feb 19, 2001
Posts: 25881
Location: Wisconsin USA
|
|
Put a 'scope on the lines at the LCD end. How do the signals look?
The easy one is that it doesn't fail when being 'scope-probed. Especially on the E line. Add a small cap at the LCD end of the E line. A ratty E line will indeed cause erratic operation.
If the noise spikes are enough to disturb your LCD operations, then I'd start digging further. There are probably noise spikes on other AVR lines. They are also probably outside Absolute Maximum Ratings. So start snubbing. |
|
|
| |
|
|
|
|
|
Posted: Mar 23, 2012 - 05:39 AM |
|

Joined: Dec 30, 2004
Posts: 8730
Location: Melbourne,Australia
|
|
| AS kscharf mentions, you'll need some protection across the solenoids. Diodes are one choice but varistors would be my choice. Ensure your switched load wiring is away from the lcd cable. Also be careful how you mount the lcd. The metal surround of the display likes to couple noise through and cause problems. Mount the display on an insulator - perspex or similar. |
|
|
| |
|
|
|
|
|
Posted: Mar 23, 2012 - 12:19 PM |
|

Joined: Dec 18, 2010
Posts: 82
|
|
@tubecut :
a- PLC works with 220V AC.
Output pins are connected to 24V dc power supply and 24V dc Relays. Relays are feeding valves with 24V to get PLC's internal relays insulated.
b- I'm using PLC's onboard serial communication some other peripherals. And it's the hard way for me if there is another quick solution.
c- I've got zero problem when i setup the driver circuit without valves. Also i am making some other systems that work flawless which dont have solenoid valves.
@kscharf:
a- yes i have shunt diodes on each valve to prevent back emf.
b- i dont have the ground shunt diode (i'll try)
c- i think everywhere is full of caps atm
@theusch:
a- I'll be on it soon.
b- Adding small cap to the E line serially? or sth else? (i've tried in simulation and first time i've seen the lcd is confused in simulation. it was really fun)
c- I've got snubbers on power lines and at the beginning of the lcd driver circuit. I guess it's not enough.
@kartman:
LCD cable is not that close to this power lines but the LCD display is inside a metal front panel, inside a rectangle hole.
I'll try to use varistor like on this example. |
|
|
| |
|
|
|
|
|
Posted: Mar 23, 2012 - 02:38 PM |
|

Joined: May 27, 2002
Posts: 737
Location: Alabama USA
|
|
Did you try a 'separate' power supply for the Atmel equipment?
You may be able to substitute (temp) the AVR power with a battery. Should be easy to test. |
|
|
| |
|
|
|
|
|