LCDscreen failing sometimes?

:upside_down_face:

General rules for logic circuits switching high currents.

  1. Ensure that each electronic item has local 100nF capacitors.
  2. Ensure that there is sufficient reservoir capacitance on power supply.
  3. Snubber network on relay coils.
  4. Keep switched high currents separate from low-level logic.

Your Fritzing implies that you are using individual ready-made modules.
So (1) and (3) are probably already correct on the modules.

Which leaves it down to the physical wire placing. e.g. noise pickup.
Hence a photo of the blue enclosure would be useful.
What are the black items at the bottom right of the grey enclosure?

Electrical Noise suppression is the best solution. e.g. good layout. avoid ground loops.
But there are always software remedies.

David.

The i2c bus on an Arduino using the Wire library is actually a bit fragile.
If the SDA or SCL signals glitch, bad things can happen.
things like:

  • lock up the Wire library
  • transfer incorrect data to the PCF8574 (which can corrupt the display)
  • lose an i2c transaction since the glitch can cause an i2c error or even attempt to send the data to different slave address.

Some of these errors are not detectable by the Arduino library.
There has been some code put in the recent Wire library to prevent the lockup but it is not enable by default.
However, if you enable the code to disable the lockup, it won't really matter since in many cases the condition that created the lockup has corrupted the slave or the slave or host state to a point where things must be restarted anyway.

power fluctuations nor noise on power signals or the I2c signals can cause this.
If the Wire library encounteres types of issues it can cause the host and the LCD to loose nibble sync.
Once that happens, there is no recovery until the system is reset.
And until then the LCD will see garbage commands since it is interpreting each byte transfer incorrectly since it will see the low nibble from one byte and the high nibble from the next byte as the command or data byte.
This will typically corrupt the display with garbage.

Another failure is if there is power glitches or there is ground bounce happening.
That can cause the LCD to see phantom E signal strobes or miss E signal transitions. If this happens it causes the host and the LCD to get out of nibble sync and the situation is as described above and requires a system reset.

The things mentioned by others are to to try to eliminate these types of issues.

--- bill

Paul_B:

I think I do - it's the black adapter in the EDB-outlet on the picture of the enclosure, and plugged into the power socket on the Arduino-clone board.

It's at 8V 500mA.

Bill/David:
Thx for a very detailed and informative answer !

Davis: The black to the bottom right is 1) the smaller wires are the BUS for reading the temp.sensors and 2) futher down the outlets for each of the pumps.
I did it this way to easily find out which temp.sensor belongs to which pump.

I wont even show you the inside of the blue box but I think I'll have to make some 'snakes' inside this box to clean up the mess of wires in there and place some reservoir capacitors too.

I'll take it all inside my shop again and run it there for a while - else I have to sit outside in the rain with a laptop and wait for some garbage to come up - that's a no-go !

THX to all for your time and advices !

Hi,

When you have it in the shop, see if the fault occurs with the pumps disconnected.

Tom.... :grinning: :+1: :coffee: :australia:

If the display suddenly starts flashing, blinking and showing weird characters you would never see on a keyboard, the reason is usually a synchronisation error. The data is transmitted to the LCD controller chip (usually) in two units of 4 bits and these are joined up to form an 8 bit unit. If the synchronisation fails, the 8 bit unit can be made up 4 bit units which don't belong together.
You can force a periodic resync be calling the display library's initialisation method at intervals.
Of course, this should be regarded as a work around, however, it might save you from opening that blue box. The best solution is to eliminate transient power effects which cause the synchronisation failure.

+1

It is still worth confining the rats nest to one area and keeping the brown wires separate.

If the relay modules have snubber networks with the pumps disconnected the LCD should be fine.

David.

While you might - just might - get away with that if it is a switchmode supply (but it actually does not look like one!), that is not the proper way to power such a circuit.

It runs on regulated 5 V.

You need to provide a regulated 5 V supply such as a USB "Phone charger" which could reasonably connect by a short cable of decent quality to the USB connector. Not the optimum approach however, which would rather be to connect the 5 V to the "5V" pin on the Arduino except when it is connected to the PC by USB.

Attempting to use the completely inadequately heatsinked regulator on the UNO via the "barrel jack" or "Vin" is pretty much asking for trouble with power glitches.

None of you kicked me for 'just' using jumper/connecting wires and using NO SOLDER inside the blue box - is that OK ?
I made some thicker pins than normal 'jumper wires' have, so they are a little harder to put in and take out - and they will NOT fall out by just moving the box around - I'm sure !

About noise-pichup in the temp.sensor wire: I could easily place these BUSsed wires inside a thin-wall alu-pipe - from the blue box to where they leave the gray enclosure - would that be worth to do ?
Where should that pipe eventually be 'grounded' ?

I the end the temp.sensor WILL get very close to the pump 'motor' - it's mounted directly on top of that - look here:

Should I have the Auduino board, the I2C/LCD and rotary encoder in one box and the relays in another box ?

Paul:
According to the manual my Arduino can run at 5-9V - and my adaptor IS in fact from a phone charger !

But, yes, I AM using the "barrel jack"

I can't have a computer placed out there in the garden just for feeding 5V by USB to this project - come on now !

Tom:
I have had the system running for weeks in my shop WITHOUT the pumps connected and NO PROBLEMS with the LCD ... BUT ...

a difference is - it was feeded 5V via USB back then - so the test here would be to see if the 'barrel jack' PS is good enough - right ?

Hi,

It is to see if noise from the relay contacts switching AC to an inductive load is causing the problem.

Tom... :grinning: :+1: :coffee: :australia:

???? I don't get you - you said:

"When you have it in the shop, see if the fault occurs with the pumps disconnected."

When the pumps are DIS-connected - then there is no AC for the relais to turn ON/OFF !

Hi,

Exactly, so if you code works in the shop without any problems, then the cause could be the mains AC switching your inductive motors.
Use a heat source, like a soldering iron, to cycle your temperature sensors and make the relays operate.

Tom... :grinning: :coffee: :coffee: :coffee: :coffee: :coffee: :coffee: :australia:

What manual?

It can run from regulated 5 V to the USB connector or "5V" pin or 7 to 9 V to the "barrel jack" or "Vin". Not at all the same thing. But running extra parts such as the relays when powering at other than regulated 5 V is where you get into trouble with the regulator on the Arduino.

Not a 5 V USB phone charger however if it uses the "barrel" connector, so that is not explaining anything.

What has that to do with anything? :upside_down_face:

USB "phone chargers" provide regulated 5 V to a USB connector. You can use a USB cable to connect them to the USB socket on the UNO. Suitable short cables (to minimise resistance) are commonly sold with UNOs or clones.

Indeed.

As said in posting #32 I have had this test done for weeks - no need to do that again, I think !

I just in detail looked at my relay modul and can NOT see any "snubber" on the power side of the relays. There seems to be implemented a diode-snubber on the coil-side of the relays.

Where should such a RC-snubber be placed - could it be placed across the brown leads somewhere outside the blue box in my gray enclosure ?

  • there is space for both of them - isolated for safety !

What values for R and C ?

Mr. @ksor
Now you have learned to read and correctly read the var word "snubber"?

Because when I wrote snubber

ref: Snubber - Wikipedia

you read "'snupper'".
I'm glad you learned

RV mineirin

Hi,

You say in post#32 that ;

Tom:
I have had the system running for weeks in my shop WITHOUT the pumps connected and NO PROBLEMS with the LCD ... BUT ...

NO PRPBLEMS without the pumps connected.
BUT
When you do connect the pumps you do.

So why dismiss this possible cause?
The different power supply could also be the problem, but don't dismiss every other one.

Tom... :grinning: :+1: :coffee: :australia:

I found this as base for my powering:
"The barrel connector can be supplied with an input of 7-12V. This is regulated to 5V by the onboard voltage regulator, and the board is powered on."
https://technobyte.org/2016/07/power-up-the-arduino-uno/

Is that fake infos ?