Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Don't Hold Your Breath – Breathing Analysis with Polar H10 HR Monitor (github.com/kbre93)
51 points by kbre93 on April 14, 2023 | hide | past | favorite | 9 comments
A person's heart rate fluctuates based on factors such as activity, environment, and mental state. Additionally, heart rate variations occur on a much shorter timescale, with changes happening every few seconds. During inhalation, heart rate slightly increases, and it decreases again during exhalation, a phenomenon known as respiratory sinus arrhythmia. There are several reasons for this. Firstly, an increase in volume within the thoracic cavity (the space between the ribs) leads to a corresponding drop in pressure, which is counteracted by a rise in heart rate to regulate blood pressure. Secondly, breathing is deeply intertwined with the autonomic nervous system, which involves the opposing activation of the parasympathetic ("rest and digest") and sympathetic ("fight or flight") responses. By measuring heart rate variability and regulating our breath, we can gain insight into our stress response and learn to control it.

The Polar H10 heart rate monitor provides basic heart rate measurements from a chest strap ECG, compatible with a number of fitness tracking apps that monitor heart rate zones wirelessly using bluetooth. The device also provides raw sensor data including an accurate measure of the timing between heartbeats (interbeat interval, with millisecond resolution) and 200 Hz accelerometer data. In this project this information is used to measure breathing rate and heart rate variability, and explore the relationship between the two.



Can confirm. My mind tends to race sometimes, especially after caffeine consumption. It's hard to get it to "shut up". I held my breath as a simple experiment and it helped quiet down my mind. I actually learned this trick from Huberman, there's a podcast about stress where he talks about this.


How long do you hold your breath for?


About 1 minute. Exhale very slowly this triggers the parasympathetic system), inhale faster. Repeat the process a few times.


Thanks. Will experiment as well.


This is really cool! Would be great to see how things like meditation and anxiety attacks fare over time. I know the Apple Watch can also do ECG. Wonder if they expose similar data to get similar measures


The apple watch gives some readings about HRV when paired with the Health app on iOS.

Not too detailed though.


dont you need to hold both hands on the watch to get this from apple?


I am a long time Garmin user, and sync to runalyze, when paired with a hear rate chest strap, they also calculate a breathing rate


Hmm, dumps core for me; happy to help debug if you point me in the right direction. All I get is:

zsh: abort python DHYB.py --record-len 600




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: