IOT & Building Automation Systems

My prototype of Building Automation Systems

The world is becoming more and more connected. With the advent of IOT (Internet Of Things), we can do interesting things like, making your fridge talk, feeding your dog when you are not home and more insane things which you may not have imagined was easy 10 to 15 years ago. I thought of sharing what I learnt through this article while working on IOT.

I did my college final year project on Building Automation Systems along with one of my friends (Gaurav Anand) and I learnt hell a lot from that exercise. The objective was to sense the surroundings and control devices in your home like lights, fans, and other electronic and electrical appliances automatically and through a user interface (you can see a prototype we made in the picture above with most of the wires removed).

Our project involved a lot of components working closely together to automate the entire process. You can find the report of the project at github: and here is the trello board which I made which also includes the references and links to various websites I referred for this project:

We used a Raspberry PI as a central controller since it was very much performant, could connect to devices and internet without much effort and has good I/O throughput and cost us relatively more than our substations which were various Arduino devices. This are the various modules used.

We had them all communicating through RF transceivers (NRF24L01+) both on the source and the destination to transmit packets of data between the PI and the substations. The substations were connected to various devices like relays, ballasts, transformers, filters, etc. This is how communication was done using RF transceivers.

We had lots of sensors in place. A light sensor, temperature sensor, motion sensor and door sensor. You can find more details on the device specs in the report you would find at my github page.

I burnt a relay, a raspberry PI, a temperature sensor and a light bulb in the process but was careful not to burn myself since most of my work was with 220V AC devices which would cause me more harm if I was careless with them.

Since I did not know what to buy at the start of my project, I bought almost everything I could find on the net and was interesting and that cost me 25,000 Rs. (INR) but did not end up using everything.

The user interface to control all my devices looked like this:

This is how we modeled: There can be multiple buildings with multiple rooms with multiple devices with multiple parameters to control or monitor.

So, we gave the user the ability to manage buildings, rooms, devices and the relevant parameters through an user interface and everything was well and good.

Depending on the output given by light sensor, we automatically controlled the light intensity in the room using ballasts to bring it to an optimal lighting level which can be made as a preset according to personal preference and this was the major challenge since there was a lot of noise involved which had to be filtered using filters and then controlled. Else, we were getting discrete light changes which was not desired. So, we added an OPAMP based filter to the circuit and controlled the PWM waves and fed the PWM waves to ballasts and inturn controlled it according to user’s needs. This is how we did it.

We made the control possible over internet so that you can control your home from the other side of the world.

Just to have some fun, we even added a door sensor to detect when a door is opened or closed.

While we did not control the fan speed due to time and budget constraints, we controlled switching on/off of all AC devices using a relay to which signal was passed from the arduino substation which in-turn got the signal from a central PI. And this is how we did that.

We had few irritating things in this process:

  1. No easy way to make sure if the electronic devices shipped to us by the vendor works properly. And they did not take returns once used.
  2. Too many wires for an RF transceiver. We had 8 wires connecting to each of them.
  3. Wires used to accidentally disconnect in some places and it used to damage certain devices.
  4. Positives & Negatives. Trust me. Its difficult to deal with these fellows even if you are a PhD. guy.
  5. I had huge trouble in soldering but luckily, my friend helped me out.

We made through it successfully and got good appreciation from the faculty. The interesting part is that I used to play DOTA 2 a lot then and relatively less time to do this project which could have been even more better.

Anyways, we all have our times. So, if you find this project useful, feel free to use it without any hesitation. You need not even ask me.

Will be back with my next article soon. Subscribe to me for future articles.