How can I accurately count heartbeats using limited hardware components?

In summary, the conversation is about a project involving limited hardware components, a 4029 Up.dwn counter and a BCD driver to 7-segment displays. The issue is how to display the output in bpm (beats per minute) with a 15 second refresh rate, which results in a factor of 4 discrepancy. The idea of using D flip flops and shifting binary values by 2 is suggested, but the issue of converting binary to decimal and synchronizing the two clock domains is discussed. The best approach is debated, with one option being to shift the binary values and convert to decimal, and the other being to figure out how to multiply by 4 with carries in logic. The need for synchronization between the two
  • #1
tenacity2986
44
0
I have limited hardware components I can use for this obstacle. Let's say I have precision rectified the input heartbeat signal into a square wave... I am trying to count the number of squarewaves/heartbeats and display them on two 7-segment displays refreshing every 15 seconds...
I can only use a 4029 Up.dwn counter and a BCD driver to 7 segment display...
My issue is that the 4029 is going to need to refresh every 15 seconds however ! the output needs to be in bpm (Beats per minute) which means it is off by a factor of 4... How can i multiply the output by 4 or is there a clever way i can do this with the timer that resets the 4029 every 15 seconds? PLEASE HELP. I've looked everywhere. even minute insight may prove valuable. thanks in advance.

Can someone verify the frequency of the clock because I read somewhere it is suppose to be 2Mhz minimum and 4 Mhz maximum which would make this task a little different. Thanks
 
Physics news on Phys.org
  • #2
Okay let's say the input is something like 20 beats for a 15 second interval. that would mean we need an output to the BCD driver to be 80 beats. Could I take the 20 beats and use an oscillator to magnify it by 4 to the input of the Cmos Ic counter? And than again i still have the issue of the minimum frequency accepted by the Ic counter...
 
  • #3
I was suggested to use D flip flops where the input will pulse and the output will be 4 pulses... Any ideas where this idea came from, moreover how it even works? Thanks
 
  • #4
homework?
 
  • #5
Moved to Homework Help.

Multiplying by 4 in binary is easy. Why?

A bigger issue for you is doing the Hex to Decimal conversion, unless you can display the result in Hex.
 
  • #6
why would i have to do a hex to decimal conversion? I think you may have misunderstood the issue.
I have a square wave as my input that is sampled/counted for 15 seconds, multiplied by 4 and displayed on the 7 seg display which tells the number of square waves passed per minute. This is refreshed every 15 seconds... I just don't know how to multiply a square waves frequency by 4 so that the counter gets the right value and displays the rate per minute.

and no this is not homework. if i wanted to multiply a binary string by 4, i would shift 2 loggical lefts, i.e. add 2 0s as lsb...
 
  • #7
tenacity2986 said:
why would i have to do a hex to decimal conversion? I think you may have misunderstood the issue.
I have a square wave as my input that is sampled/counted for 15 seconds, multiplied by 4 and displayed on the 7 seg display which tells the number of square waves passed per minute. This is refreshed every 15 seconds... I just don't know how to multiply a square waves frequency by 4 so that the counter gets the right value and displays the rate per minute.

and no this is not homework. if i wanted to multiply a binary string by 4, i would shift 2 loggical lefts, i.e. add 2 0s as lsb...

Okay, semantics. Binary to decimal conversion.

So you take your binary count and shift it up 2 bits, convert it to a 3-digit decimal number and drive the displays.

BTW, keep in mind that your simulated heartbeat signal is asynchronous with respect to your 15 second counting clock. What kind of circuit do you need to synchronize those two different domains...? What bad thing can happen if you don't?
 
  • #8
I understand that... I am going to use a 555 timer in bistable mode to pulse a 1 every 15 seconds which will allow the jamm inputs on the counter to 0000 binary. The heart rate is going to come from an amplifier/filter that comes from a microphone that you place on ur chest near your heart...
The output for each counter is 4 bits which only represents decimal numbers i.e. 0-9... so shifting would only work if the entire bit stream were continuous for all 8 bits and in binary but its not... The first 4 bits represent a number 0-9 and is the LSB and the second 4 bits represents a number 0-9 as the MSB... so shifting won't work... the signal being counted needs to be multiplied by 4 before being counted and send to display...
 
  • #9
tenacity2986 said:
I understand that... I am going to use a 555 timer in bistable mode to pulse a 1 every 15 seconds which will allow the jamm inputs on the counter to 0000 binary. The heart rate is going to come from an amplifier/filter that comes from a microphone that you place on ur chest near your heart...
The output for each counter is 4 bits which only represents decimal numbers i.e. 0-9... so shifting would only work if the entire bit stream were continuous for all 8 bits and in binary but its not... The first 4 bits represent a number 0-9 and is the LSB and the second 4 bits represents a number 0-9 as the MSB... so shifting won't work... the signal being counted needs to be multiplied by 4 before being counted and send to display...

So I guess you are working on two issues now. Is it more efficient in gates to do a contiguous count in binary, shift it up two bits, and then do your binary to 3-digit decimal conversion, or try to do it the way you are now, and figure out how to do the multiply-by-4 with carries in logic after the 3 counters. I'm guessing that option #1 is simpler, but you should draw out each of the 2 options, and figure out which is easiest for yourself.

Your second issue still has to do with synchronization between your two clock domains. It may well be the case that your assignment is at a basic enough label that they are ignoring clock synchronization issues, and that's okay if it's the case. But if you are looking for some extra credit in a basic class, and a mandatory check-off item in real industry design reviews, you will look into synchronizer circuits for asynchronous inputs into clocked domains.
 
  • #10
Here is my attempt:

Im going to add a potentiometer to the 555 timer that is used as an oscillator to mimick the heart rate... This is tempory until i get the electronics together for the actual heart signal...

I am also thinking of using a single 555 timer with 2 inverters at the output such that after the first inverter, the pulse will be low enabling the latch in the 4511 bcd to 7 seg driver...

After the second inverter will be a high pulse every 15 seconds which will reset the counter and begin a count for the next period of 15 seconds...

do you think the propagation delay between the latch being enabled after inverter 1 and the counter being reset for another period after inverter 2 will be enough such that the display correctly displays the value counted for the previous period?
 
Last edited by a moderator:

What is a counter for HeartBeat Monitor?

A counter for HeartBeat Monitor is a device that counts the number of heartbeats per minute.

How does a counter for HeartBeat Monitor work?

A counter for HeartBeat Monitor works by detecting electrical signals from the heart and converting them into a digital display of the heart rate.

What are the benefits of using a counter for HeartBeat Monitor?

Using a counter for HeartBeat Monitor can help monitor heart rate during exercise or other physical activities, track changes in heart rate over time, and detect any irregularities in heart rhythm.

How accurate is a counter for HeartBeat Monitor?

The accuracy of a counter for HeartBeat Monitor can vary depending on the quality of the device. However, most modern monitors have a margin of error of less than 5%.

Are there any risks associated with using a counter for HeartBeat Monitor?

Generally, using a counter for HeartBeat Monitor is safe. However, it is important to consult a doctor if you have any pre-existing heart conditions or if you experience any abnormal readings from the monitor.

Similar threads

  • General Engineering
Replies
3
Views
3K
Replies
17
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
11K
Replies
1
Views
5K
  • Electrical Engineering
Replies
6
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
3K
  • Electrical Engineering
Replies
2
Views
5K
Replies
9
Views
1K
Back
Top