Security system upgrade

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
drako
Normal user
Posts: 11
Joined: 24 Apr 2019, 18:22

Security system upgrade

#1 Post by drako » 24 May 2019, 22:57

Hi all,

I would like to upgrade my old 12v wired security system with ESPEasy - NodeMCU that will be controlled with Domoticz. This are my thoughts, any suggestions / advice are welcome.
1 ESPEasy - NodeMCU
2 I need a device to send (arm/disarm) and receive (sabotaged) status from 12v Motion sensors and Door switches. this device could be powered by power supply
3 I think I could use 12v Relays to turn on/off 12v Buzzer and 12v Flashlight, I could power relays by power supply
4 12v Motion sensors (4 wires, 2 power +/- and arm/disarm/sabotaged)
5 Door switches (not tested yet, but maybe I could connect them direcly to NodeMCU)
6 12v Buzzer
7 12v Flashlight
8 I need a device that could be used as a power supply to NodeMCU(from main power and battery), powering sensors, charging battery and optional monitor battery life/charging status.
9 Transformator 220v to 12v
10 12v Battery

Next step will be measure power voltage on arm/sabotage wires, probably it will be 12v, and test door switches by connecting directly to NodeMCU. Update will follow.
If you have any suggestions/advise, please let me know.

Thanks.
Attachments
setup.PNG
setup.PNG (84.14 KiB) Viewed 18773 times

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Security system upgrade

#2 Post by ThomasB » 25 May 2019, 04:48

Don't connect the door/window sensors directly to the MCU's GPIO pins. The long wires (a.k.a. big antennas) can be affected by electrical noise and cause unexpected behavior. And during lightning storms the induced voltages will damage the input pins. Instead, use 10mA-20mA current loops on the sensors that feed the input (LED) side of opto-couplers. The optos' logic output will provide electrical isolation from the demons.

- Thomas

drako
Normal user
Posts: 11
Joined: 24 Apr 2019, 18:22

Re: Security system upgrade

#3 Post by drako » 26 May 2019, 11:13

ThomasB wrote: 25 May 2019, 04:48 Don't connect the door/window sensors directly to the MCU's GPIO pins. The long wires (a.k.a. big antennas) can be affected by electrical noise and cause unexpected behavior. And during lightning storms the induced voltages will damage the input pins. Instead, use 10mA-20mA current loops on the sensors that feed the input (LED) side of opto-couplers. The optos' logic output will provide electrical isolation from the demons.

- Thomas

Thank you Thomas, what if i use level shifter like this one: https://www.tindie.com/products/ddebeer ... x6-channel
Will it do the job?
Can I use same level shifter to provide power to NodeMCU? If it's possible then it will be nice solution for steps 2,8,9 and 10. I could use the main board of security system for power management (and battery charging) and arm/read/disarm sensors with NodeMCU.
Thanks
Attachments
setup_v2.PNG
setup_v2.PNG (77.02 KiB) Viewed 18656 times

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Security system upgrade

#4 Post by ThomasB » 26 May 2019, 18:25

That level shifter won't solve the problem I mentioned. An opto-isolator will provide the needed isolation as well as logic level shifting.

Here is an example (found by quick google search) of using a optocoupler such as the popular PC817. Use 12V to power the door/window sensor switch that is connected to the left side of the circuit.
Image

- Thomas

drako
Normal user
Posts: 11
Joined: 24 Apr 2019, 18:22

Re: Security system upgrade

#5 Post by drako » 27 May 2019, 22:21

Thank you Thomas, it is clear now. The main board has one on each zone connector. I am going to dive in en do some shopping to experiment with.

drako
Normal user
Posts: 11
Joined: 24 Apr 2019, 18:22

Re: Security system upgrade

#6 Post by drako » 05 Jun 2019, 22:22

Hi I am back. I think that I got it all accept PIR sensors. My PIR sensors have 4 wires +/-, alarm and tamper.
So this is a new setup:
Level shifter to power up NodeMCU and relay directly from the old system.
Relay will be used to turning on/off buzzer, flashlight and powering door switches.
Optocoupler to read open/closed status if armed.
But then motion sensors, is it possible to connect them to optocoupler or should I use other transistors for isolation? What I didn't tested yet, is that they are always powered up or not due to tamper switch. (should do that next) Otherwise I could use the same logic as with door sensors providing power though relay to arm sensor. When motion is detected it will send impulse to opto and opto to nodemcu.

Thanks.
Attachments
setup_v3.PNG
setup_v3.PNG (664.74 KiB) Viewed 17922 times

User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: Security system upgrade

#7 Post by dynamicdave » 06 Jun 2019, 07:15

Here's a link to my PIR motion sensor project.
It might give you some ideas for your application.
I used a cut-down version with the students at my IoT Computer Club.

I powered the PIR unit with 12v that I generated using a 'step-up' converter from the 5v input that feeds the Wemos D1 Mini.

I must admit the project started off just sensing body heat, then grew and grew as you will discover if you read the tutorial.

http://resources-area.co.uk/node-red-fl ... d_grew.pdf

Kind regards from David.

drako
Normal user
Posts: 11
Joined: 24 Apr 2019, 18:22

Re: Security system upgrade

#8 Post by drako » 11 Jun 2019, 22:26

dynamicdave wrote: 06 Jun 2019, 07:15 Here's a link to my PIR motion sensor project.
It might give you some ideas for your application.
I used a cut-down version with the students at my IoT Computer Club.

I powered the PIR unit with 12v that I generated using a 'step-up' converter from the 5v input that feeds the Wemos D1 Mini.

I must admit the project started off just sensing body heat, then grew and grew as you will discover if you read the tutorial.

http://resources-area.co.uk/node-red-fl ... d_grew.pdf

Kind regards from David.
Thank you dynamicdave, i will try it out.

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests