Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By canedje
#35276 Hello everybody.

I'm wondering if there are experiences using relais straight connected to the NodeMCU.
I do read that all relais available needs at least 5V at power.
What happens If I connect relais power tot 3.3V of the NodeMCU? Is the relais still working?
User avatar
By lethe
#35279 You should never connect a relay directly to a GPIO pin on a uC. Always use a transistor (or opto-coupler) and flyback diode.
The current draw of a relay coil will usually exceed the maximum current rating of a GPIO pin.
Also since the relay is an inductive load, there will be a large negative voltage spike, when the coil is switched off. The flyback diode does prevent a transistor from being blown, but you should still isolate your uC from that spike.
User avatar
By krzychb
#35285 @canedje - expanding on lethe's answer I would use a relay module like this
Such module has a transistor, opto-coupler and flyback diode.
You may need to add a separate 5V power supply if using 5V from NodeMCU's USB is causing module resets.

Happy hacking :D

Krzysztof
User avatar
By canedje
#35290
krzychb wrote:@canedje - expanding on lethe's answer I would use a relay module like this
Such module has a transistor, opto-coupler and flyback diode.
You may need to add a separate 5V power supply if using 5V from NodeMCU's USB is causing module resets.

Happy hacking :D

Krzysztof


Thanks for the answers.

I know these type off relais.
I did also read about the module resets.

Is this module connecting to 3.3 V not working?