Is your home energy efficient? Bluemix can figure it out.

Share this post:

pubnublogo2014_hero-e1470329965179 There are quite a few things we take for granted in our day-to-day lives. Public utilities are one such example. We assume that the electricity and water supply will be at our disposal 24/7. This leads to wastage, and excessive wastage and malpractice lead to further deterioration of the environment.

Thanks to the awareness around climate change and the advancements in renewable energy sources, we are in a better position to safeguard our future generations by ensuring a sustainable supply of energy for our day-to-day needs. Still, a lot needs to be done toward achieving self-sustained living and this is where technology can help us.

Below, I present yet another amalgamation of things that can be managed using that game-changer, the “Internet of Things.” In this case, it’s a project for tracking public utilities using IoT, specifically the electricity supply system.


Smart energy grids are already in place, and we see a boom in this space with innovative business models like energy credits which can immensely benefit the consumers. But for a homeowner, this comes with the added complexity of having to install more components. For starters, there needs to be a renewable source of energy—either a solar panel or a wind turbine—along with an energy storage system. We also need a net metering system, which is a special kind of electricity meter that tracks both the energy consumption as well as the generation from a household, and rolls back the meter in case of excess generation given back to the grid.

A lot of data gets generated by these systems, and this is where IoT can help in harnessing it for our best interests. If we accumulate this per household data and combine with a smart grid, then there is potential to offer insights at the town or city level, which can help in framing benevolent policies for energy security.



Project Overview

For this project, we have tried to replicate the electricity distribution of a household by using a solar panel, a few appliances, and a battery, which acts as the electricity supply from the grid. A web-based dashboard tracks the whole system via IBM Bluemix hosted portal.

Below is a block diagram for this replicated setup for a single household.



There are two loads, “LOAD 1” and “LOAD 2,” representing a light point and a fan point in the house. Also, there are three sensors, labeled as “CURRENT SENSOR 1,” “CURRENT SENSOR 2” and “CURRENT SENSOR 3.” These are current sensors used for sensing the magnitude of current through the various paths of household electricity distribution.

  • CURRENT SENSOR 1 measures the excess energy given back from the solar panel to the grid in case of underutilization.
  • CURRENT SENSOR 2 measures the total energy consumed from the solar panels
  • CURRENT SENSOR 3 measures the total energy consumed from the grid.

The data captured in these sensors is in the form of Amperes, which is the unit for measuring electric current passing through the wire. The sensor readings are accumulated in a controller (Arduino YUN) and sent to the Bluemix cloud where they can be analyzed via a dashboard.

Note: For the sake of simplicity, this setup is based on the Direct Current (DC) system, as opposed to the Alternating Current (AC) system deployed all over the world for commercial electricity distribution.

Measurement Parameters

Using the current sensors, we can sense a few meaningful parameters such as

  • Power Consumption/Generation: Amount of current consumed by the household and generated by the renewable sources in the household. This is also known as the Watts (or Wattage).
  • Energy Consumption/Generation: Amount of energy consumed or generated by the household. This is a function of power consumption over a period of time. The standard unit of measuring this is KiloWatt/Hour (kWh). By measuring the kWh of consumption vis-a-vis generation, we can find how energy efficient the household truly is.

Data Push and Cloud Storage

All the sensors are connected to Arduino YUN controller, which also acts as an energy monitor. It takes a sample of the sensor readings at periodic intervals and then pushes them to the cloud. To do this reliably, we have used PubNub. PubNub provides a data streaming service for sending data across the internet in real-time, with the utmost reliability and security.

Data storage on the cloud is facilitated by the IBM DashDB data warehousing technology.


Both PubNub and DashDB are available as services within the IBM Bluemix catalog of services.

What’s next

In part two of this post, we will show you how to build this prototype system with the help of a few inexpensive components to deploy it on the Bluemix cloud, and most importantly, what insights can we derive from the captured data.

See you soon!

More How-tos stories
May 1, 2019

Two Tutorials: Plan, Create, and Update Deployment Environments with Terraform

Multiple environments are pretty common in a project when building a solution. They support the different phases of the development cycle and the slight differences between the environments, like capacity, networking, credentials, and log verbosity. These two tutorials will show you how to manage the environments with Terraform.

Continue reading

April 29, 2019

Transforming Customer Experiences with AI Services (Part 1)

This is an experience from a recent customer engagement on transcribing customer conversations using IBM Watson AI services.

Continue reading

April 26, 2019

Analyze Logs and Monitor the Health of a Kubernetes Application with LogDNA and Sysdig

This post is an excerpt from a tutorial that shows how the IBM Log Analysis with LogDNA service can be used to configure and access logs of a Kubernetes application that is deployed on IBM Cloud.

Continue reading