Moderators: grovkillen, Stuntteam, TD-er
-
wifi75
- New user
- Posts: 6
- Joined: 26 Sep 2017, 13:37
#1
Post
by wifi75 » 26 Sep 2017, 13:47
Hello to all,
I have home alarm and when it is armed on two pins there are + 12v.
I have already programmed a nodemcu esp8266 module withc espeasy rev12 and connecting to gpio 0 one relay.
I would like to know how is possible connect the +12v to my esp8266 and when I armed this closes relay contact connected to gpio 0.
It is possible ? How?

-
wifi75
- New user
- Posts: 6
- Joined: 26 Sep 2017, 13:37
#2
Post
by wifi75 » 28 Sep 2017, 11:52
no idea?
-
grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
#3
Post
by grovkillen » 28 Sep 2017, 14:07
You need to get the 12V down to 3.3V and have that connected to a GPIO acting as a switch (3.3V=HIGH=1, 0V=LOW=0) and have that trigger an output to an relay connected to another GPIO. But you could also do this without the use of a ESP if you want. Have the alarms output trigger an relay, no need for the microcontroller (even though it might be nice to monitor this anyway). To lower the voltage you need to divide it:
https://www.letscontrolit.com/wiki/inde ... ge_divider
https://learn.sparkfun.com/tutorials/voltage-dividers
-
papperone
- Normal user
- Posts: 497
- Joined: 04 Oct 2016, 23:16
#4
Post
by papperone » 28 Sep 2017, 14:18
I am not in favour to connect anythign as a input directly to a GPIO; I woudl rather use a optocoupler to prevent any issue/damage to the ESP itself
by the way I agree with @grovkillen why you need NodeMCU and ESPEasy if you can close a 12V relay directly from the 12VDC output signal ??
Last edited by papperone on 28 Sep 2017, 15:08, edited 1 time in total.
-
grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
#5
Post
by grovkillen » 28 Sep 2017, 14:21
papperone wrote: ↑28 Sep 2017, 14:18
I am not in favour to connect anythign as a input directly to a GPIO
Yes, don't listen to me... I'm just the wiki guy and know little to nothing about the electronics of things

-
wifi75
- New user
- Posts: 6
- Joined: 26 Sep 2017, 13:37
#6
Post
by wifi75 » 28 Sep 2017, 15:27
I want trasforming my hone security to wifi.
And with domoticz I can use this.
Who is online
Users browsing this forum: Anthropic Claude Bot [bot] and 19 guests