LCD influenced by ac current?

Hello,

I'm making a device to control an antenna rotor. It has an LCD (2x16) and several relays that switch an AC current to the rotor. The AC for the rotor comes from a separate transformer. The arduino and the rest of the circuit are powered by their own transformer with 7805 etc.

If the AC for the rotor is not connected to the relays, all works fine. The displays works and I can make the relays switch. If I connect the rotor AC and I switch on the device, the LCD works at first. But when I start to push the buttons to trigger the relays that control the rotor AC current, the LCD goes blank. Sometimes from the first relay switch, sometimes after a couple of relay switches. No idea why. The backlight remains on and if I turn the contrast pot I can get the "blocks". The rest of the device still works as I can hear the relays switch, I'm just loosing the screen. Can it "crash"?

Can the rotor AC signal have an influence on the LCD? It goes through the same PCB as it is switched by the relays. Anybody an idea of what goes wrong?

If I switch the device off and back on, the LCD works again as it should.

Cedric

Can the rotor AC signal have an influence on the LCD?

Yes. Welcome to the real world.

Are the wires going from your Arduino to your LCD physically separate from those going to the relays? Do you have 'snubber' diodes across your relay coils?

Don

Hi Don,

yes, I have diodes across the relay coil. The wires from the LCD are separated from the AC wires, but they are not far apart. And on the PCB, they are also close together.

Is there any way I can improve the shielding of the LCD?

Cedric

Is there any way I can improve the shielding of the LCD?

The problem is most likely not with the LCD itself but with the wires going to it..

Don

Can it "crash"?

Yes it is a computer system itself, multiplexing signals onto the LCD dots.
First thing to do is to add extra supply decoupling capacitors at the LCD.
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

I added a decoupling capacity and we measured the ripple on the 5V, which was 0.01V. It did not help.

If it gets in through any of the datalines, how can I decouple them?

Cedric

I added a decoupling capacity

What value capacitor?
You need a ceramic 0.1uF and I would also include a 47uF electrolitic.

Decoupling is not just about ripple it is about transients as well.

If it gets in through any of the datalines, how can I decouple them?

This is not very likely and quite difficult to eliminate. This is because any suppression of transients will also suppress the signal. Things like ferrite beads and very small value capacitors would help.

However, keep the decoupling on an have a look at how your ground is wired. Make sure it is as far away from the AC lines as possible. Also make sure it goes straight back to the arduino and it does not go on to ground any other device or component.

Would it make a difference if I connect the R/W pin to the arduino instead of directly to ground? My thinking is that the LCD would not "listen" to any stray ac while the R/W is high, and hence would not crash. You think this makes sense?

No it would not make any odds, leave it connected to ground.

Are the power and/or ground wires to the LCD shared with power and/or ground wires to the relays? If so, change the wiring so that the LCD has its own +5V and ground wires from the Arduino. The backlight +5V and ground don't matter so much, it's the main +5V and ground that are susceptible to noise.