SOLVED: ESP32 with 16 channel relay not working

Good day,

Trust you are all well.

Busy with a home project to control 14 devices. Code will only allow one relay to be active at any given time i.e. when you switch on another device, it will automatically switch off all other devices.

  • ESP32-VROOM
  • 16 Channel 5v relay low level trigger
  • 5V 4A external power supply
  • Breadboard

First scenario:

Using the breadboard and connecting the ESP 5v/GND to PSU 5v/GND and relay 5v/GND to PSU 5v/GND with 1 GPIO wire, the relay stays on constantly (tested with and without common ground wire), see below:

Second scenario:

I have an additional Arduino Nano lying around, so when I remove the 5v PSU power from the relay and push it into Nano VIN pin then the relay works perfectly. See below:

Any assistance in trying to understand what is going on here would be appreciated!!

Does you code set the correct GPIO to HIGH?

Relay is turned off at setup.

Callback loop with MQTT switches relays on using home assistant.

In the weird Nano configuration it works perfectly.

Setup

Loop

Uploaded a simple blink code that works in Nano configuration, but not when ESP & Relay are powered through 5v directly.

The nano is 5V the ESP is 3.3V

ABSOLUTE GENIUS!!!

Thank you very much, this fixed all the problems I had!!

You are welcome
Have a nice day!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.