# LCDscreen failing sometimes?

**URL:** <https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308>\
**Category:** Displays\
**Created:** [October 22, 2021, 7:09am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308 "2021-10-22T07:09:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksor](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ksor/32/547366_2.png) [@ksor](https://forum.arduino.cc/u/ksor)\
**Post date:** [October 22, 2021, 7:09am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/1 "2021-10-22T07:09:00Z")

</div>

I've had a project running to control some air pumps for my garden pond.

I can manage the system parameters via a LCD-screen and a rotary encoder, BUT ...

Now and then - when the wind is blowing from west and the sun is 22° over the horison = totally random - one or two times a week the LCD-screen is showing garbage characters !

The LCD is connected to an Arduino clone by by I2C module.

I just have to reset the system and it works again - but why this garbage screen sometimes ?

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [October 22, 2021, 7:12am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/2 "2021-10-22T07:12:28Z")

</div>

Hi,  
What is the display?  
How long is the I2C link between controller and display?

Can you please post your code?  
Can you please post a circuit diagram?  
What voltage are the pumps and how are you controlling them?

Thanks.. Tom... 😀 👍 ☕ 🇦🇺

---

<div class="post-metadata">

**Author:** ![ksor](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ksor/32/547366_2.png) [@ksor](https://forum.arduino.cc/u/ksor)\
**Post date:** [October 22, 2021, 7:25am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/3 "2021-10-22T07:25:18Z")

</div>

LCD is a 2X15 charactor and is bought with the I2C-module soldered on to the back.  
The LCD+I2C-mocule is mounted in the same box as the arduino.  
The code is working so nothing to find there.  
A diagram

 ![Diagram](https://europe1.discourse-cdn.com/arduino/original/4X/7/8/7/7873db9d7bea63c46aba078121fa305ab7982a0e.png)

The pumps run at 240V and are controlled by a relay-module between the arduino and the pumps.

---

<div class="post-metadata">

**Author:** ![ksor](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ksor/32/547366_2.png) [@ksor](https://forum.arduino.cc/u/ksor)\
**Post date:** [October 22, 2021, 7:28am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/4 "2021-10-22T07:28:14Z")

</div>

Oh, I see now the diagram misses a wire in the BUS for the temp.sensor - but it's ONLY the diagram - the wire is there IRL !

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [October 22, 2021, 7:56am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/5 "2021-10-22T07:56:42Z")

</div>

Hi,  
Can you now draw a schematic, rather than a Fritzy image

Label all components and pin names.  
What are the two components that have the TO-92 case?  
Please include the 240Vac wiring and the pumps?  
A hand drawn schematic would be adequate.  
How are you powering your project?  
I think you mean a 16x2 LCD module.

Can you also please post a picture(s) of your project?  
So we can see your component layout.

If you are switching 240Vac, have you kept the mains wiring away from the controller and display.  
Do you think the LCD problem could be associated with the switching of the 240Vac pumps?  
What are the specifications of the pumps?

Thanks.. Tom.... 😀 👍 ☕ 🇦🇺

---

<div class="post-metadata">

**Author:** ![david\_prentice](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@david\_prentice](https://forum.arduino.cc/u/david_prentice)\
**Post date:** [October 22, 2021, 9:02am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/6 "2021-10-22T09:02:25Z")

</div>

> [@TomGeorge](#):
>
> Can you now draw a schematic, rather than a Fritzy image

What is wrong with a Fritzing image?

Yes, you need to quote part names and component values.  
Yes, you want to include the _misses a wire in the BUS for the temp.sensor_

A diagram (or schematic) is not much good if it is not accurate. That includes wire colours.

Yes, you want to include a photo of the "Real Life Wiring" too.

In my opinion a Fritzing not only shows the wire connections clearly to the reader but it also means that the OP can check each wire herself. The OP does not require any technical knowledge. Just be able to identify each wire colour and connections.

Oh, individual modules have _probably_ got sufficient reservoir and bypass capacitors. However the photo would show if signal wires are routed "too close to each other".

David.

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [October 22, 2021, 9:07am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/7 "2021-10-22T09:07:43Z")

</div>

You don't show a 5 V power supply for the relays - or indeed the circuit in general. 🙄

The relay module needs the jumper to be removed, "JD-VCC" and "Gnd" run as a **pair** directly to the power supply output terminals while the two "IN" and "VCC"run again, as a **bundle** to the Arduino but "GND" does not connect to the Arduino as such.

You may also try a 100 or 220 µF capacitor directly across pins 1 and 2 of the LCD. 👍

---

<div class="post-metadata">

**Author:** ![ksor](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ksor/32/547366_2.png) [@ksor](https://forum.arduino.cc/u/ksor)\
**Post date:** [October 22, 2021, 9:30am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/8 "2021-10-22T09:30:34Z")

</div>

I'll admit my wiring in the Arduino/relay/LCD-box maybe is a little 'unsafe' - it's just connecting wires plugged into the on-board connectors of the Arduino-clone = no solder done !

Maybe Paul\_B has a point there - relays is NOT connected directly to PS - I'll do that and TOO a capacitor on the LCD pin 1-2 !

Here is the overall mounting box:

 ![Billede1](https://europe1.discourse-cdn.com/arduino/original/4X/a/d/6/ad6cae45115f4c21b0eb2333eae3fd766996df24.jpeg)

The blue electronic box is truely a mess of wires inside !

The 'problem' with the garbage on the LCD-display is not enough to take it all apart and solder and make separat PS for the relays.

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [October 22, 2021, 9:42am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/9 "2021-10-22T09:42:01Z")

</div>

Hi,  
Thanks for the image.  
The cable that curls around out of the blue box and out of the enclosure, I assume is the temperature sensors.  
I assume that the TO-92 cased devices are DS18B20 temperature sensors.

They exit close to the two power outlets for the pumps.  
I would suggest the sensor cable exits the enclosure through one of the holes on the left side away from the switched mains power.  
How long are the sensor leads?

Tom... 😀 👍 ☕ 🇦🇺

---

<div class="post-metadata">

**Author:** ![Whandall](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/whandall/32/222457_2.png) [@Whandall](https://forum.arduino.cc/u/Whandall)\
**Post date:** [October 22, 2021, 10:07am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/10 "2021-10-22T10:07:59Z")

</div>

> [@david\_prentice](#):
>
> What is wrong with a Fritzing image?

There is a whole thread answering that question.

> [@Wall of Shame](https://forum.arduino.cc/t/wall-of-shame/368601/354):
>
> [image]

> [@david\_prentice](#):
>
> In my opinion a Fritzing not only shows the wire connections clearly to the reader but it also means that the OP can check each wire herself.

I think you are pretty alone with that opinion.

---

<div class="post-metadata">

**Author:** ![ksor](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ksor/32/547366_2.png) [@ksor](https://forum.arduino.cc/u/ksor)\
**Post date:** [October 22, 2021, 10:27am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/11 "2021-10-22T10:27:06Z")

</div>

Be aware that there is nothing wrong with the temp. sensors - they are placed as there are because it's nice to find out witch sensor for witch pump - the leads are around 70CM - they came with the leads from the dealer - I just BUSsed them together ringht inside of the enclosure under the black shrinkwrap.

The system WORKS NICELY eventhough the LCD-screen is showing garbage !

So the I2C+LCD-screen is the problem most likely, I think.

The first thing I will try is the capacitor on the LCD pin 1 + 2

---

<div class="post-metadata">

**Author:** ![ksor](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ksor/32/547366_2.png) [@ksor](https://forum.arduino.cc/u/ksor)\
**Post date:** [October 22, 2021, 10:31am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/12 "2021-10-22T10:31:16Z")

</div>

I think 'witch' should be 'which' - my wife is all over me this morning 🤪

---

<div class="post-metadata">

**Author:** ![david\_prentice](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@david\_prentice](https://forum.arduino.cc/u/david_prentice)\
**Post date:** [October 22, 2021, 11:14am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/13 "2021-10-22T11:14:48Z")

</div>

The "Wall of Shame" link shows message #354 with a large Fritzing and an ugly dog.

If you have a valid opinion, please express it clearly.  
e.g. with links or message numbers that describe your argument.

Personally I don't participate in Forums like "Bar Sport"  
But this Displays Forum has a very good reputation for both politeness and solving Display problems.

I would not expect Arduino members to have an extensive technical knowledge. But a good strategy for "wiring up" a project is to follow the wire colour scheme and breadboard x,y locations.  
Or as in this thread, follow the wire colour scheme and module pinout. Yes, I would prefer no 3-way "joints". However I can understand them. And I bet that any 12-year old can too.

David.

p.s. since you have linked to one particular Fritzing, please can you list your criticisms.

---

<div class="post-metadata">

**Author:** ![ksor](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ksor/32/547366_2.png) [@ksor](https://forum.arduino.cc/u/ksor)\
**Post date:** [October 22, 2021, 11:29am UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/14 "2021-10-22T11:29:10Z")

</div>

Please take your 'Fritzing'-postings to the right place - it has nothing to do with my problem here - right !

---

<div class="post-metadata">

**Author:** ![ruilviana](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ruilviana/32/722429_2.png) [@ruilviana](https://forum.arduino.cc/u/ruilviana)\
**Post date:** [October 22, 2021, 12:35pm UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/15 "2021-10-22T12:35:09Z")

</div>

Hi @ksor,

the relays trigger the pumps, Correct.

Pumps are driven by motors,, and motors are load-inductive.

When switching inductive loads on or off, whether by relays or SSR, or other means, they generate voltage spikes known as "spikes".

These spikes are particularly annoying when using LCD displays.  
The recommended solution to reduce these spikes is to snubber each relay.

ref: [Snubber - Wikipedia](https://en.wikipedia.org/wiki/Snubber)

RV mineirin

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [October 22, 2021, 1:18pm UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/16 "2021-10-22T13:18:13Z")

</div>

Hi,

> [@ksor](#):
>
> Be aware that there is nothing wrong with the temp. sensors - they are placed as there are because it's nice to find out witch sensor for witch pump - the leads are around 70CM - they came with the leads from the dealer - I just BUSsed them together ringht inside of the enclosure under the black shrinkwrap.

There may be nothing wrong with the sensors, but you need to realise that your problem is possibly from switching noise of your relays.  
The noise may be getting into the controller and display via the sensor wiring.

Tom... 😀 👍 ☕ 🇦🇺  
What is the current rating of your pumps?

---

<div class="post-metadata">

**Author:** ![ksor](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ksor/32/547366_2.png) [@ksor](https://forum.arduino.cc/u/ksor)\
**Post date:** [October 22, 2021, 2:34pm UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/17 "2021-10-22T14:34:08Z")

</div>

Pumps are 28W each and only one running at a time.

---

<div class="post-metadata">

**Author:** ![ksor](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ksor/32/547366_2.png) [@ksor](https://forum.arduino.cc/u/ksor)\
**Post date:** [October 22, 2021, 2:37pm UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/18 "2021-10-22T14:37:54Z")

</div>

> > ruilviana  
> > No my pumps are 'driving' at the 50Hz frequence and only 28W

---

<div class="post-metadata">

**Author:** ![ruilviana](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ruilviana/32/722429_2.png) [@ruilviana](https://forum.arduino.cc/u/ruilviana)\
**Post date:** [October 22, 2021, 4:45pm UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/19 "2021-10-22T16:45:05Z")

</div>

Hi @ksor  
It does not matter the frequency, (50Hz , 60Hz), or the power, it does matter if they are inductive loads or not.  
I made a suggestion, but the decision to use snubber or not use is yours.  
RV mineirin

---

<div class="post-metadata">

**Author:** ![ksor](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ksor/32/547366_2.png) [@ksor](https://forum.arduino.cc/u/ksor)\
**Post date:** [October 22, 2021, 5:01pm UTC](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308/20 "2021-10-22T17:01:47Z")

</div>

Now that you know of my pumps ... what are they then ?

... and what is a 'snupper' on a relay ?

- tell me !

[Next page](https://forum.arduino.cc/t/lcdscreen-failing-sometimes/917308.md?page=2)
