I want to avoid adding microcontrollers (esp /smt/...) to the PCBs and want To minimize the number of wires between the ESP32 and the PCBs so I’m considering using I2C or any other communication protocol that you can suggest.
alsoInput changes (HIGH/LOW) must be detected by the ESP32 with a delay of no more than 500ms.
I’ve considered using the PCF8574 on every pcb , but it seems I’d also need an interrupt wire from pcf to esp32 ,
Does this sound like a good approach, or is there a better alternative (e.g., another chip or technology) to achieve minimal wiring while ensuring low latency and reliable communication?
I’d appreciate any advice or suggestions on suitable chips, protocols, or designs.
This can become a complex problem. How far apart are the boards? What are you switching? How many input signals are involved? What is the noise tolerance? What are the ambient environment conditions and their extremes?
Note: I²C is an excellent choice for low-speed, short-distance communication between a microcontroller and peripherals, but it doesn’t handle long wires well. It was originally designed for on-board communications.
If that's the case, you may be too far down the learning curve to take on this project. And no, I'm not being mean, or sarcastic. Planning to mix I2C off-board in a chassis containing 220 V is an indication that you haven't suffered enough design pain yet to take on this project.
You don't have to use the PCF8574 interrupt output if you poll (read periodically) the inputs. It depends how rapidly your ESP32 code needs to react to input changes.