LCD scrambles after switching breaker

Hi All,

So my project is about monitoring the aquarium temperature with DS18B20 temp sensor and switching relay plus leds, based and temperature set points.

There is a transistor on the led and also on the relay. on the relay i also placed a capacitor and diode as other topics explain that the switching relays can scramble the LCD.

Now the switching of relay goes smooth without any problem, what causes the scrambling now is when i switch on the aquarium filter.

I made a power distribution board with a breaker for every user; filter, lightning, heater and Arduino 5v power supply. Switching on another breaker causes change in the power supply to the Arduino which results in the scrambling of the LCD.

What can solve this problem? Would a capacitor on the incoming 5v supply help?

Im not a expert in electronics and i get all solutions from experts online :smiley:

This is how the Relay is wired.
See attached pic.

IMG_2689.jpg

IMG_2690.PNG

Thomassen85:
There is a transistor on the led and also on the relay. on the relay I also placed a capacitor and diode as other topics explain that the switching relays can scramble the LCD.

That diagram is not overly helpful and I am not at all sure what the capacitor is supposed to do!

The suggestion is that you place a 100 µF capacitor directly across pins 1 and 2 of the LCD display.

This problem has a lot to do with "wiring dress" - how you run the wires to the Arduino. You may note my advice on this in other posts. A photo of your wiring may be helpful to critique. :grinning:

A / E control unit:

  1. The load is not less than 20% in (three-phase);

  2. The load is not less than 40% in (two-phase);

  3. The load is not less than 100% in (single phase);

  4. When the external 24V DC power supply is connected.

D / P / h control unit:

  1. The circuit breaker is closed (even if it is no load), and the upper port is powered;

  2. Power supply at the lower opening of the circuit breaker;

  3. PTE is selected and the upper port is powered;

  4. When the external 24V DC power supply is connected.

Im aware of wires running straight next to each other can cause issues but how i wired it, it should not cause that problem right?
What i should tell is that the 5V 10A power supply was bought from AliExpress so maybe its not that reliable.
Would it help if i place a ferrite bead on the power cable going in the 5v power supply?

And why place a capacitor across pin 1 and 2 of the display? Why not place a capacitor on the incoming 5V wires on the breadboard (the 2 on the bottom of the breadboard on the pic)?

BTW the loose white cable is for the 5V power supply and the 2 loose grey cables are for the 2 relays.

Made a adjustment, i took away the capacitor from the relays circuit and placed on on the incoming 5V on the breadboard. Have not tested yet.

Also good to know that the aquarium filter has a rotor so that might influence more than lets say the lightning or heating that would be switched on at certain moments.

Tested it but it still scrambles when switching on other breakers. Also the temperature sensor goes crazy.
I placed a capacitor on the 5v on the breadboard and a ferrite ring on the power cable to the 5v power supply.

Have you tried what I suggested? :roll_eyes:

I tried now and it seems to help a little but still scrambles when i swith more than 1 breaker.

Maybe it would help if i just put a plug on the PSU cable and plug it in the wall socket so its not in the power distribution box next to the others. Not what i want in the end but if that takes away the issue...

I trust that you are not suggesting that could be a finished product? Breadboards are for temporary prototyping and absolutely impractical as a final product.

You might find that EMI issues disappear once you build it onto a PCB or stripboard too, all those long wire links can be acting as inductive loops and aerials for all the rubbish being generated by switching.

AJLElectronics:
You might find that EMI issues disappear once you build it onto a PCB or stripboard too, all those long wire links can be acting as inductive loops and aerials for all the rubbish being generated by switching.

Yes, that is what I was explaining in #2.

Thomassen85:
I'm aware of wires running straight next to each other can cause issues but how i wired it, it should not cause that problem right?

Dead wrong! The problem is that wires not running straight next to each other can and frequently does issues. "Wiring dress" as I referred and explain so often here, means bundling together all the wires that connect one part of the assembly with another.


Now to be fair, it is possible to get "cross-talk" by mostly capacitive coupling if wires are together, which means to say that it is critical that the wires switched by the relays are kept as far as possible from the logic wiring, and that the output wires from the Arduino to the relay module are kept away from all the inputs to the Arduino. But grouping signal or control wires together with their matching ground - and supply - wires, also shields the electrostatic field (that is, capacitive coupling) and minimises that problem.

As AJLElectronics points out, long looping connections provide inductive coupling from or to that part of the circuit and when heavy currents are involved - as happens here - then that is the predominant form of interference. Inductance is proportional to the size (diameter) of the loop so keeping connections short and again, keeping the sides of every such loop together - the signal and the ground travelling as a pair - minimises that loop and is critical to preventing such interference.

It is pretty evident that this is the substantial problem here. :astonished:

AJLElectronics:
I trust that you are not suggesting that could be a finished product? Breadboards are for temporary prototyping and absolutely impractical as a final product.

You might find that EMI issues disappear once you build it onto a PCB or stripboard too, all those long wire links can be acting as inductive loops and aerials for all the rubbish being generated by switching.

But is this not a pcb i build it on? Its als soldered so that looks pretty permanent to me.

Of course as we now discern, this is not a solderless breadboard so the connections themselves - presuming your soldering is good - are OK.

The problem is however the absurdly long and waving, looping connections. The shorter ones should be flat on the circuit board, and the longer ones should be as short as possible and grouped together as I describe and kept more-or-less flat, so that they more resemble the picture I just gave.

Unfortunately, a major re-wire to standard engineering practice is in order. :astonished:

I understand the idea now. This is my first electronic project and i am learning along the way.

I will now build a pcb in the way you describe, so wires and components flat on the pcb. And the wires between the display to arduino and pcb bundled.

So i started wiring everything flat on the breadboard and trying to keep all wires sorta bundled. Its almost complete, needs a few more wires and as last i will bundle all wires the best i can.

So what you think Paul__B?

And BTW just for my learning; what about interference filters and coils, would one help in my situation?
If it would help which one and where to place it? Or do they not do what i think they do?

That is looking immensely better. :grinning:

I am still concerned about that lone wire from the main board to the relay module as it should as previously explained, have a pair. But then I note you appear not to comprehend the relay module. It already includes the driver transistor and opto-isolation so your driver transistor is not needed and only causing more trouble.

Here is how you connect the relay module directly to the Arduino:

Note that the power supply wires must go as a pair to your 5 V power supply while the "IN" and "Vcc" wires (but not ground) go together to your Arduino, separate from the power wires.

So you can see how it works, here is the circuit of the relay module.

Filers are not effective against impulses, and proper wiring is the critical matter here. :astonished:


Just for reference, here is the eight relay module which may better resemble the connections on the two-relay module you have!

Ok i will have a better look at your post tomorrow. That lone wire you see is only the ground for the relays board and i still need to mount the 5v wire, it got loose around the moment i stopped.

Thomassen85:
That lone wire you see is only the ground for the relays board and i still need to mount the 5v wire, it got loose around the moment I stopped.

I presumed it was one of a pair which would later be mounted. The point is that you do not need (and do not want) the extra transistor you have mounted to control the relay board as the relay board already includes it with additional opto-isolation. The two power wires for the relay go direct from the relay board to the 5 V power supply, separately to other wires - nowhere else - and the control wires go direct to the Arduino and nowhere else!

So you have some more re-wiring to do!

Today i tested it and for some reason the red led goes on and stays on :confused:

The display is working with the correct text and also the temp sensor works correct. When i heat up the temp sensor to the point the red led normally should come on, the text on the display turns jibberish.

At this moment i cant see what is the issue with the red led circuit.

Btw the relays i have not connected yet and if i disconnect the arduino the red led also stays on.
The wires from the breadboard to the arduino i still have to straighten but first all needs to work.

IMG_3037.jpg
Expand!

You have me puzzled. Which red LED?

Unfortunately we do not seem to have an overall schematic of your project,