I have 4 environmental controllers that are all identical. 2 of them have been in use for at least 6 months now with no issues.
They are using Wemos D1 Minis(the 16-pin ones), an SHT31 sensor, and the PCF8574 expansion board(the board, not just the chip). The 8574 is used to provide additional pins for a 4-relay board. There is also a 1602 LCD with a backpack(the onboard 10k resistors have been removed). I have 4k7 resistors on the SCL & SDA lines to 3.3V, which also powers the SHT and the 8574. 5V goes to the Wemos and both of the Vcc pins on the relay board. All grounds are tied together.
When I went to upload code to the last 2, I got nothing but partially lit blocks on the upper half of the LCD, so I went exploring. The first thing I did was upload the I2C scanner. It found nothing until I disconnected the 8574. Then the SHT and LCD popped up. With just the 8574 plugged in, it just hangs at scanning in the serial monitor. If I plug in the relays, it scans but finds nothing. I can also hear a faint click of the relays when I plug them in and their respective LEDs are faintly lit.
I even went and bought another 5 of the 8574s just in case, but no dice. I also rewired my bus wires and resistors just to make certain there were no wiring issues. I'm also using a spare Wemos, so this is happening across 3 different D1 boards and several different 8574s.
Not surprisingly as you can't even pick the right place to post your question.
Installation and Troubleshooting is for Problems with the Arduino IDE itself NOT your project. It says so in the description of the section. Therefore I have moved your post here.
Please post schematics of the setup. Helpers don't want to spend resources translating Your text into a drawing. That work is Your work.
Personally running a backpacked LCD by SDA an SCL never called for any change of resistors. Connecting several peripherals will need it.
Despite your confidence, the most likely cause of the problems according to your story is an incorrect connection.
Start by drawing a detailed diagram, where you indicate all the connections, including power and GND lines and all the numbers or pin designations where these wires are connected.
I will draw that out later today but I'm pretty confident that there's no issue with the wiring. The wiring is identical to the other 2 controllers that are and have been working perfectly.
Also, these controllers did work when they were built and tested months ago. I only now went to deploy them and found the issue. They weren't touched until the other day. That's what's so perplexing.
Yes, that works well as long as You don't have a large amounts of circuits. Remember to write the pin assignments, their logic names. Pin numbers is useless. Power supply should also be drawn, voltage, capacity...
Okey. Somehow something melts down Your equipment. One guess is a connection being wrong, stressing the circuitry in some way. Operating equipment at or above maximum ratings usually cause failure some day or the other. Disconnecting a device wile power is on is another way to damage circuitry. We'll see what we can find.
You appear to be mixing voltages on the I2C bus. The LCD backpack will have pullup resistors to 5v. You have two pullup resistors to 3.3v.
The pcf8574 can sink about 20mA per pin but source only a few microamps. It is not clear if this is compatible with your relay board. For example it may be erratic if the relay board uses optocouplers.
I wired it this way based on advice from this forum. I was instructed to remove the 10k pullups on the LCD backpack and send 5V to the relay board at JD-Vcc & Vcc.
Oh yes. I missed that in your description. Can you post a link to the relay board. There are a number of these with subtle differences e.g. npn or pnp drivers or optocouplers.
The 5v to VCC on the relay board might cause a problem. That looks like a board with opto-couplers, VCC is only used to power the LEDs in the opto-couplers, which are driven by an active-low signal on the input. The outputs of the PCF8574 will be pulled toward 5V when the output is HIGH, would be better to connect the relay board Vcc to 3.3V.
I guess the relay board is similar to this schematic because it does indeed appear to use optocouplers. 2 Channel 5V Relay Module - Wiki
This is compatible with the pcf8574 which sinks the leds.
I'll triple-check my other 2 controllers that are currently running in production. I'm fairly certain that it's 5v to both pins on the relay board, but again I'll check.
Also, even when I connect just the 8574 to the Wemos and run an I2C scan sketch, it won't find it. In fact, it hangs at "scanning" until I plug the 4 relay outputs in. Then it simply says "No devices found". This happens whether the relay board has power or not.