I'm using a Mega 1280 to control a water purification system and I have a problem with the LCD display. The system includes 4 electromechanical valves to control water flow and a 1/2 HP pump.The display works properly until the controller starts the 1/2 hp motor then the display shows random characters. I'm using SSR's to switch mechanical relays because I need both NO and NC contacts. I have installed 0.1mfd capacitors in series with 100 Ohm resistors on the mechanical relay coils and the NO / NC contacts and that helped but did not totally eliminate the problem. All the valves and the pump are separated from control box and the pump is plugged into a separate AC outlet started by switching a 24 Volts AC control to neutral. Does anyone have any other hints on eliminating this type of EMI? I use software to reset the LCD but for 10 or 15 seconds the display looks bad and I would like to reduce the need for that kind of fix. The IDE is ver 1.0.1 and I use the standard LiquidCrystal library.
Basically keep high current circuitry away from logic signals to the LCD. Avoid inductive transients. Without knowing the inductance of the relay coils its hard to know if the snubbers are good enough. Are the relay coils fed with AC then?
Do you have a diagram, that description makes it clear the setup is quite complex.
Hi, You have a lot of stuff running there.
Tell us more about the different power sources and how the grounding/common of the power/relay parts is done.
If you are using SSR's you should have complete optical isolation for the power section. Can you confirm that Arduino ground is NOT connected to the power section at all?
Some information about these problems is here: Arduino Forum
If you have any diagrams of what you have that would help us understand.
Most of us who have ever built automated equipment have struggled with this kind of thing from time to time, and learned to take careful precautions. Otherwise some of the fun can turn to frustration.
Thanks for the replys. I do not have a diagram to post yet, I'm working on that. After reviewing the two links from terryking It looks like I have a lot of work to do to correct this issue. I think I'll start by moving the mechanical relays out of the box that contains the Arduino. The most troublesome is the starting of the pump and that relay is about 2 inches from the Arduino. Arduino power is isolated from the power relays by optically isolated zero crossing SSR's, however the Arduino is powered by a switching power supply that is connected to the same AC as the relays. I have noticed if I remove power from the pump then power up the control system and wait for it to call for the pump to come on then manually turn on the pump I do not get the scrambled display. Again thanks for the guidance . artatkinson
Thanks for all the suggestions, I found the noise was being induced in the ribbon cable connecting the LCD to the Arduino. I shortened the cable, covered one side of the cable with some copper tape I had left over from my ham radio days and grounded that. That seems to have taken care of the problem. I will leave the RC components on the relays and the line filters on all the AC lines.
Again thanks for all the help.