Problem with LCD which working for a long time

Hi
I have a problem with LCD 2x16 module which is connected with Arduino uno in an eggs incubator project.
The program is working very fine but here is the problem.The program must be running continuously for 21 days.The LCD works correctly for one or two days and then begin to show strange characters but the program still working correctly.The LCD don't back to normal state until resetting the Arduino.
can any one help me in this case ??

LCD could pick some interferences from power cables or relay coils, If you have any. Are you using cables to connect the LCD to arduino? If Yes, How long are they? I had verry same problem caused by relay switching solenoid valve. First I've put lcd.begin(16,2) called every 60seconds in loop() . That cleared all rubbish from LCD. Then i Just removed relay and used shorter cables connecting LCD and the problem was gone.

Hi waski,
Thank you for your reply.I've tried the solution of putting the lcd.begin(16,2) command in the void loop() as I don't have relays in my circuit and the cables are short , the problem is completely solved.
Thank you again. :slight_smile:

the problem is completely solved.

That's not really a solution, it is a crude hack. You have not solved the underlying problem, whatever it is.

Don

Yes, this is not a real solution. It's better to find a reason that LCD is behaving this way. Maybe you should try to solder a 100nF capacitor to Vcc ang GND on lcd . Ofcourse to try it out you have to remove lcd.begin from the loop. In my case, arduino was working for nearly 2 months with lcd.begin in loop() because i had no time to solve the problem - everything was fine but I felt not right using such method :slight_smile:

floresta:
That's not really a solution, it is a crude hack.

I agree with you.