Hello,
I'm trying to control 4 relays using an esp32 and MCP23017( please see attached photo). Could someone please have a look and let me know if my wiring is correct ?
The reason for asking the question is that sometime when relays are energized they switch off for less than 1 second and then come back on. It happens very rarely but I've been able to catch it a few times.
Before looking at software I want to be sure that my wiring is correct and I'm not getting any ghost signals. Attached to every variable that control each of the output pins is a specific message that gets displayed on the serial monitor ( basically output is on or off).
When the relays switch off momentarily the message on the serial monitor does not change the esp shows the relays as still being on (this makes me believe the problem is not software related.. might be wrong).
The relays I'm using are active high and there is no load connected to them at the moment. They are mounted really close to the mcp23017 with short wires.
Forgot to mention that the whole thing is powered by a PC PSU with a power resistor on the 5v and ov rail. The ESP is powered via a usb cable coming from the same power supply.
Ground is common and connected to everything ( I checked a few times now)
Andy_m03:
Forgot to mention that the whole thing is powered by a PC PSU with a power resistor on the 5v and ov rail. The ESP is powered via a usb cable coming from the same power supply.
Ground is common and connected to everything ( I checked a few times now)
I don't have a clue what you are doing with a power resistor on the 5v and 0v rails! How do you have it connected? Are you trying to load the 5 volt rail to some lower voltage?
Many PC power supplies have a minimum load requirement for stable operation.
Make sure all your power and signals run alongside their return wires. Don't create big loops as in
the diagram when wiring up. The return for the relay unit signals is the 5V, this should go back to
the MCP23017 5V terminal directly.
Paul_KD7HB:
I don't have a clue what you are doing with a power resistor on the 5v and 0v rails! How do you have it connected? Are you trying to load the 5 volt rail to some lower voltage?
Paul
I saw that in a tutorial online on how to turn a pc psu into a bench psu. Does it have to be on the 12v rail?
I was trying to put a minimum load on the psu to keep it alive otherwise it's not stable (again that's based on what I've read about it so far).
Andy_m03:
I saw that in a tutorial online on how to turn a pc psu into a bench psu. Does it have to be on the 12v rail?
I was trying to put a minimum load on the psu to keep it alive otherwise it's not stable (again that's based on what I've read about it so far).
There are usually several different 5 volt connections. The color code of the wire will tell you the one to use. Does your PSU shut down with no resistor?
Modern computers are never completely shut off. Otherwise you would have a large power switch like PCs used to have.