Ouput from NodeMCU pin as input to Arduino Nano

I have a NodeMCU ESP-12E with D7 (output) connected in series with 220R resister to pin 12 (input) on Arduino Nano.

Looks something like the image (fritzing doesn't seem to have my exact device)

Is this a safe circuit? If not - what would make it safe?

It seems to work but I don't want to fry anything.

What I am doing is using the 5V output on the Nano to operate a relay. The NodeMCU only seems to have 3v output which does not seem to be enough to operate my relay. Maybe there's a better way to get this done? 

Picture of Ouput from NodeMCU pin as input to Arduino Nano
sort by: active | newest | oldest

Use a 74AC125, powered off your 5V supply to convert a 3V logic signal from the Node to relay level. What current does your relay need ? You could even use a single transistor to drive it.

RussellM37 (author)  steveastrouk1 month ago

Your question "What current does your relay need?" has been very helpful. I was assuming that I had to supply 5v as the control signal to the relay. In fact 3v is sufficient. I have a separate 5v supply into JD-VCC of the relay to isolate the relay from the ESP. Hence I've simply omitted the Nano and everything is working fine.


These things will not drive a relay DIRECT. What have you used to interface one to the other ?

RussellM37 (author)  steveastrouk1 month ago

Really? I thought that was the point of a relay - to have an isolated low voltage control signal from a microcontroller flip the switch. As stated - I have a separate 5v supply to power the relay. All that the 3v from the ESP is doing is turning on/off the LED inside the relay that causes the switch to operate. (i.e. it is an optocoupler)

You forgot to mention the optocoupler part.