Introduction: Home Automation
With this system you will be able to go on Holidays and rest easy that your home is safe and secure.(with no Leaks ) and you will be notified when there is trouble.
Bill Of Materials Description Link on where to Buy Costs
Raspberry Pi0 Basic Micro Computer https://www.adafruit.com/category/813 $10CAD
Particle Photon Micro Controller Http://www.particle.io $19USD
Liquid Flow meter 1/2 NPT Brass Flow meter https://www.adafruit.com/?q=Liquid%20Flow%20Meter& $25.00USD
Solenoid valve 1/2NPT Plastic Solenoid http://www.adafruit.com $25.00USD
Waterproof Boxes buy them anywhere , I bought mine off of amazon http://www.amazon.com $3.00 Each
Security Box buy them anywhere, I bought mine off of amazon http://www.amazon.com $25.00CAD
Step 1: Home Automation System
Step 2: Different Types of Meters and Boards
The Remote Water leak Board this sits on the floor of your water closet or mechanical room or even in the bathroom where you might have a leaky toilet..A gerber file is attached
The Remote Relay Board this mounts near the Solenoid shutoff your water or mechanical room or even in the bathroom where you might have a leaky toilet..A gerber file is attached
You might have noticed the sensor boards are all exactly the same in size.I did that on purpose so as to only have 1 box type for all sensors
Step 3: Board Design
I have 3 relays designed into the Board.
1-can be used for an alarm Bell
1-can be used for turning on and off the solenoid
1-can be used for turning heating or Air conditioning on and off.
The Raspberry Pi Zero can be soldered into place in the spots provided to get power from the Board
Step 4: My Special Board
Step 5: Special Links
Products and Links Costs
digikey.com For electronics bits and Pieces Good quality and Low costs free shipping over $100CAD
pcbway.com Electronic board manufacturing Very good quality, Low cost and fast.. 7 day turn around from ordering to my door
fritzing.org Electronic Board Design they also manufacture and solder the boards if your in Europe. Free design Program
Spark fun.com Manufacture of the relays I'm using $2.00 Each
particle.io Web IDE for programming Free
twillio.com SMS messaging service Really cheap
OpenHAB.org Open source Home automation program for Linux, Windows and Mac Open source..Free Cool OpenHAB phone app to Control and monitor
nodered.org Open sourced Included in Raspi Programming
ThingsSpeak.com Analytics site Free for this type of project
Step 6: Bill of Materials
Bill of Materials: Security Panel.fzz
Label Part Type Properties
12VDC Voltage Regulator chip 78005; variant side; voltage 12V; package 78xxl
12VDC OUT Camdenboss CTB0158-4 hole size 2.7mm; variant 90° 4 connector; pins 4; package THT; pin spacing 0.2in (5.08mm); part # CTB0158-4
1K 1KΩ Resistor resistance 1KΩ; bands 4; tolerance ±5%; package THT; pin spacing 400 mil
1K 1KΩ Resistor resistance 1KΩ; bands 4; tolerance ±5%; package THT; pin spacing 400 mil
1K 1KΩ Resistor resistance 1KΩ; bands 4; tolerance ±5%; package THT; pin spacing 400 mil
1K 1KΩ Resistor resistance 1KΩ; bands 4; tolerance ±5%; package THT; pin spacing 400 mil
1K 1KΩ Resistor resistance 1KΩ; bands 4; tolerance ±5%; package THT; pin spacing 400 mil
1K1 1KΩ Resistor resistance 1KΩ; bands 4; tolerance ±5%; package THT; pin spacing 400 mil
3.3VDC OUT Camdenboss CTB0158-4 hole size 2.7mm; variant 90° 4 connector; pins 4; package THT; pin spacing 0.2in (5.08mm); part # CTB0158-4
3A Resettable Fuse PTC variant pth; package ptc
3A Resettable Fuse PTC variant pth; package ptc
3A Resettable Fuse PTC variant pth; package ptc
3A Resettable Fuse PTC variant pth; package ptc
5VDC Voltage Regulator chip 78005; variant side; voltage 5V; package 78xxl
C2 Electrolytic Capacitor voltage 50V; package 200 mil [THT, electrolytic]; capacitance 47µF
C3 Electrolytic Capacitor voltage 50V; package 100 mil [THT, electrolytic]; capacitance 0.1µF
C4 Electrolytic Capacitor voltage 50V; package 100 mil [THT, electrolytic]; capacitance 0.1µF
C5 Electrolytic Capacitor voltage 50V; package 100 mil [THT, electrolytic]; capacitance 0.1µF
D1 Rectifier Diode type Rectifier; package 300 mil [THT]; part # 1N4001
D2 Rectifier Diode type Rectifier; package 300 mil [THT]; part # 1N4001
F4 Resettable Fuse PTC variant pth; package ptc
IC3 IC hole size 1.0mm,0.508mm; chip label IC; pins 6; package DIP (Dual Inline) [THT]; pin spacing 300mil; true
Jumper Generic double row male header - 8 pins hole size 1.0mm,0.508mm; pins 8; form ♂ (male); row double; package THT; pin spacing 0.1in (2.54mm)
Jumper1 Generic double row male header - 6 pins hole size 1.0mm,0.508mm; pins 6; form ♂ (male); row double; package THT; pin spacing 0.1in (2.54mm)
LED1 RGB LED (com. cathode, rgb) pin order rgb; polarity common cathode; rgb RGB; package 5 mm [THT]
Motion ,Analog IN/OUT Camdenboss CTB0158-6 hole size 2.7mm; variant 90° 6 connector; pins 6; package THT; pin spacing 0.2in (5.08mm); part # CTB0158-6
Particle Electron variant variant 5; pins 36; manufacturer Particle; name Electron; version 1.0.0
Power Red (633nm) LED leg yes; color Red (633nm); package 5 mm [THT]
Q2 NPN-Transistor type NPN (EBC); package TO92 [THT]
Q3 NPN-Transistor type NPN (EBC); package TO92 [THT]
Q4 NPN-Transistor type NPN (EBC); package TO92 [THT]
R1 220Ω Resistor resistance 220Ω; bands 4; tolerance ±5%; package THT; pin spacing 400 mil
Relay1 RELAY variant pth4; package relay-jzc
Relay2 RELAY variant pth4; package relay-jzc
Relay3 RELAY variant pth4; package relay-jzc
Relays OUT 250VAC/3A Camdenboss CTB0158-9 hole size 2.7mm; variant 90° 9 connector; pins 9; package THT; pin spacing 0.2in (5.08mm); part # CTB0158-9
SW3 DIP SWITCH channels 1; package dipswitch-02
SW4 DIP SWITCH channels 1; package dipswitch-02
Temp1 DS18B20 1-Wire Temperature Sensor part # DS18B20
Temperature , Digital IN/OUT Camdenboss CTB0158-8 hole size 2.7mm; variant 90° 8 connector; pins 8; package THT; pin spacing 0.2in (5.08mm); part # CTB0158-8
VAC Camdenboss CTB0158-2 hole size 2.7mm; variant 90° 2 connector; pins 2; package THT; pin spacing 0.2in (5.08mm); part # CTB0158-2
VDC Camdenboss CTB0158-2 hole size 2.7mm; variant 90° 2 connector; pins 2; package THT; pin spacing 0.2in (5.08mm); part # CTB0158-2
Bill of Materials: Water Leak Board.fzz
Assembly List
Label Part Type Properties
10K 10KΩ Resistor resistance 10KΩ; bands 4; tolerance ±5%; package THT; pin spacing 400 mil
J1 Screw terminal - 3 pins hole size 1.0mm,0.508mm; pins 3; package THT; pin spacing 0.137in (3.5mm)
Particle Board Electron variant variant 5; pins 36; manufacturer Particle; name Electron; version 1.0.0
Temperature Sensor DS18B20 1-Wire Temperature Sensor part # DS18B20
Bill of Materials: Flow Meter Board.fzz
Label Part Type Properties
10K 10KΩ Resistor resistance 10kΩ; pin spacing 400 mil; package THT; bands 4; tolerance ±5%
10K 10KΩ Resistor resistance 10K0Ω; pin spacing 400 mil; package THT; bands 4; tolerance ±5%
10K 10KΩ Resistor resistance 10KΩ; pin spacing 400 mil; package THT; bands 4; tolerance ±5%
J1 Screw terminal - 3 pins pins 3; pin spacing 0.137in (3.5mm); package THT; hole size 1.0mm,0.508mm
Mosfet MOSFET-NCHANNEL variant pth; package to-92
Particle Board Electron variant variant 5; manufacturer Particle; pins 36; name Electron; version 1.0.0
Temperature Sensor DS18B20 1-Wire Temperature Sensor part # DS18B20
Bill of Materials: Relay Board.fzz
Label Part Type Properties
10K 10KΩ Resistor resistance 10KΩ; bands 4; tolerance ±5%; package THT; pin spacing 400 mil
220ohm 220Ω Resistor resistance 220Ω; bands 4; tolerance ±5%; package THT; pin spacing 400 mil
J1 Screw terminal - 3 pins hole size 1.0mm,0.508mm; pins 3; package THT; pin spacing 0.137in (3.5mm)
Particle Photon Electron variant variant 5; pins 36; manufacturer Particle; name Electron; version 1.0.0
Q2 NPN-Transistor type NPN (EBC); package TO92 [THT]
Temperature Sensor DS18B20 1-Wire Temperature Sensor part # DS18B20
U8 RELAY variant pth4; package relay-jzc
Attachments
Step 7: Soldering the Board
Step 8: Securing Your Boards Into Boxes
Let's put them into their Appropriate boxes
Step 9: Installing the Meter and Shutoff
Step 10: Hooking Up Your Boxes
Step 11: Water Leak Box
Step 12: Testing All Your Devices
Step 13: The Pezio Sensor
Step 14: Programming and Testing Your Programs
Programming is relatively easy using the Particle and there is no weird code to fight with ..You will have to use the libraries button in the ide to get everything to work. But there are excellent tutorials around for this.
The Following are clickable links to the Particle IDE Shared Code
https://go.particle.io/shared_apps/59b9c36208187bf... (Security Shield Code )
https://go.particle.io/shared_apps/59bdc307cf7cb97... (Sensor Board Code)
https://go.particle.io/shared_apps/59bdbdaecf7cb95... (Water Meter Code)
https://go.particle.io/shared_apps/59bdc5d0cf7cb9e... (Relay Shield Code)
The Code For Openhab 1.8 for your Raspberry Pi is in the text files above)
A great Tutorial for installing and using openHab is above as well
I decided to use Node_Red as an intermediary between the Particles and the Openhab MQTT protocols..I found it was more stable and didn't need as much babysitting .It come standard in the Raspberry Pi as a program so now downloading of the Node red is required but you need to install the Particle nodes which we will go through here.
For my notification Services I used Twillio..It messages me via SMS when there is an alarm or trouble in my house.(Water leaks , Cold temperatures, Fire or Smoke Alarms, Water flowing for no reason).
A good tutorial is available on the Particle Community Website for using Twillio and on the Twillio website. The Web hooks for both are attached.