How to count pulses per second ?

--
I just noticed on sed that you've multiposted this thread instead of 
crossposting. It would be better if you crossposted, since that way 
everybody gets to follow the thread and post to it without having to 
jump back and forth from newsgroup to newsgroup.  

I'm going to crosspost this one over to sed even though it'll repeat 
here. (seb)
Reply to
John Fields
Loading thread data ...

JH: Excellent suggestion. I truly appreciate all your help, especially the schematic. I will be ordering the HC4017 to do the trick.. hopefully it'll be here in a few days... in the meantime, i'm trying to simulate in orcad pspice and cant find the an HC4017 equivalent in the library, what did you use to simulate (if anything) ?

many thanks again.

MC

Reply to
Mike C

--
I didn\'t, but I think your library has a 4017 in it, no?
Reply to
John Fields

I used this years ago to decode morse code. Determined if it was a dash or a dot by if the counter overflowed or not. Same with long and short spaces. Worked good!

Reply to
sdeyoreo

--
Done.
Reply to
John Fields

In article , Mike C wrote: [....]

Here's the real question: How long does the 10 cycles per second need to be there before we turn the LED on?

If it is a full second then you need to have a system that measures the number of pulses in one second. If the measurement only needs to be made over a 0.1 second period then the dual oneshot idea will work.

If at any point it goes below 10Hz, implies that you will react in 0.1 seconds to a pulse being too late.

We may need a 3rd oneshot to impose the rule that the pulses remain at

10Hz for a full second, if that rule really exists.
--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith

Imagine this: the AC line frequency is 60.0Hz or so. It varies a bit. Yet, there are many household clocks which keep time precisely by this standard. Why aren't the power companies screwing these all up? Because, although the frequency itself may not be precisely regulated, the number of cycles per day, let's say, *is* kept in check. Although the clocks may cycle faster sometimes, they also cycle lower sometimes, keeping it accurate over long average periods.

The same works here. You can tap out nine pulses really quick, but if no tenth pulse comes before this counting second finishes, your counter is going to say fail. The average pulses per second is still ten, but they didn't come evenly. THIS is the question we are asking you.

If the pulse length is roughly equal for all ten pulses (i.e., the rate doesn't change much during that second), then a missing pulse timer type circuit will work very simply. It will not work if the pulses are significantly displaced (as elaborated above), because that long empty space between the first 9 pulses and the 10th will trigger the timer to send a fail.

What is your signal source?

Alright. Then please, don't call it hertz -- if you must, call it _average_ hertz. The reciprocal duration (i.e., Hz == 1/s) of each cycle varies, and could be 2Hz or it could be 50Hz, so long as the average during that second is 10Hz (10 pulses per 1 second, explicitly so).

Again, if it changes slowly (perhaps 9.7 to 10.3Hz), a missing-pulse detector (set for perhaps 0.103 or 0.104 second trip time) will suffice for reasonable accuracy. Which is another concern- how accurate must this be to exactly 10 cycles? Are the cycles what count, or the time or frequency?

...And it'll take one second to reach this decision, correct? Obviously it can't know if ten cycles have passed in that second unless they have. (Arguably, you could have a circuit count the average *continuously*, with a time constant of one second. Even a simple RC integrator would accomplish this, roughly speaking. But this also reduces to a missing pulse detector.)

That looks like it is varying pretty widely, though the Hz input count makes me feel like the input is some constant frequency during that count period.

Tim

-- Deep Fryer: A very philosophical monk. Website @

formatting link

Reply to
Tim Williams

Your requirements are contradictory. On the one hand you insist that one second be the shortest interval over which you make the determination of >= ten pulses, and on the other you insist that the circuit react "at once" if

Reply to
Fred Bloggs

The requirements are only, sort of, contradictory. They could be read as the 10Hz or greater rate must be maintained for a full second for the LED to go on and a single late pulse turns it off again. Basically, this puts a one second oneshot into the design where true on its output means the LED is off.

>
--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.