Go Down

Topic: LCD text corrupts after Arduino runs for length of time (Read 15271 times) previous topic - next topic

darkdragon

I would disconnect the powerswitch tail ground from your circuit. I would only have the arduino/LCD circuit connecting to the VDC+ and VDC- on the powerswitch tail.

Your schematic shows the powerswitch VDC- tied to the powerswitch GND and the arduino GND. That would allow noise on the mains ground to enter your circuit.

dc42


If this is the case you may be able to correct things by neatening up your wiring and/or by making the six leads between the Arduino and the LCD as short as possible and as far away from the refrigerator wiring as possible.


In particular, try running the LCD ground wire directly to a ground pin on the Arduino (not to the breadboard) and keep it short.
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.

InsufficientFunds


Try running the system with a non-inductive load such as a some light bulbs instead of the refrigerator.   The problem seems to be interference messing up the LCD controller and the compressor is the most likely source.  

If this is the case you may be able to correct things by neatening up your wiring and/or by making the six leads between the Arduino and the LCD as short as possible and as far away from the refrigerator wiring as possible.


Don


I think you're spot on with this one.  I attached a lamp and 60w incandescent bulb to the PowerSwitch system and ran the program, and the LCD remained fine.  I'm thinking that the compressor for the refrigerator is creating harmonics or noise of some sorts that's somehow carrying through the PowerSwitch and back into the Arduino.

I did move the Arudino off the compressor, put the PowerTail about 5 feet away (roughly 1.5M ) from the board and arranged the wires better.  The results were mostly the same, with the text corrupting within an hour.

I'm wondering what my next steps should be - do you think I should try to isolate the PowerSwitch circuit completely by using a different power supply and then running the PowerSwitch through a relay from the Arduino?



It looks like the board is being powered from 12v. Where is that power coming from?
Maybe that supply is getting a giant power surge when the frig kicks on/off that
is crashing the AVR or LCD.



The board is being powered by a 12v power supply, and I'm plugging it into the same receptacle that the refrigerator is running on.  I'm starting to think that this is the source of the issue, so I will try moving the power supply to a different receptacle in the basement and see if this helps correct it.


I would disconnect the powerswitch tail ground from your circuit. I would only have the arduino/LCD circuit connecting to the VDC+ and VDC- on the powerswitch tail.

Your schematic shows the powerswitch VDC- tied to the powerswitch GND and the arduino GND. That would allow noise on the mains ground to enter your circuit.


Done!  Thanks for the information.



If this is the case you may be able to correct things by neatening up your wiring and/or by making the six leads between the Arduino and the LCD as short as possible and as far away from the refrigerator wiring as possible.


In particular, try running the LCD ground wire directly to a ground pin on the Arduino (not to the breadboard) and keep it short.


I'll go try that now.  Is it okay if I use the breadboard to attach the LCD ground's prong to the ground wire (which will be directly wired to the Arudino)?  Do you think I should avoid using the breadboard altogether?  I'm sort of at a loss as how to connect it otherwise.

dc42


I'll go try that now.  Is it okay if I use the breadboard to attach the LCD ground's prong to the ground wire (which will be directly wired to the Arudino)?  Do you think I should avoid using the breadboard altogether?  I'm sort of at a loss as how to connect it otherwise.


Yes, it's ok to connect the lcd ground to Arduino ground via a dedicated row on the breadboard, the main thing is to keep that ground wire short and not share it with anything else that needs to be connected to Arduino ground. What I'm trying to avoid is noise induced on a ground wire (for example, on the -ve wire from the power supply) coupling to the LCD via a shared ground wire.
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.

InsufficientFunds

I corrected the issue thanks to everyone's advice, so I wanted to let you all know in case someone is searching in the future.  My issue was definitely a result of the draw from the refrigerator compressor starts.  It never dawned on me until reading the information about linear draws (such as with the light bulb) that motors tend to draw a large amount of current when starting.  It was the on-off cycling that was causing the Arduino's LCD to corrupt the data, as I had the power supply and the refrigerator plugged into the same outlet.  Simply moving the Arduino's power supply to a different outlet in the basement (about 15 feet away, using an extension cord) resulted in about 8 hours of continuous running today without an issue.

Remember kids, motors draw a ton of current when they start from a stand-still, and that can disrupt sensitive electrical equipment. :smiley-roll-sweat: I work in the electrical drives business, I really should have known this...

Anyways, thanks to everyone who replied with their excellent advice.  This was definitely a great learning experience, and I hope I have some good beer as a result of this.

JimG

Sorry for being late to the party, but I wanted to let you know that I have the same problem.  And I had also narrowed the cause to switching inductive loads (in my case, a small vibe pump and solenoid).  Unfortunately, I cannot solve it by moving the power source like you did.

My Arduino is powered from a small isolated AC-DC switching converter (a 9VDC wall wart).  The converter is supplied with mains power less than a foot (as the crow flies and along the wires) away from the devices with the coils.

I put a diode across the AC input leads at the converter to snub the high spikes on AC mains, and this has cut the instances of problems way down.  But I still get a confused LCD now and again when the pump or solenoid are switched.  So I would love to find a more robust solution...

Jim

snowowl

And my thanks to dc42. My lcd was corrupting after 40 seconds and I was sharing breadboard ground. I moved it directly to the Arduino and she's solid as a rock.

hardcore


My Arduino is powered from a small isolated AC-DC switching converter (a 9VDC wall wart).  The converter is supplied with mains power less than a foot (as the crow flies and along the wires) away from the devices with the coils.

I put a diode across the AC input leads at the converter to snub the high spikes on AC mains, and this has cut the instances of problems way down.  But I still get a confused LCD now and again when the pump or solenoid are switched.  So I would love to find a more robust solution...

Jim


Quote
I put a diode across the AC input leads at the converter to snub the high spikes on AC mains


Sorry that is incorrect and potentially dangerous,  if it is AC you should be using a Transorb, or if it is an AC switch, a resistor and an X2 capacitor in series across the contacts.
You ONLY put a reversed diode across a low voltage DC feed with a 0.1uf capacitor ,and possibly an inductor in the  Arduno & low voltage control feed.


JimG


Sorry that is incorrect and potentially dangerous,  if it is AC you should be using a Transorb, or if it is an AC switch, a resistor and an X2 capacitor in series across the contacts.
You ONLY put a reversed diode across a low voltage DC feed with a 0.1uf capacitor ,and possibly an inductor in the  Arduno & low voltage control feed.

I should have been more specific, I guess.  I put a 1500W, 171V TVS diode across the AC leads (Littlefuse, 1.5KE200CA-B).  Seems to have helped a little.  At least there were no sparks, smoke, or flames.

I am still looking for a better solution for what I believe are transient spikes resulting from switching off either the pump (piston/spring type driven by coil) or a small solenoid operated valve.  The same switch turns off both, so I can't easily isolate the bad actor.

Jim

hardcore

ok, a TVS is a little different........

If it is a coil type load, you will be looking at back EMF, best way is either a  diode (for DC) across the coil, or an inline inductor (for AC) in series with the coil. and  if you have a relay in there, you need a resistor+capacitor (Snubber network) across the contacts.


karimgen

Hello everybody,
I have the same problem...... Yesterday i've just put together 10 18b20 probes connected to the same pin, a lcd display 2 x 16 and a ethernet shield all running with arduino MEGA.

with this hardware i have manage to display the temp of the ten sensors ( lcd shows in looping sequence the temperatures every 5 seconds ex : T1=21,15  ... 5 second ..... T2=21,40 ... .... T10 = 21,15 ) . After about 15 minutes i get LCD text corrupted showing random characters ..... My arduino is connected only with usb cable and ethernet cable ( the device also send temperature values over telnet ) and 10 sensors.....

Thanks


liuzengqiang

Please try not to resurrect old "closed" threads just because you think you have the same problem. If you did, you would be able to solve your problem with the answer offered in the thread. Post a new thread and post your code.
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter


ariesprg

In my project i am connecting the LCD 16x2 same in Inductive load and it gets corrupt some times when valve switches ON/OFF , i put TVS in DC bias ,Snubber at AC side nothing worked out for me . though it is a product i cant use seperate supply lines for motors , AC valves and AC/DC converter .  Any robust solution , plz suggest .  -prag

Docedison

one... has anyone thought of hanging a very large capacitor, say 22000 uF @ 15Volts across the DCin connector... Great for absorbing spikes. Really Gross value and technique called by some go-rilla force but it has been known to work and Metal cases properly earthed/grounded to the Earth Ground will usually fix about 99% of the issues, the rest probably were impracticable anyway...

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Go Up