Progress will be updated on this blog and on my github: here
The aim for this project is to make visible the amount of CO2 in the air. While we know CO2 is constantly around us, it is disturbing that we can’t see it. This air quality lamp table is an attempt to visualize this invisible data.
An air quality sensor that is powered by a solar panel is situated on a windowsill. The sensor records the temperature and CO2 concentration in ppm (particle per million). This information is sent wirelessly to Air Lamp which reflects the data using RGB LEDS. The white color means extremely low CO2 values, yellow is low, peach is medium, red is high, magenta is extremely high.
About the data:
For this project, I data logged using an Arduino MKRZero. I was able to document in the course of a day the amount of CO2 in the air, time of day and the temperature. After data logging, I came to a rough hypothesis that the amount of CO2 correlates with the amount of human activity in the environment (i.e. people starting their day or getting off work). The CO2 level also spikes when it’s immediate surrounding is activated by factors, such as a person walking by or alcohol in its air.
Special thank you to Professor Tom Igoe, Jeff Feddersen and resident Hayley Hwang.
Steps this Week:
1.) Drawing the final dimensions for the CO2 light table. After doing 2 cardboard mockups of different sizes, I decided to make it 16″ diameter. The drastic increase in size is because I decided that the magnets should be half the width of the circle to make for the most visually appealing design. It was also this big to fit the large height of my Nema 17 motor.
2.) I transferred my drawings into Vectorworks then to the CNC. I am finally getting the hang of the CNC and really feel like me and the CNC are friends!
The total height of the fixture needed to be at least 3.345″ in order to fit the stepper. So, I had 7 layers of 1/2″ and 3/4″ wood to cut. Here they are all stacked.
3.) After getting the rims cut. I cut the bottom base and top rim. I also had designed an under-the-table enclosure for the Arduino and circuit to live in. The circuit enclosure was hand cut.
4.) The next step was cutting the opaque acrylic pieces. From last week, I knew that the 1/4″ or 1/2″ opaque acrylic pieces would be the best for diffusing the LEDs. Initially, I had the acrylic piece designed so that it would be an enclosure for the magmet, mineral oil, iron powder. I also had holes cutout for attaching it to the hub of the stepper motor.
5.) I tried attaching the stepper motor to the magnet holder and creating the enclosure. I even sealed the enclosure with silicone glue to hold the mineral oil. Unfortunately, after creating it I realized that the stepper could not handle the weight of this large 16″ acrylic enclosure. It was too much weight for the stepper to handle and would not make rotation cycles easily anymore.
6.) After realizing at the 11th hour that this motor, magnet, iron powder idea would not be achievable within the next few days I grudgingly scoped the project down. Instead of using this motor mechanism to show the change in CO2 levels, I decided to just focus on the colors of the lights to represent the data. From this decision on, the project felt much more manageable.
After realizing that, circuit changes and code changes were made. My circuit became very minimal in comparison to the one with the stepper motor.
Here is the previous one with the stepper motor breakout.
I was also able to focus on putting together the rest of the lamp fixture.
7.) Next was wiring up the LEDS. I wanted to make sure there was no spottiness with the lights but also be light enough to be a nice ambient light. So I really overloaded the inside fixture with tons of LED strips.
8.) Next was soldering all the components to a perfboard.
9.) Then came putting it all together: the wooden lamp fixture, the Arduino and the circuit
10.) The code was it’s own messy story. It was worked on it multiple series. First with just the stepper motor on its own sketch. Then, with the leds and the sensor by themselves. I also got some help from a couple of people (Kasra and Hayley) to figure out how to do data averaging and not have the LED not react to each reading. Instead, it now averages and checks to make sure that the previous reading is/isn’t the same as the current reading. Here is the final “super code”:
Steps for data logging can be seen in the previous blog: https://emilylinprocess.blog/2019/04/29/light-energy-wk-12-co2-clock/
Previous posts on process:
Final code here.
Objective: This website is an online chat service. I tried to make it lighthearted as I treated this project mostly as a learning experience. I was using this final as a way to practice using socket.io, node, express and heroku.
11th floor, Tisch Building
The photo below is from the 11th floor, which is part of the Film Department. Their lighting situation in certain areas seemed very considered. For example, in their lounge space, there were many light sources that made for a well-lit room. However, when I checked the lux meter, it was around 54 lux. 54 lux is a bit low.
Pretty cool, film-themed light fixture.
Data log csv file transferred and plotted with Google Sheets: https://docs.google.com/spreadsheets/d/1Bpe7Jy5zFORFkklbXdWzqBy4G5U819bS96PCMnsdiEA/edit?ts=5cd42857#gid=0
Steps I went through this week:
a.) MKRZero Data logging! Started logging at 04/29/19 at 3AM – 04/30/19 2AM (almost 24 hours). It logs every 5 seconds.
Here are the CSV files: https://github.com/emilylin-itp/light/tree/master/final_co2clock/SDCARD_READINGS
Data also looks like this:
Trying to data log with the MKR 1010 wifi. After many attempts, I narrowed down the reason that it doesn’t work to either the SD card I have (32GB) is too big or I formatted the SD Card wrong. However, I formatted it to be both FAT 16 and FAT32 and both were not working.
Despite the fact that I couldn’t get the MKR 1010 to data log, I did manage to get the MKR Zero that Tom lent me to write.
Below are some photos of the gas sensor CSS811 hooked up to the MKR Zero by my windowsill. The results are pretty interesting and varied. There may be a correlation between CO2 levels and when people get off work. The data has a lot of noise, so I need to figure out how to average it out. Also, when it is late at night the CO2 is much lower.
b.) Next, was trying to at least get my 2 MKR wifis to talk. This proved to be very difficult as I know very little about networks. I tried out the example code in Arduino but was still not able to connect to the itpsandbox network and my home network. Followed along with Hayley’s helpful blogpost and was still unsuccessful: http://www.hhayley.com/2017/04/08/li-24hours-bokeh-light-lamp/
I met up with amazing resident Hayley, and we still couldn’t figure it out. After discussing my game plan with her, we decided that given the time frame it would be hard for me to both fabricate everything and learn about networks. So, we scoped down the project for the time to just have the gas sensor be local to the light fixture. I’m hoping that after finals is due next week I will be able to spend more time to get the data to send wirelessly. For now I have decided to just focus on getting it to work with the Arduino Uno.
c.) With that in mind, I began to fabricate again. I worked on trying to redesign the fixture so the magnets attached to the motor are more secure. I got a motor hub to attach to the shaft. Below are some drawings and cardboard test.
I also tried to get my other pcomp components to work, such as the stepper motor and controlling the speed with a stepper breakout board. I used the TB6612.
d.) I tested out the LED lights to try and figure out the best place for it. I was afraid there would be a shadow from the motor, but I realized if I put it in the rim around the base (where the motor is) there would be no shadow. Here is the circuit below. Followed these easy steps: https://www.instructables.com/id/ARDUINO-CONTROLLED-12v-RGB-LED-STRIP/
e.) Tried out different materials, realized that the best acrylic to get for the diffuse look I want is this opaque white one. The frosted acrylic still makes the light spotty. (Frosted on left, opaque on right).
f.) Made my 2nd prototype mockup with a larger diameter. I still feel like it is too tall for the width. I will increase the width to be 15″, instead of 11″ it is in this mockup.
So many troubleshooting notes for this week, mostly with the sd card and mkr 1010 wifi.
SD Card Formatting via Command Line
sudo diskutil eraseDisk FAT16 #name MBRFormat /dev/disk2 sudo newfs_msdos -F 16 /dev/disk2
Stumbled on some resources/ posts that I want to keep in mind: