All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > The Projects Forum

Notices

The Projects Forum Working on an electronics project and would like some suggestions, help or critiques? If you would like to comment or assist others with their projects, this is the place to do it.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 01-06-2010, 01:19 AM
spasticteapot spasticteapot is offline
New Member
 
Join Date: Nov 2009
Posts: 4
Default Square wave to sine wave conversion?

Is there a good way to convert a square wave between 50hz and 5khz to a reasonably neat sine wave?
Reply With Quote
  #2  
Old 01-06-2010, 11:13 AM
ericwertz ericwertz is offline
Junior Member
 
Join Date: Aug 2009
Location: USA
Posts: 14
Default

Depends entirely upon what you mean by "good".

You've pretty much stumbled on the totality of what "engineering" is all about.
Reply With Quote
  #3  
Old 01-06-2010, 11:42 AM
BillB3857's Avatar
BillB3857 BillB3857 is offline
Senior Member
 
Join Date: Feb 2009
Location: St.Louis, MO area (GMT-6)_
Posts: 2,064
Default

If you first convert the square wave to a triangle wave, check out this link......

www.analogzone.com/den7.pdf

Here is another approach....... http://mypeoplepc.com/members/scottn...sine_shape.jpg

Last edited by BillB3857; 01-06-2010 at 12:20 PM.
Reply With Quote
  #4  
Old 01-07-2010, 02:39 PM
Bill_Marsden's Avatar
Bill_Marsden Bill_Marsden is offline
Super Moderator
 
Join Date: Mar 2008
Location: Dallas, TX (GMT-5 w/ DST)
Posts: 18,824
Blog Entries: 5
Default

What is the source of the square wave?
__________________
..
"Good enough is enemy of the best." An old engineering saying, Author unknown.

General info:
If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor E-mail, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input. Thanks for the verbage Wookie.
Reply With Quote
  #5  
Old 01-07-2010, 06:25 PM
russ_hensel russ_hensel is offline
Senior Member
 
Join Date: Jan 2009
Location: South Dartmouth Ma
Posts: 812
Default

Particurlarly hard to do if you want to vary the frequency and have the output amplitude to stay the same. I wonder if a phase lock loop could manage this.
Reply With Quote
  #6  
Old 01-07-2010, 08:15 PM
davebee davebee is offline
Senior Member
 
Join Date: Oct 2008
Location: San Francisco Bay area
Posts: 514
Default

A microcontroller could be programmed to read the period of the incoming square wave and use pulse width modulation to generate a sine of the same frequency over that range.

If the PWM was much faster than 5 kHz then a single high-frequency low-pass filter might be good enough to clean up the entire frequency range well enough.
Reply With Quote
  #7  
Old 01-09-2010, 02:18 PM
danny2 danny2 is offline
Junior Member
 
Join Date: Oct 2009
Posts: 29
Default

Quote:
Originally Posted by BillB3857 View Post
If you first convert the square wave to a triangle wave, check out this link......

www.analogzone.com/den7.pdf

Here is another approach....... http://mypeoplepc.com/members/scottn...sine_shape.jpg

mind to know whr is the breakpoint voltage?when i simulate on pspice,the value for Iu is wrong,some of the formula are wrong too.please check it out.

use my circuit that i attach,and use the formula on the pdf to calculate according my circuit.
the red arrow indicate current flow
Attached Images
File Type: jpg try this.JPG (51.3 KB, 183 views)
File Type: jpg 1st segment.JPG (14.7 KB, 126 views)
File Type: jpg formula.JPG (44.4 KB, 109 views)

Last edited by danny2; 01-10-2010 at 10:43 AM.
Reply With Quote
  #8  
Old 01-09-2010, 03:15 PM
BillB3857's Avatar
BillB3857 BillB3857 is offline
Senior Member
 
Join Date: Feb 2009
Location: St.Louis, MO area (GMT-6)_
Posts: 2,064
Default

Danny,
I am not the author of the article so cannot lend any insight into how it was developed or respond to any errors it may contain. I simply located it and presented it for your evaluation.. Now to your simulation. Please note that the total conversion is made by having multiple sections, each providing a slightly different slope at different activation levels or breakpoint. From the first paragraph on the first page........

"The sine converter is a classic diode-resistor multiple -breakpoint shaper It achieves an approximately piecewise - linear sinusoid approximation and is based on optimizing the breakpoint locations to minimize function error by uniformly spreading the error across a range of the function. The five-breakpoint circuit is shown below."

Your simulation shows only one section and would only produce a slight modification to the slope of the triangle wave applied to its input. With multiple sections, as the input continues to rise, more and more modification to the slope would be evident, up to the point of the peak where the slope would approach almost flat.
Reply With Quote
  #9  
Old 01-09-2010, 04:09 PM
danny2 danny2 is offline
Junior Member
 
Join Date: Oct 2009
Posts: 29
Default

i know you are not the author.
i was referring the formula and did some calculation for the circuit.see the page 2.i was very vey confuse about this formula on page 2.i spend alot of time today by analysis it,but some formula seem error and i dont know how to fixed it.im here by asking for help about the formula on page no.2.
Reply With Quote
  #10  
Old 01-09-2010, 05:10 PM
Audioguru Audioguru is offline
Banned
 
Join Date: Dec 2007
Location: Ontario, Canada
Posts: 9,411
Default

I used a switched-capacitor lowpass filter IC to convert a square-wave into a very good sine-wave. The cutoff frequency of the filter is adjusted with the frequency of its clock which is 100 times the cutoff frequency.
Reply With Quote
Reply   Post New Thread

Tags
, , ,


Related Site Pages
Section Title
Worksheet Design Project: Simple component curve-tracer circuit
Worksheet Advanced electromagnetism and electromagnetic induction
Worksheet Mixed-frequency signals
Textbook Synchronous Motors : Ac Motors
Textbook AC voltmeters and ammeters : Ac Metering Circuits
Textbook More on spectrum analysis : Mixed-frequency Ac Signals
Textbook Other waveshapes : Mixed-frequency Ac Signals
Textbook Square wave signals : Mixed-frequency Ac Signals
Video Lecture Sine Wave Characteristics - Alternating Current
Textbook Measurements of AC magnitude : Basic Ac Theory


Similar Threads
Thread Thread Starter Forum Replies Last Post
AC sine wave to DC square wave, newb, saw a similar thread SpeedEuphoria General Electronics Chat 11 05-01-2010 12:28 AM
Sine to Square Wave Converter @ 10MHz youknowwho6996 General Electronics Chat 3 09-05-2009 02:35 PM
how to make a TTL Square wave from a sine wave source whywhy68 General Electronics Chat 3 08-24-2009 01:37 PM
Square wave to sine wave JBmtk General Electronics Chat 4 07-15-2009 05:14 PM
How to amplify ac square wave mbird General Electronics Chat 5 02-03-2009 02:20 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:20 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.