39Views4Replies

Author Options:

Ouput from NodeMCU pin as input to Arduino Nano Answered

Picture of

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? 

Tags:NodeMCU

5 Replies

user
steveastroukBest Answer (author)2017-12-10

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.

Select as Best AnswerUndo Best Answer

user
RussellM37 (author)steveastrouk2017-12-10

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.

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)RussellM372017-12-11

WHOAH !

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

Select as Best AnswerUndo Best Answer

user
RussellM37 (author)steveastrouk2017-12-11

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)

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)RussellM372017-12-11

You forgot to mention the optocoupler part.

Select as Best AnswerUndo Best Answer