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