Generic Relay (active low)

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
sgtpepperaut
New user
Posts: 3
Joined: 22 Jul 2017, 09:38

Generic Relay (active low)

#1 Post by sgtpepperaut » 22 Jul 2017, 09:55

The most common relays sold on ebay/amazon are active low ( when input is driven low they engage). The reason for this are beyond me but i'm having trouble configuring espeasy for this.

Everything works but "inverted" when i turn my mqtt on from home assistant the relay switches OFF and when i turn it On the Relay Switches On. This is because the output is driven high for "on".

I see inverted logic and active low options but they do not work as expected. When i set the "inverse logic" option and reboot the mqtt commaands are not doing anything anymore. the relay just stays in the state is is in. From the debugger i can see that esp easy is getting the mqtt commands


hardware config:
Image
Image
Image

sgtpepperaut
New user
Posts: 3
Joined: 22 Jul 2017, 09:38

Re: Generic Relay (active low)

#2 Post by sgtpepperaut » 22 Jul 2017, 09:57

a dirty fix was to invert the payload in the mqtt command however this is obviously bad practise (0 is ON and 1 is OFF...)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Generic Relay (active low)

#3 Post by grovkillen » 22 Jul 2017, 11:17

Inverse logic uncheck. Reboot.

Does that work?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

sgtpepperaut
New user
Posts: 3
Joined: 22 Jul 2017, 09:38

Re: Generic Relay (active low)

#4 Post by sgtpepperaut » 22 Jul 2017, 16:07

with inverted logic of it works just the wrong way around. By default and "common sense" driving an input high would actuate the relay but unfortunately these common relais you see everywhere are driven with input low..

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Generic Relay (active low)

#5 Post by grovkillen » 22 Jul 2017, 16:16

That is why I wrote uncheck. You need to either reboot or switch on/off once or twice for the state to get set according to setting.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Generic Relay (active low)

#6 Post by papperone » 23 Jul 2017, 04:08

sgtpepperaut wrote: 22 Jul 2017, 16:07 with inverted logic of it works just the wrong way around. By default and "common sense" driving an input high would actuate the relay but unfortunately these common relais you see everywhere are driven with input low..
There are reasons and i do believe this "inverted logic" is better when drivng relays.
I do have many installed and working properly with ESPEasy at home.
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

Re: Generic Relay (active low)

#7 Post by megamarco83 » 22 Nov 2018, 10:52

papperone wrote: 23 Jul 2017, 04:08
sgtpepperaut wrote: 22 Jul 2017, 16:07 with inverted logic of it works just the wrong way around. By default and "common sense" driving an input high would actuate the relay but unfortunately these common relais you see everywhere are driven with input low..
There are reasons and i do believe this "inverted logic" is better when drivng relays.
I do have many installed and working properly with ESPEasy at home.
hi, i have 4 different board with relay some 2ch some 4ch some 8ch "arduino relay board"

when they are not connected to nothing: NC=close(active) NO=open
when i connect the relay to nodemcu with espeasy and external supply like this:
https://www.letscontrolit.com/wiki/index.php/Relais

the relay is triggering when is connected and so: NC=now is open NO=now is close

so when i set:
http://espeasyIP/control?cmd=GPIO,13,0 -> relay is active -> NO=close NO=open
http://espeasyIP/control?cmd=GPIO,13,1 -> relay is not acrive -> NC=close NO=open

i need to code the opposite of the log in this way :(

i try set on switch web page in espeasy the flag to "inversed logic" but nothing change!
http://espeasyIP/control?cmd=GPIO,13,0 -> trigger ON the relay -> NC=open NO=close
http://espeasyIP/control?cmd=GPIO,13,1 -> trigger OFF the relay -> NC=close NO=open
so no difference....what's the purpose of "inversed logic" ??

is possible to have: 1 ="higt" relay trigger -> NC=close
"0 = low" relay not trigger -> NO=open
thanks

here my configuration with "inversed logic" not connected
if i check the flag, nothing change from logic 0/1
https://www.letscontrolit.com/forum/dow ... hp?id=3355

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests