Page 1 of 1

Control 5v SSR relay with ESP01 GPIO

Posted: 10 Apr 2020, 01:32
by hemant
Hi,

Would it be possible to control a 5v SSR relay from my GPIO?
When I connect the rely it does not switch on seems voltage drops, while a common 1.2V pair of rechargeable batteries can operate the Relay easily.
When I measure the GPIO at High it provides 3.3V but when Relay is connected i'm left with 2 volt only.

Would it be possible to solve this?

I tried to use GND/RX as a relay - but the circuit is always closed, even at 0v, is there and easy way to use it like NO/NC so without a relay?

Cheers,

Happy Easter!

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 10 Apr 2020, 08:56
by Micha_he
Connect the SSR over a transistor with a resistor at the basis. Maybe the ESP has not enough current at the output.

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 10 Apr 2020, 09:36
by TD-er
Current may be a factor here indeed, but you may also try to have a look at the schematic of the SSR.
As far as I know, they are very much like an optocoupler, which means there is a LED inside.
A LED should have a resistor in series or else it will draw too much current which will eventually destroy the LED.
The output a GPIO pin can give probably protected the LED, but if you power it via a battery you may damage it.

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 10 Apr 2020, 10:32
by hemant
Hi,

Would any transistor do? Do i also need to place a diode to protect the flow back?

How would ik be connecting the transistor i have 3.3v and gnd coming from the esp. The transistor has 3 legs so where does what go? Appreciate the help.

I’m not that familiar with electrical circuits.

Hemant.

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 10 Apr 2020, 11:02
by TD-er
What exact SSR do you use?
Maybe adding a simple resistor is enough

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 10 Apr 2020, 13:12
by hemant
Hi,

It is a ITA-gz1-gl 100049de62.

Hemant

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 10 Apr 2020, 13:33
by RobertM
hemant wrote: 10 Apr 2020, 13:12 Hi,

It is a ITA-gz1-gl 100049de62.

Hemant
This is https://www.itead.cc/wiki/Sonoff_SV not SSR!

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 10 Apr 2020, 17:05
by hemant
Sorry someone told me ssr, it is indeed complete coming from a sonoff basic board, as the sonoff itself is broken i was hoping to reuse it with my esp-01.

Hemant

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 14 Apr 2020, 11:18
by hemant
Hi Any updates on this?

So situation is as follws, I want to control W11-1a2ste 5v, thorugh GPIO, problem is when directly connecting it to the GPIO and ground the voltage drops to less then 2.7 volt which is minimum to operate.
Is there a workaround to fix this?

Hemant

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 14 Apr 2020, 12:19
by Micha_he
You can't conect a 5v relay direct to a ESP GPIO!

You need a transistor to boost the current, maybe you need also more then 3.3V to switch the relay.

A simply NPN transistor in common-emitter-circuit should do that.

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 14 Apr 2020, 12:33
by Shardan
Please check the Wiki.

There is a detailed description of relay types, advantages, disadvantages and so on.
How to connect relay types and relay boards to ESP-Chips is described in detail.

https://letscontrolit.com/wiki/index.ph ... cs:_Relays

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 14 Apr 2020, 13:46
by hemant
thanx, trying:


I have a transistor: P45N02LD
Diode: 1N5406

20K resistor between GPIO and B
GND connected to E (coming from ESP01)
C connected to Diode >| other side to 5v

But relay is not clicking :(

hemant

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 14 Apr 2020, 14:44
by Micha_he
P45N02LD is N-Mosfet. Or I'm wrong?

No B/C/E !

Re: Control 5v SSR relay with ESP01 GPIO

Posted: 14 Apr 2020, 16:33
by hemant
Correct also tried with B1204 with BCE.
I can see switching with my multimeter, but as soon as i attach the relay the voltage drops.


Hemant