LCD's powered by reed relay. 1 gets no signal but has power

First of all, thanks for taking the time for reading this post.

Summary:
One of the two LCD does not get communication from arduino when reed relay is used.
I2C adress is found though. Works fine without relay.

Long story
What I am trying to do is easy.

I have an aqurium monitoring system that includes 2 LCD's.
After aquarium lights go off the LCD's are to bright when you sitting in the room waching TV.

Plan is to include a Reed relay between LCD power so I can switch them off at a certain time.

Quick drawing for testing:

The Reed relay works fine and LCD's turn on and off but here is the problem.
When I include the reed relay (sip-1a05) one of the LCD looses it signal from the arduino so no text is displayed so only lights up.
Other one is working fine. Both LCD"s have a different I2C adress ofcourse.
When I switch the wires the same LCD does not get this signal comming from arduino.

Now when I bypass (remove) the reed relay both LCD's get the text.
When reed relay is used and no text is showing it does show up on I2C scanner.

I measures resistance but it is almost 0.
Installed second relay in paralell but same issue.

It seems to have to do with the LCD itself (both are different brand) but I just doesnt make any sense. Who can help me out or explain it.

Thank you

When you initially apply power to the system the Arduino starts running your sketch from the beginning. The 'setup' part of the sketch sends initialization commands to the LCD controller. These commands are essential to reliable operation of the display.

The LCD controller has no non-volatile memory so when you remove it's power it 'forgets' everything.

When you reapply power to the LCD it does not receive the required initialization commands since the Arduino sketch has not restarted from the beginning and is only running the commands in 'loop'. This is the reason that your one display does not function properly. Why the other display appears to work when power is reapplied is a mystery.

Normally I would suggest that you use the reed relay to remove just the backlight power. This is a trivial problem for the standard parallel interface but may not be too difficult for your I2C setup depending on which I2C adapter you have. If your adapter has a jumper that enables the backlight you should be able to use the reed relay in it's place to control the backlight.

Otherwise the solution would involve turning the backlight off by software which is probably the best technique in any case. Use a simple light sensor to detect when the aquarium lights go on or off and then issue the appropriate commands to turn the backlight on or off.

Don

You are using I2C interfaced LCDs.

There is absolutely no reason whatsoever to muck about with relays, as the backlight is controlled by the I2C interface. Did you not know this? Just study up on the code (library) which you are already using.

There are also two tricks you can use with the I2C backpack. Many have a link which will disable the backlight completely - if you substitute this link with a resistor (in the range of 100 to 5k ohms) you can reduce the intensity of the backlight when it is on. Alternatively, you can wire a resistor across to the corresponding terminal which connects to the LCD, to provide a minimum LED brightness, and switch between this and full brightness.

Alternatively, you can wire a resistor across the terminals which connect to the LCD, to provide a minimum LED brightness, and switch between this and full brightness.

Huh? I think this needs some rework.

Don

floresta:
Huh? I think this needs some rework.

Reworked as requested.

It is merely a matter of figuring out whether the control transistor is NPN on the ground side, in which case a resistor from pin 1 to pin 16 will set a minimum LED brightness, or if it is a PNP on the supply side, a resistor from pin 2 to pin 15.

Thank you both for your reply. Both are very helpfull!

@ floresta
There is indeed a jumper on the back for the backlight so that is a very good suggestion!
I never though about the initialization issue when using it this way and makes sense.

@ Paul__B
Now that you mention it I know that the backlight is turned on by the sketch.
For some strange reason I just didn't think about turning it off this way........idiot :slight_smile:
Gues I just wanted to try and play with relays since I never did.
I will check out the resistor suggestion also. Sounds easy enough with your explanation.

@ Both
Your suggestions will make this work for sure but there is that one question.
Why would one of the LCD's initialize and the other not when using the relay?
Doesn't realy matter for the fix but hate it when I don't understand something.

Thank you for your time gentlemen.

Redeque:
Why would one of the LCD's initialise and the other not when using the relay?
Doesn't realy matter for the fix but hate it when I don't understand something.

Do you mean "Doesn't relay matter"? :grinning:

My suspicion would be the code because the driver chips in the LCDs should be identical.

To figure that out with your problematic relay still in place, exchange the addresses of the two backpacks (if that is practical). If that is not practical, might as well forget it. ;D

Working like a charm now.

RTC is setting time and at 20:00 the LCD backlight turns off.

Sometimes you just need to think.....simple...

It was not the code since it is working fine when powered directly.
Chaned I2C adress but no change there.
It is always the same LCD. Strange but like you said......let it go, let it go!

Thanks again gentleman. Turned out to be an easy one!

Redeque:
It was not the code since it is working fine when powered directly.

Well, that is of course, not a correct deduction.

Never mind! :slight_smile: