Hi!
I am trying to use a 4 relay board with a d1 Mini.
I can trigger all relays individually but when trigger 2, all relays open. If I set all to in in HA, all relays go off. I’ve tried to change the relay board with the same result.
And here are the logs when triggering the relays (when sending turn on ventil 2, it turns on all relays on the board, but not in HA)
[21:01:28][D][switch:012]: 'Ventil 1' Turning ON.
[21:01:28][D][switch:055]: 'Ventil 1': Sending state ON
[21:01:29][D][switch:012]: 'Ventil 2' Turning ON.
[21:01:29][D][switch:055]: 'Ventil 2': Sending state ON
[21:01:29][D][switch:012]: 'Ventil 3' Turning ON.
[21:01:29][D][switch:055]: 'Ventil 3': Sending state ON
[21:01:30][D][switch:012]: 'Ventil 4' Turning ON.
[21:01:30][D][switch:055]: 'Ventil 4': Sending state ON
[21:01:30][D][switch:016]: 'Ventil 4' Turning OFF.
[21:01:30][D][switch:055]: 'Ventil 4': Sending state OFF
[21:01:31][D][switch:016]: 'Ventil 3' Turning OFF.
[21:01:31][D][switch:055]: 'Ventil 3': Sending state OFF
[21:01:32][D][switch:016]: 'Ventil 2' Turning OFF.
[21:01:32][D][switch:055]: 'Ventil 2': Sending state OFF
[21:01:32][D][switch:016]: 'Ventil 1' Turning OFF.
[21:01:32][D][switch:055]: 'Ventil 1': Sending state OFF
I see nothing wrong here. Maybe you have something wrong in HA setup or wiring.
Anyway notice that most relay boards trigger relay when you write pin LOW.
The 12V source can support up to 24W. Yes, all grounds are wired together if by grounds you mean the negative poles. Here is an attempt at showing how its wired.
I’ve tried moving to other pins on the D1, without any luck. I’ve tried a 2-relay board with almost the same result, one output triggering 2 relays.
Set all the relay jumpers to high trigger. Then trigger manually with jumper wire from esp 3.3v pin to in1…in4. If it works correctly, your problem is in HA
What is the trigger voltage of the relay board?
Can you trigger it with 5 volt or perhaps even 12 volt?
I would want to try and isolate the board from ESP.
So if you can trigger it with the stepdown board (also what stepdown is this? Does it have enough power?) or perhaps directly from 12 volt.
That way we can see if it’s ESP, stepdown or relayboard that is broken.
This wiring diagram doesn’t look correct. You have your trigger signal as one wire all linked to a pin. There should be a (one) wire from the ESP32 pin # to the relay. You have pins 8, 5, 2 & 3 one wire should come from one of those pins to a relay. Each relay should have a separate wire to a pin # on your ESP32. Are you sure you have wired it correctly?
Ha! Thanks, yeah, the wiring “diagram” isn’t showing the reality. Of course each pin of the ESP is wired to In1, In2, In3, In4 individually. I can trigger all relays individually from HA. It’s when I open 2 or more when it’s going haywire.
I am suspecting a ground issue. And will rewire those tonight.