As we have recently moved into a new house I thought I should take a little time and investigate what would be involved in implementing a system which I could use for monitoring and automating parts of our new greenhouse as well as around our home.
If you have had a look at my previous automation page you can see that I have already played with some one wire electronic equipment and a little bit of X10, I wanted to make a larger system now though which I could keep on expanding as I wanted.
Looking at the available options for automating lights and music etc. around the home I found them to be quite expensive and not flexible enough for what I wanted to do, So I was going to have to design all the parts I wanted from scratch.
As my previous experiments with one wire items had worked well and these items are very low cost and reliable I decided I would still use dallas one wire equipment for monitoring things like the levels in my greenhouse tanks and temperatures etc.
One wire items work by interfacing to a PC or other computer via one cable, In my case I used Cat5 ethernet cable because it is low cost and contains spare cores for future use.
The first think I needed to do though was purchase a new interface to allow my PC to talk to the one wire items over a long distance. So I purchased a Link12 interface from iButtonLink, You can see this item in the photo.
This has now been working very reliably for over a year and goes along way around the house and garden. The interface plugs into the PC via a serial port. I decided to do away with a lot of the X10 equipment I had been using due to a lack of speed for turning lights on and off and also I have found it to be unreliable. Sometimes a code was missed until sent again etc. One of the problems with basic X10 is that there is no confirmation signals sent back to the transmitting units, So when this is interfaced with a PC the pc doesn’t really know if when it asks a light to turn on that it actually has. New versions of X10 have been developed to accomodate this but in the UK these are not readily available.
The photo to the left is the X10 Eagle Eye Module
(Used as an instant light switch or remote control)
I already owned several Eagle eye motion detection modules and stick on light switches so I decided to purchase an enhanced X10 receiver which could interface to my PC and receive signals from light switches and motion detectors around the garden etc.
The receiver I purchased was called W800RF and was made by wgldesigns, This was ideal because it comes with antenna which was seperate from the unit and allowed me to install the antenna in the loft to get the best all round reception of X10 Radio signals.
What I ended up doing was creating a module using a couple of dallas one wire DS2408 1-Wire 8-Channel Addressable Switches, This module connected to one of the remote control switches I received with the mains sockets.
Having built this I now had the capability of sending radio codes to turn on and off any of the mains sockets I previously purchased, This also allowed me to purchase light modules etc. to turn on and off the lights from the PC I was going to setup.
The response to the codes from the mains sockets is instant compared with a delay of a couple of seconds which the X10 modules used to have.
I also purchased a couple of RF weather proof mains interfaces which I use to control the lights in the greenhouse and turn the fans on and off. I then made a few simple interface boxes which contain dallas DS2408 chips which allow me to connect switches and sensors around the greenhouse into the PC I have, For just a few pence I can get lots of input devices to connect straight into my PC.
I have also built a one wire module with a couple of small amplifiers and a dallas DS2408 switch which I can use to send music and sounds from my PC to several speakers around the home, This is an ideal way for my system to alert me when any levels go low in the greenhouse tanks. It’s also handy to get the kids out of bed in the morning.
I also wanted to design a level measurement device so I can see how much liquid is contained in my nutrient automatic topup water butt, Rather than a simple high or low level I wanted to know approximately how many gallons were still left so I could estimate the water usage.
To build this items was quite hard work, I tried several different methods.
The first method I tried used a sharp GP2D12 infrared ranging device which basically bounced an infrared signals from the lid of the water butt to a piece of polystyrene floating on top of the liquid and the reflected signal was received back by the module which then translated this into a distance.
Unfortunately this device put a lot of interference onto the one wire communications to the extent that it was unusable, Even after trying several methods to reduce this it still wouldn’t work enough for me to use. Reading up on the internet this seems to be occuring for lot’s of other people also.
The second method I tried to use was an ultrasonic ranging device. After a little investigation the module I decided to try was by a company called Maxbotix and was called a MaxSonar-EZ1, I chose this device because it has several methods of outputting the range including an analog output which seemed ideal to interface with one of my Dallas chips which could read analog voltages.
Unfortunately although this device worked extremely and didn’t interfere with any of the one wire communications it didn’t quite cover the lower quarter of the tank which was the important part so had to try something else.
I probably should have checked it’s coverage and range before I purchased it, But if the coverage is correct for your application I would certainly recommend this device and the support provided by the company.
The final method I used and which I am using today is the simplest, Consisting of a tube all the way down the inside of the water butt which I then placed an strip array of read switches and resistors inside.
After making an appropriate floating magnet which sat around the tube I had a completed level gauge, It was then a simple matter of connected this to the PC via a connection on a dallas DS2438 Smart Battery Monitor which could read an analogue voltage which was related to the level albeit more volts meant less nutrients. Sometimes the simplest ways are the best.
The left hand photo shows My makeshift floating magnet, The white stuff is sealant used to stick the magnet to the sponge. The middle picture is a simple schematic showing what is contained within the actual tube and the final photo shows the completed level gauge tube showing the float at the actual water level.
The other module I needed then to make was an LCD interface which I could use inside the greenhouse to display information and messages etc.
After creating another one wire module using two dallas DS2408 chips I then had to program my PC send all the correct signals to displays the information on the LCD display.
This took quite a while but now I have a fully configurable display in the Greenhouse and can use the 3 buttons to interface with the PC from the greenhouse.
The PC software itself I have written myself in Delphi to give myself complete flexibility, It looks after alerting me when things go wrong in the greenhouse. And gives me nice indication of the status of my one wire interfaces etc as you can see in the picture below.
It can even send a text message to my mobile phone if something goes wrong while I’m out.
Finally I decided to connect several cameras to this PC so I could capture what is happening visually. I stumbled upon an interface called an IP Video 9100A Plus from a company called Aviosys which allowed me to connect 4 cameras to a little interface box which then connects to the PC through the ethernet
Although it’s not as high quality as some other boxes you can purchase it does it’s job and doesn’t cost the earth.
I also purchased a few low cost cameras from Ebay and I’m able to keep an eye on my greenhouse from any where in the world, And my system also records any goings on around my house for an extra bit of security.
I’m also having a go at making a few small self contained items such as a timelapse camera, My plan is to use some Pic Microcontrollers and a modified low cost digital camera to do this. I’ve been having a play with an excellent programming package for these called BoostC which allows you to program the controllers in C rather than assembler which should make it a little easier. I’m planning on using the software to also display information on an LCD display such as the one seen earlier on this page. Fortunately the BoostC software allows you to simulate this before trying it out on a real device. This should help immensly with getting the display write. You can see the package for yourself at http://www.sourceboost.com.
I hope this page has given you an insight into what is capable with little money and a little more ingenuity.