Michael Craft
Newbie level 3
I would like to build a circuit to detect the presence of a TTL-level square wave produced by a microcontroller. (I know nothing about the micro-controller... I did not program it. I'm simply trying to interface to it.) However, I can control whether or not the square wave is "on" or "off" by pressing a button connected to the micro-controller.
I hooked an oscilloscope to the square wave and took some measurements. When I press the button to turn on the square wave, it has a frequency of 60 Hz, duty cycle of 50%, a low voltage of 0 V, and a high voltage of 5 V. In other words, a regular 'ol TTL square wave. When I press the button to turn off the square wave, it will either be at 0 VDC (continuous) or 5 VDC (continuous).
As mentioned above, I would like to build a circuit to detect the presence of this square wave. When the square wave is "on," my circuit should produce some kind of signal (like 5 VDC). When the square wave is "off," my circuit should produce around 0 V.
I've thought about different ways of doing this. All else being equal, I would like the solution to be very simple and have a low parts count. I would also rather not use a clock signal. (It means I would have to build a clock.)
One idea was to use a frequency-to-voltage converter. I also thought of sending the signal through a high-pass filter (with a cutoff frequency around 20 Hz or so), and then to a peak detector (diode + capacitor + bleed-off resistor). Yet another idea was to use an RMS-to-DC converter.
Ideally, I would love to use some kind of integrated circuit that is designed to detect square waves/clock signals and produces a "1" when it detects it. But I haven't been able find a chip that would do this.
Once I find a solution to this problem, I plan on publishing an article to N&V. It's a pretty neat application, and is something I think a lot of people will want to build. I will also include acknowledgements in the article.
Thanks,
Michael Craft
Saint Paris, OH
magcraft@windstream.net
I hooked an oscilloscope to the square wave and took some measurements. When I press the button to turn on the square wave, it has a frequency of 60 Hz, duty cycle of 50%, a low voltage of 0 V, and a high voltage of 5 V. In other words, a regular 'ol TTL square wave. When I press the button to turn off the square wave, it will either be at 0 VDC (continuous) or 5 VDC (continuous).
As mentioned above, I would like to build a circuit to detect the presence of this square wave. When the square wave is "on," my circuit should produce some kind of signal (like 5 VDC). When the square wave is "off," my circuit should produce around 0 V.
I've thought about different ways of doing this. All else being equal, I would like the solution to be very simple and have a low parts count. I would also rather not use a clock signal. (It means I would have to build a clock.)
One idea was to use a frequency-to-voltage converter. I also thought of sending the signal through a high-pass filter (with a cutoff frequency around 20 Hz or so), and then to a peak detector (diode + capacitor + bleed-off resistor). Yet another idea was to use an RMS-to-DC converter.
Ideally, I would love to use some kind of integrated circuit that is designed to detect square waves/clock signals and produces a "1" when it detects it. But I haven't been able find a chip that would do this.
Once I find a solution to this problem, I plan on publishing an article to N&V. It's a pretty neat application, and is something I think a lot of people will want to build. I will also include acknowledgements in the article.
Thanks,
Michael Craft
Saint Paris, OH
magcraft@windstream.net