Problems with 16x2 LCD - writes fine but after 10s disintegrates to weird chars

Muppo:
A0 as contrast pin: In regards to the whole A0 as contrast pin, I have no idea how I made it work before (it was couple of years ago and with an UNO and MEGA

You didn't ever make it work with A0. (nobody else could either)
A0 simply does not have PWM support on those boards.
If you had s/w contrast control working using an Arduino pin, you were using some other pin than A0, like perhaps pin 10.

Wiring: My wiring is hard to show with a picture as it is a double sided homemade PCB but I have written out a small schematic to show how I have wired the LCD and the LM7805. I hope this is okay. I have also taken pictures of the actual PCB just in case you want to see it.


As you can see on the down side of the PCB I soldered a wire from the 5V out of the LM7805 to the LCD as I was getting an unwanted voltage drop (possibly because of my homemade PCB) that is now fixed with that wire. I left out the other parts of the schematic as, at this point, I don't use it. It involves two DS18B20 temperature sensors, one YF-S201 flowmeter and a power output for 12 V controlled by a transistor. Also I have two tactile switches for controlling the whole thing.

We need to see the full schematic of ALL the parts.
Just because you are not trying to use the other parts does not mean that they are not influencing the overall circuit, and perhaps in a not so good way if there is a circuit issue.
This could be causing a large current draw.

What concerns me is the need for the extra wire. Given what you have, the load on the 7805 should not be very high and even a small trace should be able to handle the current.

It would interesting to know the overall current draw on the 7805.
I'd expect no more than about 100ma or so for the AVR and the LCD and LCD backlight all combined.

How are you downloading the code to the Nano?
Are you using the USB cable? And if so do you still have the LM7805 driving the 5v signals?
If so, that is not good as you have a short between two to different voltages.

Also, there is a 5v regulator on most nano devices.
Why not use that instead of using your own? Although 12v Vin might be a bit high depending on all the other devices being used (that you haven't shown us).

In looking at the photo with the angled LCD where you can see the "characters" under the "blocks", the characters look like garbage. That is often a sign the the LCD and host (Arduino) have lost 4 bit synchronization. This often can be due to bad signals or noisy signals or power supply issues.

--- bill