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. In this blog post, we present yet another amalgamation of things that can be managed using that game-changer, the “Internet of Things.” In this case, it’s an IoT energy management system for tracking electricity supply and consumption.
Note: This blog post was originally published in the IBM Bluemix Blog
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.
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 acts as an IoT energy monitoring system and 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.
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.
Using the current sensors, we can sense a few meaningful parameters such as
All the sensors are connected to Arduino YUN controller, which also acts as an energy monitoring unit. 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.
There are three components in this project.
The complete source code along with build and configuration details are available the shyampurk/iot-for-utilities project on GitHub.
The energy monitoring server program is based on Python and is hosted in IBM Bluemix platform. This application also relies on two Bluemix services, DashDB and PubNub. DashDB is IBM’s in-house database platform for data warehousing needs. PubNub is one of the third party services available under Bluemix catalog which offers a real-time messaging service over the internet. Refer to the steps in README file to understand how to setup and host a python application under Bluemix with DashDB & PubNub.
The source code for this energy monitoring server is located under powerGrid_server directory in the GitHub repository.
This is the user interface for monitoring the energy consumption of the model electrical network used for this project.
The web dashboard is hosted on Bluemix, as part of the server application. The communication between a web client and energy monitoring server is orchestrated via PubNub.
The source code of web dashboard is located in powerGrid_webApp/IOTEG directory under the GitHub repository.
The electrical network is modeled using a solar panel supply and a battery supply ( representing the actual Grid supply). Two loads, a light, and a fan, act as the electrical devices whose consumption pattern need to be tracked. Three sensors are connected to the network, and their measurements are fed to the Arduino YUN controller.
Here is the schematic diagram of this project.
The battery charging circuit in this schematic represents the part of the electrical network which gives back excess energy generated from the solar panel, back to the Grid (the battery in our case). This happens when the energy consumed by the loads is less than what is generated from the solar panels.
The Arduino YUN runs an OpenWRT Linux images which continuously monitors the sensor readings and pushes them to the energy monitoring server every second. PubNub also orchestrates the communication between Arduino YUN and the energy monitoring server.
PubNub acts as the communication middleware for the entire system. It provides a cloud-based real-time Data Stream Network which supports more than 70+ SDKs, such that it can enable any device to communicate with any other device on the Internet. This application uses three of PubNub’s SDKs for all components to seamlessly communicate with each other. These are:
The Hardware and overall electrical network setup of this project is a little complex than the usual. To simplify things, we can divide it into four steps.
Refer the hardware build section under README file to see how the hardware is built.
Once everything is setup regarding the hardware, we have to ensure that our energy monitoring server and its associated services are up on Bluemix dashboard.
Now we are all set.
Fire up the circuit. Launch the web dashboard, and we are all set to track the energy consumption and generation status of this system. This is the model IoT energy management system in action!
As you can see, the sensor gauges show the readings of the total energy generated from the solar panel, total energy given back to the grid and total energy consumed by the loads. With the light on, the energy consumed is less than generated by the solar cell. Hence the grid supply is not utilized. But with both light and the fan in on state, the consumption exceeds the generation and hence the grid is called into action.
Why would you want to track energy? Apart from the obvious reasons of monitoring and auditing, there are some practical benefits of this.
This project portrays the possibilities of a connected economy of essential services. With every industry getting revitalized with the new landscape of business and service model possibilities, electricity supply and other utilities industries are also evolving towards a smarter world.
Be leveraging the IBM Bluemix ecosystem, we have shown you how we can elevate the concept of connectedness to a new level and assist enterprises and utility service providers to scale up their offerings as per the trends. This is also an exciting area for IBM Watson as the amount of data generated is huge and deriving practical benefits of energy tracking from that data could become the real game changer in the medium to long-term.
Surya is a hardware buff and tinkerer who loves all the stuff around IoT. He is a specialist in building proof-of-concepts around electronic hardware and conceptualizing use cases and solutions for Internet of Things. When not working with hardware, Surya can still be found fiddling with some crazy hardware design, trying to bring out an idea out of a raw circuit.
Realtime Updates with Smart Contract on Ethereum
Worrying About Rising Energy Bills? Realtime IoT Energy Management Is At Your Disposal
How To Make Your Smart Bin Smarter With IBM Bluemix
Saving dogs with IBM Watson Visual Recognition
Model IoT Application For Tracking Kitchen Inventory
Microservice in action : Build a weather enabled chat
Please log in again. The login page will open in a new window. After logging in you can close it and return to this page.