rubensm wrote:Of course, there is no difference between pins on Arduino Yun and ESP8266.
I don't know Yun's voltage supply, but if it is 5V instead of 3.3V, you will only need a buffer to convert ESP 3.3V output into 5V to turn on the relay.
This buffer can be build in several ways:
1.- Buying a buffer.
2.- Using a transistor in saturation:
Where it says Arduino input, it should appear relay input.
I think option 2 is better and cheaper than first one.
Hope it is helpful!
R
Hi rubensm,
I need to control a 5v relay with the esp-01 GPIO, I do not know anything about electronic
Can I use this schema? I'm not sure because I found different circuit with different resistences. Can I use both 1K as shown here? Can also use a BC337 as transistor?
GPIO0->1k Res -> base of BC337
BC337 emitter to ground
BC337 collector to relay IN to 1K res -> 5v
The circuit http://vinceelizaga.com/mobile-relay/ uses different resistances value.... why?
Thanks
M