How can I accurately count heartbeats using limited hardware components?

  • Thread starter Thread starter tenacity2986
  • Start date Start date
  • Tags Tags
    Counter Monitor
Click For Summary

Discussion Overview

The discussion revolves around the challenge of accurately counting heartbeats using limited hardware components, specifically focusing on how to process a square wave signal representing heartbeats and display the count in beats per minute (bpm) on 7-segment displays. Participants explore various methods to achieve this using a 4029 Up/Down counter, a BCD driver, and timing mechanisms.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related
  • Mathematical reasoning

Main Points Raised

  • One participant describes the need to count square waves representing heartbeats and refresh the display every 15 seconds, raising the issue of needing to multiply the count by 4 to convert to bpm.
  • Another participant suggests using an oscillator to magnify the counted beats by 4 before inputting them into the counter, while also expressing concern about the minimum frequency requirements of the IC counter.
  • A suggestion is made to use D flip-flops to generate 4 pulses from each heartbeat pulse, though the origin and functionality of this idea are questioned.
  • One participant clarifies that they are not dealing with homework but rather a practical application, emphasizing the need to multiply the square wave frequency by 4 before counting.
  • There is a discussion about the potential need for binary to decimal conversion, with one participant asserting that shifting a binary string would be a straightforward method to multiply by 4.
  • Another participant counters that the output of the counter is limited to 4 bits, which complicates the shifting approach, and emphasizes the need for multiplication before counting.
  • Concerns are raised about synchronizing the counting clock with the heartbeat signal, highlighting the importance of addressing clock domain issues in the design.
  • One participant proposes using a 555 timer in bistable mode to manage timing and counting, while also discussing the potential propagation delay between enabling the latch and resetting the counter.

Areas of Agreement / Disagreement

Participants express differing views on the best method to multiply the heartbeat count and manage synchronization between the counting clock and the heartbeat signal. There is no consensus on a single approach, and multiple competing ideas are presented.

Contextual Notes

Participants mention various limitations, such as the minimum frequency requirements for the IC counter and the challenges of converting between binary and decimal formats. The discussion also highlights the complexity of synchronizing different clock domains in the proposed design.

tenacity2986
Messages
44
Reaction score
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
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...
 
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
 
homework?
 
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.
 
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...
 
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?
 
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...
 
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:

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
Replies
17
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
13K
Replies
1
Views
6K
  • · Replies 19 ·
Replies
19
Views
5K
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 2 ·
Replies
2
Views
5K