Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #505941

Re: square wave to sine filter

Subject Re: square wave to sine filter
Newsgroups sci.electronics.design
References <d0n0gdhcfmsiukt0eufh92ovlnh0kfa24v@4ax.com> <e4f45bb6-6c18-4d2a-9073-c31b4dc848c0@googlegroups.com>
From bitrex <user@example.net>
Message-ID <Zt5MC.148443$T14.17529@fx44.iad> (permalink)
Organization frugalusenet - www.frugalusenet.com
Date 2018-05-19 22:56 -0400

Show all headers | View raw


On 05/19/2018 10:20 PM, bill.sloman@ieee.org wrote:
> On Sunday, May 20, 2018 at 3:31:59 AM UTC+10, John Larkin wrote:
>> https://www.dropbox.com/s/t4fv4gvx9f8hbqd/LPF_Trans.jpg?raw=1
>>
>> Input is a PWM square wave from an ARM. This makes a nice looking
>> sine, 3rd harmonic down almost 40 dB.
>>
>> It's a sallen-key lowpass with a 12 dB bump at 10 KHz. It works a lot
>> better than an equivalent-part active bandpass. Maybe the bandpass
>> wastes resources rejecting stuff below the fundamental, where there is
>> nothing to reject.
> 
> If you have a DAC in the ARM you can start off with a much better approximation to a 10kHz sine wave.
> 
> Don Lancaster's "magic sine wave" binary sequences have explored the matter at length for purely binary signals, which is presumably what you'd get out of a PWM driver.

I've looked at those papers every once in a while for a decade or so but 
for the life of me I've never once seen him simply post some source code 
that does what the documents say in e.g. portable ANSI C.

> If you could tri-state the output of the PWM generator you could generate the usual cheap approximation to a sine wave, which off from 0 degrees to 30 degrees, high from 30 degrees to 150 degrees, off from 150 degrees to 210 degrees, low from 210 degrees to 330 degrees and off again for the last thirty degrees.
> 
> No third harmonic content, and the fifth and seventh harmonics are down a bit.
> 

Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

square wave to sine filter John Larkin <jjlarkin@highlandtechnology.com> - 2018-05-19 10:31 -0700
  Re: square wave to sine filter George Herold <gherold@teachspin.com> - 2018-05-19 15:17 -0700
  Re: square wave to sine filter "Tim Williams" <tiwill@seventransistorlabs.com> - 2018-05-19 18:46 -0500
    Re: square wave to sine filter bitrex <user@example.net> - 2018-05-19 21:09 -0400
    Re: square wave to sine filter John Larkin <jjlarkin@highlandtechnology.com> - 2018-05-19 18:34 -0700
  Re: square wave to sine filter bitrex <user@example.net> - 2018-05-19 21:04 -0400
    Re: square wave to sine filter John Larkin <jjlarkin@highlandtechnology.com> - 2018-05-19 18:32 -0700
    Re: square wave to sine filter "Tim Williams" <tiwill@seventransistorlabs.com> - 2018-05-19 23:37 -0500
      Re: square wave to sine filter bitrex <user@example.net> - 2018-05-20 01:47 -0400
      Re: square wave to sine filter John Larkin <jjlarkin@highlandtechnology.com> - 2018-05-20 08:35 -0700
  Re: square wave to sine filter bill.sloman@ieee.org - 2018-05-19 19:20 -0700
    Re: square wave to sine filter bitrex <user@example.net> - 2018-05-19 22:56 -0400
      Re: square wave to sine filter bill.sloman@ieee.org - 2018-05-19 20:49 -0700
      Re: square wave to sine filter "Tim Williams" <tiwill@seventransistorlabs.com> - 2018-05-19 23:47 -0500
        Re: square wave to sine filter bitrex <user@example.net> - 2018-05-20 01:33 -0400
          Re: square wave to sine filter bitrex <user@example.net> - 2018-05-20 01:41 -0400

csiph-web