Wednesday, September 16, 2009

Back, with polar ideas!

A lot has happened in the last 2 months or so since my last post!

I was on holidays for quite a while, and then I came back and kept experimenting with the JeeNodes/JeeLinks from JeeLab, but that is not what I will write about today! I'll keep it short and show something I just got together in the last hour (instead of practicing the trombone!)

Based on this article in Make magazine, I decided that that is a great way to show the electricity consumption, so I decided to adapt my old fashioned looking graphs to the modern polar graphics!

Here is the first iteration!


In the bottom you can still see the linear bar chart, so that you can relate the consumptions to the pie slices! Let me know if you want the code...still must investigate a way to get it online!

The next stage is to integrate in one sole graph the consumption of the last hour (displayed above) and the last day, just like "hours and minutes", and of course, make it pretty!! something I am not very good at!

It is all made in PHP!

UPDATE:

Been trying around with fancy stuff, first color dependent on the consumption, going towards red as we go up, and then, some rounding of the courners :) check it:

Tuesday, June 23, 2009

Heating system rundown

Recently I met one of the persons behind the Wattcher, a nice little device to measure the electricity consumption of the house and show it in an accessible way to the users. Furthermore, it is a design piece as it was designed by the famous dutch designer Marcel Wanders.
Talking about the wattcher and my own power ball, I mentioned by automated heating system, and he was interest in it, so I wrote an extensive email about it, which I think should come here to the blog as well. So here it is, slighly adapted for the bolg:


Here is a quick breakdown of how my system works.
First, in Holland, the central heating works by having a thermostat in the living room which commands the boiler to burn gas when heat is needed. The remaining rooms then keep a temperature which is relative to the temperature in the living room, since the radiators in those other rooms will be more or less opened depending on the wishes of the inhabitants.
Some places have thermostatic valves, in which you can set the desired temperature and it will open and close the radiators according to the need of heat. However, for this last setting to function it is necessary that the living room thermostat turn on the boiler time enough for the heat to get there, and at the necessary moments.

This situation always annoyed me, since to get some decent temperature in the sleeping room in the morning, the living room would have to be heated up in order for heat to circulate in the system and heat up the sleeping room. The same for e.g. the bathroom.

So, I thought of a system where each room would have its own thermostat, able to request heat from the boiler (turn it on) and ways of opening and closing the radiator valves.

These systems are not new, and they exist for office buildings, high end residential buildings, and in other countries where the standard central heating system works according to different principles. Companies like Honeywell also have similar packages, but they are very expensive.


So, I found these room thermostats and radio controlled valve actuators, in elv.de

http://www.elv.de/FHT-80b-Set-2-Raumregler-FHT-80b,-1-Stellantrieb,-Batterien,-Adapterset/x.aspx/cid_74/detail_10/detail2_10647/flv_1

These are room thermostats, and function just like a thermostatic valve (like mentioned above), but one that you can program the day/night cycle. Furthermore, these thermostats can communicate with another device from ELV:

http://www.elv.de/FHZ-1000-PC-Software-zur-Ansteuerung-der-FS20-,-HMS-100-Komponenten-der-FHT-80b/x.aspx/cid_74/detail_10/detail2_9859/flv_1

which is a device to connect to a computer and that receives state data from the thermostats.

So, I got all these together, and built a computer system which receives desired and current temperature data from the thermostats and decides if the boiler needs to be on or not. If the boiler needs to be on (somewhere there is need for heat in the system) the system turns on a relay switch (also a wireless switch from ELV) that turns the boiler on.

I hope I didn't make it very confusing.

Meanwhile, ELV developed a device that does essentially the same:

http://www.elv.de/Wauml;rmebedarfsrelais-FHT-8W/x.aspx/cid_74/detail_10/detail2_22834

Monday, June 15, 2009

JeeNodes

I just bought a couple of JeeNodes from JeeLab, the Lab behind bringing affordable wireless technology to the arduino! It is not mainstream yet, in fact I think only a couple have been built and sold, but I think it is great simple technology!



So I got my kits, 2 boards, with all the necessary components, and assembled it. The Atmega168 that comes in it already has the arduino boot code burnt in it, along with a demo of the RFM12 radios for test purposes.

To interface with the little JeeNodes a FTDI interface cable (?) is necessary, but since I didn't have one, I remembered that the Arduino can function as a serial data relay when the Atmega is not there, so I connected the jeenode to the Arduino. Only 4 cables: GND, Power, RX and TX. I guess you could only connect the reset, but I couldn't figure that out, so I left it out.


My plan is then to burn the images using the arduino and then transfer the Atmega to the JeeNode board.

Plugged it in, only one, and I could communicate with it. Checked both, and both work!! great little boards, kits and service from JeeLab!

now I still have to solder the antennas (forgot those) and the headers (was too much in a rush to get it running) and then start playing with these little devices.

I am even happier since I think one can connect 8 inputs to it. I thought it was only four. So I can make my little remote weather station, with wind speed sensor, light sensor, temperature, humidity (maybe these can even get in through the TWI) and if I am lucky wind direction sensor.

Thursday, June 4, 2009

Touchatag success

Some time ago I bought a touchatag, not to use their service, but because it is a pretty cheap RFID system.
I always wanted to experiment a bit with RFID and maybe try to get the garden door, the one from the street to the garden to open when we get there with the bike. I know a bit (not much) about the security risks of RFID and so I am weary of using t for any major goal. I figure that if a crook goes all the way to break into my system to unlock the garden door, which is pretty easy to jump anyway, it is probably not a standard lock that is gonna stop him.

So, I got it, tried to get it running with the RFIDIOt tools, but with no major success. But today I found a page saying that you must supply a certain parameter in order to get it to use the proper reader. So I came home, tried it and SUCCESS! I manage to read the tags! now I just have to find some sort of daemon to notify an application that a tag haas been brought into, or out of, contact. It must exist so I'll keep searching!

Saturday, May 30, 2009

Daylight measurements

The next project, now that the door bell growls in the mac and the power orb is orbing like mad, is to make a small weather station, with a wind speed meter and a daylight meter in order to control the sun shade in the kitchen.

In the late afternoon the kitchen gets a lot of direct sun, and while that is a good thing in the winter months, it is not as nice in the summer, as it makes it very hot and the refrigerator has to work overtime.

I have an electric sun shade, of the extending type, which is connected to an ELV device making it controllable from the server. However, I cannot lower it automatically, since if it is raining or windy or simply cloudy, it is not a very wise thing to do. I do raise it automatically every day at 20:30, which should cover it most of the year, and in case I need to go out of the house and don't come back till late while the shades are off.

So I started the weather station by getting an LDR and connecting it to the arduino. Using the standalone temperature logger I made a few months back I could leave the arduino in the kitchen the whole day logging the amount of light.


The results are great I think! with the steep rise around 14:00 which is when the sun comes around the bend, and a clear difference between the times when the sun shines and when it doesn't. I think a threshold at around 800 will do the trick.
Furthermore I am quite happy with the excursion of the sensor, going from 0 to 916 at least, which is a 89% coverage of the 5V conversion range!
Now, off to the wind speed! Already spent the night disassembling an old VCR, and got some promising parts out of there!

One more note. I thought a lot about how to make a rain sensor. Not necessarily measuring it, but just to detect if it is raining or not, but concluded that if it is rainy, the sky will be overcast, so it won't be necessary to lower the shades!

Tuesday, May 19, 2009

Growling door bell



In my quest to complicate things, but to use the available technology, as you might remember, I connected the doorbell to the computer.
So, if someone rings, the internal beeper makes a little funny noise, not very loud, and the power orb turns purple!
The problem arises when I am upstairs, probably at the computer and do not hear the little beep, so, I thought of making some kind of listener daemon for the mac that would listen to messages in the network, only to find out that it already exists (technology advanced a lot while I was not looking...) and it is called Growl. After that and almost by accident I found a php library for growl, which is great, because all my server and home automation stuff is done in php, including the eternal cycle of checking if there is an additional line in the doorbell rings databse and sound the beeper if so. From there to a growling doorbell was just a few lines of code.

Even cooler is to setup the messages from the doorbell application to be spoken! Then the mac tells me that there is someone at the door! That is why the message is so verbose - it makes it cool when spoken! I managed to record it! The only way I found to get it here was to make a little movie out of it...so here it is!



As usual, if you want the code, just drop a line!

Power Orb complete

Finally!! you might say!
I fact, it has been a while since it is operational and running on the wall, but I had no time to report.
So here they are, the photos! where you can also see my home made home server enclosure.






The little black dot at the right, where the balls hit the wall (not the screw) is a little piece of metal that pushes the push button when the ball is touched, and it also helps keeping the ball in place, as it is pivoting on the other side on one screw only!

During the day it is not very visible, as the led is not very high power (on the contrary), and there is plenty of light coming in through the door, but the red and the purple are quite visible, even during the day, which is good, because those are the colors that it is relevant to see.

So for details. The processing is pretty simple: if there are more than 2 pulses from the gas meter in 20 seconds (0.03 cubic meters per minute) or 2 pulses from the electricity meter in 10 seconds (6Wh per minute) the light glows red. As soon as that doesn't happen, it turns back into green.
It is in my plans to make it average the consumption, so that it gives a better indication, since now we will probably not see it while it is red, since by then we are either in the shower (spending gas) or in the kitchen (spending electricity). Also should change the amount of glow depending on the amount of consumption. But all that is for later!

As for the purple, it comes up when someone rings the doorbell, and overrides all other indications. To reset, all you have to do is press the ball lightly, and it will turn the the appropriate color, indicating the consumption.

The code will come soon, I guess in a google code acount. If you want it, just drop a message!