Go Down

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

liudr

To add on dc42's suggestion, you want a capacitor between 5V and gnd on the breadboard. Try 0.1 uF to 10uF cap.

Hi dc42 and liudr,

Thank you for your advice. Attached is a closeup of the Arduino with labels. It should clear up some confusion regarding the wiring.

@liudr, I will add the cap between Vcc and GND.

@dc42, just to confirm, the Arduino, LCD and backlight should be powered as follows:

Arduino <- dedicated 12V power supply
LCD <- dedicated 5V power supply
backlight <- same power supply as the LCD

Many thanks!

dc42

No, the LCD (other than the backlight) must be powered from the Arduino 5V pin. The backlight can also be powered from the 5V pin (but that will increase the dissipation in the regulator), or from a separate 5V supply, or (if it is a standard LED backlight and has no low-voltage caps across it) from the 12V supply if you use a larger series resistor.
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.

liudr

Does the relay control have a ground that goes from arduino to breadboard then to relay control? Just checking.


Does the relay control have a ground that goes from arduino to breadboard then to relay control? Just checking.


The 5V relay control is currently powered by the same 5V/GND from the Arduino to the LCD & backlight. Is this correct?

About half an hour ago, the garbage character problem showed up again. It happened when I tried to turn on and off 17 solenoids (one by one in consecutive order with one second in between). But it did not happen again when I repeated the same steps. So the problem is evasive. BTW, I do not have the 10uF cap between Vcc and GND yet as I still need to get the part from the local store.

liudr

This is the LAST time I am asking you: what happens if you just switch the relays without solenoids connected to the relays.


This is the LAST time I am asking you: what happens if you just switch the relays without solenoids connected to the relays.


I would like to give you a definitive answer, but I can't. It took entire day to reproduce this problem once (with the solenoid connected). A few days ago I did disconnect the solenoid, and the problem did not occur for the entire day. However, it does not mean the problem would not occur without the solenoid connected. Until I find a consistent way of producing the problem, there is just no way to be sure.

liudr



This is the LAST time I am asking you: what happens if you just switch the relays without solenoids connected to the relays.


I would like to give you a definitive answer, but I can't. It took entire day to reproduce this problem once (with the solenoid connected). A few days ago I did disconnect the solenoid, and the problem did not occur for the entire day. However, it does not mean the problem would not occur without the solenoid connected. Until I find a consistent way of producing the problem, there is just no way to be sure.


En, understand. Try the capacitor then, just leave your system for a day or so and check back on the LCD. You don't need 10 uF something less than that will also work.

nanohex

This may seem like a noob point, but I noticed your PCB doesn't have a ground flood? You should try adding one in to aid in heat-sinking!

...apologies if you already know this  :P


This may seem like a noob point, but I noticed your PCB doesn't have a ground flood? You should try adding one in to aid in heat-sinking!

...apologies if you already know this  :P


@liudr, I added the cap at LCD Vdd and Vss. Unfortunately the problem still exists. :( I will try cleaning up all the wiring and solder joints.

@nanohex, would you mind clarifying the ground flood for me? I am not too familiar with it. Thanks.

liudr

I think nanohex was talking about your relay circuit board having no ground plane. But it may have some on the bottom side.

dc42


Hi dc42 and liudr,

Thank you for your advice. Attached is a closeup of the Arduino with labels. It should clear up some confusion regarding the wiring.


You haven't yet implemented the suggestion in my reply #59 because the power and ground wires to the LCD do not follow the same route as the signal wires.

Keep the +5v and ground wires to the relay separate from the ones to the LCD as far as possible. You shouldn't need to use the same ground pin for both because you have 3 ground pins on the mega. If the LCD and relay share the +5V connection, keep that shared wire as short as possible.

How are you driving the relay: through a transistor?
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.



Hi dc42 and liudr,

Thank you for your advice. Attached is a closeup of the Arduino with labels. It should clear up some confusion regarding the wiring.


You haven't yet implemented the suggestion in my reply #59 because the power and ground wires to the LCD do not follow the same route as the signal wires.

Keep the +5v and ground wires to the relay separate from the ones to the LCD as far as possible. You shouldn't need to use the same ground pin for both because you have 3 ground pins on the mega. If the LCD and relay share the +5V connection, keep that shared wire as short as possible.

How are you driving the relay: through a transistor?


I will keep the LCD signal/power/gnd wires all close together.

Regarding the relay, it is powered by a separate 5V power supply. I am driving the relay through two transistors to provide a matrix configuration as shown in the attached schematic (containing 8 relay modules).

nanohex

Quote
@nanohex, would you mind clarifying the ground flood for me? I am not too familiar with it. Thanks./


I couldn't come up with a decent explanation in my own words so this is from Wikipedia:

"A ground plane on a printed circuit board (PCB) is a large area or layer of copper foil connected to the circuit's ground point, usually one terminal of the power supply. It serves as the return path for current from many different components.
A ground plane is often made as large as possible, covering most of the area of the PCB which is not occupied by circuit traces. In multilayer PCBs, it is often a separate layer covering the entire board. This serves to make circuit design easier, allowing the designer to ground any component without having to run additional traces; component wire needing grounding is routed directly through a hole in the board to the ground plane on another layer. The large area of copper also conducts the large return currents from many components without significant voltage drops, ensuring that the ground connection of all the components are at the same reference potential."

Basically any area that's just left empty (copper etched away; no traces) is instead left with its original copper. These are then connected to ground.


Quote
@nanohex, would you mind clarifying the ground flood for me? I am not too familiar with it. Thanks./


I couldn't come up with a decent explanation in my own words so this is from Wikipedia:

"A ground plane on a printed circuit board (PCB) is a large area or layer of copper foil connected to the circuit's ground point, usually one terminal of the power supply. It serves as the return path for current from many different components.
A ground plane is often made as large as possible, covering most of the area of the PCB which is not occupied by circuit traces. In multilayer PCBs, it is often a separate layer covering the entire board. This serves to make circuit design easier, allowing the designer to ground any component without having to run additional traces; component wire needing grounding is routed directly through a hole in the board to the ground plane on another layer. The large area of copper also conducts the large return currents from many components without significant voltage drops, ensuring that the ground connection of all the components are at the same reference potential."

Basically any area that's just left empty (copper etched away; no traces) is instead left with its original copper. These are then connected to ground.


Thank you for the explanation. It turned out that there is no ground plane on my relay PCB. Is there anything I can do?

Go Up