0

I've setup my NodeMCU v3 with this relay and I got this:

  • When using 3V to power the relay, I can hear coil when I turn on the board and I can only turn it on once. Then I can no longer hear the coil, but LED turns on and off.
  • When using VU pin (5V) to power the relay, I get the same coil sounds (when turning on board and on first toggle), then nothing. But the LED stays on, just slightly dims itself when turning on. Barely noticeable.

Alright, but I had a D1 Mini relay shield* laying around and I decided to give it a try. And it worked when powering the shield with VU pin (5V).

So my question is what is the difference? Does the D1 Mini Relay Shield have a transistor to pull up pin voltage from 3V to 5V and the other relay doesn't? If I had a logic level converter 3V-5V between the NodeMCU GPIO and the relay IN, would it work?

Thanks in advance.

*must say mine is a clone, but it works

9
  • what does this mean? I can only turn it on once
    – jsotola
    Commented May 30, 2019 at 3:24
  • Have you used a multimeter to check if the contacts are switching?
    – sa_leinad
    Commented May 30, 2019 at 4:00
  • 1
    it he relay expects 5 V as HIGH signal, that it is possible that it doesn't read 3.3 V as HIGH. the D1 shield is made for 3.3 V signal
    – Juraj
    Commented May 30, 2019 at 9:45
  • a logic level converter would likely work in your situation (too low of a high voltage to trigger)
    – dandavis
    Commented May 30, 2019 at 17:51
  • in my previous comment "it he" is "if the"
    – Juraj
    Commented May 31, 2019 at 5:15

2 Answers 2

-1

More than likely it is a faulty board.

The schematic for the D1 Mini relay shield can be found here.

I couldn't find a schematic for the relay that is having the problems but you can see from the picture below that it has 2 LEDs (power and relay signal), a flyback diode and a FET or transistor.

Close-up

As you can see the circuits are pretty much the same. So my conclusion is that you have a faulty relay board.

4
  • that could be tested by giving the trigger pin 5v instead of 3.3. i bet it works fine like that...
    – dandavis
    Commented May 30, 2019 at 17:52
  • Yeah, I don't know much about schematics. But I guessed it was similar to the d1 shield. But I'll surely try what @dandavis suggested and apply 5V to the trigger pin. I'm also getting another relay just like that to see if I can reproduce the issue or if it works with 3V. Commented May 31, 2019 at 5:41
  • @BrunoCardosoDantas did you test it with 5V as per DanDavis' comment?
    – sa_leinad
    Commented Jun 3, 2019 at 7:40
  • @sa_leinad sorry for the delay. took a while to get everything. I did tho. Didn't work. I've got a logic level converter and also another relay just as the one that I had the issue. The first mentioned relay didn't work with 3V nor 5V. The new relay didn't work with 5V on VCC and 5V on the INPUT. Yeah, I know. But it did work with 3V on both of them. Don't ask me why tho. It just did. Commented Jun 11, 2019 at 6:55
0

Ok, so:

  1. I've bought a logic level converter.
  2. Bought another relay.

Now to the results:

  • With the first relay, no joy with 5v or 3v in any combination (3v on VCC / 3v on IN; 5v VCC / 5V IN; 3V VCC / 5V IN; 5v VCC / 3V IN)
  • With the second relay (the new one), funny enough.. Didn't work with 5V on VCC and 5V on input. But it did work with 3v on both of them.

I measured every output voltage to make sure everything was working fine and it wasn't a problem with power supply.

I guess it should work with 5v...? Right?

Anyway, it was indeed a faulty relay. And 3V on VCC and Input is what worked for me, even though it is a 5V relay. Thank you all for the assistance.

1
  • The D1 Mini relay shield would make sense that it works at 3V as that is what the both the Wemos and nodeMCU boards output for a logic high.
    – sa_leinad
    Commented Jun 15, 2019 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.