How do I control a PWM fan with my heart rate?

Thread Starter

ssr215

Joined May 15, 2021
12
It should work like this. The fan is off at 50% heart rate or less. When heart rate is 50% or higher, each 1% my HR increases or decreases, the fan's speed will increase/decrease by 2%. It should be at full speed when my HR is 100%. How do I do the PWM, and how do I turn off the fan with pin 4 when my heart rate is less than 50%? Is this possible with the Alta HR as control input?
 

Papabravo

Joined Feb 24, 2006
21,159
How are you measuring your heart rate?
Easiest way to do this would be with a processor. It has the input capture hardware for the heart rate and the the output compare hardware to do PWM for the fan.
Easy Peasy
 

djsfantasi

Joined Apr 11, 2010
9,156
Your heart rate is not a constant, so 50% of a varying quantity is ALSO a varying quantity. It's kind of tough to nail that value down.
Papa, give the kid a break. I think he means the maximum heart rate he can get to or even the max heart rate a person will get to. Of course, the latter isn’t well defined. Does he want to use Hussein Bolt’s or Chris Farley’s max. heart rate??? We just don’t know.

To the Thread Starter, this is just a way to explain to you the importance of explicitly defining your parameters...
 

Thread Starter

ssr215

Joined May 15, 2021
12
Papa, give the kid a break. I think he means the maximum heart rate he can get to or even the max heart rate a person will get to. Of course, the latter isn’t well defined. Does he want to use Hussein Bolt’s or Chris Farley’s max. heart rate??? We just don’t know.

To the Thread Starter, this is just a way to explain to you the importance of explicitly defining your parameters...
The maximum heart rate can be calculated with 220-age.
 

djsfantasi

Joined Apr 11, 2010
9,156
So how are you calculating the maximum heart rate with your circuit? I don’t see any input requirements, nor a decimal to binary converter, nor any adders nor half-adders, nor a microprocessor??
 

Audioguru again

Joined Oct 21, 2019
6,673
The maximum heart rate can be calculated with 220-age.
Maybe for somebody who has never exercised a day in their life?
I am 75 years old and am slim but muscular and very healthy. My heart attack occurred 11 years ago caused by two heart arteries clogged with cholesterol and was fixed with two stents. I learned to eat better and take some medications each day plus lots of exercise and now I am young again, probably for a long time.

The last stress test was done with me running fast on a treadmill that slowly got steeper and steeper.
The doctor told me to yell STOP when I was ready to faint but I was fine at 192 heart BPM. I was breathing heavily but I was fine.
I run with my dog who is also healthy.
 
Top