I'm having a project, there will be a 16 relays (Lights), which are controlled by 16 buttons. I'm using esp32 as Micro-controller.
For achieving this, I've used two mcp23017 boards as GPIO extenders. Everything works perfect. The thing is, I want to use one power source for both relays and esp32+mcps. So now that "opto isolation" is gone as i understand.
For protecting my esp and mcp boards, what kind of components i can use ? I want to minimize the noise, make it more stable for circumstances.
Sorry for my poor drawing, but i hope that you will get the idea. (For the buttons, to minimize the drawing i just drawed one of them) (For the second relay, to minimize drawing i just supplied one 12v to output side, but all of them are connected to outputs)