Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Best way to calculate frequency of a signal per minute?

Status
Not open for further replies.

kasrak

New Member
We are trying to build a digital stethoscope. So far, what we've got working is an LED that pulses on and off with the heart beats (using an IR sensor & transmitter, amplified with op-amps).

The part we're stuck on is generating the beats per minute based on 10 second or 20 second samples. We're trying to find out how to make a sub-circuit to count the number of beats in either the 10 second or 20 second timespan and then use a binary multiplier to multiply by 6 or 3 to get the BPM.

So are we on the right track? What's the best way to go about implementing this. Oh and we are not allowed to use microcontrollers or multipurpose chips. The circuit we have right now runs on a single 9V battery.

Thanks!
 
Hi,


If you can not use a microcontroller then i would suggest using a counter (however many bits needed) and count over 15 seconds, not 10 or 20. At 15 seconds you can multiply by 4 which is much much simpler than some other non binary base unit. To multiply by 4, simply interpret the bits two more to the left and make the two to the right both zero.

For example, if you count binary 1111 (that's 15 decimal) and then shift two places to the left you get 111100, which is binary for 60 decimal which would be 60 beats per minute. Note that you dont actually have to shift anything however, just interpret the bits differently. That means no multiplication at all is really needed.
 
Last edited:
Yes 15 would indeed be simpler. But the 10 second and 20 second modes area part of the project specs. :(

So i'm beginning to understand how this will work in theory, but the application is still a bit fuzzy. How would I go about setting it up so that, say after a button is pressed, it will count for x seconds and then,once thats done do the multiplication? Would 1 555 suffice?

Thanks for the reply.
 
Doing digital multiplication without a microprocessor is not simple. See this, for example.
 
Yes 15 would indeed be simpler. But the 10 second and 20 second modes area part of the project specs. :(

So i'm beginning to understand how this will work in theory, but the application is still a bit fuzzy. How would I go about setting it up so that, say after a button is pressed, it will count for x seconds and then,once thats done do the multiplication? Would 1 555 suffice?

Thanks for the reply.


Hi again,


Ok then to multiply by 3 you would need an 8 bit adder. You would have to add the 20 second count to itself shifted left 1 time, which means one set of adder inputs comes from the count directly and the other set comes from the count starting at bit 1 instead of bit 0. For the count of 10 seconds you would do the same thing except instead of interpreting the result directly you would interpret it shifted one bit to the left with the leftmost digit made equal to zero.
For example, say for the 20 second count we get a count of 20 which in binary 8 bits is:
00010100
Now we take that and add it to itself after interpreting one bit to the left:
00010100+00101000
and we get:
00111100
which is binary for 60, which means 60 beats per minute.
To do this requires one 8 bit adder, either a single chip if available or multiple chips.

Now if instead for our example we take a 10 second count and get 10 which in binary 8 bits is:
00001010
and then add this to itself after shifting:
00001010+00010100
and we get:
00011110
and then interpreting that one more bit to the left end up with:
00111100
which again is binary for 60.
So for the 10 second count we end up with one additional step at the end.

The nice thing about doing it this way is we dont need any shift registers or clocks. We do need an adder however with it's inputs correctly wired to the counter chips outputs so that it always adds the count to itself shifted once. The output of that is then either interpreted directly or one bit left shifted, but no actual shifts have to take place.
 
Last edited:
We are trying to build a digital stethoscope. So far, what we've got working is an LED that pulses on and off with the heart beats (using an IR sensor & transmitter, amplified with op-amps).

The part we're stuck on is generating the beats per minute based on 10 second or 20 second samples. We're trying to find out how to make a sub-circuit to count the number of beats in either the 10 second or 20 second timespan and then use a binary multiplier to multiply by 6 or 3 to get the BPM.

So are we on the right track? What's the best way to go about implementing this. Oh and we are not allowed to use microcontrollers or multipurpose chips. The circuit we have right now runs on a single 9V battery.

Thanks!

hi,
You can multiply the beats by three using this simple circuit.
This is set for a 3* 20 sec rate.
 

Attachments

  • 4017_BPM1.gif
    4017_BPM1.gif
    32.4 KB · Views: 410
Hi again,


Here's the circuit i was talking about...requires 2 ic chips part CD4008. Propagation delay less than 245ns.
 

Attachments

  • MultiplyByThree-01.gif
    MultiplyByThree-01.gif
    4.8 KB · Views: 336
Last edited:
I produced the same type of circuit 30 years ago by using two 4026's and a 4047. It counts in the background and updates every 10 or 20 seconds and the display is ON constantly.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top