Before anything else, I would like to personally thank the organisers and sponsors of this challenge, and kudos to doctorcdf for the great support and ironing out issues around some duties on the kits.  This challenge has been really an exciting and productive experience.


Previous Posts

Setting up the development environment

MSP430 Development in VisualStudio

CC3200 Development in Visual Studio

BeagleBone + node.js + Visual Studio


Carbon Footprint Monitoring - Architecture

Carbon Footprint Monitoring - Sensor Nodes

Carbon Footprint Monitoring - Data Flow


Carbon Footprint Monitoring - Hardware Design

Carbon Footprint Monitoring - Printed Circuit Boards

Carbon Footprint Monitoring - Power Supplies

Carbon Footprint Monitoring - Hardware Mods

System Components

Central Hub

Carbon Footprint Monitoring - BeagleBoneBlack Quick Recipe

Carbon Footprint Monitoring - CC3200 Remote Debug Console

Emission Sensor

Carbon Footprint Monitoring - Emission Sensor

Carbon Footprint Monitoring - Emission Sensor Firmware

Carbon Footprint Monitoring - Calculating Car Emissions

Outdoor Sensor

Carbon Footprint Monitoring - Power Meter CT

Carbon Footprint Monitoring - Outdoor Sensor Enclosure

Carbon Footprint Monitoring - Interpreting Collected Data

Smart Plug / Smart Switch

Carbon Footprint Monitoring - Smart Switch/Plug

Carbon Footprint Monitoring - Smart Switch/Plug Test

Carbon Footprint Monitoring - Remote Switch/Plug Mobile Test

Cloud Platform

Carbon Footprint Monitoring - [kNow] more AirVantage

Carbon Footprint Monitoring - AirVantage REST Library

Mobile Application

Carbon Footprint Monitoring - Mobile Application

Carbon Footprint Monitoring - Mobile Application Auto Launch


Around four months ago, this design competition was kicked off with the objective of creating a solution using Internet of Things technology to sense the environment we live in and how IoT can help us build a cleaner and less polluted world. 

Reflecting on the question:

"How would you use the amazing products below to help create a cleaner, more breathable world?" -from link


And so I thought one possible way to achieve this goal is for everyone's little contribution in reducing greenhouse gas emissions. 

Currently , there are already a number of initiatives and regulations promoting the reduction of carbon footprint that mostly adopted by commercial/industrial companies around the globe.  However, it should not stop there.  With all the advancement in technology, it is now more economical to build devices that can be installed for residential applications, such as the one being proposed here: a real-time carbon footprint monitoring system, to provide awareness about the households carbon footprint and is the first step towards the reduction of CO2 emissions.  Then we can all contribute to this goal of transforming our world into a healthier place to live in.


As with anything that is to be built, the blueprint for the system was first laid out, followed by foundation laying, then building the design closely to the initial plan but allowing for modifications and slight detours along the way.  This approach has always been the practice I've used in creating a working minimum viable product.  This approach will be discussed into a bit more detail in the next sections.


During the first few weeks of the challenge and while waiting for the development kits to arrive, I started off thinking about the high level architecture which is simple and straightforward.  The image below depicts the high level architecture of the system.  Also, during this period, and since knowing the key components of the system, the software development environment were installed and configured.



From the high-level architecture, the features for each component were drafted and again another thought process about how to build a solution given the constraints of the challenge, i.e. must use provided kits and tools, limited time and budget, and the like.  For this process, pen and paper works best for me.  


Hardware Design

Pen and paper design yields to some hardware blocks and from each block the key components are identified and checked if they would meet the requirements for the system.  Datasheets, application notes and reference schematic diagrams are used to draw the schematic and design the PCB.  While the waiting for the PCBs to be manufactured and delivered, the task was shifted into some software development.



Software/Firmware Development

The key components for the system (firmware) are from Texas Instruments: CC3200 Launchpad XL, MSP430FR5969 Launchpad, and the Beagle Bone Black.  This is the first time I've worked on the CC3200 and MSP430 devices.  The very good documentation and lots of sample programs made firmware development a breeze.  It was more like building a Lego house and merely selecting which block components are necessary.  For the firmware, this was mostly the GPIO control, ADC sampling, I2C and SPI sample programs.  However for the CC3200, the TCP Socket was the most useful as it was the key for the sensor node talk to the central hub (Beagle Bone Black).


For the central hub application, this is not the first time I've used the BBB, but feeling a bit adventurous, I decided to use node.js as the coding language.  This was outside my comfort zone but thought that this is one of the unique features of BBB and was a good opportunity to brush up some node.js skills.


For the cloud platform, Sierra Wireless' AirVantage was also new to me.  The documentation is comprehensive and very much helpful.  Although, I was stuck at one point and almost gave up on AirVantage, thanks to the guys, they helped me out resolved the blocking issue.  This was a really great experience with this whole challenge, and I commend both amgalbu and tomaja for reaching out.  To give back to the community, I wrote two helper libraries to easily connect, send and receive data to AirVantage.  These libraries and other source code put as attachments hopefully will become useful to someone at some stage.


Lastly, the mobile application was written to close the loop (of a minimum viable product).  During a series of test and use of the mobile app (CO2 emission tracking), an issue was identified such that manually launching the app may be forgotten and the trip will not be monitored or will be monitored late in the trip.  This was resolved by automating the process.  That is, using a pre-programmed NFC sticker placed in the phone holder, the mobile app is automatically launched and started when the phone is placed in the holder.  This was never planned out in the beginning but imo was a great feature creep. 


Challenges and Limitations

There are a lot challenges along the way that some of them ended up into frustration and uninspiring.  Challenges such as delayed components, hardware failures, missing information, buggy software and drop date deadline are typically experienced even in larger companies.  To me though, time management is the greatest challenge.  I have to balance the time between family, work, Christmas holiday, and this project.



I am quite happy with the outcome of this challenge.  With the limited time, I was able to build a basic yet functional prototype that would monitor my daily carbon footprint.  Knowing how much is the start for me to identify areas where I could reduce this footprint.  As an example on how to reduce the footprint, idling is a big waste of energy and is usually caused by heavy traffic.  Thus, it becomes more economical and more environmentally friendly to travel when traffic is light (already a known fact).  However, using historical data, we can create algorithms to "learn" and forecast when traffic is lighter in a given week.  i.e. Mondays always have heavy traffic from 7-9 but on Tuesdays through Thursdays, traffic is only heavy from 6:45 to 8:30.  We can then adjust our daily routines and be able avoid traffic on most days of the week.

Also, with the current data set recorded in the span of one week, I have few other ideas to make this even work better, i.e. base from the power usage data, it is possible to identify the activities inside the house at any given time.

Sierra Wireless' AirVantage is a big platform and I feel like I only scratched the surface and have not gone deep into its key features.


Not all features were implemented with the given time frame and even if they were, the system has a lot of areas which it can be improved on that are detailed below:

Emission Sensor Node

    • It would be nice to make use the MSP430, BLE and CO2 sensor as initially planned to measure actual emission.  Further research is needed to accurately relate the ppm value of the sensor to CO2 emission.
    • Install a digital fuel meter or connect through the CAN bus to accurately measure fuel consumption.
    • As an additional feature, using the recorded distance traveled and CO2 emission level (via sensor), the system can send notifications to the user that the vehicle must be serviced.

Smart Plug and Smart Switch

    • The power monitoring feature (via ACS712) needs to be implemented
    • Implement ambient light sensing for the smart switch implementation
    • Report humidity and temperature sensing to AirVantage
    • Re-spin a smaller hardware that will fit inside standard wall socket flush box

Outdoor Sensor Node

    • Re-spin hardware to support additional CT sensor (i.e. for monitoring hot water power usage)
    • Report rechargeable battery state/condition
    • Report BQ25504 charging status

Indoor Sensor

    • To be fully implemented
    • Add microphone and implement some sort of voice detection to identify presence

Central Hub

    • Create additional capes for the Beagle Bone Black to support additional communication mediums, i.e. ZigBee or RF, to support additional off-the-shelf sensors

Cloud Platform

    • This improvement is more for Sierra Wireless, some of them might be implemented but I haven't had the time to dig deeper, regardless these are nice to haves
    • It would be nice to support more data series on monitoring charts, atm, it can only do 3 series max
    • It would be nice to support other charts aside from the line chart, i.e support for bar graph and pie charts
    • It would be nice for charts to support presentation of DateTime or Timespan in charts
    • Possibly the most important one, it would be ideal if there are downloadable libraries that can be used for ease of interfacing with AirVantage.

Texas Instruments

    • My personal experience with TI has always been great and the plethora of documentation and samples is just the best, and can only think of a couple improvements
    • (1) have an alternative package for the HDC1000 sensor.  It being a BGA is a real challenge to for prototyping and reworking (if even possible without destroying the chip).  Another note about this sensor, I think at its price and performance ratio, it is one of the best out there.  Well done on this one TI!
    • (2) possibly a light-featured and cheaper version of the CC3200 that can compete strongly with other WiFI SoC just wishful thinking...


For the short period of time, a working Carbon Footprint Monitoring System has been designed and developed for this challenge and to end this post (but NOT the project, as development will continue outside the scope of this challenge)  I would like to answer the posed question:


"How would you use the amazing products below (TI, Wurth Electronics, Sierra Wireless etc) to help create a cleaner, more breathable world?"

By using the amazing and awesome products and parts in this challenge and build a carbon footprint monitoring system within the realms of IoT technology, can indeed help create a cleaner and more breathable world.  With this sort of system placed in every house across the globe, we will all be aware and become cautious on our carbon footprint.  Being aware is the first step towards changing our daily routines and habits.  The smallest reduction in CO2 emission will have a great contribution in this goal.


As an example, given the 7 billion world population, and if each individual would save roughly 1kg of CO2 per day (which is roughly about 6km of travel on a 12.5l/km car efficiency) results to 7 trillion grams (7 million metric tons) of CO2 reduction per day.  To put this into perspective, using the data presented in earlier post, if each ton roughly costs $336.01 then that would be roughly $2.352 quadrillion saved per day!!! That's a lot of zeros...