RAPPAHANNOCK COMMUNITY COLLEGE STEM CAMP
  • Home
  • 2021 STEM Camp (HS)
    • 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
  • Shared Google Folder
  • The Teachers
  • Archive
    • Pictures from prior years
    • 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!

Day 3:        
Measure Pulse


Disclaimer: The Pulse Sensor you make for this activity should not be used for diagnostic purposes. If at any point you are concerned about your heart rhythm, you should consult your physician.


Materials for today's activities:


The Arduino and USB cord
Picture
Several Different LEDs
Picture
All the Resistor Strips
Picture

The Pulse Sensor​
Picture
Wires
Picture
Breadboard
Picture

Buzzer

Picture

Seeing your Heartbeat with Light! 

The color of blood

Have you ever heard that blood gets darker if it does not have oxygen in it? Well, that's true. The more oxygen blood has, the more deep red light it absorbs so it reflects less deep red. 
Picture
All sketches for this section come from this source: ​https://www.youtube.com/watch?v=MHPgamGQmDY

Picture
Picture

Graphing blood's light absorption by wavelength

This is a rough sketch showing how much hemoglobin (Hb) absorbs different light wavelengths  depending on if it is oxygenated.  

Red light at a 660 nm wavelength is used in pulse oximeters. This is because it is the max difference between light absorbance.
Picture

The Visible Light Spectrum

White light includes all primary colors (ROYGBV). Remember prisms from elementary school? This prism separates Red, Orange, Yellow, Green, Blue, and Violet from white light! I do want to point out, Violet does not mean purple! It is the "roses are red, violets are blue" color.
Violet is a flower. Click here to see some. 
https://en.wikipedia.org/wiki/Viola_(plant)
Picture
Picture source: ​http://blogs.nature.com/ofschemesandmemes/files/2015/02/Week-2-Blog-Dispersive-Prism.jpg

ROYGBV is just the visible light wavelengths! 

Picture

Light penetration

You can see red light penetrate through your finger if you put it in front of a flashlight. You see red on the other side because most of the other colors were absorbed in your finger. Try this at home! Put your phone flashlight, or any white flashlight, on one side of your finger. Then look at what color makes it to the other side! 
Picture
Picture
www.researchgate.net/publication/316712743/figure/fig13/AS:668385360744448@1536366896067/a-Tissue-penetration-depth-of-light-with-different-wavelengths-NIR-light-penetrates.png
Picture
https://images.theconversation.com/files/201297/original/file-20180109-83559-19kt3yi.png?ixlib=rb-1.1.0&q=45&auto=format&w=754&fit=clip

Red light can be used to see inside your body. 

Something is not right with this finger!
Picture
Got an X-ray and yep, something is there.
Picture
All images are sourced from: ​http://www.eatonhand.com/img/img00087.htm
Let's shine red light on it. Yep, it's darker where something is sitting. That means there is not good blood flow there.
​There is more deoxygenated blood in that spot.  
Picture
Click this button see what was taken out after surgery. ​Warning: somewhat graphic image. 
Link to post surgery picture.

Measuring the Heart Beat

Here is a video that shows a similar sensor to what you will build. This way, you know what to expect. We will use a sensor to get a plot of our heartbeat. Specifically, the sensor measures the IR light going through/off your skin. As blood pumps, this value changes. 

Measuring Pulse

Pulse is one of the simplest and main resources healthcare professionals can use to know if something is wrong with you. This activity will help you learn basic Arduino wiring, how to read data from a sensor, and how to get information to display on your computer monitor. ​

Before we write the code, we need to get the library that runs the SpO2 sensor. 
In Arduino IDE:
  1. Go to Sketch -> Include Library -> Manage Libraries
  2. Type in “max3010x” into the search box
  3. Install/Download the “Sparkfun MAX3010x Pulse and Proximity Sensor Library”
Picture
Now we are ready to wire and code the sensor. ​

How to Wire the MAX Pulse Sensor

Flip over your sensor and find the 4 prong labels (Vin, SDA, SCL, GND). You will also need 4 wires to connect the sensor to the Arduino. Use the picture here to help. 

Vin (volts in) to the 5V Arduino pin. 
GND (ground) to the GND Arduino pin.
​SDA to the Arduino A4 pin.
SCL to the Arduino A5 pin. 

Coding for the Pulse Sensor

Picture

Here is Mr. Dorsey explaining the sensor and code


Verify and Upload the Code to the Arduino 

After you upload the code to the board successfully, open up your serial plotter.

Seeing your pulse data. Serial Plotter

and see if you see your pulse data. You will have to wait about 10 seconds for the graph to zoom in on the data. ​
Picture
Here is a screenshot of Mr. Dorsey's data from the serial plotter.
Here are some tips to get a good reading. 
1) Use your thumb, it is bigger and has more blood flow
2) Do not push down too hard on the sensor (that would restrict blood flow) 

Picture

Here are comments explaining what the code does

Light blinks when your heart beats.

In this activity, we will turn on a light every time your heart beats. In order to do this, you need to set a "threshold value". That means an upper limit. Whenever your sensor gets a reading above that point and the graph goes above that point, the light will turn on. 

Under development
Powered by Create your own unique website with customizable templates.
  • Home
  • 2021 STEM Camp (HS)
    • 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
  • Shared Google Folder
  • The Teachers
  • Archive
    • Pictures from prior years
    • 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!