i have issues arduino uno freezing program when i using Relay with controlling Relay using rotary switch 11 steps and the from step can be show with LCD i2c.
At first everything worked normally, then after switching the LCD several times, the text was unclear and then the LCD went blank. and arduino cannot be controlled by rotary switches. Below I have attached the control diagram of the Arduino Uno.
There are a few simple tests to narrow down this type of problems
Disconnect the load from the relays.
If the problem persists, it's not (or not only) the load.
Disconnect the relays from the Arduino.
If the problem disappears, check how you power your setup.
I've worked on a project with a clone Nano, a LCD and two relays. Power was just USB during the development.
Switching one relay on and I could see a slight dimming of the display. Switching the second one on as well and I could see a significant dimming of the display. So the question asked above in post #2 (about power) is very relevant.
The question in post #4 is also relevant: what kind of load. Because it can cause interference causing your Arduino to crash.
use a value between 2k and 4.7k for each resistor and the +V represents the +5V positive rail of the Arduino.
SCL is pin 5 of the Arduino and SDA is pin 4. Together they form the I2C bus.
Have you a real electronic circuit or are you simply using what looks like a Proteus simulation?
Show the code you are using.
Test each component individually with a small sketch starting with the screen.