Square wave detector

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

Reply to
pinku
Loading thread data ...

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.

Reply to
John Popelish

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?

Reply to
Greg Neill

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.

;-)

--
Paul Hovnanian	paul@hovnanian.com
-----------------------------------------------------------------------
Procrastinators: The leaders for tomorrow.
Reply to
Paul Hovnanian P.E.

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

John

Reply to
John Larkin

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

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

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

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

I smell a differentiator somewhere in that circuit.

D from BC

Reply to
D from BC

the question i would have is: detect the presence of the square wave against what other alternative? silence or noise?

we probably won't know that; no common timebase...

that's an issue of setting a threshold.

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

Reply to
robert bristow-johnson

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

Reply to
msg

Art history major?

--
Paul Hovnanian     mailto:Paul@Hovnanian.com
------------------------------------------------------------------
Opinions stated herein are the sole property of the author. Standard
disclaimers apply. All rights reserved. For external use only. If
irritation, rash or swelling occurs, discontinue use immediately
and consult a physician. Void where prohibited.
Reply to
Paul Hovnanian P.E.

"Paul Hovnanian P.E." hath wroth:

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:

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.

I guess a graduate student can be trained to do the same.

--
Jeff Liebermann     jeffl@cruzio.com
150 Felker St #D    http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
Skype: JeffLiebermann     AE6KS    831-336-2558
Reply to
Jeff Liebermann

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

__________ _____ ___| |__________|

||| | | ||

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.

-- JF

Reply to
John Fields

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

Reply to
John Larkin

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

Reply to
pinku

As long as the major interest isn't abstract expressionism.

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

--
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?
Reply to
John Fields

Saw it in half, and save a few cents?

John

Reply to
John Larkin

(view in Courier font) R1 C1 >-/\/\--||-----+----. | | --- --- LED D1 \ / / \ ~~>

--- --- | | === === GND GND

James Arthur

Reply to
James Arthur

Lets repeat some of those questions:

Is the not-so-very-square wave the only possible signal present?

How soon after the signal is applied must the response occur? How soon after the signal is removed must the response occur? Couch these times with reference to a period of the waveform.

Is the 5V really 5, or could it be 4.5 sometimes? Could 0V in be .8"

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

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.