PIPER MAKE

EDUCATOR GUIDES


YOU ARE HERE

Sensors expedition

Mission 6 of 6

Sensors expedition: Mission 6 of 6

Pulse


Intermediate

90 minutes

Grades 3 - 8

MISSION OBJECTIVE

Learn to build a functioning pulse sensor and measure your heart rate.

In this mission, Piperbot and Pip find themselves on a new, swampy planet that makes Pip tired! To figure out if Pip’s pulse has slowed down, you build a heart rate sensor and use it to measure your pulse.

View student interface at make.playpiper.com
MISSION CHARACTERS

Piperbot

Pip

Dr. Monitor
MISSION MATERIALS

Computer with USB port and Chrome or Edge browser
Piper Make Base Station or Starter Kit
Piper Make Pulse

MISSION RESOURCES

Learning Goals

  1. Students will learn about the tools used in a doctor’s office, including a stethoscope, thermometer, scale, electrocardiogram, and blood pressure monitor.
  2. Students will gain knowledge of how ultrasound technology works.
  3. Students will learn about the organ systems in the human body (including muscular, skeletal, circulatory, nervous, and digestive) and how we use different technologies to study them.
  4. Students learn a healthy heart rate and how a heart pumps blood into vessels, changing pressure, which is measurable.
  5. Students understand how to measure a heart rate by looking at the interval between high points, or peaks, in graphed data.
  6. Students learn how smartwatches can measure heart rate.

Learning Activities

The following sections will contain step by step instructions for ELA, ELD and Math extensions directly related to this mission. Adjust the directions to fit your ELA, ELD and Math standards.

ELA Extension: Bio-med Tech Tools
  • Start by asking your students to think about their last doctor’s visit. Now ask:
    • Did the doctor or the nurse measure anything?
    • What tools do you remember?
    • What about outside the doctor’s office?
    • Does anyone have a smartwatch?
  • Ask your students to come to the board and draw any tools they saw in the doctor’s office. Some common ones are the following:

ELD Extension: Bio-med Tech Tools

  • There are so many things our bodies can do, but when something goes wrong, it can cause people to become very sick. Luckily, we’ve figured out how to use technology to study our body's systems.

Math Extension: Ultrasonic Range Finder as Ultrasound

  • This OPTIONAL mission is not a Piper Make mission but rather an illustration of how we can use ultrasound in medicine. All you need is a few sheets of graph paper, scissors, and tape.

⚠️ This challenge requires the ULTRASONIC RANGE FINDER (Sensors or Robotics).

Career Connections

Remote Sensing Technician: Salary $50,290/yr
Security/Fire System Installers: Salary $50,130/yr
Computer Hardware Engineer: Salary $132,360/yr
Hydrologic Technician: Salary $53,360/yr

Hardware Diagram




Code Diagram




Tutorial Steps

Pulse

Piperbot and Pip land on a Tatooine-like planet, lots of sand and no water in sight.
Geez, Piperbot. Where did we land this time? I can only see one building, and then it's just sand, sand, and more sand.
(speaking more slowly than usual, sounding tired) This is the remote planet of Trezed. Not many people live here, I don't think.
Are you okay PiperBot? You don't sound like yourself.
I'm…not sure. I feel…tired. Let's walk into that lab over there and see if there's anyone who can help.

To start, build your heart sensor using the blueprint in your kit. After it's built, you will connect the Heart Sensor to your Raspberry Pi Pico.

The colors of the wires on your 4-pin cable can vary, so it is important to match the pins on your sensor module to the correct connections on your Breadboard.

Remember, the DIGITAL VIEW is a handy way to see the GPIO pin locations. For this circuit, you will connect:
  • GND to G (ground)
  • SDA to GP20
  • SCL to GP21
  • VCC to 3V
Follow this guide and use the wiring diagram below:
Before we get started, though, remember that Piper Make is a cool tool to learn coding and circuits, but it shouldn't be used to make decisions about your health or your body. If you get a strange reading from the Heart Sensor, don't panic! It could just be as simple as a little bug in the code or an error in the block diagram.
If you're worried about your heart, make sure you talk to a doctor before making any decisions about your body, including starting or stopping new medications.

In this tutorial, we'll learn about a really cool tool to measure heart rate, or the number of times per minute your heart beats.
Do you know how many times a normal, healthy adult heart beats per minute?
60-80 times
100-120 times
40-50 times
More than 130 times

60-80 times. The normal adult human heart rate is between 60 and 80 beats per minute.

Each time the heart beats, it pumps blood through all the different blood vessels in your body: the ones in your head, down to your legs, and all the way out to your fingertips.

When the blood gets pumped into the vessels, it changes the pressure inside. In fact, this is a really easy way to measure someone's heart rate!

They walk into the building and find a Lizard character wearing a white lab coat. It's clearly a research space, and there's a giant hamster wheel next to a generator.
Excuse me, can you help us? My friend Piperbot isn't feeling so well.
Oh, of course! Let me just take a look at him. Oh my, it seems your friend's power source is running quite low. Our atmosphere is a little different here on Trezed, and it tends to drain traditional batteries quite quickly.
Well, is there anything we can do?
As a matter of fact, there is! We don't have much on Trezed to make electricity like other planets do — no water for turbines, not much wind, and no oil or coal. So, our scientists made these generators that use energy from exercise to harness electricity!

Wow! So if I run on the wheel, I can help Piperbot power back up!
Yes, exactly. But you're new to the planet, and I want to make sure your body handles the new atmosphere. Put this Heart Sensor on your fingertip while you exercise so I can monitor your heart rate.
Place your finger in your heart rate sensor as shown here! You can squeeze it where the arrows show to open the sensor holder up.
Once you place your finger in the sensor, it works best when you don't suqeeze or push hard. Don't press your finger down on the sensor. Just let it rest on top of the sensor to get the best readings.
Okay! I can do that. Don't worry, Piperbot, it's going to be okay.
Where would you like the readout of the sensor measurements to plot on your Piper Make interface?
Console
Python
Data
Digital View

The Data View will allow us to plot the readout from the sensor directly onto a graph.

Digital View provides a dynamic view of the Raspberry Pi Pico and which pins are active, Console allows you to print readouts, and Python gives you a text based view of the drag-and-drop code you write.

Okay so we want our Data View to display the readings from the sensor right?
Yep, so first things first, drag out that start block, and then find the block that lets us read the data from the heart sensor!
Ooh got it, now how do I graph that onto our Data View?
Grab a Graph block from the Actions menu first. Then drag out the heart sensor block and select raw value.
Now, let's wrap that whole thing in a repeat while true block so it keeps reading! And then we're ready to go!

Let's hit START! Open up your Data View and see your heart rate plotted in real time.
Do you see a graph that kind of looks like waves? That's your heart beating! Well…actually, it's a measurement of that little Green LED Light bouncing back to our Heart Sensor.
But, how on Mars, do we get Pip's heart rate from a graph like this?
The high points on the waves are when the vessels in your finger tips are all full of blood right after your heart pumps. The low points on the waves are when your heart is in between beats.
Whoa, that's cool!! So I could use this to know how much energy I can send to Piperbot?
Yeah that's right!

To measure our heart rate, we want to find out how much time goes by in between each high point, or peak, of the waves. Lucky for us, The Trezed Generator System has pretty cool math built in to help us with this.
We need to give the heart sensor time to measure the heart rate, so we have to add some blocks that only print the heart rate value once every 2 seconds.

First, click the Variables menu, and click Create variable... Name your new variable "loop time".
Go ahead use blocks from the Logic and Variables menu to make the code below that will print the Heart Sensor Heart Rate:
Now, when we click START and put our finger on the sensor, we should see our heart rate printing on the console!

Pip gets on the treadmill, and Dr. Monitor hooks up Piperbot to the generator.
Just start out walking, and then work your way up to a run.
Pip steadily gets faster!
Is it working?
Yes. If you can, run a little faster to give the generator a little more power to give to Piperbot.
Pip now running at a pretty good clip.
Your heart rate is increasing but looks good, Pip! And Piperbot is almost at full power again!
I feel so much better, thank you Pip!
Anytime, Piperbot. Now, what's a mouse gotta do to get some water around here?

Hit START and see your own heart rate in action!
Pip's heart rate increased while on the treadmill! Running faster meant Pip's heart needed to pump faster to bring blood to Pip's legs.
Let's see if your heart will do the same! Measure your heart rate with the Heart Sensor again, and write down what it was.

If it's safe for you to exercise where you are, try doing 20 jumping jacks (don't forget to take the finger holder off first!).
Now that you've exercised like me, try measuring your heart rate again. Is it higher this time? If it is, that's because, just like when I was running on my wheel, your body needed more blood once you started exercising, so your heart started beating faster! How cool is that?
I think they've got the hang of it, Pip!
Remember, Piper Make is a really cool tool for learning computer science, electrical engineering, and traveling to new planets with Pip and Piperbot. But it is not professional medical equipment.
Sometimes, bugs in the software, an error in the block diagram, or even a little more sweat on your fingertip can give you a strange reading on your Heart Sensor.
The heart rate from your Piper Make sensor shouldn't be used to make any kind of medical decision, including starting or stopping a medication. You should always talk with a doctor before doing anything else if you're worried about your heart.
But…probably better if you make sure your doctor is a human, not a lizard.

I feel so much better, thanks Pip!
No problem! Hey, Dr. Monitor, are there places you can use this kind of heart sensor to measure heart rate other than your fingertip?
Of course! There are some great blood vessels in your wrist that you can use too. In fact, that's how lots of Smart Watches measure your heart rate!
I bet you could use some simple items around the house to make a strap to hold the sensor in place.
Can you measure your heart rate from your wrist? Now, can you make a wrist strap to make your own simple wearable device?

Click EXIT to return to the menu and start your next coding challenge.

Blueprint

OPEN IN BLUEPRINT VIEWER  DOWNLOAD

Have an different version? Look for more information on the Support Page.

Troubleshooting Tips

  • Where do I attach the Velcro piece?
    • Step 1 on the blueprint refers to the bottom piece. Center the Velcro piece as the diagram shows in Step 1.
  • What do I do if a message pops up when I connect my Pico to Piper Make saying that the firmware needs to be updated?
    • Click Accept, and follow the instructions.
  • Are you having difficulty with Step 2 of the assembly?
    • You may find it easier to put the pieces together with all 4 ’legs’ on the table as if Step 2 shows them unfolded.
  • Is your Pulse not reading correctly?
    • The O-Ring may be too tight. Take it off and lightly close the Pulse instead. Alternatively, you could use a rubber band or hair tie, or tighten the screws, which will help hold the Pulse in the position you want.
    • Do not press hard on the sensor; a light touch with the thumb is all you need. Play around with which fingers get a more accurate result.

Our customer support specialists are on hand to ensure your implementation of Piper runs seamlessly.
View Support Docs or Contact Support
EXPANDED RESOURCES

Term Glossary


Engineer Someone who designs, builds, or fixes things to solve problems.

Sensor A device that produces an output signal to sense a physical phenomenon.

Conditional Statement A coding instruction used to compare values and express and make decisions, like an if-then statement.

List A sequence of several values grouped under a single name in code. A group of items or components. A tool used to store multiple pieces of information at once.

View Full Glossary

Standards Alignment


Individual Standards
  • CA 3-5.CS.1 Describe how computing devices connect to other components to form a system. (P7.2)
  • 3-5.AP.18 Perform different roles when collaborating with peers during the design, implementation, and review stages of program development.