Go Down

Topic: Problem with LCD and Motor (Read 11761 times) previous topic - next topic

floresta

Whenever you see the term 'motor' or 'relay' in the same sentence as 'LCD problem' the answer is almost always the same. 

Don

dc42

Do you have dedicated +5V and ground wires from the Arduino to the LCD? Shared grounds can cause a lot of problems.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


From the photo, it looks as if those solenoids are held together by 4 screws with hex or Torx heads. It might be worth disassembling one, to see whether there is room to fit a diode inside (although that will probably invalidate the warranty). If space is limited, then depending on the current taken by the solenoid, you may be able to use a smaller diode. You can also get 1N400x diodes in SMD packages.


@DC42, I opened up the solenoid, and inside is one complete unit, so there is no way to place the diode inside. What I did was to place the diode as shown in my previous photo (where the scissors symbol is pointing at) to see if I can completely suppress the EMF. To my surprise, this new setup actually made it worse. Now I see garbage on the LCD all the time. Attached is a drawing of my old and new setup. The diode on the left-hand side is the old setup where I place the diode about half way between the solenoid and the 12V power supply. This setup works sometimes. The diode on the right-hand side is the new setup, which always fails, i.e. garbage on LCD. This is completely opposite to what I expect to happen. Any suggestion? Thanks.

dc42

Yes, it does seem strange. I suggest you test the diode that you fitted in the new position. Does the garbage appear when the solenoid turns on, or when it turns off? Also see my previous reply about +5v and ground wires to the LCD. A photo of your wiring would help.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


Yes, it does seem strange. I suggest you test the diode that you fitted in the new position. Does the garbage appear when the solenoid turns on, or when it turns off? Also see my previous reply about +5v and ground wires to the LCD. A photo of your wiring would help.


I will do more testing here, and take a photo after I clean up the wiring. The garbage characters appear always when the solenoid is turned off. I am powering the LCD using the 5V and GND pins directly from the Arduino UNO's power rail. Thanks.

amitkrj


You tried a 1n4004 diode yet?

Thanks liudr for your reply, Today i tried to buy 1n4004 diode but all verdors are saying that the replacement/upgrade is 1n4007 and 1n4004 is outdated and not avalable. Do you have any other solution for this problme? Thanks in advance.

floresta

Quote
Thanks liudr for your reply, Today i tried to buy 1n4004 diode but all verdors are saying that the replacement/upgrade is 1n4007 and 1n4004 is outdated and not avalable. Do you have any other solution for this problme? Thanks in advance.

All of the 1N4000 series devices are essentially the same except for their reverse voltage rating.  The higher the number the higher the voltage rating.  Therefore a 1N4007 can replace a 1N4004 with no problems.

Don

liudr

If you get problem when you disengage the solenoid, then it is the diode's problem or how it is connected. If you have it correctly connected then the diode will bypass the back EMF. Let us see the connection diagram and the actual photo.


If you get problem when you disengage the solenoid, then it is the diode's problem or how it is connected. If you have it correctly connected then the diode will bypass the back EMF. Let us see the connection diagram and the actual photo.


Attached is a photo of the relay and solenoid. I was trying out different length of the wires, and it seems that a long wire between NO of the relay to the cathode of the diode yields the best result (even though it still does not completely suppress the back EMF). The power supply is a dedicated 12V with 10A rating, and has no connection to the Arduino UNO. The 12V solenoid draws about 1A when active. Please let me know if you have any suggestion or need more information. Thanks.

liudr

Help me here, is this what you want to do?

Turn on a relay that powers a solenoid? The diode needs to be at the relay coil side. The solenoid? separate the 12V supply ground from arduino's. They don't have to and should not share grounds.

I only see the box (you held it in your hand in the other picture). Is the relay inside the box or is it outside your picture?


Help me here, is this what you want to do?

Turn on a relay that powers a solenoid? The diode needs to be at the relay coil side. The solenoid? separate the 12V supply ground from arduino's. They don't have to and should not share grounds.

I only see the box (you held it in your hand in the other picture). Is the relay inside the box or is it outside your picture?


Yes, there is also a diode on the relay coil side. Attached are the schematics of the customized 8-unit relay board and a photo of the relay PCB. I am using the Arduino to control the two input pins of each relay (a matrix configuration), so I can control 256 relays with one Arduino. The box in my hand is the solenoid. The relay is shown in this attachment.

Regarding the ground, Arduino is powered by its own 12V power supply, which is separate from the 12V power supply for the solenoid. The relay is 5V and is powered from Arduino. Thanks.

liudr

OK got it. If you only switch relays without solenoids attached, will you see garbage on LCD? Can you give a large picture of the arduino and LCD included?


OK got it. If you only switch relays without solenoids attached, will you see garbage on LCD? Can you give a large picture of the arduino and LCD included?


Sorry for the delay. This past week I have been trying to find a consistent way to reproduce the problem. I cleaned up the wiring, so I can take a better picture to show you guys. After that, I have not been able to reproduce the problems consistently (the problem still exists). Attached are the photos of the Arduino side with two closeup photos. The wiring of the LCD is the same as the Arduino tutorial, except I have added a 150 ohm resistor to the LCD backlight supply voltage as suggested by another post. I will add more labels to the wiring later tonight or tomorrow, so you guys can better understand my setup. Thanks.

liudr

What about driving the relays without the solenoids connected? Still junks?

dc42

In the photo, I can see a brown wire and a black wire from the LCD, and these wires appear to go under the table. Which connections are they, and where do they go? I also see some wires from the top end of the LCD going to the breadboard, and there appears to be a +5V connection to the breadboard which is shared with other devices. See my previous advice about using dedicated Vcc and ground wires between the Arduino and the LED. Sharing the Vcc and ground to the backlight with other connection should be OK though, provided the backlight cathode connection on the LCD is isolated from the LCD signal ground connection.

Try to keep all the LCD signal, Vcc and ground wires (not counting the backlight wires) close together, with no big loops. I can see 4 wires (red, yellow, orange, green) like this, but the rest are all over the place.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up