0

I am using a bi-directional 3.3-5V logic converter to control 5V relay with 3.3V D5 pin of nodemcu. link of logic converter is here

However, I expected to control the relay but it didn't work. I don't think there is a problem with electrical connection or code since that is simple.

3.3V sides of nodemcu is connected to LV and 5V side of Relay is connected to HV.

Code:-

void setup() {
  // put your setup code here, to run once:
pinMode(D5, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(D5, HIGH);
delay(2000);
digitalWrite(D5, LOW);
delay(2000);
}

My Observations:- 1) When relay is removed, multimeter shows 3.3V at the LV & HV side. (so logic converter is not working i guess) 2) When relay is connected, multimeter shows 2.5V on both sides.

Everything is powered from nodemcu pins. Does it means that i have to supply extenal power or something wrong with logic converter?[![enter image description here][2]][2]

What do you guys think?

PS - I soldered the pins another way around on logic converter. Does it change anything?

circuit image, nodemcu is powered by the laptop USB

circuit

  • Please show your actual wiring. – Majenko Sep 30 at 10:34
  • Are you trying to drive a pure relay, or do you have a relay module (which already includes the driver circuit). If the first, make sure, that the level converter can actually provide the needed current – chrisl Sep 30 at 11:17
  • The photograph you provide is not helpful. Instead, show us the schematic of your actual circuit and provide a link to the manufacturer's datasheet for the level converter and the relay. – Elliot Alderson Sep 30 at 12:56
  • Its the relay module that I am running. I provided that above photo to check if I soldered right side. Will the logic converter work if I soldered behind? will add the circuit also – Sultan Morbiwala Oct 1 at 8:00
0

The converter and/or the nodemcu can't provide enough current to drive the relay. So you should get a 5V psu. For further details we need more information about the parts you use.

  • could be, I put arduino instead of nodemcu since it has 5V pins and worked – Sultan Morbiwala Oct 3 at 7:40
0

To make that work you'd need to connect the HV connection to the Vin of the NodeMCU (as well as to the relay board) which should be the 5 V coming form the USB port. You'd also need to connect the GND on the HV side to the GND of the NodeMCU.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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