chipKIT Project 3: Easy Pulse Meter

Summary of chipKIT Project 3: Easy Pulse Meter


This project builds a pulse rate meter using an Easy Pulse sensor with a chipKIT Uno32 and Digilent chipKIT Basic I/O Shield. The Easy Pulse analog output (PPG) connects to Uno32 analog input A1 via the I/O shield; the OLED on the shield displays waveform and BPM. JP4 jumper must be set to RG9 for SPI SS on pin 10. Power the Easy Pulse from the I/O shield 3.3V and use an external 9V DC adapter for Uno32. The firmware implements a pulse-detection algorithm from a prior PC-based project and is uploaded as P3_Uno32_PulseMeter.pde.

Parts used in the Pulse rate meter using chipKIT Uno32 and Easy Pulse:

  • Easy Pulse sensor
  • chipKIT Uno32 board
  • chipKIT Basic I/O Shield
  • 3 male/female jumper wires (20 cm long)
  • Power supply source (9V DC wall adapter or battery with clip)
  • USB cable (for uploading firmware)

This is a third project in our chipKIT tutorial series and today we are going to construct a simple pulse rate meter using our Easy Pulse sensor with Digilent’s chipKIT Uno32 board. Digilent’s chipKIT Basic I/O shield is also used in this project for displaying the pulse waveform and the pulse rate.

Pulse rate meter using chipKIT Uno32 and Easy Pulse
Pulse rate meter using chipKIT Uno32 and Easy Pulse

What do we need?

In order to build this project, we will need following things.

  • 1 Easy Pulse sensor
  • 1 chipKIT Uno32 board
  • 1 chipKIT Basic I/O Shield
  • 3 male/female jumper wires (20 cm long)
  • Power supply source (9V DC wall adapter or battery with a clip)
    Things required to build this pulse meter
    Things required to build this pulse meter

    Besides, a USB cable (not shown in the picture above) is also required to upload the firmware from PC to the Uno32 board.Where to Buy Easy Pulse Sensor?US customers buy here

    International customers buy here

    Wire Connections and Setup

    The OLED display on the Basic I/O Shield is driven through SPI interface. This requires the JP4 jumper on chipKIT Uno32 board be placed on the RG9 position so that the SPI SS function is available on Pin 10. Read our tutorial Exploring the chipKIT Uno32 for more details on jumper functions and settings on the Uno32 board. The following picture shows the required jumper settings on Uno32 board for this project.

  • Jumper settings on Uno32 boardNow plugin the Basic I/O shield on top of the Uno32 board and connect the Easy Pulse sensor power supply and the analog PPG output pins to the I/O shield as shown in the following figure.
  • Pin connections between Easy Pulse and I O shieldThe Easy Pulse board is powered with 3.3V power supply from the I/O board header pins. The analog pulse output from Easy Pulse is connected to analog pin A1 of Uno32 through headers available on the I/O shield. The analog pin A0 of Uno32 may not be used for feeding Easy Pulse output because it is already hard-wired to the potentiometer output on the I/O shield. The following picture shows the complete setup of this project.
  • Complete project setup
    Complete project setup
  • Project sketchThe firmware of this project is based on the same algorithm as used in out previous project PC-based heart rate monitor. The algorithm used by the PC application before is now implemented in the firmware of Uno32. The following flowchart shows the algorithm used to compute the pulse rate. For more detail on this algorithm, visit the PC-based heart rate monitor project.

    Algorithm flowchart for computing heart rateThe PPG waveform and the pulse rate (in beats per minute, BPM) are both displayed on the OLED screen of the I/O shield. The Uno32 sketch uses the chipKIT I/O Shield library to display data on the OLED. The complete sketch along with the required library routines is available for download through the following link.

    Download complete sketch

    Unzip the downloaded sketch folder and upload the sketch named P3_Uno32_PulseMeter.pde to the Uno32 board.

    Demonstration

    Sensor unplugged

    PPG waveform and Pulse Rate displayed on the OLED screen

    After the sketch is uploaded, power the Uno32 board through a DC wall adapter or any other external power supply that could be used to power the Uno32 board. Using USB power source is not recommended as some USB ports do not supply enough current for Easy Pulse sensor, in which case the performance of the sensor would be poor. When the sensor is unplugged, the range of ADC would not exceed 50 counts (described in the algorithm) and the pulse meter displays “No Pulse Signal” message on the OLED screen as shown below.Sensor unpluggedNow wear the Easy Pulse sensor on a finger tip and adjust the P1 potentiometer on the Easy Pulse to 1/4th position from left. The PPG waveform and the pulse rate should now display on the screen. The screen is refreshed in every 3 seconds. If the PPG signal appears clipped at the peak values, consider decreasing the gain of the filter circuit on the Easy Pulse board. This can be done by rotating the P1 potentiometer counterclockwise. Similarly, if you see the “No Pulse Signal” message even after wearing the sensor, you should consider increasing the gain by slightly turning the potentiometer clockwise. Read the Easy Pulse document for more details on the function of P1 and P2 potentiometers of Easy Pulse.PPG waveform and Pulse Rate displayed on the OLED screen

     

 

Quick Solutions to Questions related to Pulse rate meter using chipKIT Uno32 and Easy Pulse:

  • What jumper setting is required for the Uno32 board?
    JP4 jumper on the Uno32 must be placed on the RG9 position so SPI SS is available on Pin 10.
  • Which analog pin does the Easy Pulse analog output connect to?
    The Easy Pulse analog pulse output is connected to analog pin A1 of the Uno32 through the I/O shield.
  • Can analog pin A0 be used for the Easy Pulse output?
    No. Analog pin A0 is already hard-wired to the potentiometer output on the I/O shield and should not be used.
  • What power supply should be used for the Uno32 during operation?
    Use an external DC wall adapter or other external power supply (9V DC adapter or battery); USB power is not recommended.
  • What voltage powers the Easy Pulse board in this setup?
    The Easy Pulse board is powered with the 3.3V supply from the I/O board header pins.
  • Which sketch file should be uploaded to the Uno32?
    Upload the sketch named P3_Uno32_PulseMeter.pde from the downloaded kit folder.
  • How often does the OLED screen refresh the display?
    The OLED screen is refreshed every 3 seconds.
  • What should I do if the PPG signal appears clipped at the peaks?
    Decrease the gain by rotating the P1 potentiometer on the Easy Pulse board counterclockwise.
  • What should I do if No Pulse Signal appears while wearing the sensor?
    Increase the gain slightly by turning the P1 potentiometer clockwise.
  • Where is the pulse-detection algorithm implemented?
    The pulse-detection algorithm from the PC-based heart rate monitor project is implemented in the Uno32 firmware.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter