0
\$\begingroup\$

I'm trying to control a 2 relay module with an Esp8266 esp 12-f.

After a while, I realized that the GPIO from the ESP8266 was not going to drive the 5v needed for the relay to be activated. I only get the relay module led turned slightly on, but I don't get the relay activated.

I tested the relay and it works if I control it with an arduino or even with a direct 5v in its IN1/IN2 inputs.

That's why I bought a Logic Level converter, which turns my 3v signal into a 5v one.

enter image description here

How I set all up

Here's a schematic of what I set up for this. (I don't know how to add components to fritzing, so this is just to get the concept of what I've done)

enter image description here

Everything is powered by a 5v USB and the 3v part of the Logic Level is powered from the ESP8266 3v pins

I'm using the GPIO14, but also tested with the GPIO 4.. not sure if there's a difference there.

The problem

After setting that, I can see that the blue wire, this is where my 5v signal should be, gets a 3v instead. And that's my actual question:

  • Why my converter won't convert my gpio14 3v to 5v? What am I doing wrong, or is it the converter that's fried?

I'm testing this with a multimeter. And of course, this means the relay is not triggered.

Let me know If I can provide anything else, any help is appreciated. May be i just need to buy a new converter?

Thanks a lot!

\$\endgroup\$
  • \$\begingroup\$ The coil DCR and switch RdsOn form a voltage divider \$\endgroup\$ – Sunnyskyguy EE75 Jul 31 '18 at 22:55
1
\$\begingroup\$

These types of logic level converters are designed for low current signals. There is probably only a 1k resistor pulling the voltage high. That's not allowing for enough current to drive your relay.

To control the relay you can use this circuit:

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
0
\$\begingroup\$

This module is controlled by pulling inputs low. So, it does not matter what the ESP8266 voltage is, as long as it can sink about 2 mA (which it can). No level converter necessary.

I tested the relay and it works if I control it with an arduino or even with a direct 5v in its IN1/IN2 inputs.

I don't know what you were doing, but all the reviews in the link say exactly the same: it is switched ON by logic "0" and switched OFF by tri-state. The schematics posted by one of the reviewers confirms this.

\$\endgroup\$

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.