Skip to main content
shopping_basket Basket 0
Log in

Mindful Droid - Bringing Awareness and Change to Air Pollution Levels: Part3

Final working version of the Mindful Droid

The Mindful Droid has been programmed with settings to accommodate for air quality indoor, outdoor and also correlate with the RS DesignSpark ESDK kit.

The use of RGB coloured addressable LEDs was to create fun and understandable animations, through the use of Pixel Art, that change based on the settings and specific live air quality data readings. In my last article, I described the build guides, components and objectives. Here, I describe how the final Droid came together, live testing, code used and sources used to obtain the Pixel animation and also what I could have done better.

The Mindful Droid animates at various air quality levels depicting the C02 and CO sensor results from good, decent, bad and extremely bad. The extremely bad level results in a sad to crying smiley face display in addition to the sound of a buzzer noise alarm prompting you to take action i.e open the window, or change environment.

Assembling the Droid

In my last article, there was an issue I identified with the Droid. I had issues with a sensor not giving accurate results. This was the MICS5524 gas breakout sensor, which hasn't been added to the part list, although it's on the PCB board design.

This process was really challenging, as it felt I had to revise a lot to accommodate for a new sensor and make do with the existing PCB design. With much determination, perseverance and many failed 3D print prototypes, I was able to find a solution and a new position on the droid that will accommodate the new CO sensor, giving the desired result.

The wiring and connecting of the components were pretty straight forward. I ensured the polarity matched before soldering - this helped save having issues along the build and test process.

PCB constriction of the droid

If I am to do this again I would ensure there are less restraints and more flexibility around building the droid - one being the PCB board design would allow for moveable /interchangeable components.

Below is video on how I assembled the parts and components together:

 

The Pixel Art Animation development

I have had to use an open-source platform PixelArt to design the Art animation for the Droid. The process was quite straight forward once I knew the type of animation I wanted on the Droid. The platform has tutorials on how to achieve desired design effect. For this process, I would recommend sketching ideas on paper first to help understand how to bring them onto pixel art. I did struggle as I had some restraints with the pixel canvas size which was 18x10, making it difficult to get proportional designs on the droid. However, I was able to make about 18-pixel designs for the droid and the fun part is you can do this also by yourself following the steps taken.

Going for a smaller pixel pitch size is something I would consider doing moving forward, to allow freedom of manipulating pictures into pixel canvas easily.

An example below is of an angry face pixel design that will appear and reflect upon a high polluted room or environment.

angry face pixel design

Once a design has been made, the next phase is to convert this into the droid. This is done using Led Matrix Control software (LMCS) by YouTuber Tyler Jones. This is used for controlling LED matrix in real-time.

The LED control software helps to convert the pixel-designed files, this means I can save the design to “.txt” format that will be readable by the Droid when uploaded onto Arduino. Another cool feature with LMCS is that you can upload actual images and convert them directly into pixel art in real-time with little or no iterations.

The link above on his name, directs you to his youtube video tutorials on how to achieve desirable pixel art design and animations of your choice.

The Code & Testing development

I wouldn't have been able to do this part without the guidance of Ahmsville and I'm super grateful for the support he provided on this project.

In addition to the animation and awareness word display feature on the droid, there are a few other functions like a noise buzzer when the pollution level is over a certain threshold, a clock display feature that can serve as a bedside night time table clock and a possible game function.

The features listed above are possible using Arduino MKR WIFI 1010 board, which has WiFi capability and is based on the ATSAD21 chip. The Droid has multiple features and runs various things at once, meaning I need to find a way to regulate the features and allow the user to have personal preferences in relation to what air quality they want to monitor or what matters most to their health and environment.

The program I wanted to run on this board would have to do a lot of different things at once. So, to assist in breaking it down into simple steps, I listed below the steps I carried out to ensure its main functions to possible wishes, as the codes evolves:

  • Test are LEDs working on the PCB board.
  • Test Animations are working on display pixels
  • Test air-quality sensors work by checking the serial monitor on Arduino
  • Get the wifi + MQTT working on Droid
  • Change the animations on the Droid based on sensor readings and values
  • Get Droid animations into frames on Arduino
  • Have the ESDK live values feed directly to the Droid animation
  • Collect data, upload and store to cloud Grafana

 

The droid is driven by CO2 when indoors and CO when outdoors and also runs the VOC sensor.

int CO2thresh[4] = {500, 1000, 1500, 5000};

int VOCthresh[4] = {20, 50, 100, 150};

int COthresh[4] = {9, 35, 800, 12,800};

int GENERALAIRQUALITYthresh[4] = {65, 100, 150, 200};

At 400ppm CO2, the animation should have a cool happy smiley with glasses animation. At over 500ppm a normal occupied indoor space with good air exchange, there should be a green to amber or yellow smiley animation. At over 1200ppm, the user will be aware of the sad smiley face animation flickering from green to red, so the animation would get significantly frequent. At 1600ppm and over, the droid will increase attention to itself with an intermittent buzzer sound and changing animation to a sad crying face.

I also have a general air quality sensor on the droid that would be the default setting for when the droid is turned on. Using the buttons on both sides of the droid will help alternate through the AQ sensors and can also be programmed to change features and functions on the droid.

The code on the droid can be reprogrammed to something more specific or further equipped with more features and functions with respect to bringing awareness and change to air pollution.

Based on the demonstration video, it works nicely and shows an accurate result in relation to data collected from the ESDK and also from the Droid itself.

What I would have liked to do if time was on my side would have been to explore further the user interface and experience on the droid to ensure smooth and comprehensive interaction. I would also have liked to play with the animation a bit more in future, as I believe that there is room for more experimentation and better pixel art designs.

Overall, it has been a great project to work on and it has definitely stretched and pushed my comfort zone.  I am pleased with the result so far and I can only hope for it to be taken further.

Mindful Droid sitting on a car dashboard

Mindful Droid being carried across shoulder

I hope in the future there can be a modular, compact and smaller Mindful Droid 2.0, that can be easily accessed by children, adults, schools and institutions to help raise more awareness and change towards the effects of pollution in a fun interactive way.

Below is a video showing how the Mindful Droid works in real-time and in connection to the ESDK kit.

Update on Mode Structure for Droid

Below are further additions with new features, functions and adjustments to the existing code for the Droid

Downloads

Michael is an Industrial Design Engineer, Maker and winner of the Young Innovators Award 2021, with over 9 years experience working in various industry sectors. Having a problem solving background, he is always enthusiastic about finding solutions to problems that challenge everyday living. His key focus points are inclusivity, functionality with consciousness, and sustainability.
DesignSpark Electrical Logolinkedin