lcd goes wrong when load connected to relay

Hi,
I am developing a controlling system using arduino, lcd display and some relays. Switching of the relays is as follows.

  • Arduino output is used to switch a transistor through an opto isolator.
  • 6 no of 12Vdc relays are switched by that transistors.
  • 24Vdc relays are switched by 12Vdc relays.
  • some solenoids and 2x230Vac contactors(to drive a 3phase motor clockwise & anti-clockwise) are powered by 24Vdc relays.

When there are no solenoids connected, the lcd display works properly. But when solenoids and motor are connected, display shows some random charactors when switching the relay. I have used diodes for every relay.

I feel I may have to use some other protection techniques to but I have no clear idea of what to do. Please help me.

ma

I have used diodes for every relay.

Have you used diodes for every solenoid as well?

Don

Have you used diodes for every solenoid as well?

Sorry,I am using ac solenoids & I forgot to mention that. So what will be helpful?

Add extra supply decoupling on the LCD supply rail.
Use snubbers on the AC stuff as well.
Keep AC wiring and DC wiring as far appart as possible.

Thanx for your reply Grumpy_Mike.
I will try your options.

Add extra supply decoupling on the LCD supply rail.
Use snubbers on the AC stuff as well.

I have added a 100uF capacitor parallel to the Vcc and Gnd pins of the lcd display. Is that you mean?

For the snubber circuit, can I use 220ohms and 0.5uF or how can I select the resistors and capacitors?

I have added a 100uF capacitor parallel to the Vcc and Gnd pins of the lcd display. Is that you mean?

Yes get them as close to the display as you can, the closer the more effective it is.

can I use 220ohms and 0.5uF

The resistor is far too high.

how can I select the resistors and capacitors?

Have a look at this:-

It sounds like you are using a lot of current with all those relays, and whatever. Maybe your power supply is overloaded. What power supply(s) are you using?

the USB can be expected to provide about 500ma
the onboard 5V regulator can be expected to provide about 500ma with 12V on Vin.

Good luck.

What power supply(s) are you using?

I am using 5A 12Vx2 transformer and rectified and 12V is given to the arduino and the relay board.
24V is given to the 24V relays. I have not given 5V to the lcd backlight either from arduino or power supply and just given Vcc and Gnd and 6 pwm pins only.

so will you think there is a problem with the power supply?

Do you have a volt meter, can you test the 5v on the arduino?
Also look at the 12volt. I would bet that it is closer to 20 volt.
Feel the onboard 5v regulator. It should be warm/hot, but if it burns your finger, it is to hot.

You mention you give 12v to the relay board. Can you provide a link so we can see what relay board you are using.
Most relay boards for arduino use 5v to energise the relays. outputs can/will be higher than 5v, so I am not sure where your 12v is being used.

good luck

There is a 7812 regulator to provide 12V to the arduino & relay board. I checked the 5V out from the arduino & there is no problem with that. But, I checked the onboard regulator and it is hot.

The relay board is made by one of my friends and This is the link of that circuit.

http://farm4.static.flickr.com/3428/3961812306_45cbe0f6b3_o.jpg

Here, instead of MFU, it is connected to arduino. R1 = 100 & R2 = 1k. supply from 12V regulator is used instead of 9V battery. Here the load is a 12Vdc relay coil. Transistor is D400 & optocoupler is pc123.

There are 7 such kind of circuits in the relay board. I have ordered a relay board & I have not still received that one. Hope to connect it after receiving.

And also, I used a snubber circuit with 100ohms & 100nF as mentioned in both methods in the link below for 230Vac switching by 24V dc relay. But the problem with the display has still not been solved.
http://home.broadpark.no/~pbrakken/emc/emc-testing/emcdesign_6/991215g.gif

thanks.

Your relay schematic did not show a protection diode across the relays coil. It's possible that the back EMF could be causing our problem.
It is likely that when you get your 5v relay board, it will not cause the problem.

Good luck, Jack


Cannot access this link.

@Larry,
I had problem accessing that link also, but was able to copy and paste to get it to come up.

5V - 2V = 3V (voltage across the 100R opto i/p resistor)
3V / 100R = (30ma current from each pin)
30ma X 7 = 210MA too much current (7 relays) plus pins for LCD
12V - 5V = 7V (voltage across the Arduino regulator)
7V X 210ma ~ 1.5 watts too hot (wattage dissipating in the Arduino regulator)

@Larry and others as well

If you create a forum post containing a link it is a good idea to 'Preview' your information before posting it. When the preview is displayed you should check on the link and verify that it works. Only if everything is OK should you actually go ahead and 'Post' it.

Don

I see no problems with the posts from Larry.

@floresta

All I said was I could not access the link that was previously posted.

All I said was I could not access the link that was previously posted.

I see that now.... My recommendation should have been addressed to the OP madard.

DOn

I am extremely sorry that I should have checked before posting it. This time I have checked twice.

This is my transistor switching circuit & @jack, I did not mention that I have used diodes for every dc relay but the problem still remains.

This is the snubber circuit I have taken as guide.
http://home.broadpark.no/~pbrakken/emc/emc-testing/emcdesign_6/991215g.gif

I hope to call lcd.clear() about 1s before & lcd.print() about 1s after switching of each relay without delay() function. I am still working on that & I would like to know your opinions. When I browsing about this problem, I saw that some people have called lcd.begin() at several places. Will it be harmful for the display?