lcd garble

I decided to create a new thread since the old one got too clouded…
here is a link to the old thread…
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1291774777

and here it goes…
okay folks i played around some more and found out its a problem with the lcd…

the problem might originate from somewhere else in my circuit but, only the lcd is affected (severly…)

here is a link to what one of the odd garbles is that i get:

http://img33.imageshack.us/img33/3077/photo0365m.jpg

here is a link to my circuit diagram in fritzing…

http://img227.imageshack.us/img227/3775/garduinobb.jpg

what do you think I can do about this issue??
i tried to find stuff googling without results… except that it may be a corruption of the lcd memory due to noise…? please help me out here :wink:

you have a display on/off switch attached to lcd power.

LiquidCrystal sort of hides the initialization of the LCD hardware. When you write LiquidCrystal lcd(rs,en,d1,d2,d3,d4);

the LCD hardware gets initialized. If you switch the power off later or if it is not on when your sketch starts you can run lcd.begin(); to reinitialize the display.

In general switching the power off directly like this, then, is a bad idea; the arduino can't really see when the lcd needs to be reinitialized. The initialization process is relatively slow.

1) Looks like you learned nothing from (assuming you even read) Grumpy_Mike's tutorial on Decoupling.

not true. i tried that and still get the errors on the lcd screen. This is why i started the new thread - LCD GARBLE.

2) The "Fritzing" picture tells us nothing useful about your circuit. Fritzing is not a suitable documentation for debugging purposes.

fine, what would you prefer?

you have a display on/off switch attached to lcd power.

LiquidCrystal sort of hides the initialization of the LCD hardware. When you write LiquidCrystal lcd(rs,en,d1,d2,d3,d4);

the LCD hardware gets initialized. If you switch the power off later or if it is not on when your sketch starts you can run lcd.begin(); to reinitialize the display.

In general switching the power off directly like this, then, is a bad idea; the arduino can't really see when the lcd needs to be reinitialized. The initialization process is relatively slow.

as i understand the switch is attached to the 5v+ going to the led. However I had the problem before adding the switch. Thanks for the lead, ill check it out.

fine, what would you prefer?

Best would be a properly annotated circuit diagram? That's how electronic circuits have been documented for the past 70 years or mare. If you don't have a program to generate it, get out a piece of paper and pen and draw it using your preferred upper appendage, then scan it or take a photo. That's still a lot better than counting holes in Fritzing.

Korman

Best would be a properly annotated circuit diagram? That's how electronic circuits have been documented for the past 70 years or mare. If you don't have a program to generate it, get out a piece of paper and pen and draw it using your preferred upper appendage, then scan it or take a photo. That's still a lot better than counting holes in Fritzing.

Korman

haha okay i was just trying to get this resolved as quickly as possible and i am not really your best circuits guy lol but ill have that a go some time soon.

For right now (going to europe to morrow night and would like to have it running without errors...), can anyone tell me if the problem is due to noise to the lcd? can i use caps to reduce the noise? Where else can i find a problem with the lcd?

About the problem with the garbling, have you tried to drive your LCD in the same hardware setup with a most simple program which only displays stuff and ignores everything else? Do you get the same errors?

What when you try just a most simple program and circuit consisting of the LCD and the Arduino with short cables? Also the same errors? Do you have loose cables that generate random data errors?

That's a few things interesting to know which might give some clues about what could be the source of the problem.

In the end, you might have to check if the LCD works properly with the most simple circuit and program. If that works, add stuff again slowly until it fails. Then you will have a point where you can say, adding this breaks things and you can look into matters there.

Korman

i created a short lcd test code with my atmega 2560 and tried it out, there it works fine.

Also the problem with the noise seems to be coming from the power line itself (the in wall powerline... lol - see old thread..)

but since it does not effect the programming on the chip, i assume i can do something about the lcd on the breadboard to make it work...?

About the problem with the garbling, have you tried to drive your LCD in the same hardware setup with a most simple program which only displays stuff and ignores everything else? Do you get the same errors?

yes

What when you try just a most simple program and circuit consisting of the LCD and the Arduino with short cables? Also the same errors? Do you have loose cables that generate random data errors?

most simple program short cables, same setup, same problem. power the arduino via usb, problem gone... cables are all in breadboard but never had an issue with that...

In the end, you might have to check if the LCD works properly with the most simple circuit and program. If that works, add stuff again slowly until it fails. Then you will have a point where you can say, adding this breaks things and you can look into matters there.

well i see that the corruption is coming from somewhere in my setup. i can now eliminate the relays. eliminate the pot and buttons leaving only the walwort thingy... however the only thing effected by the wall wort is the lcd in that its memory must corrupt... the code , as stated above, works fine (arduino continues to keep track of time, turning lights and water on and off like it should), leading to believe that there is noise that is coming from the psu.

fix?

If you have long cables, you might pick up garbage on the data lines those. Does the same problem arise when you power it form batteries?

If it's the power supply, the only thing left to do is decoupling like Grumpy_Mike wrote. If that doesn't work, either you're not doing it right or it's something else.

Korman

If you have long cables, you might pick up garbage on the data lines those. Does the same problem arise when you power it form batteries?

i just made my cables shorter, it did not help. I tried decoupling again but I messed up somewhere... now my lcd is bonkers .. haha ohh boii

If it's the power supply, the only thing left to do is decoupling like Grumpy_Mike wrote. If that doesn't work, either you're not doing it right or it's something else.

i guess ill work over it when i get back... thanks everyone for all the help youve been fantastic

i tried that and still get the errors on the lcd screen.

Just because trying decoupling didn't instantly solve your problem doesn't mean you can remove it. Apply decoupling and then go chasing another possible error source. The fact that it works with a simple setup implies that you are getting noise into the system and that the decoupling technique you have used is not sufficient. Remember decoupling is not just a simple matter of adding capacitors across the supply.

okay fair enough. Where would you place capacitors on my circuit? I am not too familiar with decoupling .. maybe you can show me around a little.. what type of transistors too pls...

I must have read the page on decoupling 20 times on your website before i looked at the other stuff and i must say, i love it! good stuff there!

thanks Grumpy_Mike!

That horrible Fritzing drawing appears to show pin 5 of the LCD connected to +5v instead of GND.

Your 'Display On/OFF' switch should be labeled 'Backlight ON/OFF'.

Don