Home Automation over IP
It has been a while since I started with my home automation over IP project. There has been a lot of progress but also some changes in the original design.
Previous posts:
Home automation over ethernet
The home automation over IP controller
Software
Right now the micro controller board with the Atmega168 can read analog inputs, switch relays and dim LEDs using pulse width modulation. However no logical decisions are made by the micro controller.
To do the logics I made a client and server application with Java that’s able to run JavaScript files in a script engine. The Java application retrieves the values from the micro controllers, executes the JavaScript and sends the updated values back to the micro controllers. It acts like some kind of soft PLC, running on a simple language like JavaScript.
Because the JavaScript based soft PLC has no GUI I integrated an extra webserver in it. Now it’s possible to create fancy interfaces with Adobe Flash or any other development tool that’s able to get and send data over HTTP.
A complete cycle is as follows:
- retrieve IO status from micro controllers
- execute script
- retrieve modified IO status from script engine and put it in the IO buffer
- apply modifications received by the server in IO buffer
- flush the buffer to the micro controllers
- goto step 1…
To avoid to much load on the network a cycle is only ran once every 200ms. For industrial purposes this could be to slow but for switching on and of lights in your house this is fast enough. When pushing a button in a Flash movie the delay is barely noticed.
Hardware
Beside the point that the modules will not be build in to a housing that can be mounted on a DIN rail there are no changes on the hardware part.
Can I get the source and schematics from this project?
At the moment, no. It might get open source one day, it might be not.
Zelf je Telenet Digicorder maken
Since this article is about a typical Belgian product (and its problems) I will write it in dutch.
Het Digicorder probleem
Veel digitale kijkers die gebruik maken van de Digicorder van Telenet ondervinden na enkele jaren problemen. Deze gaan van af en toe een melding dat de stekker uitgetrokken moet worden om alle functionaliteiten te herstellen tot het continu herstarten van de Digicorder. De garantietermijn van de Digicorder bedraagt 2 jaar en die garantietermijn blijkt net iets korter te zijn dan de levenstermijn ervan. Wat weinig mensen weten is dat je voor nog geen 3 euro de Digicorder zelf kan herstellen.
De oorzaak van de problemen
Hoewel je zou kunnen denken dat de oorzaak aan de software ligt is dit veelal niet het geval. De eerste firmware versies van de Digicorder waren niet de beste maar tegenwoordig is de software behoorlijk stabiel. Waar het dan wel fout loopt bij de Digicorder is de hardware.
Na het openschroeven van de Digicorder wordt het probleem meteen duidelijk. Zeven condensatoren die bol staan of zelfs uitgelopen zijn.
De oplossing
Atmega bricked by watchdog
While programming a micro controller for the home automation over IP project there’s a lot of trial and error involved. To make it possible to reboot the micro controller remotely by software I was experimenting with an infinite loop without resetting the watchdog timer.
Custom screen resolution for 7″ touchpanel
As HMI for the home automation over IP project I’m using a 7″ touchscreen. To get the best result from the screen I want to use it on it’s hardware resolution. This is 800×480 px, not a standard supported resolution. To get around the problem I installed Powerstrip, a very useful program to create custom timings and resolutions. After experimenting for a few minutes I had the touchpanel going at 800×480 px. Another job well done… ![]()
Home automation over IP: the controller
Finally some progress in the home automation over IP project. The controller is put into it’s housing, there is some firmware written and there’s also some progress on the computer software.
To make it possible to mount the controller in a common electric cabinet it will be housed in a DIN Rail mountable enclosure.
To bring the micro controller outputs to the exterior I made a PCB using the toner transfer method.
Making Printed Circuit Boards - Toner Transfer
For the home automation over IP project I needed a fast and easy method for creating printed circuit boards (PCB). After some research the “toner transfer method” seemed a solution to give a try.
Not being sure about the quality of the final result I designed the PCB with wide paths. This way a lack of precision shouldn’t be a big problem.
What you we need:
- a PCB design (obvious)
- a blank board (without photosensitive layer)
- magazine paper
- a laser printer
- an iron, preferably without steaming capabilities
- personal protection against chemicals (gloves, safety glasses and eventually a lab coat)
- glass or plastic bowl (never use a metallic bowl as etchant container!)
- etchant: HCl, H202 and H20
- thinner (acetone)
Making a Pizza oven
About a year ago I landed on a website about making pizza ovens. I wanted one too. Pizza ovens, or more in general wood fired brick ovens give a unique taste to the pizza, bread, cookies,… you make in it. Because of the higher temperature crusts become more caramelized.
After doing a lot of research (read googling) I had build my own brick oven in my head and it was time to build it in real bricks. Since I didn’t make detailed plans or calculations I’ll just provide you the pictures. If you’re going to build a brick oven make sure it’s unique, don’t stick to a plan, that makes it even more special! And now, the pictures…
Home automation over ethernet - update
It has been a while since I announced the home automation over ethernet project. It’s time to make some progress!
I’ve been writing some basic software for the microcontroller making it possible to switch leds on and off and change the IP and MAC address of the modules. Also on the hardware part some decisions have been made. As mentioned in the previous post the modules will be mounted on a DIN rail. The microcontroller will have it’s own housing. Outputs and inputs will have a separate housing making it possible to create different configurations.
For the creation of the circuit boards the “Toner Transfer” method will be used. This is a cheap and accurate method to create prototypes. When I start creating the PCB’s I will explain this method in detail.
The software running on the server will not be written in VB.net but in Java since I want to leave the option for Linux as operating system open. Below you find a screenshot of the main screen. This is really an early development version, but it gives an idea.
The next step, something for tomorrow, will be ordering some electric components to create the prototype modules. To be continued.=;;
Cheap AVR programmer
For my Home automation over Ethernet project I’m using an AVR micro controller. Several companies offer in system programmers for these controllers. Since I don’t need in system debugging a simple programmer will be enough form me.
The programming cable is a printer port cable (parallel, LPT) with some resistors to protect the port. I don’t use optical isolation, it’s a direct connection. This brings some risks but is cheap, very cheap.
To make the programmer I used an printer old cable, and soldered resistors on the end as follows:
All resistors are 220R. This cheap AVR programmer works great. To send the programs to the AVR’s memory I use Ponyprog, a free tool compatible with the programming cable.
Home automation over Ethernet
A lot of houses are equipped with a wired Ethernet LAN. So why install an extra network just to turn on and of a light bulb or dim a light? Wouldn’t it be possible to use an ordinary Ethernet connection to control our home appliances?
On my job I use ‘Industrial Ethernet’ everyday. It’s like your home LAN, but with more expensive switches and, in general, green wires and fancy connectors. The principles are the same, but for security reasons it’s separated from the office LAN. For home automation purposes it’s not necessary to separate the networks, actually it’s better to have only one network. That way I’ll be able to control the appliances from my computer.
My user requirements:
- Create a micro controller based module that ’speaks’ Ethernet.
- Make expansion modules to add relays, dimmers and inputs to the CPU.
- A user interface (VB.net and/or web based) to control the modules
- A computer service handling the logics (for time based switching etc.)
- …
To create the CPU module I’ll use a webserver board from http://tuxgraphics.org/, when the basics are programmed I’ll go on developping the hardware.
As enclosure for the modules I will use DIN-rail housings. This will not be the first concern, but size WILL matter while developping the printed circuit boards.
Things to do:
- Find the right programming and development tools
- Design PCB’s (probably with EAGLE)
- Make the PCB’s
The first two points on the short time to-do list are clear. The last one, the production of the circuit board, I’m not yet sure about. I never made a circuit board before. Will I use my CNC router do isolate the paths, make a UV box and use boards with a light sensitive layer or just find a company to produce the boards? I don’t know yet, suggestions are appreciated…


















