LCD shows Garbage

i am using arduino uno interface with 16x2 lcd. but after some time lcd shows garbage. once we reset it dispay good but again shows garbage. please find attached code and circuit diagram and help me to resolve this issue.

my.ino (5.22 KB)

OP image.

My first guess is that the 5V regulator is getting hot and the voltage is dropping. Check the regulator to see if it is getting hot.

The recommended max power dissipation for the regulator is 1 Watt. You are feeding the regulator 12V. To output 5V the regulator must drop 7V. To keep dissipation under 1W the current supplied by the regulator must stay under about 140mA (1W / 7V = 143mA). The Uno takes about 50mA of that so that leaves 90mA for everything else. The solution is to use a buck regulator to drop the 12V to 5V and feed that to the 5V of the Uno, bypassing the regulator.

My guess is that one or more of the relays could also be causing the problem.

There have been lots of threads about this topic. Look for titles containing LCD along with descriptions such as Garbage, Weird , etc.

Don

Una pantalla LCD (liquid crystal display: ‘pantalla de cristal líquido’ por sus siglas en inglés) es una pantalla delgada y plana formada por un número de píxeles en color o monocromos colocados delante de una fuente de luz o reflectora. A menudo se utiliza en dispositivos electrónicos de pilas, ya que utiliza cantidades muy pequeñas de energía eléctrica.

Está presente en un sinnúmero de aparatos, desde la limitada imagen que muestra una calculadora de bolsillo hasta televisores de 50 o más pulgadas. Estas pantallas se componen de miles de pequeños cristales líquidos, que no son sólidos ni Líquidos en realidad, sino un estado intermedio

but it works fine after reset... and again shows garbage. i use separate power supply for relay and controller but same issue again.. also tries decoupling capacitor at lcd ..also at power supply.. but same problem arising.