i2c lcd contrast issue when switching on heater

I have a timer program on an Arduino uno that switches a 230v immersion heater via a relay module. The lcd uses an i2c backpack. Everything works fine when mains isn’t connected, but when it is and the uno switches the heater on, the lcd contrast gradually goes high over about one minute. I can still make out the characters and they are displaying correctly. When the heater switches off the contrast returns to normal. I’m thinking the heater is interfering with the contrast pin of the lcd somehow. Does anyone have any ideas?

Thanks

If the LCD display changes temperature, that will change the contrast.
Is the LCD inside the heater and heating up?

Resistor values can change as temperature changes, so if the potentiometer pot changes temperature it can have effect on the display contrast.

Another thing that can change the LCD contrast, is the lcd module supply voltage.
If you measure the voltage at the LCD (usually hd44780 LCD module pins 1 & 2) does it change when the heater is switched on?

--- bill

While checking the lcd module voltage when the heater was on, I accidentally shorted the power rails and screwed up the program

So?

Paul__B:
So?

No idea why the rest of that comment didn't post.

So the program got messed up, so I uploaded it to another uno that I had lying around to replace it. The first uno that I shorted was a clone. The second uno happened to be an original and when I installed it everything worked fine. The lcd contrast no longer went high. So its fixed. So what in the clone would have caused the problem?

Thanks.

I think you are still short on detail as to exactly what you did when you say "I accidentally shorted the power rails and screwed up the program". Just how is the "program messed up", and what about the initial problem you described with the LCD contrast?

Did you check the details Bill described? Is the LCD inside the heater and heating up? Did you eventually check the LCD module supply voltage? Are you using some peculiar way of defining the contrast voltage, such as trying to control it using PWM, or attempting to power the UNO via the "barrel jack" or Vin?

It is extremely unlikely that a "clone" will behave differently to a "genuine" Arduino. It would be something you did - or failed to do - that would be the problem.