-->
Page 1 of 1

ESP-01 + 2 channel 5V relays are always ON on powercycling

PostPosted: Tue Aug 21, 2018 10:56 am
by Miamia
Hi there,
I have this scheme of ESP01 and 2channel SSR relay (sorry about not so nice sketch) connected on gpio0 and gpio2.
Image


My problem - after initial powering (or powercycling), relay goes first to ON state and when my esp boots (1 second) I programmed it to set default state of relays to OFF (even when I disconnect esp from scheme, relays go ON on powering, because of 1K resistor. But without 1K resistor I am not able to control relay from esp).

But I need to keep relays OFF after powering and to switch it just programatically. Which element should I change in my scheme please, to do this?

Re: ESP-01 + 2 channel 5V relays are always ON on powercycli

PostPosted: Thu Aug 23, 2018 7:45 pm
by PuceBaboon
Miamia wrote:Hi there,

My problem - after initial powering (or powercycling), relay goes first to ON state and when my esp boots (1 second) I programmed it to set default state of relays to OFF...

But I need to keep relays OFF after powering and to switch it just programatically. Which element should I change in my scheme please, to do this?


Miamia,

Throw away your transistors and resistors. :mrgreen:

A quick internet search for the module you are using shows that it already has the buffer transistors (and series 10k resistor between the input terminal and the transistor base) built in, so all you're doing with your extra transistors is adding an inversion to the drive signal.


-John-

Re: ESP-01 + 2 channel 5V relays are always ON on powercycli

PostPosted: Fri Aug 24, 2018 11:30 am
by Miamia
PuceBaboon wrote:
Throw away your transistors and resistors. :mrgreen:


Thanks John, I did, but without it relay is not working (I mean Esp is not able to switch state of relays)

Re: ESP-01 + 2 channel 5V relays are always ON on powercycli

PostPosted: Fri Aug 24, 2018 6:57 pm
by PuceBaboon
Miamia wrote:Thanks John, I did, but without it relay is not working (I mean Esp is not able to switch state of relays)


So now you have GPIO0 and GPIO2 connected directly to the input on the solid-state relay board with absolutely no pull-ups or other components between the ESP01 and the SSR board (with the ground connection too, of course)?

Do you see the LEDs on the SSR board flashing when you toggle the GPIOs or staying permanently on or permanently off?

I'm looking at this schematic for the SSR module, by the way:- https://www.sainsmart.com/products/2-4- ... tate-relay