RAPPAHANNOCK COMMUNITY COLLEGE STEM CAMP
  • Home
  • Health-STEM Coding Camp
    • PreAcademy prep
    • Day 1: Basics and Lights >
      • Multicolor LED
      • Button Control
    • Day 2: Ultrasound >
      • Ultrasound Health Lesson
      • Supplement Melody
      • Supplement: Servo >
        • Potentiometer and Motors
        • 2 servo control
    • Day 3: Measuring Pulse >
      • How the body absorbs light
      • OLED Screen Basics >
        • Scrolling Screen Graph
    • Day 4 Making an ECG/EKG! >
      • ECG Health Lesson
      • Pictures to OLED
      • BPM on OLED
    • Day 5: Finishing up/Show >
      • CO2 Sensor
      • IR Light Proximity Sensor
  • 3D Design Camp
    • Prep
    • Day 1: 2D design
    • Day 2: 3D design basics
    • Day 3: Constraints
    • Day 4: Designing a Rocket
    • Day 5: Finishing, launching rockets
  • The Teachers
  • Archive
    • Pictures from prior years
    • 2021 STEM Camp (HS) >
      • The Teachers (2021)
      • PreAcademy prep
      • Day 1: Basics, Lights, and Temperature Sensor >
        • Day 1 Supplement: Measure Temperature
        • Day 1 Supplement: IR Temp Sensor
        • Day 1 Supplement: Identifying Resistors
        • Supplement: Controlling Buttons
        • Supplement: Controlling A Servo
      • Day 2: Measuring Pulse >
        • How the body absorbs light
        • Day 2 Supplement: IR Light Proximity Sensor
        • Day 2 Supplement: Motion Sensor
        • Code to start later on plotter
      • Day 3 Supplement: OLED Screen Basics >
        • Display Screen Temperature
        • IR Temp Sensor And Screen
        • Scrolling Screen Graph
      • Day 4: Finishing up/Show >
        • Pictures to OLED
        • BPM Pulse Sensor
        • Multimeter
    • 2021 STEM Camp (MS) >
      • Home (2021)
      • PreAcademy prep
      • Day 1: Basics, Lights, and Temperature Sensor >
        • Day 1 Supplement: Identifying Resistors
        • Day 1 Supplement: Measure Temperature
        • Day 1 Supplement: IR Light Proximity Sensor
      • Day 2: Ultrasound >
        • Day 2 Supplement: IR Temp Sensor
        • Day 2 Supplement: Controlling A Servo
      • Day 3: Measuring Pulse >
        • Day 3 Supplement: Motion Sensor
      • Day 4: OLED Screen Basics >
        • Temperature Screen Display
        • IR Temp Sensor And Screen
      • Day 5 Friday: Finishing up/Show
    • 2020 STEM Camp >
      • Home (2020)
      • The 2020 Teachers
      • PreAcademy prep
      • Day 1 Monday: Basics and Lights >
        • Day 1 Supplement Activity
      • Day 2 Tuesday: Servos >
        • Day 2 (Suppliment Activities)
      • Day 3 Wednesday: Making an ECG/EKG! >
        • Day 3 (Supplement Page)
      • Day 4 Thursday: Controlling Servos with EMG >
        • Day 4 Supplemental Activity
      • Day 5 Friday: Finishing up/Show >
        • Unused lessons/content
    • 2018 Lessons >
      • Day 1: Basic Coding
      • Day 2: Motors
      • Day 3: Build Robot Claw
      • Day 4: Saving Positions
      • Day 5: Presentations
    • 2017 Camp >
      • Day 1 (Monday)
      • Day 2: Multicolor LED and Keypad
      • Day 3: Servo and Keypad
      • Day 4: Multiple Motors/Stepper Motor
      • Day 5: Presentations
    • Pictures archive for lessons (some graphic images)
  • Contact Us!

CO2 sensor

Materials for this activity: 


Gas Sensor MQ135
Picture
Jumper Wires
Picture
Arduino and USB Connector
Picture

Breathing Barrier
Picture
22 kΩ Resistor
Picture
Picture
OLED
Picture
Breadboard
Picture

CO2 in the air 

The earth’s Atmospheric CO2 level is increasing year over year. The global average atmospheric carbon dioxide in 2019 was 409.8 parts per million and it was 411.3 ppm in October 2020. Carbon dioxide is a key greenhouse gas and responsible for about three-quarters of human emissions. So CO2 level monitoring has gained importance.

Wiring Diagram

For the first CO2 activity, we are only using the A0 signal pin. Let's wire it up. 
Picture
Picture
Picture

The Base Code

We are going to start simple. We are not going to calibrate it and just take its preprocessed output data and display it to the serial monitor. Type up and send out this code after you wire up your sensor to the board. After you upload it, open up the serial monitor. 
Picture
It should have outputs like this. 
Picture
​Did it work? If it did, save your code. 

Outputting Readings to OLED

Wire up the OLED with the gas sensor. Below is how to wire that if you forgot. Change the code to below and see if you can get the readings from the sensor to get sent to the OLED. 
Picture
The Wiring. 
1) GND to GND 
2) VCC to 5 V
3) SCL to pin A5
4) SDA to pin A4
Picture

This lesson is inspired by 
https://circuitdigest.com/microcontroller-projects/interfacing-mq135-gas-sensor-with-arduino-to-measure-co2-levels-in-ppm

and https://pslab.io/blog/measuring-co2-with-mq135/

https://www.hackster.io/sheekar/mq-135-sensor-co2-benzyne-with-arduino-sheekar-banerjee-ab6ccd​
Proudly powered by Weebly
  • Home
  • Health-STEM Coding Camp
    • PreAcademy prep
    • Day 1: Basics and Lights >
      • Multicolor LED
      • Button Control
    • Day 2: Ultrasound >
      • Ultrasound Health Lesson
      • Supplement Melody
      • Supplement: Servo >
        • Potentiometer and Motors
        • 2 servo control
    • Day 3: Measuring Pulse >
      • How the body absorbs light
      • OLED Screen Basics >
        • Scrolling Screen Graph
    • Day 4 Making an ECG/EKG! >
      • ECG Health Lesson
      • Pictures to OLED
      • BPM on OLED
    • Day 5: Finishing up/Show >
      • CO2 Sensor
      • IR Light Proximity Sensor
  • 3D Design Camp
    • Prep
    • Day 1: 2D design
    • Day 2: 3D design basics
    • Day 3: Constraints
    • Day 4: Designing a Rocket
    • Day 5: Finishing, launching rockets
  • The Teachers
  • Archive
    • Pictures from prior years
    • 2021 STEM Camp (HS) >
      • The Teachers (2021)
      • PreAcademy prep
      • Day 1: Basics, Lights, and Temperature Sensor >
        • Day 1 Supplement: Measure Temperature
        • Day 1 Supplement: IR Temp Sensor
        • Day 1 Supplement: Identifying Resistors
        • Supplement: Controlling Buttons
        • Supplement: Controlling A Servo
      • Day 2: Measuring Pulse >
        • How the body absorbs light
        • Day 2 Supplement: IR Light Proximity Sensor
        • Day 2 Supplement: Motion Sensor
        • Code to start later on plotter
      • Day 3 Supplement: OLED Screen Basics >
        • Display Screen Temperature
        • IR Temp Sensor And Screen
        • Scrolling Screen Graph
      • Day 4: Finishing up/Show >
        • Pictures to OLED
        • BPM Pulse Sensor
        • Multimeter
    • 2021 STEM Camp (MS) >
      • Home (2021)
      • PreAcademy prep
      • Day 1: Basics, Lights, and Temperature Sensor >
        • Day 1 Supplement: Identifying Resistors
        • Day 1 Supplement: Measure Temperature
        • Day 1 Supplement: IR Light Proximity Sensor
      • Day 2: Ultrasound >
        • Day 2 Supplement: IR Temp Sensor
        • Day 2 Supplement: Controlling A Servo
      • Day 3: Measuring Pulse >
        • Day 3 Supplement: Motion Sensor
      • Day 4: OLED Screen Basics >
        • Temperature Screen Display
        • IR Temp Sensor And Screen
      • Day 5 Friday: Finishing up/Show
    • 2020 STEM Camp >
      • Home (2020)
      • The 2020 Teachers
      • PreAcademy prep
      • Day 1 Monday: Basics and Lights >
        • Day 1 Supplement Activity
      • Day 2 Tuesday: Servos >
        • Day 2 (Suppliment Activities)
      • Day 3 Wednesday: Making an ECG/EKG! >
        • Day 3 (Supplement Page)
      • Day 4 Thursday: Controlling Servos with EMG >
        • Day 4 Supplemental Activity
      • Day 5 Friday: Finishing up/Show >
        • Unused lessons/content
    • 2018 Lessons >
      • Day 1: Basic Coding
      • Day 2: Motors
      • Day 3: Build Robot Claw
      • Day 4: Saving Positions
      • Day 5: Presentations
    • 2017 Camp >
      • Day 1 (Monday)
      • Day 2: Multicolor LED and Keypad
      • Day 3: Servo and Keypad
      • Day 4: Multiple Motors/Stepper Motor
      • Day 5: Presentations
    • Pictures archive for lessons (some graphic images)
  • Contact Us!