Rudy Alvarado
Air Quality Sensor
Background: The original idea was to take Floral’s character and try to create something that would make sense in that setting, and that could implement what we learned about Arduino projects. Because her character lives in a post-apocalyptic setting with bad air quality. I had the idea to create an air quality sensor. I then implemented the requirements for the project, and was able to make a comprehensive project that worked well and actually tied into the persona quite well.
Required Materials-
- For virtual simulation: TinkerCAD
- For physical circuit: Arduino board, Arduino IDE, jumper wires, temperature sensor, MQ135 air quality sensor, RGB light, 16×2 LCD screen, 1k ohm resistors.
Explanation & Revisions: A major change that I had to make was the use of a force sensor instead of an actual air quality sensor. I had found one that would have worked and I purchased it; however, it did not arrive in time and I was not able to implement it into my final project. Apart from that, the idea is the same.
The idea was to simulate the potential air quality environments and convert them to thresholds for the force sensor. For example, good air quality would be no force, unhealthy air quality would be ~1N of force, and hazardous air quality would be around ~4N of force. At each threshold, the LCD screen would read something different and the RGB light would be a different color. At good air quality, the RGB light would be green and the LCD screen would read “AIR QUALITY: GOOD!”. At unhealthy air quality, the RGB light would be yellow and the LCD screen would read “AIR QUALITY: UNHEALTHY”. At hazardous air quality, the RGB light would be red and the LCD screen would read “AIR QUALITY: HAZARDOUS”. In addition, I found out that higher air temperatures make air quality worse. Due to this, I implemented a temperature sensor. For example, if the air sensor, or in this case, the force sensor read a number that would signify unhealthy air quality, the temperature would make the unhealthy air quality into hazardous air quality at temperatures above ~26 C. I also included an external power source (9V Battery) in the original TinkerCAD design because of portability, but eventually dropped the idea for the physical circuit due to time constraints. Below is the code.
Further Revisions: Upon realizing that we had no physical force sensors, I had to once again change the design. This time, I had to substitute in two push buttons for the force sensor. The idea stayed the same, but the execution of it and the code had to be changed. Now the thresholds were once again changed.
This time, when button 1 was pressed, it went into a state displaying what would occur in unhealthy air quality. When button 2 was pressed, it went into the state displaying what would occur in hazardous air quality. When neither buttons were pressed, it would go into the state displaying what would occur in good air quality. Code is below taking new inputs into account.
Demonstration-
Resources- TinkerCAD