Relay connection to NodeMCU V3



  • Good afternoon everyone. I'm here to get suggestions from those of you who are more experienced than me in electronics.
    The problem is simple. I have an ESP8266 (NodeMCU V3 Lolin) and I'd like it to drive a 5Vdc relay.
    Searching in internet I can find many samples like this... BUT.... some of them are connecting the positive wire of the relay to Vcc (3,3V), some others to VU (5V) and all say it's perfectly working.
    If I find two solution to the same problem I get worried 🙂
    Specifically, should I connect Vcc, I'm not sure that the relay would switch in a secure way.
    At the same, if I connect it to VU, I'm asking myself if this would not create a problem since the pin triggering the relay is coming from a GPIO pin and should be 3.3V
    Please forgive me if this is a stupid question but I have to experience in this area.
    Thanks in advance
    Giacomo


  • Mod

    If you get the opto isolated relay boards, you can power the trough a separate 5v vcc pin ,but I was able to use them on raspberry pi at 3.3v



  • @gohan , if I understand well, in a relay like the one of the attached picture, you removed the jumper, connected +5V to JD and GND, In1, In2, 3,3V on the other connector?
    If this is true I'll be happy because this is how I'd have done.... but I couldn't find anybody confirming it...


  • Mod

    I don't see the picture, but keep in mind that to toggle a relay you need to put the pin to Low



  • alt text
    Sorry... my fault.
    Yes, the need to pull the pin low is the only sure info I found around.. 😞


  • Mod

    As you said before, you should be good to go


Log in to reply
 

Suggested Topics

  • 87
  • 1
  • 7
  • 5
  • 8
  • 5

12
Online

11.4k
Users

11.1k
Topics

112.7k
Posts