Link Search Menu Expand Document

Fitness Tracker Application on SAM D21 Curiosity Nano Evaluation Kit and Nano Base for Click boards

Download


Description:

The application demonstrates a solution based on Microchip products for health care industry and wearable products. The application displays heart rate readings (in beats per minute - bpm) on a very low power consuming display. The Mikroelektronika Heart Rate 9 click board is used to read the heart pulse. Mikroelektronika Eink E-Paper display 2,9” 296x128 dots display is used for displaying heart rate. The Eink E-Paper display 2,9” 296x128 dots display contains the eINK click adapter board and the E-Paper display 2,9” 296x128 dots display.

The Heart Rate 9 click introduces Microchip’s proprietary method of measuring multiple signals in a body using pseudorandom binary sequence generation and phase division multiplexing This algorithm for processing data from the sensor and it can send data for 3 different diodes (green, ir, red) who give out a diagram of the heartbeat and its frequency per minute.

The Eink E-Paper display 2,9” 296x128 dots display is a very low power consumption display and it can retain the information, even after disconnecting from the power source. The host MCU SAM D21 is interfaced with the Heart Rate 9 click over the USART interface and eINK click over SPI Interface.

Modules/Technology Used:

  • Peripheral Modules
    • Timer
    • EIC
    • SERCOM (SPI)
    • SERCOM (USART)
  • STDIO Library

Hardware Used:

Software/Tools Used:

This project has been verified to work with the following versions of software tools:

Refer Project Manifest present in harmony-manifest-success.yml under the project folder firmware/src/config/sam_d21_cnano

Because Microchip regularly update tools, occasionally issue(s) could be discovered while using the newer versions of the tools. If the project doesn’t seem to work and version incompatibility is suspected, It is recommended to double-check and use the same versions that the project was tested with. To download original version of MPLAB Harmony v3 packages, refer to document How to Use the MPLAB Harmony v3 Project Manifest Feature

Setup:

  • Mount SAM D21 Curiosity Nano Evaluation Kit on “CNANO56_HOST_CONN”(U3) connector of Curiosity Nano Base board
  • Mount Heart Rate 3 click board on mikro bus click 3 connector of Curiosity Nano Base board
  • Mount the Eink E-Paper display 2,9” 296x128 dots display (eINK click + E-Paper display 2,9” 296x128 dots Display) on the mikro bus 1 connector of Curiosity Nano Base board
  • Power the SAM D21 Curiosity Nano Evaluation Kit from a Host PC through a Type-A male to Micro-B USB cable connected to Micro-B port (J105)

Programming hex file:

The pre-built hex file can be programmed by following the below steps.

Steps to program the hex file

  • Open MPLAB X IDE
  • Close all existing projects in IDE, if any project is opened.
  • Go to File -> Import -> Hex/ELF File
  • In the “Import Image File” window, Step 1 - Create Prebuilt Project, Click the “Browse” button to select the prebuilt hex file.
  • Select Device has “ATSAMD21G17D”
  • Ensure the proper tool is selected under “Hardware Tool”
  • Click on Next button
  • In the “Import Image File” window, Step 2 - Select Project Name and Folder, select appropriate project name and folder
  • Click on Finish button
  • In MPLAB X IDE, click on “Make and Program Device” Button. The device gets programmed in sometime
  • Follow the steps in “Running the Demo” section below

Programming/Debugging Application Project:

  • Open the project (fitness_tracker\firmware\sam_d21_cnano.X) in MPLAB X IDE
  • Ensure “SAM D21 Curiosity Nano” is selected as hardware tool to program/debug the application
  • Build the code and program the device by clicking on the “make and program” button in MPLAB X IDE tool bar
  • Follow the steps in “Running the Demo” section below

Running the Demo:

  • Perform a reset by unplugging and re-plugging the power cable of SAM D21 Curiosity Nano Evaluation Kit.
  • After power up, the application displays the “microchip logo” on the Eink E-Paper display 2,9” 296x128 dots Display and initializes the heart rate sensor.
  • After successful initialization, keep your finger on Pulse Detection Indicator on the heart rate 9 click sensor as shown in the figure below.

    Note: Place your index finger gently on the heart rate 9 click sensor as shown in the above figure

  • Press switch “SW0” on SAM D21 Curiosity Nano Evaluation Kit, LED “LED0” on SAM D21 Curiosity Nano Evaluation Kit glows on
  • Wait till the LED “LED0” on SAM D21 Curiosity Nano Evaluation Kit goes off and then lift your finger
  • The heart rate value (in bpm - beats per minute) gets displayed on the Eink E-Paper display 2,9” 296x128 dots Display.

Comments:

Revision:

  • v1.6.0 - Replaced Eink Click Bundle with Eink E-Paper display 2,9” 296x128, regenerated and tested application
  • v1.5.0 - Removed MHC support, regenerated and tested application.
  • v1.4.0 - Added MCC support, Regenerated and tested application.
  • v1.3.0 - Regenerated and tested application.
  • v1.2.0 - Regenerated and tested application.
  • v1.1.0 - Regenerated and tested application.
  • v1.0.0 - Released demo application


Copyright © 2020 Microchip Technology.