element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sensors
  • Technologies
  • More
Sensors
Blog ROHM Heart Rate Optical Sensor BH1790GLC test with Arduino
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Sensors to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 17 Jan 2022 12:31 AM Date Created
  • Views 2547 views
  • Likes 5 likes
  • Comments 1 comment
  • heart
  • rohm
  • Health
  • medical
  • arduino
Related
Recommended

ROHM Heart Rate Optical Sensor BH1790GLC test with Arduino

Jan Cumps
Jan Cumps
17 Jan 2022
ROHM Heart Rate Optical Sensor BH1790GLC test with Arduino

I was Road Testing the Rohm SensorShield-EVK-003 (Arduino Compatible) and the sensors that come with it, in 2017.
One of the sensors that I hadn't reviewed during the test, is the BH1790GLC Heart Rate Monitor.
I'm going to use that sensor in an FPGA design. First I'm testing it with ROHM's Arduino examples, to learn how it works.

image

The Heart Monitor Sensor 

The BH1790GLC  sensor uses visible light (green) to measure heart rate metrics.
Two green LEDs, best placed right next to the sensor and shining up, are pulsed by the IC's LED driver. Pulsing and intensity are configurable. There is a link with the sensor's sampling rate.
You put your fingertip on top of the LEDs and sensor.
The sensor has an IR-block and green-pass filter, and measures the light of the LEDs that passed through your finger (and blood vessels).

image  image

image source: annotated from BH1790GLC datasheet and evaluation board landing page

This footprint, with SMD LEDs, is tiny. If you'd build this into a housing, a green-friendly protection filter can be used to protect the hardware. Touch detection works with and without a filter on top.

There are 3 power supplies. One for the IC proper. A second for the i2c I/O. The two external LEDs need their own supply.

Evaluation Board and Circuit

The evaluation board circuit is an exact implementation of the datasheet design.
Just visible in the right lower corner on the PCB Bottom photo is the external LED power supply wire .
The board uses a 3V VCC. The LEDs need 5V, and there's a dedicated wire for that

imageimage

image source: evaluation board user's manual and evaluation board user's manual, finger by Leonardo Da Vinci (fair use)

The BH1790 uses the i2c protocol. It supports speeds up to 400 kHz.
The application circuit shows the i2c pull-up resistors. Although the evaluation module has a footprint for them, they aren't populated.
On the evaluation module, VCC2 is connected to VCC1 via a 0R resistor.
The i2c pull-up circuit is part of Rohm's evaluation base shield.

image

image of the typical circuit for this sensor. source: BH1790GLC datasheet

The schematic of the evaluation board is shown below. As indicated, VCC2 is tied to VCC1/VDD. i2c components are not populated because they are provided on the base shield.

image

image of the actual evaluation board circuit. source: evaluation board landing page

Software and Firmware

There are two examples, available as ZIP from the product home page.

A simple example (BH1790GLC.zip) initialises the IC with default values, then reads and displays sensor raw data, on a 32 Hz sample rate.
The two data values are the raw sensor measurement with LED ON and OFF.
It just relies on Rohm's IC wrapper, and the Arduino FlexiTimer2 library to request the samples.
This is the minimum setup to get samples out of the sensor. 

image

A more elaborate example (BH1790GLC_HeartRate.zip) returns the measured heart rate. This one uses a 32 step pulse wave - and the pulse wave sensor (at the same 32 Hz sample frequency).
It uses the same 2 libraries as the first one, but then additional APIs from Rohm for the more complex averaging and pulse train control:

  • hr_bh1790:  provides a heartrate API
  • pw_bh1790: Pulse Wave Sensor API
  • pwCalc: Pulse Wave Calculation API
  • touchDet: Touch Detection API
  • lxCtrl: LED control API
  • iirFilter: infinite impulse response filter API
  • movingAverage: Moving Average API

Although the sketch for this elaborate example is simple, there is a lot happening in the background:

  • When there's no finger on the sensor, the LEDs are off.
  • samples are validated
  • pulse wave is used
  • pulse data is filtered by the software DSP infinite impulse response filter
  • data is averaged over 32 samples.

image

Here's me at ease, then I paused the sampling and ran down and up all the stairs of my house. Then continued sampling:

image

As a follow-up, I'll solder wires to the two LEDs and probe them with an oscilloscope. For the simple and elaborate example. I'll post the findings in the comments.

  • Sign in to reply
  • Jan Cumps
    Jan Cumps over 3 years ago

    Scope captures of the two LED cathodes. The IC works as a pull-down open collector. Led is on when the value is low.
    The device is actually a controlled current source, but we can interpret the voltage like that.

    The pulse wave trains frequency is 32 kHz. That matches the sketch timer. All pulse trains look similar.

    image

    They have a start pulse and then 4 sequenced pulses. The time between start and first sequenced pulse is 30.8 ms. I didn't find that back in the datasheet.

    image

    4 sequenced pulses are at 242 Hz. I don't know where that's coming from.
    According to the datasheet, this can either be 64 or 128 Hz. I made the measurements with higher sample rates but always ended around the 242 Hz frequency.

    image

    Led on time is 0.3 ms. That corresponds with one of the two valid settings in the datasheet:

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube