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.

Missing Pulse Detector with Varying Input Frequency

Status
Not open for further replies.

adamey

Member
I searched and all I seem to find online are patents for such a circuit. :)

Is there an easy way to make a circuit that will accept a digital square wave that will vary between about 5KHz up to a maximum of 150KHz and have it detect a missing pulse? There would only ever be a single missing pulse, guaranteed by the circuit generating these pulses.

This signal is a clock used by a counter. I want the counter to reset when it gets the missing pulse. I don't want to run two wires to my counter (clock and reset), and would like to get the reset on the same single wire as the clock.

The only other thing I thought of was to have the pulse for the reset to be twice the voltage of the normal "clock" pulses, but then there is the possibility of noise giving a false reset.
 
Its a bit complicated, but all I can think of is a Phase Locked Loop. The Voltage controlled oscillator would be tuned and locked to the frequency that the signal has been at for the last few cycles. The loop filter time-constant would have to be set to the still track the rate of change of frequency. When the missing pulse happens, the Vco would supply a clock to a flip flop which would be used to detect the missing pulse.
 
Filter the square wave into an RC filter, then feed that DC voltage to one input of a comparator. Set the other comparator input voltage with a trimpot.

When there is a missing pulse the RC filter DC output drops, triggering the comparator. 5-150kHz is a range of 30:1 which is large, but I think if the squarewave itself is reliable you should be able to set the RC values and the trimpot values to give reliable triggering on a lost pulse.

I just made that up on the spot as a "completely obvious" way to do it... Which means it's probably in about 27 of those Patents.
:D
 
Use a microcontroller. Have the microcontroller time the interval between each new input transition and the previous transition and compare that interval to the one previously measured. If the difference between the two interval times is larger than 50% of the average interval, you are missing a pulse and the controller should output the desired reset pulse on an I/O line. That is pretty simple.
 
Problem here is that the input pulse is changing from 5Khz to 150Khz. How will the detector know the time window to look for a missing pulse? Will there be a data bus to indicate pulse freq?
 
Problem here is that the input pulse is changing from 5Khz to 150Khz. How will the detector know the time window to look for a missing pulse? Will there be a data bus to indicate pulse freq?

As I understood it, he's sending a 'missing pulse' specifically to reset the counter, not just looking for a missing pulse in the normal time frame.

In which case a 555 solution (or any other monostable) would be perfectly fine.
 
How would a 555 timer be able to differentiate a missing a pulse at 5khz and also 150khz? The missing pulse window has a limited detection range.
 
You obviously just look for a missing pulse for a longer period than 5KHz, as from what he said he's sending a specific missing pulse to reset the counter, not looking for a normal missing pulse. So the frequency doesn't matter.

I don't want to run two wires to my counter (clock and reset), and would like to get the reset on the same single wire as the clock.

The only other thing I thought of was to have the pulse for the reset to be twice the voltage of the normal "clock" pulses, but then there is the possibility of noise giving a false reset.
 
So how would that detect a missing pulse at 100khz? I don't get it.
 
Well a 30:1 freq ratio means my system wouldn't work either. :(

But here's a simple analogue system that does seem to be workable;

on HI period a cap is charged via 1k resistor
on LOW period the cap is discharged via 1.1k resistor (1.05k ??)

The result is that for any 50:50 square wave the cap voltage won't quite discharge back to 0v in the LOW period. But any missed pulse is (LOW period *3) which should result in the cap voltage hitting 0v which is the detected event.

Provided there is enough voltage headroom for the lowest frequency it is not too affected by frequency. 30:1 might still be stretching it though...

(edit)Nigel- the OP stated there would only ever be a single missing pulse.
 
Last edited:
OP never stated duty cycle, I think this is an occasion where a MCU would be best solution as RadioRon suggested.

I suspect the OP has not really given us the big picture and post was somewhat vague. We may just be spinning our wheels. Need more info I think.
 
Last edited:
So how would that detect a missing pulse at 100khz? I don't get it.

Read what he originally said, in particular the part I just quoted.

As I read it he's NOT trying to detect a missing pulse, but he's wanting to send a reset pulse without running another wire - and to do so by sending a long missing pulse. So the frequency of the normal plses has no bearing at all, as long as they are shorter than the reset missing pulse.
 
Read what he originally said, in particular the part I just quoted.

As I read it he's NOT trying to detect a missing pulse, but he's wanting to send a reset pulse without running another wire - and to do so by sending a long missing pulse. So the frequency of the normal plses has no bearing at all, as long as they are shorter than the reset missing pulse.

Perhaps you are right Nigel, at this point I am not sure, the OP was somewhat unclear on what is going on so I just dunno.
 
Probably more complex than you're after, but you could convert the frequency into a voltage using an edge detector into an (single-slope?/resetable) integrator into a peak detector. This voltage can then be passed through an LPF to get an average peak. Compare the average with some fraction of the preset peak to detect when a pulse is missing.

An easier way would be to send the reset as a higher voltage pulse (as you suggested), or by using a constant width (independent of frequency) pulse for the clocking and a longer width pulse for the reset. This extended width pulse would be very easy to detect.
 

Attachments

  • missing pulse detector.gif
    missing pulse detector.gif
    338.8 KB · Views: 453
Thanks for the ideas.

Mikebits: I posted that it is a square wave, so 50% duty cycle.

Nigel: The missing pulse will be only as wide as a single pulse, so its width will vary depending on frequency. It would look like this:

0011001100110011001100 normal
0011001100000011001100 missed

What you're suggesting is this:

0011001100110011001100 normal
0011000000000000001100 missed

I can't use any length of pulse because that would affect the counter and how many pulses it sees at higher frequencies.




The closest application I can think of is modern car engines crank sensors. They often use what's known as a 60-2 trigger wheel (a fancy way of saying it has 60 teeth and two missing teeth "notched" into it), where the misssing teeth are used to reference a specific position in the crankshaft (usually top dead centre on cylinder #1).

I assume they also use a missing pulse detector, but since an engine changes speed it would be similar to what I want. Only difference is an engine probably has a 10:1 ratio where I need more like 30:1.
 
Do you require 50% duty? If not, the length of the pulse can tell whether the counter should count or reset. e.g.
0010001000100010001000 normal
0010001000110010001000 missed

and for a lower frequency:
0000100000100000100000100000100000 normal
0000100000100000110000100000100000 missed
 
The PLL idea is getting better all the time....
 
I suggested the use of a microcontroller for several reasons. 1) it makes the decisions in the digital domain so suffers no temperature, tolerance or aging problems that an analog electronic solution would 2) it can easily implement simple digital filters to exclude short noise transients 3) the algorithm makes decisions based on only the previous cycle period and so it would easily track changes in frequency and still make the correct decisions (as long as those frequency changes are not instantaneous). Alternatively, if frequency changes are known to be relatively slow, a running average value for the cycle period can be maintained and used as the value to test the most recent measurement against. This is a form of digital filter too. 4) the part cost of this microcontroller is about the same as one 555 timer chip
 
Nigel, I think we're separated by the same language.

A 'missing pulse detector' isn't looking for a special pulse. It generates a signal when it does not detect a pulse that is otherwise expected.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top