Page 1 of 1

smoke detector triggered killswitch based on esp-01 relay

Posted: 10 Jan 2019, 20:23
by letsDIY4fun
Hello community,

i need some help on my project

I have an 3D printer in my basement and for some safety measures I want to setup an automatic killswitch triggered by an smoke detector.
There are two PINs (GND, Signal) on the smoke detector going HIGH 3,3v in case of smoke detection.
I want to connect the smoke detector directly to the esp-relay to cut off the power of the 3d printer in case of smoke or fire.

so i bought some of these esp-01 relays here
https://de.aliexpress.com/item/ESP8266- ... 21218.html

I also soldered an extra wire directly to the GPIO12 on ESP8266EX Chip, to be able to connect the smoke detector as the esp-01 has only two GPIO pins, so now i have 3 in total.
It was a hard piece of solderwork but fortunately i'm not an heavy drinker so i made it :)

Of course i could take another eps-01 and connect it to the smoke detector that griggers the other esp-1 on the relay but in case of an wifi connectionloss or any other problem it will just not work.
I think it would be the best and safest solution.

I have activated the "Rules-Tab" on EasyESP but unfortunately I'm not good at coding at all so i need your help to code the right logic :(

Re: smoke detector triggered killswitch based on esp-01 relay

Posted: 10 Jan 2019, 20:30
by grovkillen
You need to tell us the setup (task names and value names etc).

Re: smoke detector triggered killswitch based on esp-01 relay

Posted: 10 Jan 2019, 20:35
by letsDIY4fun
taskname=killswitch
fire as the valuename

Re: smoke detector triggered killswitch based on esp-01 relay

Posted: 10 Jan 2019, 20:45
by grovkillen
And is it 1/0 for smoke detecting or a range value?

Re: smoke detector triggered killswitch based on esp-01 relay

Posted: 10 Jan 2019, 20:48
by letsDIY4fun
0=no smoke
1=smoke detected

:)

Re: smoke detector triggered killswitch based on esp-01 relay

Posted: 10 Jan 2019, 21:37
by grovkillen

Code: Select all

On Killswitch#Smoke Do
  If [Killswitch#Smoke]=1
    GPIO,14,0
   Else
    GPIO,14,1
    EndIf
  EndOn
  
Change the GPIO number to whatever your relay is connected to.

Re: smoke detector triggered killswitch based on esp-01 relay

Posted: 11 Jan 2019, 08:15
by letsDIY4fun
Thank you grovkillen, i will try it

Has anyone already tried those chinastuff relays? I mean i've already saw such things like weak soldered PCBs, cheapest components and stuff like this. It would be ironic if an safety measure would cause unsafety as its directly connected to 100-220V AC

Re: smoke detector triggered killswitch based on esp-01 relay

Posted: 11 Jan 2019, 08:31
by kimot
letsDIY4fun wrote:
10 Jan 2019, 20:23

I want to connect the smoke detector directly to the esp-relay to cut off the power of the 3d printer in case of smoke or fire.

So why using ESPeasy module?
Standalone relay driven directly by signal from smoke detector will work the same way.

Or your smoke detector is far away from printer?
Or you want report error state somewhere else?
Then using ESPeasy module is nesessery.

Re: smoke detector triggered killswitch based on esp-01 relay

Posted: 11 Jan 2019, 08:48
by letsDIY4fun
I want to report in case of any actions so i was thinking about to combine it with IFTT calling an IFTT trigger, what trigger would be the right one in EasyESP rules?