-->
Page 5 of 7

Re: Using GPIO pins to switch on relay.

PostPosted: Sun Oct 18, 2015 8:25 pm
by roccomuso
martinayotte wrote:
roccomuso wrote:Does the esp8266 correctly drives a 3V Songle relay? does the relay takes too much mA?

Where do i need to put the capacitor exactly?


As the link you provided mentioned, the ESP is driving transistor or MOSFET which then drive the relay.
(ESP is not able to drive the relay directly, neither than other kinds of MCU)
You can also use driver chips like ULN2803.

The capacitor is something like 100uF or 470uF between GND and the 3.3V as near as possible from power pins of the ESP, it will have a role of a power reserve to avoid consumption spikes making ESP reset.


Are you sure about the transistor? Actually i'm driving an SSR directly with the ESP-01 gpios.

Re: Using GPIO pins to switch on relay.

PostPosted: Sun Oct 18, 2015 9:09 pm
by martinayotte
SSR is not a relay !
Relays have coil which take a lot of current, especially at startup, it is an inductance.
SSR is a module which have a Triac along with an triac optocoupler, which is seen to the MCU as a simple LED which can be saturated with only few milliamps, so MCU can drive it directly.
But, it is really depend of the spec of your SSR, some requires 4-5V to be really saturated, so, in such case, same kind of driver is needed to control such SSR.

Re: Using GPIO pins to switch on relay.

PostPosted: Mon Oct 19, 2015 10:24 am
by roccomuso
martinayotte wrote:SSR is not a relay !
Relays have coil which take a lot of current, especially at startup, it is an inductance.
SSR is a module which have a Triac along with an triac optocoupler, which is seen to the MCU as a simple LED which can be saturated with only few milliamps, so MCU can drive it directly.
But, it is really depend of the spec of your SSR, some requires 4-5V to be really saturated, so, in such case, same kind of driver is needed to control such SSR.


but SSR stands for Solid State Relay :')
can you give me some advice on a relay to bought for my project, without considering the use of transistor and stuff like that.. Currently i'm using a SSR for my project, but it's too big and doesn't fit inside my box..

Re: Using GPIO pins to switch on relay.

PostPosted: Mon Oct 19, 2015 11:40 am
by martinayotte
Simply question of wording, yes, SSR means SolidStateRelay, but when I see only Relay, for me, I see a coil relay ... ;)
Recommendations ? that depends of your requirements, voltage and current.
If you don't have much space, the Omron G3MB series are pretty popular, but they are only 2A.
Beware also that even if direct connection to ESP GPIO may work, it is strongly suggested to keep driving them with a transistor of MOSFET, they are small too, like 2N7000.