Jun 05

Home Automation System – An engineering project (EE5)

Just as I did with our previous projects I’m going to elaborate on the ‘Engineering Experience’ project we’ve done this semester. We opted to build a home automation (Domotica) system from scratch. We, a team of 4 (clicky & clicky) electronics students at Group T University College, spent the last five months or so developing and building a system that, in theory, could be used to control and sense stuff in your house. Here’s some explanation on both hardware/electronics and software.


The essential hardware (excluding sensors such as temperature sensors, light sensors, switches, …):

We made a ‘sandwich’ of the Uno, Ethernet and XBee shields which acts as the core, the central coordinator or access point. From here all data is received from and sent to modules around the house. Thanks to the Ethernet connection, a MySQL database is hooked up and a webinterface is able to check and control the entire system. Unfortunately the Uno only has one serial IO channel, which caused some problems in the end due to both shields being connected to that one line. We fixed most of them by software filtering but looking back it would’ve been easier if we had for example an Arduino Mega, which has 3 serial channels.

Module End Device

Module End Device

Arduino Uno - Ethernet Shield - XBee Shield stack

Uno, Ethernet & XBee Shield 

As you can see on the left, the end device “module” is something we designed ourselves. An XBee is used to send over sampling data to the Access Point and to receive commands (set a digital pin to logical 1 or 0).

You can easily attach sensors to any of the 8 available XBee pins (which can be set either to DIO or ADC).

The programming of the XBee devices is done with a tool developed by Digi called X-CTU. We started out with a serial terminal to program the XBees but quickly switched to a more user-friendly application.



This program can be used to quickly change some parameters in the XBee’s firmware. The firmware can also be easily upgraded, which is a great thing since Digi seems to release a newer version every couple of months that introduces more features for the device.


XBees can either be used in transparent or API mode. For more complex actions one quickly leaves the simple transparent mode behind and uses the somewhat more complex API mode. This mode uses packets (frames) of data to send over information.

XBee API packet

XBee API packet



This was quite the challenge to be able to read the data, making sense of it and being able to use it to interpret voltages and status information. That’s why I developed a simple packet parser program in C# that quickly transforms any received data packet into human readable form. And so XBeeP was born!

We transfer data to and from the database by  letting the Arduino do PHP GET requests. Packet data is assembled and parsed on the webserver which translates it into usable information that can be shown on an interface. For ease of use we developed both a regular website and a mobile version with jQuery mobile.

Mobile Interface

Mobile Interface

Regular interface

Regular interface

User Restrictions

User Restrictions

With these bits of software, the possibilities are nearly endless, you can create cron jobs or do a check every time the Arduino fetches a page to automate things like turning on the lights when it gets dark. We’ve added a scheduler where you can set actions to be performed at a certain time. These can also be set to be repeated daily or weekly.

Some other features the webinterface has:

  • User rights management (see screenshot above)
  • Easy overview of your switches and the option to turn them on or off
  • Temperature/humidity graph
  • Motion Detection notifications


This was always just a proof of concept project but it turned out to be pretty usable. Of course, for a commercial project a lot more security would be added as well as the usage of “confirmation” packets a module would send to the access point to notify it has correctly received a command. Some more checksum calculations should be added as well to make sure there is no corruption of information along the way.

To conclude, if you look at Twine, which is somewhat similar I think this project is a beautiful example of home automation systems that allow a lot more interactivity between the system and its users. A funfact here is that if our project would be an actual commercial product on the market it would be cheaper than a Twine with something like $30 to $50 per module and $100-150 for the central access point.

Update: more photos of the finished product can be found at http://ee5.crombeen.be/

May 01

Erasmus at Politecnico di Torino

Some time ago I posted about applying for an Erasmus program. Turns out Turin was the only option that offered enough courses that match Group T’s Electronics master ones. As a reference for people who would like to go there as well I’ll explain how we prepared for this and selected our courses.

Ideally you should start looking for courses you would like to do in Turin in January/February. Don’t forget to contact the teachers of the courses you would like to replace! Head to the International Office and request the Erasmus Request Form (click to check out this year’s form). Once you’ve filled in this form, send it back to the International Office at Group T.

Next up is getting the Group T Learning Agreement (click to see mine) and making sure you fill in the courses you want to do in Turin and the ones you are planning to do at Group T. As it’s not feasible to do the master in one year when you’re going abroad I’m spreading it over two years doing the postgraduate as well.

By the end of April you should get an email telling you the ‘Apply@polito’ form of the Polytecnico is available. Make sure to register using your email address that was given to them (preferably clicking the direct link in their email).

Apply@polito homescreen

Apply@polito homescreen

Once you’ve filled in all your personal details, you’re presented with this screen. As you can see, their registration system is quite extensive! Try to fill in all of the important matters as soon as possible. All data you’ve entered can be changed later so don’t worry if you enter something wrong. As long as you don’t ‘Save and Submit’ the application isn’t final yet.

But that’s not all! You’ll also need a whole bunch of paperwork that needs to be submitted. Here is the official explanation of all things you need:



1. Academic transcript of records
This document must be a printed list of all courses and grades they have taken to date at home university. Documents can be presented in English, French, Spanish or Portuguese and stamped and signed by officials at home university.

2. Proposal of Learning Agreement (study plan)
This form specifies the courses which they apply to and/or the final project they would like to carry out at our Institution. Please note that this is a preliminary Learning Agreement. They will choose the courses together with the Politecnico di Torino Academic Advisor at arrival. In the proposal they must choose courses ONLY from one Faculty (Engineering I or III or IV; Architecture I or II). They can not pick up courses in the study plan of different Faculties.
3. Copy of passport or ID card (EU citizens), only the page with photo and personal data.
4. For LLP/ERASMUS students:
Declaration of the “LLP/ERASMUS” status. A document, issued by home institution, confirming the status as an Erasmus student. (Example)
5. Motivation/recommendation letter.


As you can see it requires somewhat of an effort to get all papers filled in, signed and printed. Once everything is uploaded, hit Save & Submit! Now you’ll have to wait until July 10th or beyond before you hear from them again, hopefully with a positive answer!

If you have any other questions, feel free to drop a comment and I’ll try to help you if possible.

To be continued…

Apr 10

The final round

It’s been a while but we’re back with more jibber jabber! The too few hours of sleep are starting to weigh down on all of us but I managed to find some time to post this diary entry, so here goes…

On Saturday we visited the famous TianAnMen Square. The evening before we already went to take a peek as Koen wanted to see it “by night” but apparently the square closes at some point in the evening and there wasn’t any particular interesting view at that time. So on Saturday morning we hopped on the metro, when we arrived the square was teeming with tourists. Thank god the square is really big. It also had a lot of merchants trying to sell hats, fake watches, the “red book”, … You can see the history of the square is still a touchy subject, everywhere there are surveillance cameras, guards, …

Continuing into the Forbidden City, we had some fun with Hanny’s Group T flag while he was getting the tickets. All sillyness aside we checked out some of the cultural relics that were shown there. While we were there we socialized with some medical department students of some university of Taiwan.

In the late afternoon we went shopping at Silk Market. This is a large building with about 5 floors with small shops with goods ranging from clothes to shoes, to accessories, … The funny part here is that their starting prices are ridiculously high, luckily you can get 1/10th to 1/4th of the price with 10 minutes of bargaining. Apparently we are ‘tough negotiators’ according to some sellers. Then again, I’m guessing the Americans don’t know that they can get a much lower price right here. Obviously all the brand things are fake but then again for 20-40 yuan per T-shirt you don’t really care. I bought a Hard Rock Cafe T-shirt for 40 while the original in the cafe itself was 200. Funny that on every floor there is a notice that you should not buy non-authentic merchandise. Some of us also bought a cheap travel router for 100 yuan.

The next day we took the bus to the Great Wall. During the busride we passed by a copy of Disneyland where its construction got shut down. Anyway, when we arrived at the wall the other groups were slowly but surely arriving as well. The first time all 4 groups of Group T were together in one place, a lot of people I can tell you. The Chinese visitors didn’t have a clue what the ‘invasion’ was. In the end it didn’t live up to the hype around the Great Wall.

After the mandatory group photo we had the option to climb one part or two parts. Due to time constraints we only climbed the ‘hard’ part which had an elevation of about 400 meter.

In the afternoon we were free to do whatever we liked. Dieter and I went to check out a cultural district but unfortunately it was quite disappointing as there were only regular shops. We did find a Seven Eleven store where we had our dinner for a measly 12 yuan, baked rice and dumplings.

Since the moment we arrived in Beijing we decided we had to visit the Hard Rock Cafe here because we kinda forgot to go to the one in Shanghai. So that’s what we did in the evening, after a good hour of walking we managed to find the cafe (thanks to 3G internet and 40 yuan of cell phone credit). We went to have a drink with 11 of us, it was quite expensive though. A fun addition is that there was a promotion where we received a Hard Rock cafe branded glass for free.

Since some folks hadn’t eaten yet and it was almost late in the evening we walked to the Bar Street/District (near ‘The Tree’). Here there were streetmerchants that sold satés (food on sticks) at 10 yuan for 5 as well as all drinks were 5 yuan. You could get a decent meal for less than 20 yuan.

This morning we finally went to Rigol. At first we watched an introduction movie about the company, after that someone of the company held a powerpoint presentation, unfortunately their English wasn’t that great nor was the slideshow particularly interesting. The best part of the company visit was the fact we were allowed to go into their production building. Seeing some giant Siemens machines making PCBs was pretty fascinating. However, there was still quite a bit of manual labor. Funfact: we had to wear coats, hats and shoe protectors but the doors were wide open and they led us through a dusty courtyard, talk about keeping up appearances ;)

In the afternoon we went to have lunch at a Korean BBQ restaurant, which was nice but apparently quite expensive. After that we decided to check out the Hutongs (sloppenwijken). Word on the street is that they might be fake and judging from what we have seen (Audi’s driving through the narrow streets, a fiber optic cable splitter, …) that might be the case.

For dinner we went to a Burger King and came back to the hotel afterwards. The journey is coming to an end and my feet are starting to dislike all the walking. Tonight I’m going to try and have a good night’s rest for a change so the last evening can be a long one and I can, in turn, sleep easily on the Airbus 380.

Well, that’s all for what is probably my last diary post about China. Just as a funfact I’d like to add that we now have over 10,000 photos so it might take a while to weed out the ‘bad’ ones and publish the good ones online.

You can find some over at Facebook: https://www.facebook.com/cp2012ea

More diary entries and status updates can be found at https://chinaproject.groept.be/dagboek/?editionID=12#group39