2023 Health-STEM Camp:
Heath and Coding: July 24 to July 28 | 9:00 to 12:30
Lessons:
Lessons:
- Day 1: Basic Coding and Controlling Lights
- Button Controlling Lights
- The body's electrical signals health science lesson
- Day 2: July 25, 2023: Ultrasound Coding Lesson
- Day 3: July 26, 2023: Pulse Oximeter
- Measuring Light Signals Coding Lesson
- Pulse Ox Coding Lesson
- CO2 Sensor Coding Lesson
- Build your CO2 mask
- Pulse Ox Health Sciences Lesson
- Day 4: July 27, 2023: Make an ECG
- ECG Wiring and Coding Lesson
- OLED Screen display lesson
- Combining the ECG and OLED code
- ECG Nursing Lab Health Sciences Lesson
- Day 5: July 28, 2023: Reach/Differentiation Day, Presentations
- Use your body’s electrical signals to control lights
- Helicopter medivac visit and lesson
Materials for this activity:
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.
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.
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.
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
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
Proximity Sensor
IR obstacle sensor - is something in front of me?
The clear LED is an IR lightbulb. The dark bulb is an IR phototransistor. Photoresistors are devices that amplify current more when more light shines on it. The sensor works by emitting light in front of it and then the detector measures the amount of light reflection. The little screw on the board is a variable resistor that you can use to set the detection threshold. If the detector receives enough light, it outputs that something is there!
Plug the sensor into the Arduino. Then point a digital camera, like your cell phone or webcam, at it and see if you can see the light using the camera. Note, only some cameras can see IR. |
The bulb not emitting visible light. It is only emitting a specific wavelength of infrared light (IR)! That means it is not visible to your eye.
|
Look at this picture and video for how this sensor works.
The code!
This sensor gives outputs of either 0 or 1 for if something is close to it or not. This code below will print on or off to the Serial Plotter depending on if something is close to it or not. Type out the code below in Arduino IDE