16x2 LCD displays junk charac and no refresh after 230V relay operation

In my application i need to turn ON/OFF a 1kw filament heater through a 230V relay contactor. My board has a 12v pilot relay which drives the 230V relay. Even without heater load and with 3 times switching (in 3 seconds) of the 230v relay, the 16x2 LCD corrupts and the display refresh done every 1 second does not help. After that display scrolls junk characters for some time and after that no display, power to the board has to be reset to bring the display back in original state. In case of one operation of the 230v relay per 10 secs every thing works fine, only multiple switching causes problem. Without 230V relay there is no issue, so i confirm only 230v relay causes issues.

Is it possible to reset the LCD alone through arduino code instead of complete power off and on?

Is it possible to reset the LCD alone through arduino code instead of complete power off and on?

Yes, but why not fix the cause of the problem which is electrical interference from the relay?

Don

Yes i should provide suitable filter components to eliminate conductive noise. I will try that in parallel, since the PCB need to house in a small box, i have a restriction for adding more components. I will also try to keep the relay away to check the influence of radiated noise.

I felt that the control through Arduino is more reliable at all noise ranges than passive components.

Rameshbabuvs:
I felt that the control through Arduino is more reliable at all noise ranges than passive components.

Not sure about that. Not sure at all!

It may depend on how far your LCD is from the Arduino board. Start by putting a 0.1µF (ceramic) and a 10µF capacitor across the Vcc and Ground terminals of the LCD itself.

Now the circuit that the pilot relay (which of course has a "snubber" diode connected across the coil) switches is in no way connected to the Arduino, is it? Because if it is (connected), it provides no isolation. If the contactor is actuated by DC, it should have a "snubber" diode as well, or if it is AC, it should have a resistor across the coil to draw about 1/10 of the current that the coil does.

As a first step i tried to switch the 230v relay frequently (by door switch press), more problem on LCD when placed closer to 230V relay coil supply wire, less problem (1/10th) when kept away (300mm far).

As a second step connecting a 0.1uF near the 5V regulator and the LCD connector the effect has reduced. But still the issue is not closed.

Next step I will place a 0.1uF on the LCD across supply and ground and will check it.
+
As a logical step i had added a 1.5Sec delay after the relay deactivation due to door open. (logically door switch should not operate several times in 1 second). This way the 230 v relay can only turn ON after 1.5secs after clearing all the faults.

Thanks for the support!

Regards
Ramesh

Hi,

Adding capacitor or adding delay had postponed the display corrupting but has not solved fully.

Is there a command to clear the LCD/reset the LCD?

Regular clear command is not helping at the moment.

Thanks.
Regards
Ramesh

I have exactly the same problem!!! did u figure out some solutions??? PLEASE HELP ME!!!

I had similar issues with my lcd screen going garbled when I used the relay under load and then after a couple times using the relay under load the garbled letters turned back to normal,

I added an i2c backpack to the lcd and it seemed to help. I also changed my code so I did all the updates to the lcd screen before I turned the relays on and off and the issues went away. If I changed a relay and updated the lcd right before and after the garble seemed to happen right away and get worse.

The relays I have used all had the opto-isolators on the board and I was still getting the garbled letters.

lcd.begin(16, 2);  // init display
lcd.clear();       // clear display and set cursor in upper left corner

now re-write your data to the display to see it.

In one of my home projects the display regularly gets corrupted and every minute I run the above lines of code to restore the display.

Why are you telling him to clear the display immediately after initializing it? The initialization includes this step.

In one of my home projects the display regularly gets corrupted and every minute I run the above lines of code to restore the display.

Reply #1 is valid here as well regardless of the source of the screen corruption.

Don

jasit:
The relays I have used all had the opto-isolators on the board and I was still getting the garbled letters.

Using the commonly available "Sainsmart" relay modules, you must not connect the "GND" on the relay board to the Arduino, only directly to the relay power supply. Connecting the ground to the Arduino completely defeats opto-isolation.

Why don't you try to solve some current problems instead of dredging up old ones?

Don

floresta:
Why don't you try to solve some current problems instead of dredging up old ones?

Don

++1;

I’ve had a similar problem in various applications over the years, generally after the LCD has been in operation for a few hours. It happens even when no relays are involved, but in retrospect, whenever the Arduino shares the same circuit with an electric motor. I’ve tried using 10 mfd and 50 mfd capacitors on the LCD power input (pins 1 & 2) without effect.
This is a kludge but for me it works and that’s what I’m interested in - just reset the LCD before every write with lcd.begin(16, 2);

AARRGGHH

did u use a flyback diode with the coil of relay, u can also use an optocoupler with relay

I have found a way to solve this issue as the AVR isnt hanging thats sure & only LCD controller is getting noise.

1st ) use internal clock oscillator to prevent AVR from hanging

2nd) Reinitialize the LCD after every time you turn on & off the Relay or contactor or any inductive load

(lcd.begin(16, 2):wink:

This way my problem got solved

Your turn floresta! :grinning:

It's Groundhog Day all over again.

AARRGGHH

Don