Control 5v SSR relay with ESP01 GPIO

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
hemant
Normal user
Posts: 17
Joined: 22 Mar 2020, 17:34

Control 5v SSR relay with ESP01 GPIO

#1 Post by hemant » 10 Apr 2020, 01:32

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!

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Control 5v SSR relay with ESP01 GPIO

#2 Post by Micha_he » 10 Apr 2020, 08:56

Connect the SSR over a transistor with a resistor at the basis. Maybe the ESP has not enough current at the output.

TD-er
Core team member
Posts: 8642
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Control 5v SSR relay with ESP01 GPIO

#3 Post by TD-er » 10 Apr 2020, 09:36

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.

hemant
Normal user
Posts: 17
Joined: 22 Mar 2020, 17:34

Re: Control 5v SSR relay with ESP01 GPIO

#4 Post by hemant » 10 Apr 2020, 10:32

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.

TD-er
Core team member
Posts: 8642
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Control 5v SSR relay with ESP01 GPIO

#5 Post by TD-er » 10 Apr 2020, 11:02

What exact SSR do you use?
Maybe adding a simple resistor is enough

hemant
Normal user
Posts: 17
Joined: 22 Mar 2020, 17:34

Re: Control 5v SSR relay with ESP01 GPIO

#6 Post by hemant » 10 Apr 2020, 13:12

Hi,

It is a ITA-gz1-gl 100049de62.

Hemant

RobertM
Normal user
Posts: 23
Joined: 22 Oct 2017, 15:23

Re: Control 5v SSR relay with ESP01 GPIO

#7 Post by RobertM » 10 Apr 2020, 13:33

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!

hemant
Normal user
Posts: 17
Joined: 22 Mar 2020, 17:34

Re: Control 5v SSR relay with ESP01 GPIO

#8 Post by hemant » 10 Apr 2020, 17:05

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

hemant
Normal user
Posts: 17
Joined: 22 Mar 2020, 17:34

Re: Control 5v SSR relay with ESP01 GPIO

#9 Post by hemant » 14 Apr 2020, 11:18

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

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Control 5v SSR relay with ESP01 GPIO

#10 Post by Micha_he » 14 Apr 2020, 12:19

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.
Last edited by Micha_he on 14 Apr 2020, 14:45, edited 1 time in total.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Control 5v SSR relay with ESP01 GPIO

#11 Post by Shardan » 14 Apr 2020, 12:33

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
Regards
Shardan

hemant
Normal user
Posts: 17
Joined: 22 Mar 2020, 17:34

Re: Control 5v SSR relay with ESP01 GPIO

#12 Post by hemant » 14 Apr 2020, 13:46

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

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Control 5v SSR relay with ESP01 GPIO

#13 Post by Micha_he » 14 Apr 2020, 14:44

P45N02LD is N-Mosfet. Or I'm wrong?

No B/C/E !

hemant
Normal user
Posts: 17
Joined: 22 Mar 2020, 17:34

Re: Control 5v SSR relay with ESP01 GPIO

#14 Post by hemant » 14 Apr 2020, 16:33

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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 24 guests