You are on page 1of 11

technology workshop living food play outside

Creating a home automation system!


by Mjtrinihobby on May 7, 2015

Table of Contents

Creating a home automation system! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Creating a home automation system! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: The labjack u3 hv! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2: FLOWSTONE! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 3: Initializing the labjack u3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 4: Reading my Lifepo4 battery bank. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Step 5: Switching of real world devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Step 6: Metering of power. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Step 7: Scheduling of events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 8: Analog Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 9: Voice annunciation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 10: Remote Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 11: The Graphical User Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

http://www.instructables.com/id/Creating-a-home-automation-system/
Author:Mjtrinihobby
Trini hobbyist who enjoys making new projects, doing repairs at home and improving existing systems.

Intro: Creating a home automation system!


Here is how I automated my Home. I needed a means to;

- manage my solar power system including the ability to switch to/from utility supply should I need it.

- manage the food and water to my three doggies.

- control the outside lights.

- provide metering for the power consumption within the home.

- remotely control/monitor the home.

- Provide voice annunciation for key events (yes I love having my home talk to me like a person).

- a couple other functions.

Now I simply don't have the time or energy to learn how to use those fancy arduino, raspberry pi, Micro controllers etc. Those are for extreme minds (respect!). I can't
wrap my head around those things.

So, how did I automate my home? Read on for my solution!

Step 1: The labjack u3 hv!


This USB digital acquisition board is the cornerstone to my home automation needs! It is supported in Windows and several software packages support it!

I got this from Amazon for approximately 130usd.

It has digital I/O, analog I/O, counters, timers, The CB15 extension board brings out more IO from a labjack u3. A single labjack u3 hv has proven sufficient for all my
automation needs.

The wiring is straight forward. I used shielded cat5e cables for noise reduction. All the 0VDC busses are tied to the GND terminals of the labjack u3 (I used the shield of
the cat5e cables as the 0VDC lines).

Any switches (pushbutton or momentary) I wired between a digital input and GND. When a switch (NO) is physically actuated, the logic input for the digital input goes to
FALSE.

To have this beauty working i used a Windows pc (the more energy efficient the better), the driver from the labjack website and a software suite to create the program for
decision making.

Read these instructables concerning the actual pc I had used to automate the home.

http://www.instructables.com/id/Undervolt-an-amd-1...

http://www.instructables.com/id/Efficient-solar-at...

http://www.instructables.com/id/Creating-a-home-automation-system/
Step 2: FLOWSTONE!
This graphical programming suite is made by dsprobotics and supports the labjack u3 plus many other automation device across multiple manufacturers.

For me it's the perfect means to create an automation program and interface to My labjack u3. It supports line based programming with ruby but I stuck with the visual
based object oriented programming.

http://www.instructables.com/id/Creating-a-home-automation-system/
Step 3: Initializing the labjack u3.
The first screenshot shows the mandatory primitive and module needed to get the labjack u3 ready for data. The I/O config sets up parameters for the channels. For
example in my setup, all my analog inputs are set to special (SP) to allow the maximum range of 20VDC.

Digital channels are assigned as input or output (the default is input). For example on channel 5 (i.e. FIO5) I have it set as a digital output: DO5. If I wanted it as a digital
input it would be: DI5, or you can omit it and leave it as default input. If I wanted it as an analog input it would be: AI5. Sorry guys and girls, no analog out on the FIO
channels!

So its pretty easy to configure the labjack u3!

http://www.instructables.com/id/Creating-a-home-automation-system/
http://www.instructables.com/id/Creating-a-home-automation-system/
http://www.instructables.com/id/Creating-a-home-automation-system/
Step 4: Reading my Lifepo4 battery bank.
The labjack u3 can accept a maximum of 20vdc on 4 of its dedicated analog inputs. My Lifepo4 battery bank goes up to 29.1vdc so I used a 10k-ohm potentiometer to
divide the voltage to 14vdc maximum.

Via software I used basic maths to bring the voltage reading back to the real value. I also can tell how many minutes the charge controller has been on constant voltage
mode (how "full" the battery bank is"). Its all about voltage levels in this section of my flowstone schematic.

Here is the link to my Lifepo4 battery bank.


http://m.instructables.com/id/Lifepo4-solar-storage-battery-bank/

http://www.instructables.com/id/Creating-a-home-automation-system/
Step 5: Switching of real world devices.
I used a couple of these relay cards to turn on and off devices such as lights, motors, automatic transfer switches, valves and so on.

Once a relay pin is tied to 0v that relay coil will turn on. Basically in FLOWSTONE once I send a logic of false to a digital output, the relay wired to that output will turn on.
Each relay has NO and NC contacts so the world of possibilities are made available!

Very easy to do and any amount of creativity can be used to control home devices.

Step 6: Metering of power.


I used DC hall sensors to obtain a voltage reading that is proportional to the current supplied by the charge controller and also the load on the batteries. I already have
the voltage reading of the lifepo4 bank so power consumption is an easy calculation (V x I).

My instuctable below details how I wired the hall sensors.

http://www.instructables.com/id/Measuring-DC-via-a-computer-interface/

http://www.instructables.com/id/Creating-a-home-automation-system/
Step 7: Scheduling of events.
Flowstone has a time module to give information from year down to millisecond. Very convenient to have and use. A Tick is used to drive regular output of the Time
module and that information I used to trigger my dog feeder/waterer and external lights. Also at night the counter for constant voltage mode "minutes" reading is cleared.

All made possible with the time module.

Step 8: Analog Output.


The Labjack u3 has two DAC outputs: 0 to 5VDC. This is very handy for controlling, for example, a PWM controller that accepts 0 to 5VDC input. I used this to control the
speed of my solar water pump. Take a read of my instructable on it!

http://www.instructables.com/id/Solar-powered-wate...

Step 9: Voice annunciation.


Yes my automation PC speaks to me (or anyone listening) concerning key events. The sound is routed through the surround sound speakers for the PC (yes its also my
home entertainment system).

All I used is a text to mp3 online site to create the voice alerts. Next I used a separate program to play the mp3. Send a False to True logic state via the Bool to True
Trigger and The Exec module will pull up the mp3 and play it with the program specified. Quite easy!

Step 10: Remote Access.


I used Teamviewer to access the home automation pc. I can do this from my phone or another PC. It's completely free for personal use. Very easy to setup and works
like a charm.

http://www.instructables.com/id/Creating-a-home-automation-system/
Step 11: The Graphical User Interface.
The GUI is so easy with flowstone and its fully customizable in terms of scaling, colors, text etc.

Any switch, level meter, LED, text box, string box in the flowstone schematic will show up on the GUI. To make a free standing EXE to run in windows, just click the EXE
button at the bottom of the GUI page. You can include you own custom ICON for the EXE file as well.

So that's a summary on how I created my home automation system using a windows PC, labjack u3 hv, flowstone, relays cards, wiring, miscellaneous items and some
skills! I hope you enjoyed reading this.

PS: I uploaded the actually schematic file I used to make my home automation system for your cannibalizing pleasure!

http://www.instructables.com/id/Creating-a-home-automation-system/
File Downloads

mj home automation[1].fsm (536 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'mj home automation[1].fsm']

Related Instructables

Solar powered
Replacing all water pump
my infrared with speed
remotes with control via manual winch
girder 6 and an computer. by for a dog feeder
android phone. by Mjhobby DIY
Motherboard Mjtrinihobby Measuring Circuit breaker
by Mjtrinihobby
watchdog timer Direct Current panelboard with
DIY by via a computer Automatic
Mjtrinihobby interface. by Transfer Switch
Mjtrinihobby (ATS), metering
and computer
control. by
Mjtrinihobby

Advertisements

Comments

http://www.instructables.com/id/Creating-a-home-automation-system/

You might also like