I hope someone can help me. I am getting trouble.
I would like to control my floorheating system with an esp with Relay board.
I am using a pin expander MCP23017 to handle this 16 channel relay board. I made some test and my first problem I can not get working on the same time all 16 channel. Just 14 channel, the other two replacing the MCP23017 randolmy goes forward to other channels but 14 pieces work. I need just 12 channel so this is not a big problem. But heart me why can I get woking all of them.
The second much bigger problem = The relay board working only if i don’t have any load on them. If just connect the one of them to the 220V, I don’t any connectiong more with the relay board. It switched off… Without load, it working and I can switch them for weeks. (I would like not install on my heating system if I know it not woring correctly, so I tested it now for weeks till last week, where I tried to test with two actuator) If I connect one and I give it a power, then switching off the relay board or the MCP23017.
I am using one AC/DC 5V 2,4A PSU for power der ESP/MCP/Relay board. I think not the power the problem.
Do you have any Idea what’s wrong? I think I made somewhere the mistake but I don’t know where… I made before more esp8266 with a single relayboard in my previous home and they worked like a chram. This is my first project mit a pin expander.
If your power supply is the little black box on the right on your picture, it’s clearly the source of most of your problems Replace it with a proper PSU and it should work lot better !
I tried now with an other psu which can 5V and 60A but I get a same thing. So this is 100% not a power issue.
Blockquote
Umm… shouldn’t you also have cables going into the Com terminals in your relays if you actually want it to switch stuff?
If I connet something to the relay (doesn’t matter COM and NC or COM and NO) then after switching the relay (where on the load) I lose the connection over the relay board and it switch off. I have to restart the esp. I checked now and the MCP is working forward, so the problem should be there somewhere the relay board.
This big metal plate you have everything screwed on to, did you shield the backside of your PCBs?
I mean it looks kind of dangerous and could very much be the issue.
All those relays are probably through hole soldered so they are in contact with the plate
They are on plastic holders and I have 8mm distance from the metalsheet. I tough that is the Problem but I tried( I gave under them the plasticshield) but nothing changed.
Now I find something strange… If I change the the mode: inverted true
Then I can get work under load one relay output… but just only one, the last one. I can change the switch anytime and it working… If i connect the fuse without load on more relay channel, then if I switch get the same error as before.
I don’t understand why this working, and why just here. If the board is faulty can couse trouble but I cannot think every channel are “death” without that.It sould be a “user error” somewhere.
Now what happened: After I set the mode inverted true on each channel. It works a lil bit better… I can change the loaded channels but I have to wait 5s to switch in and if I have to wait other more then 10s then I can switch off them one by one… If I am faster I have to reset a board. I cannot change more channel on the same time just one. It will be important to my floor heating.
I have doubts that anything depends on the AC load connected or not.
But your relay board and MCP wiring is incorrect, you are mixing 5V and 3.3V like they were same to you.
Take all 5V connections out from the setup except relay board screw connector.Esp32 is 3.3V MCU!! So power MCP from 3.3V pin.