I am designing a circuit which will drive 4 relays & 2 LEDs from 4 push buttons(for each relay) with ESP-12E via (I2C) IO expander PCF8574 as I need more IO's than what are usable(stable) on ESP-12E. I'm using ULN2803A as a relay driver circuit. Circuit schematic is as shown in image below.
I made the circuit and was testing it out. I've made all input pin's initial state to be 'LOW'. But all of the output pins(Relays) are staying high when ESP-12E is connected (and also even when it is not connected!). And also I'm using INT(interrupts) for detecting inputs, the interrupts are being generated on push button(software debounced) input and MCU sometimes scans/detect inputs from multiple ports even when only one switch is pressed.
Question is :
Is the circuit schematic and components used are correct for ESP-12E and given appliacation?
Why multiple inputs are scanned even when action is done at single switch input?
Why are all output pins are staying 'High' when they are set at initial 'LOW' state?
Suggest if any components or methods needs to be changed for better and stable operation.
P.S. : In image only one relay is shown, there are 3 more relays with same configuration and are driven from ULN2803 remaining designated outputs.