LCD brightness with relay.

Hey forum, im stuck with a problem that i can’t deal by myself. In a couple words, my LCD brightness is darker when my relay is turned off but when i turn it on the screen becomes normal. There’s some pictures below that i took and my code.

Relay ON:

Relay OFF:

codigo.txt (8.61 KB)

(deleted)

As #1, or the whole thing from a more powerful power supply.

This is the current scheme from my relay:

wvmarle:
As #1, or the whole thing from a more powerful power supply.

Both Arduino and relay are being supplied from different things.

Flambo: Both Arduino and relay are being supplied from different things.

That's not what I see in your schematic, so either what you state here is false, or your schematic is wrong. Schematic shows the Arduino powering the relays.

By the way, your LCD screen is notably absent from this schematic.

wvmarle: That's not what I see in your schematic, so either what you state here is false, or your schematic is wrong. Schematic shows the Arduino powering the relays.

By the way, your LCD screen is notably absent from this schematic.

Im sorry. You're right, i misunderstood the answers. Do you really think this might be the problem ? I used this project in a previous version and this wasn't a problem, the only different is the add of a water sensor DS18B20.

You should probably get yourself a multimeter. I'm guessing the 5V is dropping.

Hey forum, im stuck with a problem that i can't deal by myself. In a couple words, my LCD brightness is darker when my relay is turned off but when i turn it on the screen becomes normal. There's some pictures below that i took and my code

If you are using the NO relay contacts (I can't see your picture clearly) so the lights go on when the relay is energized, it should be the other way around... However, if you are using the NC contacts, the lights will be on when the relay is de-energized... It's (probably) related to current through the relay coil "sucking down the voltage", and unrelated to the 120VAC lights being on or off.

the only different is the add of a water sensor DS18B20.

I'll betcha' if you disconnect the sensor it makes no difference. Unless you've wired the sensor wrong, it shouldn't draw much current and shouldn't affect the power supply.

Flambo: Im sorry. You're right, i misunderstood the answers. Do you really think this might be the problem ?

Good chance, especially if you operate both relays at the same time. It's quite a draw on the Arduino's tiny regulator.

The DS18B20 sensor doesn't draw much (about 1 mA according to the spec sheet when active, much less when idle), so indeed shouldn't be an issue. Relays on the other hand easily draw around 100 mA each.

I don't see how the Uno is powered. Leo..