Fail to read the temperature, humidity and light intensity when relay active

HAIII i have question...
why when the relay is active then suddenly the sht21 sensor and bh1750 sensor do not work or NaN, fail to read the temperature, humidity and light intensity. does this happen because of EMI?
I use an arduino mega as a controller for a 12vdc peltier, 12vdc fan, 24 vdc mistmaker, 12vdc pump and 220vac lamp. using a 5v 10a relay except for the peltier using a 5v 30a relay because the peltier I use is 15a. The power supply is 12v 30a and is sufficient to power everything, for the mistmaker using a 12vdc to 24vdc step up converter, the vcc and gnd pins on the relay are connected to the arduino mega as well as the vcc gnd scl and sda on the sht21 sensor, bh1750 sensor and 2004a 12c lcd.

Please post a schematic of the setup and some clear photos of how everything is wired up.

You likely have a power supply problem that tracks down to a basic hardware design error.

Welcome to the forum

You started a topic in the Uncategorised category of the forum when its description explicitly tells you not to

Your topic has been moved to a relevant category. Please be careful in future when deciding where to start new topics

Disconnect the RELAY VCC from the ARDUINO VCC... the relay might damage the Arduino.

Then where does the vcc relay connect to?

Nowhere, it's not safe, until you post that schematic and photos.

The wiring diagram as drawn can't work since the Arduino is not being powered by anything. Ergo: the diagram is inaccurate. Please update it; especially the power scheme is relevant, and it's exactly that part which seems to be incomplete.

One thing that's also missing is a common GND between your power supply, relay boards and the Arduino + sensors. I suspect you may have this in reality, but in case you don't, then this is likely a big part of your problem. Again, update the diagram so that it matches reality.

To a separate 5V power supply which you do not have.

sorry, I don't understand because I'm still a complete beginner and have only been learning for 2 months and this is my first project. this is the schematic diagram according to what I'm wiring.
The arduino is powered with a 9v adapter and if I only power the arduino, the lcd and sensor work normally, but when I plug the psu to activate everything connected to the relay, then the lcd goes blank and the sensor becomes NaN.

excuse me what is the common GND between the power supply, relay board, and Arduino + sensor?

I tried this earlier, but the relay does not turn on, I have wired vcc and gnd on the relay coil to v + and gnd power supply 5v 5a.
even though the psu is not damaged, I have tried to turn on the 5v fan and I checked with an avometer

Did you connect the 5V power supply ground the the Mega GND?

No, am I wrong here?

Yes.
All the 5V relay GNDs and the 5V power supply ground need to connect the the Mega GND

okay, i'll try

the good news is that the relay works and activates the peltier and the lights (because of the setpoint that I have coded).
the bad news, the sensor still can't read the temperature humidity and light intensity when the relay activates and switches on the peltier and lamp.
what to do please I'm confused :frowning:

Is everything else off?

How long are the wires on the I2C bus