Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

flatern/smooth the harmonic to perfect square/digital signal.

Status
Not open for further replies.

lcs81

Member level 3
Joined
Aug 2, 2005
Messages
57
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,683
i got a square wave like signal with some noise/harmonics. Any know how to make it perfect square(digital)?

PLease refer to the attachment.

tq
 

Attachments

  • ssquare.jpg
    ssquare.jpg
    12.9 KB · Views: 70

What kind of filter?
 

A filter with a cut-off frequency higher than you clock frequency * 10, or so. In order to have a square wave, you need to retain several of the odd harmonics (squarewave is an odd function, thus consisting of only odd-numbered harmonics... 1st, 3rd, 5th, 7th, etc).

If your fundamental clock frequency is 1 MHz, then you should make a low-pass filter with a cutoff > 10 MHz.

A better way would be to run your signal into a spectrum analyzer or turn on FFT on your oscilloscope (or do it in a tool like Matlab, for post-processing). Run a quick FFT in Matlab, or find a webpage, and determine what relative magnitude your odd harmonics should have from the fundamental frequency in a perfect square wave. Once you run your signal through a filter, you want to retain those relative levels, otherwise you begin to distort the square-ness of the square wave. It'll probably take some trial and error, but using Matlab might help you to make some filters digitally, run it over the data and see how it looks afterwards. Then you can quickly change the filter performance and re-simulate quickly. Just some thoughts on how to do some quick trials before building real filters with hardware.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top