Jump to main content

Wearable Air Quality Sensor

1
2
3
4
5
4 reviews

Summary

Active Time
2-3 hours
Total Project Time
2-3 hours
Key Concepts
Wearable, electronics, air quality
Credits
Jennifer Lee, Science Buddies
Finalized dust sensor including images where it is being tested

Introduction

Wearables are found all over the biomedical world: heart rate monitors, EKG patches, braces, etc. In this project, you will make your own wearable air quality sensor that notifies you of high-risk air. You can attach the sensor patch on any existing clothing or even make a standalone patch that you can wear as a necklace or a bracelet.

This activity is not recommended for use as a science fair project. Good science fair projects have a stronger focus on controlling variables, taking accurate measurements, and analyzing data. To find a science fair project that is just right for you, browse our library of over 1,200 Science Fair Project Ideas or use the Topic Selection Wizard to get a personalized project recommendation.

Materials

Disclaimer: Science Buddies participates in affiliate programs with Home Science Tools, Amazon.com, Carolina Biological, and Jameco Electronics. Proceeds from the affiliate programs help support Science Buddies, a 501(c)(3) public charity, and keep our resources free for everyone. Our top priority is student learning. If you have any comments (positive or negative) related to purchases you've made for science projects from recommendations on our site, please let us know. Write to us at scibuddy@sciencebuddies.org.

Prep Work

  1. Make sure you have the Arduino IDE installed on your computer.
  2. If this is your first time using an Arduino, see the Science Buddies How to Use an Arduino page. That page is for the Arduino UNO, but the process is similar for a TinyLily board.

Instructions

  1. This procedure will show you how to build the following circuit, using multiple layers of fabric to help insulate between the wires. There are other ways to construct the circuit, including using a soldering iron and a protoboard, or insulating individual conductive threads when they cross so they do not create a short-circuit.

    Wiring Key
    Component Connection 1 Connection 2
    Dust sensor red wire Dust sensor LiPo booster board positive '+' pin
    Dust sensor black wire Dust sensor TinyLily pin A0
    Dust sensor yellow wire Dust sensor LiPo booster board negative '-' pin
    Dust sensor white wire Dust sensor TinyLily pin 3
    Dust sensor green wire Dust sensor LiPo booster board negative '-' pin
    Dust sensor blue wire Dust sensor 150Ω resistor
    Red led wire 1 Red LED negative '-' pin TinyLily negative '-' pin
    Red led wire 2 Red LED negative '+' pin TinyLily pin 0
    Yellow led wire 1 Yellow LED negative '-' pin TinyLily negative '-' pin
    Yellow led wire 2 Yellow LED negative '+' pin TinyLily pin 1
    Green led wire 1 Green LED negative '-' pin TinyLily negative '-' pin
    Green led wire 2 Green LED negative '+' pin TinyLily pin 2
    Negative wire TinyLily negative '-' pin LiPo booster board positive '+' pin (JST connection)
    Positive wire TinyLily positive '+' pin LiPo booster board negative '-' pin (JST connection)
    220μF capacitor LiPo booster board positive '+' pin LiPo booster board negative '-' pin
    150Ω resistor Dust sensor blue wire LiPo booster board positive '+' pin
    circuit diagram of dust sensor patch
  1. First, prepare your LiPo booster board. You will not need the JST connector (the connector that would connect the LiPo booster board to the LiPo battery) on your LiPo booster board. Remove the connector with your needle nose pliers. Twist the top off the booster board so that the positive (+) and negative (-) input pins are exposed.
    Removing JST connection from booster board
  2. Prepare your fabric patches. You can choose to make a patch of any shape. Cut six of the same shape from your fabric. The demonstration uses different colored felt sheets to better highlight the different layers. Note the patch should be at least 2"x3" in size. Make sure the electronics can fit.
    6 different layers of felt used in project
  3. Begin with base patch which will hold the TinyLily, LiPo battery, and LiPo booster board. Place these parts onto felt piece and trace around them with a pen. Sew the LiPo booster board onto the felt piece with non-conductive thread. Hot glue the TinyLily onto the felt piece. The image shows sewn areas outlined in green and hot glue spots in red.
    Base patch with trace of battery, LiPo booster board attached and mini processor attached.
  4. With conductive thread, sew the '+' from the TinyLily to the '+' of the booster board that originally had the JST connection piece. Next, sew the '-' from the TinyLily to the '-' of the booster board (right next to the previous '+'). In the next image, one of the connections is made on the other side of the felt piece.
    TinyLily connected to LiPo boost board
    back of base patch showing extra sewn connections
  5. To prevent any short circuits, hot glue the conductive threads down and apart from each other. Turn your base felt piece over and do the same. Green is to mark the conductive thread paths and blue is to mark points of hot glue.
    back of base patch showing extra sewn connections
    Back of base patch where hot glue spots are highlighted.
  6. Place two pieces of one-inch conductive fabric tape parallel to each other above the marked battery spot. One is for pin A0 on the TinyLily and the other is for pin 3 on the TinyLily. Sew from the conductive fabric tape rails to the appropriate TinyLily pins.
    Conductive fabric tape patches for pins A0 and 3 on TInyLily.
  7. We will now work on the dust sensor patch. Trim the 6-wire connection piece so that the wire is around 3-4 inches long. Using your wire stripper, strip about an inch of insulation from the end of each wire.
  8. Plug the 6-wire connection piece into the dust sensor and place on the center of your patch. Cut a narrow rectangle at the top for the 6-wire connection piece to go through. Tape the wires down for extra security.
    Dust sensor patch with drawn out rectangle to cut for wire.
    Dust sensor patch with wires threaded through.
  9. Select your VCC patch. This is where your 5V wire will go from your base patch. Cut a 1-2 inch strip of conductive fabric tape. Tape it on the VCC patch approximately to the slight right your '+' 5V output on your booster board as a vertical rail.
    Vcc patch with vertical conductive fabric tape rail.
    Diagram of VCC Patch and Base Patch side by side.
  10. Select your GND patch. This is where your negative wire will go from your base patch. Cut a 1-2 inch strip of conductive fabric tape. Tape it on the GND patch directly above your '-' output on your booster board as a horizontal rail.
    Horizontal conductive fabric tape rail for GND.
    Diagram of GND Patch and Base Patch side by side
  11. Stack your GND patch on top of your base patch. Using conductive thread, connect your negative '-' output of the LiPo booster board to the conductive fabric tape rail on the GND patch.
    Stitching GND from LiPo booster from Base patch to GND patch.
  12. Using the capacitor from your dust sensor kit, place the shorter capacitor leg on top of the conductive fabric tape rail. Either hot glue the leg onto the rail or use a small piece of conductive fabric tape. After it cools, stack the VCC patch on top of the GND patch. Mark the bump where the capacitor is. Cut a hole big enough for the capacitor go through.
    capacitor on GND patch.
    Cutting hole for capacitor in VCC Patch.
  13. Thread the capacitor through, place longer capacitor leg on the VCC rail and either tape on with a small piece of conductive fabric tape or hot glue on.
    Connecting capacitor to GND Patch and VCC Patch
  14. Sew the '+' 5V output from the LiPo booster board on the base patch up to the positive rail.
    Positive 5V output from LiPo booster board to positive rail on VCC patch.
  15. On the VCC patch, tape or hot glue the resistor from your dust sensor kit on to the conductive fabric tape rail. Temporarily tape down the other end of the resistor.
    Resistor connected to VCC positive rail.
  16. Thread your dust sensor through to the other layers. For where your six-wire connector should go through, cut a slit in your fabric patches and thread the wires through.
    1. red and dark blue wires go to the VCC patch
    2. green and yellow wires go to the GND patch
    3. white and black wires go to the base patch
    Diagram of how wires should be dispersed throughout the layers of patches.
  17. Connect the white wire to the piece of conductive tape connected to TinyLily pin 3 on the base patch of felt. Do the same for the black wire and connect the black wire to the piece of conductive tape connected to TinyLily pin A0 on the base patch of felt. Tape down with conductive fabric tape or hot glue it down.
    Black and white wires connected on base patch.
  18. Connect the yellow and green wire to the top of the conductive fabric tape rail on GND patch. Tape down with conductive fabric tape or hot glue it down.
    Yellow and green wire connected for GND patch.
  19. Connect the red wire to the top of the conductive fabric tape rail on VCC patch. Tape down with conductive fabric tape or hot glue it down. Remove the resistor from under the conductive fabric tape, the non-conductive fabric tape rail end. Connect the blue wire to the free end of the resistor (not the conductive fabric tape rail end). Tape down with fabric tape or hot glue it down. Note that the next image does not have the red wire connected to the right most VCC conductive fabric tape rail yet.
    Red and blue wires connected for VCC patch.
  20. The capacitor should cause a bump in the dust sensor patch. Cut a small hole for the capacitor to go through to the dust sensor patch.
    Capacitor hole cut in dust sensor patch.
  21. Launch the Arduino IDE.
  22. Attach the TinyLily Mini USB Adapter to the TinyLily then connect to the computer through your microUSB cable.
    MicroUSB and USB adapter connected to TinyLily on base patch.
  23. Go to the top bar: Tools → Board. Click the drop-down menu and select "Arduino Pro or Pro Mini."
  24. Select Tools→ Processor. Select "ATmega328p (3.3V, 8MHz)." Note: this option will not appear until you have selected "Arduino Pro or Pro Mini" for the board.
  25. Select Tools→ Port. Select the available port. It should be "COM" followed by a series of numbers. If your computer is a Mac, this would be "dev/cu.usbserial" followed by a series of numbers.
    Arduino IDE Tools setting required
  26. Download DustSensor.ino and open in the Arduino IDE. Note: The code is based on this Github site code.
  27. Upload onto your TinyLily.
    upload button for arduino ide
  28. Open the Serial Monitor by selecting: Tools → Serial Monitor. A new window should pop up. Set baud to 115200. This is located as a drop-down menu at the bottom of the Serial Monitor.
    Close up of Baud drop down menu on serial monitor
  29. Once your Arduino code has successfully uploaded onto your TinyLily, you should see your voltage value and dust density in mg/m3.
    1. Look at the dust density while you are in still air. It should change very little.
    2. Try throwing some dust in the air (make up from make up brush, a sprinkle of flour, dusting your pillows, etc.). You should see the dust density in the air increase.
    3. Negative values in the serial monitor can show up. This is okay. This is due to a calibration issue initially with the dust sensor. You can just assume these negative values as 0 if they are within -0.10. If it is more negative than -0.10, double check your wires.
    make up brush with powder on dust sensor.
    Serial monitor measuring voltage and dust density.
  30. Disconnect the battery adapter and the microUSB cable from the TinyLily. Stack the LED fabric patch on top of your dust sensor. Cut a hole in the fabric so air can still get into the hole in the dust sensor.
    hole cut out of LED patch.
  31. Flip the LED patch over to its back side. To the left of the hole, place a vertical strip of conductive fabric tape. This is your negative '-' rail.
    back of led patch with conductive fabric tape rail.
  32. Flip the LED patch back over (right side up). Place your LEDs to the right of the hole. From top to bottom they should be green LED, amber LED, and red LED. Line up the negative '-' side of your LEDs so they point to the left and the positive '+' side of your LEDs so they point to the right.
    front of led patch with LEDs lined up.
  33. With conductive thread, stitch down the negative '-' side of your LEDs onto the conductive fabric tape rail on the other side of the patch.
    LEDs negative pins wired up with conductive thread.
  34. Starting from the bottom up, thread through the '-' pin on the TinyLily that is not used up to the conductive fabric tape rail on the bottom of the LED patch. The thread should go through all the patches.
    Connecting negative pin on tinylily to conductive fabric tape rail on LED patch.
  35. Sew the positive ends of the LED to their respective pins.
    1. '+' of green LED to pin 2 of TinyLily.
    2. '+' of yellow LED to pin 1 of TinyLily.
    3. '+' of red LED to pin 0 of TinyLily.
    Complete wired LEDs on LED patch.
  36. Re-attach the TinyLily Mini USB Adapter to the TinyLily then connect to the computer through your microUSB cable.
  37. Download DustRGB.ino and open it in the Arduino IDE.
  38. Upload the code onto your TinyLily.
  39. Once your Arduino code has been successfully uploaded onto your TinyLily, open the Serial Monitor again. To test the LEDs, try throwing some dust in the air (make up from makeup brush, a sprinkle of flour, dusting your pillows, etc.). You should see the dust density in the air increase and the sensor light yellow or red.
    1. When your dust density is less than 0.12 mg/m3, the light should be green.
    2. When your dust density is less or equal to than 0.35 mg/m3 but more than 0.12 mg/m3, the light should be yellow.
    3. When your dust density is greater than 0.35 mg/m3, the light should be red.
    Clean air test for LED with Green Led lighting up.
  40. When exposed to high dust densities (>0.35 mg/m3), the program sets a 15-minute timer. The red light will start blinking as a warning if levels have remained high for 15 minutes. When exposed to medium dangerous air pollution levels, the dust sensor sets a 30-minute timer. When the sensor measures exposure to this air for more than 30 minutes, the yellow light will start rapidly blinking. The blinking will not stop until you reach safe air.
    Red LED lighting up when exposed to dust.
  41. Switch your USB adapter with your battery adapter and power the TinyLily with the LiPo battery.
    LiPo battery tucked in on the base patch.
  42. To finalize your wearable, place the cover-up patch onto the bottom of your base patch. Stitch the patches of fabric together along the edge or hot glue the edges down. Leave one edge open for easy access to the LiPo battery.
    Gluing layers of patches together.
  43. You can stitch this onto an existing shirt, make a necklace, put it onto a hoodie, etc. Have fun!
    Green LED lighting up on sensor patch to signify good air.

Cleanup

To charge your LiPo battery, remove the LiPo battery from the unstitched side and charge.

What Happened?

In this activity, you were able to measure dust density values from a dust sensor. To make the dust sensor wearable more compact, you stacked many layers of felt on top of different kinds of conductive threads, conductive fabric tapes, and wires. This worked because felt is an insulator and does not allow electrical charge to flow between the layers.

Additionally, the dust density is measured by your sensor by shining a tiny laser into the air and measuring how cloudy the laser is from the other side. It is like how you can see dust particles indoors in the sunlight.

Dust being shined on by sunlight through a window.

Digging Deeper

Air pollution is measured with many different variables and can be composed of many different particles. This can mean any chemical, physical, or biological agent. The five major pollutants are ground-level ozone, particle pollution, carbon monoxide, sulfur dioxide, and nitrogen dioxide. In this project, you observed particle pollution which is how much dust and other particulates are in the air. The longer you are exposed to bad air, the more dangerous it becomes for you. This exposure can lead to severe illnesses in the future.

Wearable devices allow for people to regulate their health and know how the current environment affects their body. This is the reason why it is very common to find wearable devices in the hospital. By using wearable devices, doctors can regulate many different patients at once and be notified when the patient is in danger.

icon scientific method

Ask an Expert

Curious about the science? Post your question for our scientists.

For Further Exploration

  • What other sensors can you implement into a wearable device?
  • Can you add other ways to notify someone of bad air? How about a speaker? What about vibrations?
  • What about aesthetic changes to your patch? Can you try making a heart shaped patch? What about a star?

Project Ideas

Science Fair Project Idea
People have a variety of reasons to use heart rate monitors. For example, patients in a hospital might have stationary, bedside equipment monitor their heart rate and alert medical staff in case of an emergency. Somebody going for a run might wear a portable heart rate monitor to keep track of their workout intensity. Heart rate monitors are not all the same—their appearance and function will vary depending on the intended use. In this project you will design, build, and program your own… Read more
Science Fair Project Idea
Smog days are often posted in your local newspaper. Check how many smog days your city has had in the last year. How does it compare to to other years? You can also take pictures of your city landscape on high and low smog days. How do the pictures compare? How does smog in the atmosphere affect visibility? What is smog made of? You can use tongue depressors smeared with Vaseline to check for smog particles in different areas; just stick in the ground and look at them a few days later. … Read more

Activities

STEM Activity
Sewable circuits are a fun way to mix electronics and arts and crafts by sewing circuits into clothing or fabric. This sewable circuit focuses on creating a unicorn horn with a programmable red-green-blue (RGB) LED in the tip that changes colors. You will use conductive thread to make the circuit, but your stitched lines will also form the spiral lines of the unicorn horn. Read more

Careers

Career Profile
A medical equipment repairer, or medical equipment technician, has an essential role in the fields of healthcare and engineering. From X-ray machines to electric wheelchairs, the medical equipment repairer can fix a wide array of machinery used in hospitals and clinics. They have detailed knowledge of how machines and instruments are to be maintained, how they function, and how to repair them. Broken medical equipment costs hospitals and providers time, money, and may pose safety risks for… Read more
Top
Free science fair projects.