Final Week

The end of the Senior Project is here! It was a wild journey, with many ups and downs, but well worth it. This week, I attached the Bluetooth Module and worked on connecting it to the app. Here’s what it looks like:

Screen Shot 2018-05-03 at 10.32.25 PM

I learned a lot in this Senior Project. I was able to apply knowledge from my AP Physics 1 class in the real world. Learning about something in class is one thing, and using that knowledge in real-world situations is another thing. I had to review some topics again such as Kirchoff’s Law and the difference between parallel and series circuits.

I had a lot of personal challenges as well. I was working too slow at times, I didn’t feel motivated to work on the project, and a bunch of other issues. But I reminded myself of my end goal. I kept in my mind that this project was going to be shown to others. I had to put in my best effort. I used tutorials online when I felt stuck. I asked others for help when I wanted to give up. All of these challenges prepared me for college and the future. I’m going to face similar struggles in life, but now I know how to handle them better.

Like  I mentioned before, this project had a lot of ups and downs and a lot of things that went right and a lot of things that went wrong. Some things that went right were the connection and powering of the gas sensor and the coding for the sensor. Some things that went wrong was the connection of the Bluetooth module and wiring for it. While I’m still not 100% done, I’m at the final stage. In a few more days, I expect to fully finish the project. There are so many little details that you have to know when using Arduino, and while I haven’t mastered everything yet, I’m much more confident in myself if I have to use this again in the future.

My final product will be an environmentally-friendly air quality-detecting keychain with a biodegradable cross-hatched jute case and a companion phone app. As I mentioned in posts before, I’m not done with this project. I plan on expanding it as I gain more knowledge and experience over time. I will be presenting May 23 from 6:30 – 6:45 at the Doubletree by Hilton Hotel in San Jose.

I would like to thank these people for their support and technical help. Without them, I wouldn’t have been able to do my project. Thank you so much for taking time out of your day to help me:

  • My Basis advisor Mr. Barnes
  • My External advisor Ms. Zhang
  • Mr. and Mrs. Bhattacharya
  • Mr. Gaurav Chodnekar
  • Wawa from Arduino Forum
  • YouTube
  • Google

For future students, I recommend doing something that you’ve never done before and that you’re really interested in. This is the only chance you’ll get at Basis to do something you actually like and it’s not graded. Seize the opportunity. Don’t just do something that will get you by. Do something that will challenge you, even change the world. Also, make sure to pay attention in class! Yeah AP Calculus can be boring, but when you’re gonna need to use related rates or derivatives for your project, you’re gonna be glad that you took notes. And not just for STEM classes. Pay attention in all of your classes. That’s the only way you can learn topics and expand on them. I learned about air pollution in AP Environmental Science (and we made air pollution sensors out of filter paper and potassium iodide) and that was one of my inspirations for my project. I wanted to make something like that but more advanced And my final note is to never give up. I know it’s cliche but it’s true. There are always people to help you. I will leave you with this closing quote: “If there’s a will, there’s a way”.


Air Pollution News (Edition 3)

Air pollution linked to fertility treatment failure

Pollutionwatch: spring is often the worst time in UK for air pollution

Air Pollution Contributed To More Than 6 Million Deaths In 2016

Study: Air pollution could lead to more crime

Eight places where air pollution can ruin your trip

Week 11 Updates

Hello everyone!

The Senior Project is coming to an end very rapidly. A sense of urgency is coming upon me. I have received all my materials now (the bluetooth module arrived this Thursday) and the device should be finished by next week. The final project will be done a few days after, with the case being completed and testing of the device would take another few days. I will be posting pictures of the device once the bluetooth module is attached. Here is a snippet from the code I’ve used so far. It is from an open-source library but I changed a few things.

Screen Shot 2018-04-28 at 6.08.06 PM

I’m thinking about changing the code again to fit the app from, an open-source platform with “end-to-end solution for collecting, displaying, and sharing health and environmental data using your smartphone”. I found out about it recently. Basically, it’s a platform for people interested in making a device like mine. You download the AirCasting Arduino sketch for the AirCasting Android app and data is uploaded via Bluetooth (bluetooth module). I will explore this website more over the weekend and early next week.

Week 10 Updates

Hello everyone! The Senior Project journey is coming to a rapid end. It’s been fun, but now I need to push even harder to get things done. I’ve made progress on the Device and Coding aspect of my project. As you’ve read in my previous posts, I had problems with the results. I looked at the manual again, and it said that the sensors need >= 48 hours to preheat. Maybe that was the problem? I opened up a new sensor, heated it up for more than 48 hours, added new code, and I was starting to get promising results. I will post the code and data in the next post. I also ordered my Bluetooth module (for the app) and it will be arriving this Thursday. I plan on finishing the app and device next week, testing it out for a few days, making the case, fix some details up a bit, and be done! I will continue working on and improving this device in college. I started my Senior Project with no experience with Arduino and C++, and with a bit more time, I will have mastered it and create an awesome device. Looking back at the experience I had in AP Environmental Science and my trip to India, this project is not just for me to make, present at the Senior Project presentations, and then throw in the back of my closet. No. It’s much more than that. It has meaning to me. I have so many opportunities that many people in other countries don’t, such as clean drinking water, clean air, housing, etc. I want to help people live healthier lives and address the problem of air pollution, which affects everyone around the world, not just people in third-world countries. We all must pitch in and do our part to help save the planet.

The Lowdown on LEDs

Using LEDs in an Arduino seem easy right? You just put it in the breadboard, hook it up to the Arduino using a jumper cable, and you’re done? Well not so much, especially for a beginner. Today, I will be breaking down how to use LEDs and why it’s really important to use the right ones (hint: it has to do with circuits).

Screen Shot 2018-04-09 at 9.25.29 PM

Why are LEDs so special?

According to the EPA, “Inside each LED is a small bit of chemical that when electrons are passed through, it emits radiation (i.e., light). By changing this chemical compound, you can in effect change the wavelength emitted – infrared, green/blue/red, near-ultraviolet, etc.  Be aware that an LED is a diode, meaning that it is polarized. By convention, current can only go from the anode (positive end) to the cathode (ground, or negative end)…Note that the two wires on the LED are different lengths. The longer wire is always + and the shorter is -.”

Screen Shot 2018-04-09 at 9.31.40 PM

Is there anything that needs to be placed with an LED?

Yes, it’s called a resistor.

Screen Shot 2018-04-09 at 9.35.18 PM

“If there is too much current the LED will glow too brightly and will be damaged. The battery will also run out very quickly. The resistor resists current of electrons resulting in a lower current. Think of water flowing when you think of current. Inserting a resistor is like inserting a smaller pipe in the middle of a river. The stripes on the resistor are a code for the resistance and tolerance values of the resistor” (source ). The stripes and colors are important in determining the value of the resistor (there are a lot of values of resistors and if you use the wrong one for your circuit, it could lead to damage to the Arduino and insufficient resistance of the LED’s current). You use a color code like the one shown below. If you already have an Arduino starter kit with prepackaged resistors with given values, then you’re all set, but if not, then you have to do calculations by hand (I had the values given but the colors were muddy and I wanted to double-check if the values were correct so I recalculated them). I’m also including a link to a video on how exactly to calculate the values.

Screen Shot 2018-04-09 at 9.39.11 PM

How to Read a Resistor (VIDEO)

Okay, this doesn’t look too bad. 

Well, that’s not all. Once you have your values, you need to determine the value of the LED. Yes, LEDs have values and they’re based on colors. In my kit, it didn’t say what the values of the colored LEDs were, so I had to go through a lot of websites to find out. It took a really long time and I made a lot of calculations. I had to measure how long the LEDs were, determine whether they were clear or diffused, and a bunch of other things. Here is my sheet of work so you can see exactly what I was doing:


Eventually, I found this table from the company who made the kit (on a random website, not on their website). There are a few steps on how to get the value for the LED. Find the color, size, and opacity (I think that’s the correct word) of the LED you’re using. Use the forward voltage and plug it into this equation and you’ll get the value of the right resistor to use:

(Power supply voltage – LED voltage) / current (in amps) = desired resistor value (in ohms)

Screen Shot 2018-03-31 at 9.56.54 PM

There is an article that explains everything very clearly (what a forward voltage is, what a power supply is, Ohm’s Law, etc.) and since there is too much information to place in one blog post, I’ve linked the article right here (Basics: Picking Resistors for LEDs ). Finally, once you have everything, you have to place the LED and resistor properly on the breadboard and Arduino. Here’s a video showing you how: Arduino Tutorial: LED Sequential Control- Beginner Project . It should look like the featured image on this post.

Wait you haven’t answered the question of why you removed the LED.

Oh because it wasn’t working properly (yes even after all of this) and I kind of just wasted my time experimenting with it (it’s not going to even be in my final product). But hey! I learned something new!

Well that’s all for now. If any of you have any other questions, please ask them in the comments below. Bye!

Week 7 (a lot of updates and information!!)

Hello folks! It is Week 7 and I have a LOT to tell you! So, I’m going to break my project down into 4 sections (I will be doing this for my presentation also) and explain the progress made in each section:

  1. Device (sensor(s), wires)
  2. Coding (includes results from the sensor(s))
  3. Companion phone app
  4. Keychain

1. Device:

As I mentioned in my previous post, I used a carbon monoxide sensor to test out my code and if I put the wires correctly. I removed the LED light because it was not really working and it was too much of a hassle (here’s my post on LEDs and why it was removed from my project: The Lowdown on LEDs). I instead used the LED light that was already on the board.

Screen Shot 2018-04-06 at 7.29.18 PM

I changed the wiring of the device as well (to fit with the code). It is now much simpler. Here is a side-by-side photo of what it looked like in the beginning and what it looks like now:


It may not look like much has changed, but if you look closely, you can see the wires near the base of the sensor have either been removed or rearranged. I will be adding another sensor soon and that will require an external power source.

2. Coding:

This part was pretty crazy, so let’s get right into it. The initial code I had (not the one from the previous post because I changed it) gave me indoor readings in the 500s and 600s! That was obviously wrong because according to the carbon monoxide level chart in the previous post, I would’ve felt nauseous, had a headache, and died in 2-3 hours. I was sure that the code was fine. I thought maybe the sensor was broken, so I changed it and used an alcohol sensor instead, hoping it would work better. But after trying multiple times with Listerine, rubbing alcohol, and a bottle of whiskey, and talking with my BISV advisor (who told me that you have to spit in a breathalyzer, not breathe on it), I took another look at the code, changed the sensor back to the carbon monoxide one, and altered a few things:

  1. I added a threshold value of 1000 ppm to compare the readings from the sensor to (why 1000ppm you ask? well it’s because the manual for the sensor says that the range of levels it can detect are from 10ppm, being the minimum, to 1000ppm, being the maximum)
  2. I made the analog pin an output too along with the digital pin (the analog pin is one that can take on any number of values, unlike the digital pin which has only two values: HIGH and LOW)

Screen Shot 2018-04-06 at 7.29.18 PM

3. I set the analog pin as the sensor and compared it to the threshold value (if the sensor value is higher than the threshold value, then print “ALARM” as the result, otherwise, print “OK”).

And guess what? It worked! Here is the code so you can look at it yourself:

Screen Shot 2018-04-06 at 7.49.31 PM

I now have readings of 2 ppm, which is much more reasonable than 500 or 600 ppm.

3. Companion phone app

I have been researching this aspect of the project, and I will get started on it next week,

4. Keychain case

I visited Michael’s last weekend and got jute fiber, Velcro, and artistic wire. Jute is a, according to Google, “rough fiber made from the stems of a tropical Old World plant, used for making twine and rope or woven into sacking or matting”. It is biodegradable. I had a few ideas on how to make the case:

  1. Use artistic wire as a frame, cover the frame in jute, somehow remove the wire frame, leaving only the jute frame (it’s not biodegradable)
  2. Use biodegradable newspaper (made from soy ink, not petroleum ink) for the bottom of the case and cross-hatch using jute
  3. Cross-hatch a case made of only jute
  4. Wrap jute around a cardboard box to get a shape and secure with either hot glue or jute

I think I will go with number 4 and use jute to secure it, but I’m still exploring the other options.

(pic credit: )

Air Pollution News (Edition 1)

I will be posting air pollution news every week starting this week so you can learn more about what’s happening around the world and where you live and what you can do to help. Knowledge is power!

Tiny nation of Kosovo has air pollution so bad that it rivals Beijing

S. Korea seeks China’s help on tackling air pollution

Study: Foxconn plant would add to air pollution in Wisconsin

Combating air pollution ultimately benefits humans

Air pollution is a major cause of concern even inside your home; here’s how to minimize it

(pic credit: )

Week 6

Hello everyone!

This week, I have been working on coding and I am going to be testing out my project today. I placed an LED light to visually see if my device can detect levels of carbon monoxide in my home and outside in my backyard. I will be adding more sensors but for now, I just want to see if I placed the wires correctly and if the code works. I watched a lot of tutorials on YouTube on coding for gas sensors with Arduino, and this is what I have so far:

Screen Shot 2018-03-31 at 4.32.16 PM

Below is a chart of the levels of carbon monoxide (PPM) and the health effects (ignore the text written in red).

Screen Shot 2018-03-31 at 4.13.50 PM (source for table )

I have set the value of the gas sensor (gasValue) to be 10 (because the manual says that this sensor can only detect 10 – 1000 PPM). If the detected carbon monoxide level is greater than 10, then the output will be “HIGH”, otherwise, the output will be “LOW”. Since I don’t have an LCD panel (see here for image: LCD Panel ), I cannot add detailed text about levels right now. So I will just be using “LOW” and “HIGH” to determine the levels. Like I mentioned before in my previous post, I will be adding another sensor, but in order to not add too much current and damage the Arduino board, I will have to use an external power source, which will be a 9V battery. I will also be using a multimeter to read the levels of current and amplitude passing through the board (see previous posts for the definition of a multimeter). So in my next post, I will be telling you all of my results, what needs to be fixed, and the next steps. Thanks for reading!