Materials needed for today's activity.
Note: Not for diagnostic purposes
The Arduino heart monitor and the IDE Serial Monitor for this lesson are purely for educational purposes and should not be used for any diagnostic purpose. If you have any medical concerns that arise as a result of this education experience, contact your health care provider for advice.
Watch this Video about our ECG
Setting up the Heart Monitor.
Step 1) The first step will be to hook up the electronics of your heart monitor. Here is a wiring diagram.
The Code
Verify that your code works by pushing the check button in the upper left.
If you get an error message, try the troubleshooting skills you learned on day one. See this link for a reminder. https://www.rcccamp.org/day-1-monday-basics-and-lights.html
Upload your code to the board
If you get an error message, try the troubleshooting skills you learned on day one. See this link for a reminder. https://www.rcccamp.org/day-1-monday-basics-and-lights.html
Upload your code to the board
How to hook up your Heart Monitor?
We'll show you how to place the electrodes. If you are not taking this class in person, watch the videos in the health science lesson for today.
Seeing your Heart Rhythm!
Now that you are all plugged in, you should be able to see your heart rhythm. The Arduino Serial Plotter should look something like below, this is Mr. Dorsey's heart.
Here is Mr. Dorsey explaining how he got his heart rhythm.
Tip (stay still!)
Tip (stay still!)
Control Electronics with your Heart
We will now learn some things we can do with our heart signals!
Send your code to your Arduino and open the Serial Plotter. See if your Arduino's builtin LED is lighting up at the same time your heart beats. Below is how to adjust your code to work perfectly for you.
Finding your threshold value
You have always been told that everybody is different. Well, so is everyone's heart! The threshold value I used for my code above will be different than the one you need.
See how my highest hump is at about 390 and my 2nd highest hump is at around 360. You have to pick a threshold number between those two. I chose 370. Change your code's threshold number to work with your heart's numbers and resend your code to your board.
|
Remember to save your code!
|
Does the onboard LED light when your heart beats?
Your onboard LED should be blinking once every time your heart beats.
If you need help, watch this video. |
|
Controlling an off board light with your heart.
Plug in your resistor attached to your LED like below to control your light using your heart. That is the 220 Ohm resistor and a red LED.
Let's make a light show.
Remember the series and parallel lesson using the bread board? You can actually put a bunch of lights on your breadboard that will light up whenever your heart beats! For the +- rail, hook the black wire to the GND and the + red wire to pin 13.
LET'S MAKE SOME NOISE! (Buzzer)
Once you are able to get lights to work on your bread board, all you have to do is replace the lights with the buzzer in your kit and your buzzer should beep every time your heart beats.
Here is a video showing it working. This uses the same code as before.