Reference firmware for PixArt's PAT9125EL sensor and evaluation board. "Hello World" and "Library" contain the exact same files. Please import just one of the two into your mBed compiler as a new program and not as a library.

You are viewing an older revision! See the latest version

Guides

This Wiki page provides a detailed guide on how to setup and operate PixArt's PAT9125EL sensor with the Nordic nRF52 (recommended) as well as any other microcontroller.

Setup for the Nordic nRF52:

Hardware

  • 1. PC with Windows Operating System
  • 2. Nordic nRF52 Microcontroller
  • 3. PAT9125EL Evaluation Board
  • 4. USB Cable (USB-A Male to USB-B Male)
  • 5. Standard Male Pin Headers
  • 6. Jumper Cables
  • 7. Soldering Station
    500
    • NOTE: PC and soldering station not included in image.

Connection

Please connect the board as show below.
700

  • VDD and VLD on the PAT9125EL evaluation board connect to any VDD pin on the Nordic nRF52 microcontroller.
  • GND on the PAT9125EL evaluation board connect to any GND pin on the Nordic nRF52 microcontroller.
  • NC = No connection.
    • NOTE: For the SPI version, you will need a 2-to-1 connection because this sensor uses 3-Wire SPI (data pin is bi-directional). The SDA pin on the evaluation board needs to connect to pin 23 AND pin 24.

Supplying Power

Connect the one end of the USB to the PC USB and the other to the Nucleo L476RG miniUSB as shown in the figure below.

/media/uploads/pixus_mbed/connection_with_power_st_nucleo_unprogrammed.jpg

I am assuming that you already know and are able to download the code at this point. Once programmed with the latest compiled .bin file, the LED should turn Green, as illustrated below.

/media/uploads/pixus_mbed/connection_with_power_st_nucleo_programmed.jpg

Next, we will test to see if the sensor is indeed functional and deriving the Heart Rate.

Functional Test

1. Open up Tera Term. If you do not have Tera Term, you can download here.

https://en.osdn.jp/projects/ttssh2/releases/

2. Once you have your Tera Term open, go to File > New Connection or use the Hot Key "Alt + N".

3. Select "Serial".

4. On the Port selection, click on the drop down menu and select the port that describes "COM4: USB SERIAL DEVICE(COM4)".

/media/uploads/pixus_mbed/tera_terminal_screenshot_serial.png

5. Click on "OK"

6. Go to "Setup" on your top menu, and select "Serial".

7. Set the BAUD Rate to 115200.

/media/uploads/pixus_mbed/tera_terminal_screenshot_baud.png

8. Select "OK".

9. Place finger gently on the PAH8011 as illustrated below. Remember that finger does NOT need to press hard onto the sensor package in order to derive a heart rate. A gentle touch will do. Keep in mind the first Heart Rate readout will take a few seconds (6 secs of more).

/media/uploads/pixus_mbed/finger_on_8011.jpg

10. Going back to the Tera Term window, you should see the printouts on the TeraTerm Window that includes HR Data and MEMS DATA. Since the Arduino Shield do not come with an Accelerometer, the data will just be 0 throughout. However, the program can take in MEMs data for motion compensation purposes.

/media/uploads/pixus_mbed/tera_terminal_screenshot_hr.png

Have fun with this and let us know if you have any further questions!


All wikipages