Maker Pro
Maker Pro

Square wave detector

P

pinku

Jan 1, 1970
0
Hi,
I need to detect a presence of square wave. If square wave is there I
need to generate a logic 0 and this square wave is not present I need
to generate logic 1 or vise versa. Can you suggest me a circuit for
this functionality.

Thanks in advance

Regards
Pinku
 
J

John Popelish

Jan 1, 1970
0
pinku said:
Hi,
I need to detect a presence of square wave. If square wave is there I
need to generate a logic 0 and this square wave is not present I need
to generate logic 1 or vise versa. Can you suggest me a circuit for
this functionality.

First, you have to do a lot better than that at defining
"square wave". You might be surprised at the variety of
signals that have been called square waves.
 
G

Greg Neill

Jan 1, 1970
0
pinku said:
Hi,
I need to detect a presence of square wave. If square wave is there I
need to generate a logic 0 and this square wave is not present I need
to generate logic 1 or vise versa. Can you suggest me a circuit for
this functionality.

Does your signal line have only a square wave on it,
or are there other things present when the square
wave isn't?

Is the squarewave centered on zero (so it goes positive
and negative) or does it have zero as its floor? What
is the magnitude (volts) of the signal?

What's the period (or frequency) of the square wave?
 
P

Paul Hovnanian P.E.

Jan 1, 1970
0
Greg said:
Does your signal line have only a square wave on it,
or are there other things present when the square
wave isn't?

Is the squarewave centered on zero (so it goes positive
and negative) or does it have zero as its floor? What
is the magnitude (volts) of the signal?

What's the period (or frequency) of the square wave?

And, for what period can the square wave be present (absent) before the
output must correctly signal its status?

If you've got enough time, you could use a technician, an oscilloscope
and a toggle switch. Technician examines the 'scope periodically and, if
the wave status changes, flips the switch to the correct position.

;-)
 
J

John Larkin

Jan 1, 1970
0
And, for what period can the square wave be present (absent) before the
output must correctly signal its status?

If you've got enough time, you could use a technician, an oscilloscope
and a toggle switch. Technician examines the 'scope periodically and, if
the wave status changes, flips the switch to the correct position.

I bet a PhD in physical chemistry would work almost as well.

John
 
J

Jerry Avins

Jan 1, 1970
0
Greg said:
Does your signal line have only a square wave on it,
or are there other things present when the square
wave isn't?

Is the squarewave centered on zero (so it goes positive
and negative) or does it have zero as its floor? What
is the magnitude (volts) of the signal?

What's the period (or frequency) of the square wave?

How square is it really? I.E. what's the bandwidth?
Are there other signals at the same time?

Jerry
 
J

Jerry Avins

Jan 1, 1970
0
Jerry said:
How square is it really? I.E. what's the bandwidth?
Are there other signals at the same time?

Is the duty cycle 50%? If yes, with what tolerance?

Jerry
 
D

D from BC

Jan 1, 1970
0
Hi,
I need to detect a presence of square wave. If square wave is there I
need to generate a logic 0 and this square wave is not present I need
to generate logic 1 or vise versa. Can you suggest me a circuit for
this functionality.

Thanks in advance

Regards
Pinku

I smell a differentiator somewhere in that circuit.


D from BC
 
R

robert bristow-johnson

Jan 1, 1970
0
Does your signal line have only a square wave on it,
or are there other things present when the square
wave isn't?

the question i would have is: detect the presence of the square wave
against what other alternative? silence or noise?
Is the squarewave centered on zero (so it goes positive
and negative) or does it have zero as its floor?

we probably won't know that; no common timebase...
What is the magnitude (volts) of the signal?

that's an issue of setting a threshold.
What's the period (or frequency) of the square wave?

but we should know that. if we do, i would say to cross-correlate
with, say, two different square waves of the known (or trial)
frequency that have fundamental 90 degrees apart.

if we *did* have a common timebase and could do synchronous detection,
it would be just a single square wave to cross-correlate with.
hmmm... maybe a matched filter implemented as an FIR with a stretch
of square wave as its impulse response. that might work for either
synchronous or async.

r b-j
 
M

msg

Jan 1, 1970
0
if we *did* have a common timebase and could do synchronous detection,
it would be just a single square wave to cross-correlate with.
hmmm... maybe a matched filter implemented as an FIR with a stretch
of square wave as its impulse response. that might work for either
synchronous or async.

FWIW, many, many years ago I built an intrusion alarm with a superregen
receiver that listened for a homemade keyfob's signal; the rcvr
quieted in the presence of the carrier, noise power dropped and the
superregeneration frequency spectrum narrowed; filtering as per your
suggestion above worked well and the system was quite robust.

Regards,

Michael
 
J

Jeff Liebermann

Jan 1, 1970
0
Art history major?

Close. The local multiversity, UCSC, has a "History of Consciousness"
major, which should provide an endless supply of graduates capeable of
detecting a square wave:
<http://humwww.ucsc.edu/HistCon/>
<http://en.wikipedia.org/wiki/History_of_Consciousness>

I hate to admit it, but there was a time in the early 1960's when I
worked on a job that resembled a "square wave detector". In this
case, I was sentenced to stare at a Tek 520A vector display, for what
seemed like endless hours, and yell of help if anything changed.
Unfortunately, things did change so I really did need to pay
attention. After about 10 consecutive days of this nonsense, I
simulated a mental breakdown, and was assigned a more creative task.
That was sweeping the floor from all the crud that was falling from
the ceiling during construction.

B.F. Skinner trained pigeons to peck at a CRT to run a guided missile.
<http://en.wikipedia.org/wiki/Project_Pigeon>
<http://www.spring.org.uk/2007/06/pigeon-guided-missiles-superstitious.php>
I guess a graduate student can be trained to do the same.
 
J

John Fields

Jan 1, 1970
0
Hi,
I need to detect a presence of square wave. If square wave is there I
need to generate a logic 0 and this square wave is not present I need
to generate logic 1 or vise versa. Can you suggest me a circuit for
this functionality.

---
Assuming you mean a square wave looks like this:

__________ _____
___| |__________|

|<---t1--->|<---t2--->|
| |
|<--------2t1-------->|

You could use a couple of counters, a clock, a magnitude comparator
and some glue logic to do it in hardware and determine whether
clocks accumulated during time t1 were equal to the number
accumulated during t2. If they are, then a square wave is present.

Use one counter to accumulate clocks during t1, the other to
accumulate clocks during t2, the edges to do the comparisons and
then to clear the counters on the fly. That way your worst latency
will be 1/2 cycle. You'll also need to do a zero detect so you
won't detect 0 counts = 0 counts as a square wave.
 
J

John Larkin

Jan 1, 1970
0
---
Assuming you mean a square wave looks like this:

__________ _____
___| |__________|

|<---t1--->|<---t2--->|
| |
|<--------2t1-------->|

You could use a couple of counters, a clock, a magnitude comparator
and some glue logic to do it in hardware and determine whether
clocks accumulated during time t1 were equal to the number
accumulated during t2. If they are, then a square wave is present.

Use one counter to accumulate clocks during t1, the other to
accumulate clocks during t2, the edges to do the comparisons and
then to clear the counters on the fly. That way your worst latency
will be 1/2 cycle. You'll also need to do a zero detect so you
won't detect 0 counts = 0 counts as a square wave.

Or an HC123?

Or just reset a counter every input edge, and clock it from something
else. When it reaches some terminal count, it hangs, and that's the
timeout. We do that in FPGAs as signal-loss detectors.

John
 
P

pinku

Jan 1, 1970
0
Thanks in tones ..for all the idea.
The signal is not 50% duty cycle. This signal is coming from other
card. I need to glow a LED if square wave is present. Voltage level is
digital i.e 0V and +5V. Basically if there is toggle in the line I
need to drive low and if no toggling drive high.
If this detection can be done using simply digital circuit along with
capacitor and Diode will be great.

Thanks in advance
Regards
Pinku
 
K

Ken S. Tucker

Jan 1, 1970
0
Thanks in tones ..for all the idea.
The signal is not 50% duty cycle. This signal is coming from other
card. I need to glow a LED if square wave is present. Voltage level is
digital i.e 0V and +5V. Basically if there is toggle in the line I
need to drive low and if no toggling drive high.
If this detection can be done using simply digital circuit along with
capacitor and Diode will be great.

Thanks in advance
Regards
Pinku

The basic TTL spec defines a LO by <1/3 Vcc,
and the HI by >2/3 Vcc, every gate works to
that standard, (approximately), so a TTL spec
gate becomes a detector.
Take that TTL spec'd O/P threw a series cap,
and the power transferred should lite-up your
LED.
Ken
 
J

John Fields

Jan 1, 1970
0
Or an HC123?

---
I took: "I need to detect a presence of square wave." to mean that
he wanted to determine whether the signal was 50% duty cycle (a
square wave) or not; not something one can easily detect with a
123.

As it turns out all he wants to know is, "Is the signal there?" so
sure, a 123 would work, but why waste 1/2 a chip?
 
J

Jamie

Jan 1, 1970
0
John said:
---
I took: "I need to detect a presence of square wave." to mean that
he wanted to determine whether the signal was 50% duty cycle (a
square wave) or not; not something one can easily detect with a
123.

As it turns out all he wants to know is, "Is the signal there?" so
sure, a 123 would work, but why waste 1/2 a chip?
30 years ago?, that puts you up in the old duffer category!

And here, I thought you were a young gentleman. At least you
still have your mind fully intact which is more than I can
say for a couple of others here! :)

It'll be aprox 29 years for me employed in the field
while doing school mean while at the start which was rough on
me. There were few weekends we got to enjoy our self.
 
J

John Larkin

Jan 1, 1970
0
---
I took: "I need to detect a presence of square wave." to mean that
he wanted to determine whether the signal was 50% duty cycle (a
square wave) or not; not something one can easily detect with a
123.

As it turns out all he wants to know is, "Is the signal there?" so
sure, a 123 would work, but why waste 1/2 a chip?

Saw it in half, and save a few cents?

John
 
Top