EDAboard.com | EDAboard.eu | EDAboard.de | EDAboard.co.uk | RTV forum PL | NewsGroups PL

Square + triangle = sine (almost)

elektroda.net NewsGroups Forum Index - Electronics Design - Square + triangle = sine (almost)

Goto page Previous  1, 2, 3, 4, 5, 6  Next

Robert Baer
Guest

Wed Mar 10, 2010 7:46 am   



Jim Thompson wrote:
Quote:
On Mon, 08 Mar 2010 21:42:22 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Mon, 08 Mar 2010 09:25:15 -0700, Jim Thompson <To-Email-Use-The-Envelope-Icon_at_My-Web-Site.com> wrote:

On Mon, 08 Mar 2010 00:01:44 -0800, Muzaffer Kal <kal_at_dspia.com
wrote:

On Sun, 07 Mar 2010 23:11:20 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Sat, 6 Mar 2010 20:21:10 -0800, D from BC <myrealaddress_at_comic.com> wrote:

In article <4b9324ee.4432562_at_news.tpg.com.au>, rontanner_at_esterbrook.com
says...
On Sun, 7 Mar 2010 14:31:48 +1100, "Phil Allison" <phil_a_at_tpg.com.au
wrote:

"Harold Larsen"
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,

** Sorry - that is WRONG .

A triangle wave contains only odd harmonics too.

http://en.wikipedia.org/wiki/Triangle_wave

A "sawtooth" wave contains all integer harmonics.

OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .

I have not seen that method applied or described anywhere, but it
makes a fair approximation, at least to my eye.

Harold Larsen

This reminds of the XR2206 chip that makes square, triangle and sine
using analog technology.
Sure enough, as does the ICL8038. Part of the question is how it is done.
The datasheet at http://www.intersil.com/data/FN/FN2864.pdf has a
pretty good schematic and explanation which shows how it's done.
Yep. "Piecewise-Linear", aka break-point analysis... taught in better
engineering schools Wink

...Jim Thompson
I first saw it in a synchro to digital converter about 1973. I had to think
hard for a while before i "got" it.

The only place I can remember using it in an actual product was for
linearizing a flat-face CRT sweep (RADAR)... and there it was
piecewise _curve_ fitting.

...Jim Thompson
Yup! Good 'ole analog DFGs..


MooseFET
Guest

Wed Mar 10, 2010 8:35 am   



On Mar 9, 8:36 pm, Bitrex <bit...@de.lete.earthlink.net> wrote:
Quote:
Jim Thompson wrote:
On Tue, 09 Mar 2010 10:10:26 -0500, Phil Hobbs
pcdhSpamMeSensel...@electrooptical.net> wrote:

On 3/9/2010 9:59 AM, Jim Thompson wrote:
On Mon, 08 Mar 2010 21:42:22 -0800,
"JosephKK"<quiettechb...@yahoo.com>  wrote:

On Mon, 08 Mar 2010 09:25:15 -0700, Jim Thompson<To-Email-Use-The-Envelope-I...@My-Web-Site.com>  wrote:

On Mon, 08 Mar 2010 00:01:44 -0800, Muzaffer Kal<k...@dspia.com
wrote:

On Sun, 07 Mar 2010 23:11:20 -0800,
"JosephKK"<quiettechb...@yahoo.com>  wrote:

On Sat, 6 Mar 2010 20:21:10 -0800, D from BC<myrealaddr...@comic.com>  wrote:

In article<4b9324ee.4432...@news.tpg.com.au>, rontan...@esterbrook.com
says...
On Sun, 7 Mar 2010 14:31:48 +1100, "Phil Allison"<phi...@tpg.com.au
wrote:

"Harold Larsen"
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,

**  Sorry  -   that is  WRONG .

A triangle wave contains only odd harmonics too.

http://en.wikipedia.org/wiki/Triangle_wave

A "sawtooth" wave contains all integer harmonics.

OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .

I have not seen that method applied or described anywhere, but it
makes a fair approximation, at least to my eye.

Harold Larsen

This reminds of the XR2206 chip that makes square, triangle and sine
using analog technology.
Sure enough, as does the ICL8038.  Part of the question is how it is done.
The datasheet athttp://www.intersil.com/data/FN/FN2864.pdfhas a
pretty good schematic and explanation which  shows how it's done..
Yep.  "Piecewise-Linear", aka break-point analysis... taught in better
engineering schools ;-)

                                        ...Jim Thompson
I first saw it in a synchro to digital converter about 1973.  I had to think
hard for a while before i "got" it.
The only place I can remember using it in an actual product was for
linearizing a flat-face CRT sweep (RADAR)... and there it was
piecewise _curve_ fitting.

                                         ...Jim Thompson
Breakpoint amps are nearly always a crutch.  One poor guy I tried to
help (15 years back) ignored my advice and wound up with a multi-diode
breakpoint amp stuck inside a crystal oven to keep the breakpoints from
going all over the place with temperature.  Blech.  (It was in a fancy
measurement system, too.  Got all sorts of industry awards.)

The Widlar approach (National AN4, Figure Cool uses BJT saturation to make
nice sharp breakpoints that don't drift much.  Of course you have to
wait for the transistor to come out of saturation.

About the only good use of breakpoint amps I've seen is inside
complicated FB loops, e.g. to approximately correct for the nonlinearity
of VCOs and heaters.  This reduces the variation of loop gain and so
makes frequency compensation easier.  Drift and inaccuracy are not a big
problem in those sorts of applications.

Cheers

Phil Hobbs

Ah, yes!  Thanks for the reminder!  I also linearized a frequency
hopping VCO for OmniSpectra _many_ years ago... for jumping close to
desired frequency, so the PLL lock was faster... a cavity beast :-)

I would never use _just_ diodes, rather use them with OpAmps or
comparators, such as...

http://analog-innovations.com/SED/ClampForLarkin.pdf

(A Christmas gift, 2007. But he remains a cranky old git :-)

http://analog-innovations.com/SED/LevelDetectAndFollow-LM339.pdf

http://analog-innovations.com/SED/LevelDetectAndFollow-TL431.pdf

http://analog-innovations.com/SED/PerfectDiodeForChargerIsolation.pdf

                                        ...Jim Thompson

The first schematic looks like the start of a decent guitar fuzzbox
pedal!  I think one could set more breakpoints with different slopes by
using more comparators with the breakpoint voltage on the non inverting
inputs and putting resistors in series with the diodes, right?

Back before guitar practice amps with DSP became commodity hardware,
Peavey had a patented technology called "TransTube" that purported to
make a solid state amp have a tone more like a tube amp.  I wonder if
they used a similar piecewise linear technique to make the amp have a
softer clipping characteristic.

At lowish frequencies, you can do this:

---------------------------------------/\/\---+----Out
! !
+-----------------/\/\----+-/\/\---+---/\/\----+
! ! ! !
! --!-\ ! !
In ---+--------!+\ ! >-- !
! >---+--/\/\--+---!+/ !
--!-/ ! ! !
! ! ---/\/\--GND !
GND--/\/\--+--/\/\---+------------------------/\/\--

With rail to rail op-amps, you can get a total of 6 knees from Vee to
Vcc in the output
swing.

MooseFET
Guest

Wed Mar 10, 2010 8:41 am   



On Mar 9, 9:38 pm, "JosephKK"<quiettechb...@yahoo.com> wrote:
Quote:
On Tue, 9 Mar 2010 06:35:44 -0800 (PST), MooseFET <kensm...@rahul.net> wrote:
On Mar 9, 12:22 am, Fred Bartoli <myname_with_a_dot_inbetw...@free.fr
wrote:
MooseFET a écrit :

On Mar 8, 8:28 am, "Tim Williams" <tmoran...@charter.net> wrote:
"MooseFET" <kensm...@rahul.net> wrote in message

news:c968f0a3-64bc-46e1-8a14-7b36a8e75d0f_at_b9g2000pri.googlegroups.com...

If you use a quad comparator, you can do some interesting stuff.  With
just 2 more comparators, you can make this:
   ------            ------
---      ---      ---      ---
            ------
I recollect something from Don Lancaster about Magic Sinewaves and how you
can get arbitrarily low harmonics from certain optimal patterns of on and
off, given sufficiently accurate timing, and I suppose some sort of
filtering.  I never did figure out if it's supposed to be a tristate
waveform (as above)

The waveform I drew can be made by simply adding two pulse trains
with
different duty cycles.  The fact that 3 time 60 degrees is 180 degrees
is how you can get the 3rd harmonic to go away.

If you use more steps, you can get the first N harmonics to drop to
zero.  The same is true for line segments instead of steps.

Which is nothing more than the analog variant of a transversal filter
that you can build from a divider, a shift register and a few weighted
summing resistors.

It is the same idea but in this case, it is made from a triangle wave
which we have to start with instead of needing to make a higher
frequency
first.

--
Thanks,
Fred.

Just to be off the wall, what is the integral of a triangle wave?
How about the second and third integrals?

Each time you integrate, the segment between switching points becomes
a higher power of X.

Square wave X^0
Triangle wave X^1
?????? wave X^2
Cubic wave X^3

Don Klipstein
Guest

Wed Mar 10, 2010 8:43 am   



In article <AvOdnWKo1Yb_vwrWnZ2dnUVZ_u6dnZ2d_at_earthlink.com>, Bitrex wrote:
Quote:
Jim Thompson wrote:

<SNIP to here>

Quote:
Ah, yes! Thanks for the reminder! I also linearized a frequency
hopping VCO for OmniSpectra _many_ years ago... for jumping close to
desired frequency, so the PLL lock was faster... a cavity beast :-)

I would never use _just_ diodes, rather use them with OpAmps or
comparators, such as...

http://analog-innovations.com/SED/ClampForLarkin.pdf

(A Christmas gift, 2007. But he remains a cranky old git :-)

http://analog-innovations.com/SED/LevelDetectAndFollow-LM339.pdf

http://analog-innovations.com/SED/LevelDetectAndFollow-TL431.pdf

http://analog-innovations.com/SED/PerfectDiodeForChargerIsolation.pdf

...Jim Thompson

The first schematic looks like the start of a decent guitar fuzzbox
pedal! I think one could set more breakpoints with different slopes by
using more comparators with the breakpoint voltage on the non inverting
inputs and putting resistors in series with the diodes, right?

Back before guitar practice amps with DSP became commodity hardware,
Peavey had a patented technology called "TransTube" that purported to
make a solid state amp have a tone more like a tube amp. I wonder if
they used a similar piecewise linear technique to make the amp have a
softer clipping characteristic.

A little over a decade ago, I worked along with 2 partners on what we
hoped would be a patentable significant on an "electric guitar fuzzbox".
As in able to get a patent for improvement over prior art in US patents
by Pittman and Scholz (sp).

"Our" device received rave reviews where we showed it off.

"We" abandoned the project after determining that "we" could make a
majority as much money working at entry level at a big-name fast-food
restaurant as "we" could getting this device manufactured and selling it,
even should (unlikely) sales volume get the cost of patenting it to be
negligible-per-unit, let alone battling whoever tries their hand at
infringing "our patent" in a case likely costing upper 10's of kilobucks
to hundreds of kilobucks (I can't rule out megabucks) in a court battle.

One of "us" (we 3) even schmoozed the likely examiner of the
prospective patent application to extent of hearing from the likely
examiner that a patent would likely be granted.

This "improved fuzzbox" never went to any actually filed patent
application. It was since published on the web, at least significantly
where web searching for it or major segments of it are best found by
AND-ing search terms of "LXH2" and either of the 2 major brands of British
electric guitar amplifiers - Fender or Marshall.

- Don Klipstein (don_at_misty.com)

Don Klipstein
Guest

Wed Mar 10, 2010 9:04 am   



In art. <a1cep55fuh2dlo9lc0k9jeu1d1rsp9btaf_at_4ax.com>, JosephKK wrote:

<SNIP a lot of previously quoted material>

Quote:
Just to be off the wall, what is the integral of a triangle wave?
How about the second and third integrals?

Integral of a triangle wave is a "nearly-sinusoid" having periodic
parabolic arches.

This reminds me of a story...

During my 2nd (and successful) attempt to pass "Electronic
Instrumentation Laboratory" course at Drexel U. around 1983-1984 or so,
I had to handle the 10th of 10 weekly "laboratory projects".

That was an "analog computer" that modelled a damped resonant item such
as a "damped pendulum". This used a circuit having two op-amp integrators
with arrangement so as to model K1 * y'' + K2 * y' plus K3 * y = zero.

I was one of only 2 out of 78-or-so students taking that course that
semester who managed to make this thing work. (Not that I did so well or
better most of elsewhere in my attempt for an EE degree...)

I got the circuit to work by recognizing a "parabola arch wave" on an
oscilloscope to be visibly discernable from a sinusoid, and subsequently
setting "initial conditions" short of any of the op-amps clipping.
(The parabolic arch waveform was due to a heavily clipped sinusoid
being integrated twice.) Fixing the clipping issue achieved the
oscillation damping-out rather than growing.

- Don Klipstein (Jr) don_at_misty.com

Bitrex
Guest

Wed Mar 10, 2010 10:50 am   



MooseFET wrote:
Quote:
On Mar 9, 8:36 pm, Bitrex <bit...@de.lete.earthlink.net> wrote:
Jim Thompson wrote:
On Tue, 09 Mar 2010 10:10:26 -0500, Phil Hobbs
pcdhSpamMeSensel...@electrooptical.net> wrote:
On 3/9/2010 9:59 AM, Jim Thompson wrote:
On Mon, 08 Mar 2010 21:42:22 -0800,
"JosephKK"<quiettechb...@yahoo.com> wrote:
On Mon, 08 Mar 2010 09:25:15 -0700, Jim Thompson<To-Email-Use-The-Envelope-I...@My-Web-Site.com> wrote:
On Mon, 08 Mar 2010 00:01:44 -0800, Muzaffer Kal<k...@dspia.com
wrote:
On Sun, 07 Mar 2010 23:11:20 -0800,
"JosephKK"<quiettechb...@yahoo.com> wrote:
On Sat, 6 Mar 2010 20:21:10 -0800, D from BC<myrealaddr...@comic.com> wrote:
In article<4b9324ee.4432...@news.tpg.com.au>, rontan...@esterbrook.com
says...
On Sun, 7 Mar 2010 14:31:48 +1100, "Phil Allison"<phi...@tpg.com.au
wrote:
"Harold Larsen"
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,
** Sorry - that is WRONG .
A triangle wave contains only odd harmonics too.
http://en.wikipedia.org/wiki/Triangle_wave
A "sawtooth" wave contains all integer harmonics.
OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .
I have not seen that method applied or described anywhere, but it
makes a fair approximation, at least to my eye.
Harold Larsen
This reminds of the XR2206 chip that makes square, triangle and sine
using analog technology.
Sure enough, as does the ICL8038. Part of the question is how it is done.
The datasheet athttp://www.intersil.com/data/FN/FN2864.pdfhas a
pretty good schematic and explanation which shows how it's done.
Yep. "Piecewise-Linear", aka break-point analysis... taught in better
engineering schools Wink
...Jim Thompson
I first saw it in a synchro to digital converter about 1973. I had to think
hard for a while before i "got" it.
The only place I can remember using it in an actual product was for
linearizing a flat-face CRT sweep (RADAR)... and there it was
piecewise _curve_ fitting.
...Jim Thompson
Breakpoint amps are nearly always a crutch. One poor guy I tried to
help (15 years back) ignored my advice and wound up with a multi-diode
breakpoint amp stuck inside a crystal oven to keep the breakpoints from
going all over the place with temperature. Blech. (It was in a fancy
measurement system, too. Got all sorts of industry awards.)
The Widlar approach (National AN4, Figure Cool uses BJT saturation to make
nice sharp breakpoints that don't drift much. Of course you have to
wait for the transistor to come out of saturation.
About the only good use of breakpoint amps I've seen is inside
complicated FB loops, e.g. to approximately correct for the nonlinearity
of VCOs and heaters. This reduces the variation of loop gain and so
makes frequency compensation easier. Drift and inaccuracy are not a big
problem in those sorts of applications.
Cheers
Phil Hobbs
Ah, yes! Thanks for the reminder! I also linearized a frequency
hopping VCO for OmniSpectra _many_ years ago... for jumping close to
desired frequency, so the PLL lock was faster... a cavity beast Smile
I would never use _just_ diodes, rather use them with OpAmps or
comparators, such as...
http://analog-innovations.com/SED/ClampForLarkin.pdf
(A Christmas gift, 2007. But he remains a cranky old git Smile
http://analog-innovations.com/SED/LevelDetectAndFollow-LM339.pdf
http://analog-innovations.com/SED/LevelDetectAndFollow-TL431.pdf
http://analog-innovations.com/SED/PerfectDiodeForChargerIsolation.pdf
...Jim Thompson
The first schematic looks like the start of a decent guitar fuzzbox
pedal! I think one could set more breakpoints with different slopes by
using more comparators with the breakpoint voltage on the non inverting
inputs and putting resistors in series with the diodes, right?

Back before guitar practice amps with DSP became commodity hardware,
Peavey had a patented technology called "TransTube" that purported to
make a solid state amp have a tone more like a tube amp. I wonder if
they used a similar piecewise linear technique to make the amp have a
softer clipping characteristic.

At lowish frequencies, you can do this:

---------------------------------------/\/\---+----Out
! !
+-----------------/\/\----+-/\/\---+---/\/\----+
! ! ! !
! --!-\ ! !
In ---+--------!+\ ! >-- !
! >---+--/\/\--+---!+/ !
--!-/ ! ! !
! ! ---/\/\--GND !
GND--/\/\--+--/\/\---+------------------------/\/\--

With rail to rail op-amps, you can get a total of 6 knees from Vee to
Vcc in the output
swing.

I'm having trouble following that circuit - it looks clever, but how
does it work?

Somebody
Guest

Wed Mar 10, 2010 10:56 am   



Quote:
Sure enough, as does the ICL8038.

Avoid this chip like the plague. At the transiition from
one quadrant to the next there is one almighty noise
spike.

Ban
Guest

Wed Mar 10, 2010 1:10 pm   



MooseFET wrote:
Quote:

At lowish frequencies, you can do this:

---------------------------------------/\/\---+----Out
! !
+-----------------/\/\----+-/\/\---+---/\/\----+
! ! ! !
! --!-\ ! !
In ---+--------!+\ ! >-- !
! >---+--/\/\--+---!+/ !
--!-/ ! ! !
! ! ---/\/\--GND !
GND--/\/\--+--/\/\---+------------------------/\/\--

With rail to rail op-amps, you can get a total of 6 knees from Vee to
Vcc in the output
swing.

This is indeed a very cute circuit, in fact I had built something similar,
but with one more opamp.

ciao Ban

Jim Thompson
Guest

Wed Mar 10, 2010 4:18 pm   



On Tue, 09 Mar 2010 21:38:56 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

Quote:
On Tue, 9 Mar 2010 06:35:44 -0800 (PST), MooseFET <kensmith_at_rahul.net> wrote:

On Mar 9, 12:22 am, Fred Bartoli <myname_with_a_dot_inbetw...@free.fr
wrote:
MooseFET a écrit :



On Mar 8, 8:28 am, "Tim Williams" <tmoran...@charter.net> wrote:
"MooseFET" <kensm...@rahul.net> wrote in message

news:c968f0a3-64bc-46e1-8a14-7b36a8e75d0f_at_b9g2000pri.googlegroups.com...

If you use a quad comparator, you can do some interesting stuff.  With
just 2 more comparators, you can make this:
   ------            ------
---      ---      ---      ---
            ------
I recollect something from Don Lancaster about Magic Sinewaves and how you
can get arbitrarily low harmonics from certain optimal patterns of on and
off, given sufficiently accurate timing, and I suppose some sort of
filtering.  I never did figure out if it's supposed to be a tristate
waveform (as above)

The waveform I drew can be made by simply adding two pulse trains
with
different duty cycles.  The fact that 3 time 60 degrees is 180 degrees
is how you can get the 3rd harmonic to go away.

If you use more steps, you can get the first N harmonics to drop to
zero.  The same is true for line segments instead of steps.

Which is nothing more than the analog variant of a transversal filter
that you can build from a divider, a shift register and a few weighted
summing resistors.

It is the same idea but in this case, it is made from a triangle wave
which we have to start with instead of needing to make a higher
frequency
first.



--
Thanks,
Fred.

Just to be off the wall, what is the integral of a triangle wave?
How about the second and third integrals?

Gradually becomes sine, though smaller and smaller amplitude. I've
used such a scheme over small frequency ranges... in an ASIC, of
course, where parts are cheap Smile

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

The only thing bipartisan in this country is hypocrisy

Jim Thompson
Guest

Wed Mar 10, 2010 4:20 pm   



On Tue, 09 Mar 2010 23:36:12 -0500, Bitrex
<bitrex_at_de.lete.earthlink.net> wrote:

Quote:
Jim Thompson wrote:
On Tue, 09 Mar 2010 10:10:26 -0500, Phil Hobbs
pcdhSpamMeSenseless_at_electrooptical.net> wrote:

On 3/9/2010 9:59 AM, Jim Thompson wrote:
On Mon, 08 Mar 2010 21:42:22 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Mon, 08 Mar 2010 09:25:15 -0700, Jim Thompson<To-Email-Use-The-Envelope-Icon_at_My-Web-Site.com> wrote:

On Mon, 08 Mar 2010 00:01:44 -0800, Muzaffer Kal<kal_at_dspia.com
wrote:

On Sun, 07 Mar 2010 23:11:20 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Sat, 6 Mar 2010 20:21:10 -0800, D from BC<myrealaddress_at_comic.com> wrote:

In article<4b9324ee.4432562_at_news.tpg.com.au>, rontanner_at_esterbrook.com
says...
On Sun, 7 Mar 2010 14:31:48 +1100, "Phil Allison"<phil_a_at_tpg.com.au
wrote:

"Harold Larsen"
If a squarewave contains all odd harmonics of the fundamental
frequency, and a triangle all even,

** Sorry - that is WRONG .

A triangle wave contains only odd harmonics too.

http://en.wikipedia.org/wiki/Triangle_wave

A "sawtooth" wave contains all integer harmonics.

OK thanks for the pull-up, but how about using a triangle-square wave
mix, in place of a filter, to simulate a sinewave .

I have not seen that method applied or described anywhere, but it
makes a fair approximation, at least to my eye.

Harold Larsen

This reminds of the XR2206 chip that makes square, triangle and sine
using analog technology.
Sure enough, as does the ICL8038. Part of the question is how it is done.
The datasheet at http://www.intersil.com/data/FN/FN2864.pdf has a
pretty good schematic and explanation which shows how it's done.
Yep. "Piecewise-Linear", aka break-point analysis... taught in better
engineering schools Wink

...Jim Thompson
I first saw it in a synchro to digital converter about 1973. I had to think
hard for a while before i "got" it.
The only place I can remember using it in an actual product was for
linearizing a flat-face CRT sweep (RADAR)... and there it was
piecewise _curve_ fitting.

...Jim Thompson
Breakpoint amps are nearly always a crutch. One poor guy I tried to
help (15 years back) ignored my advice and wound up with a multi-diode
breakpoint amp stuck inside a crystal oven to keep the breakpoints from
going all over the place with temperature. Blech. (It was in a fancy
measurement system, too. Got all sorts of industry awards.)

The Widlar approach (National AN4, Figure Cool uses BJT saturation to make
nice sharp breakpoints that don't drift much. Of course you have to
wait for the transistor to come out of saturation.

About the only good use of breakpoint amps I've seen is inside
complicated FB loops, e.g. to approximately correct for the nonlinearity
of VCOs and heaters. This reduces the variation of loop gain and so
makes frequency compensation easier. Drift and inaccuracy are not a big
problem in those sorts of applications.

Cheers

Phil Hobbs

Ah, yes! Thanks for the reminder! I also linearized a frequency
hopping VCO for OmniSpectra _many_ years ago... for jumping close to
desired frequency, so the PLL lock was faster... a cavity beast :-)

I would never use _just_ diodes, rather use them with OpAmps or
comparators, such as...

http://analog-innovations.com/SED/ClampForLarkin.pdf

(A Christmas gift, 2007. But he remains a cranky old git :-)

http://analog-innovations.com/SED/LevelDetectAndFollow-LM339.pdf

http://analog-innovations.com/SED/LevelDetectAndFollow-TL431.pdf

http://analog-innovations.com/SED/PerfectDiodeForChargerIsolation.pdf

...Jim Thompson

The first schematic looks like the start of a decent guitar fuzzbox
pedal! I think one could set more breakpoints with different slopes by
using more comparators with the breakpoint voltage on the non inverting
inputs and putting resistors in series with the diodes, right?

Yep, It's the sort of circuit arrangement where you can continue
pretty much forever :-)

Quote:

Back before guitar practice amps with DSP became commodity hardware,
Peavey had a patented technology called "TransTube" that purported to
make a solid state amp have a tone more like a tube amp. I wonder if
they used a similar piecewise linear technique to make the amp have a
softer clipping characteristic.

Possibly.

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

The only thing bipartisan in this country is hypocrisy

Bob Monsen
Guest

Wed Mar 10, 2010 7:13 pm   



"Phil Hobbs" <pcdhSpamMeSenseless_at_electrooptical.net> wrote in message
news:4B96EA4D.9070300_at_electrooptical.net...
Quote:
On 3/9/2010 7:15 PM, whit3rd wrote:
On Mar 8, 6:40 pm, Phil Hobbs<pcdhSpamMeSensel...@electrooptical.net
wrote:

You can do a pretty good job with an LM13700 producing the tanh
shape,
and then subtracting off a small amount of the original triangle wave
to
get rid of the cusps at the peaks.

The transfer characteristics of a BIPOLAR diff pair IS a TANH
function.

See http://electrooptical.net/www/sed/TanhSineShaper.pdf

Whoa! That's brilliant, you should get a patent. Not just for what
it
is, but it REMOVES THE AUTOCORRELATION glitch.
It follows, from the Wiener-Hopf theorem, that the crude XR2206 style
diode shaping will now be VERY effective; if your triangle
wave is accurate enough, and your summation really takes
out the cusp, then the crude diode-array trim can get you
much further, to -80 dB or better.

The low level of high harmonic content in F-space looks nice, but it
doesn't do justice to the full glory of the scheme, in the context of
building a sinewave generator on a chip. Tanh and diodes are
easy, so are triangles. Getting the coefficients accurate enough
on the summation might want trimmed resistors, but that can
be done on-chip, too.


Thanks, but I very much doubt that I'm the first one to think of it. Works
great though.

Cheers

Phil Hobbs


Very similar to the Gilbert sine shaper. It uses the fact that the tanh
function's maclauren series is similar to the sin maclauren series

sin x = x - x^3/3! + x^5/5! - ...
tanh x = x - x^3/3 + 2x^5/15 - 17x^7/315...

so by summing the result of tanh x + tanh x/a - tanh -x/a you end up with a
result that is closer to the sin,
assuming you only use the values generated by the range -PI/2 to PI/2.

Here is an LTSpice simulation that implements it. No idea how well it works
over temp ranges etc.

Regards,
Bob Monsen

Version 4
SHEET 1 1320 680
WIRE -384 -224 -576 -224
WIRE 176 -224 -384 -224
WIRE 320 -224 176 -224
WIRE 832 -224 320 -224
WIRE -384 -208 -384 -224
WIRE 176 -208 176 -224
WIRE 320 -208 320 -224
WIRE 832 -208 832 -224
WIRE -384 -112 -384 -128
WIRE 176 -112 176 -128
WIRE 320 -112 320 -128
WIRE 832 -112 832 -128
WIRE 112 -64 -320 -64
WIRE 768 -64 384 -64
WIRE -576 -48 -576 -224
WIRE 112 -16 112 -64
WIRE 176 -16 112 -16
WIRE 384 -16 384 -64
WIRE 384 -16 320 -16
WIRE 176 16 176 -16
WIRE 176 16 -16 16
WIRE 688 16 176 16
WIRE -384 32 -384 -16
WIRE 832 32 832 -16
WIRE 320 48 320 -16
WIRE 320 48 -160 48
WIRE 544 48 320 48
WIRE -160 80 -160 48
WIRE -16 80 -16 16
WIRE 176 80 176 16
WIRE 320 80 320 48
WIRE 544 80 544 48
WIRE 688 80 688 16
WIRE -224 128 -272 128
WIRE 64 128 48 128
WIRE 400 128 384 128
WIRE 480 128 464 128
WIRE 768 128 752 128
WIRE -576 160 -576 32
WIRE -272 160 -272 128
WIRE 464 160 464 128
WIRE -80 176 -160 176
WIRE -16 176 -80 176
WIRE 240 176 176 176
WIRE 320 176 240 176
WIRE 624 176 544 176
WIRE 688 176 624 176
WIRE 944 176 944 16
WIRE -576 192 -576 160
WIRE -528 192 -576 192
WIRE -320 192 -448 192
WIRE 64 192 64 128
WIRE 64 192 -320 192
WIRE 400 192 400 128
WIRE 400 192 64 192
WIRE 768 192 768 128
WIRE 768 192 400 192
WIRE -384 208 -384 32
WIRE -80 208 -80 176
WIRE 240 208 240 176
WIRE 624 208 624 176
WIRE 832 208 832 32
WIRE -576 224 -576 192
WIRE -272 256 -272 240
WIRE 464 256 464 240
WIRE -576 320 -576 304
WIRE -384 320 -384 288
WIRE -384 320 -576 320
WIRE -80 320 -80 288
WIRE -80 320 -384 320
WIRE 240 320 240 288
WIRE 240 320 -80 320
WIRE 624 320 624 288
WIRE 624 320 240 320
WIRE 832 320 832 288
WIRE 832 320 624 320
WIRE 944 320 944 256
WIRE 944 320 832 320
FLAG 112 128 0
FLAG -576 160 0
FLAG -320 192 c
FLAG -384 32 a
FLAG 832 32 b
FLAG 944 16 out
FLAG -272 256 0
FLAG 464 256 0
SYMBOL npn 384 80 M0
SYMATTR InstName Q3
SYMBOL npn 112 80 R0
SYMATTR InstName Q4
SYMBOL current 240 208 R0
SYMATTR InstName I2
SYMATTR Value 50µ
SYMBOL voltage -576 208 R0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL voltage -576 -64 R0
SYMATTR InstName V2
SYMATTR Value 5
SYMBOL voltage -432 192 R90
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 24 104 Invisible 0
SYMATTR InstName Vtri
SYMATTR Value PULSE({-Va} {Va} 0 .5 .5 0 1)
SYMBOL npn 480 80 R0
SYMATTR InstName Q1
SYMBOL npn 752 80 M0
SYMATTR InstName Q2
SYMBOL current 624 208 R0
SYMATTR InstName I1
SYMATTR Value 50µ
SYMBOL npn -224 80 R0
SYMATTR InstName Q5
SYMBOL npn 48 80 M0
SYMATTR InstName Q6
SYMBOL current -80 208 R0
SYMATTR InstName I3
SYMATTR Value 50µ
SYMBOL pnp 112 -16 M180
SYMATTR InstName Q7
SYMBOL pnp -320 -16 R180
SYMATTR InstName Q8
SYMBOL res 160 -224 R0
SYMATTR InstName R1
SYMATTR Value 10
SYMBOL res -400 -224 R0
SYMATTR InstName R2
SYMATTR Value 10
SYMBOL pnp 384 -16 R180
SYMATTR InstName Q9
SYMBOL pnp 768 -16 M180
SYMATTR InstName Q10
SYMBOL res 336 -224 M0
SYMATTR InstName R3
SYMATTR Value 10
SYMBOL res 848 -224 M0
SYMATTR InstName R4
SYMATTR Value 10
SYMBOL res 816 192 R0
SYMATTR InstName R5
SYMATTR Value 100k
SYMBOL res -400 192 R0
SYMATTR InstName R6
SYMATTR Value 100k
SYMBOL bv 944 160 R0
SYMATTR InstName B1
SYMATTR Value V={5+V(a)-V(b)}
SYMBOL voltage -272 144 R0
SYMATTR InstName V3
SYMATTR Value {E}
SYMBOL voltage 464 144 R0
SYMATTR InstName V4
SYMATTR Value {-E}
TEXT 72 384 Left 0 !.tran 0 100 0 500u
TEXT -432 352 Left 0 ;Barrie Gilbert's Sine Shaper
TEXT 960 48 Left 0 !.four 1 v(out) 10
TEXT 440 376 Left 0 !.param E=100m
TEXT 232 376 Left 0 !.param Va 50m
TEXT -528 392 Left 0 ;I1 - I2 = I * 2 *
exp(-Vt*PI*PI/2/E)*sin(PI*Va/(N-1)/E)\nN = number of pairs, Va amplitude of
triangle, E amplitude of correction.
TEXT -376 0 Left 0 ;I1
TEXT 840 -8 Left 0 ;I2

JosephKK
Guest

Wed Mar 10, 2010 10:00 pm   



On Wed, 10 Mar 2010 09:56:55 -0000, "Somebody" <why.do.you.want_at_to.know.invalid> wrote:

Quote:
Sure enough, as does the ICL8038.

Avoid this chip like the plague. At the transiition from
one quadrant to the next there is one almighty noise
spike.


Dude, the chip was new maybe 40 years ago and quite obsolete. Is
someone wildcatting poor work alikes out there?

JosephKK
Guest

Wed Mar 10, 2010 10:09 pm   



On Wed, 10 Mar 2010 08:18:25 -0700, Jim Thompson <To-Email-Use-The-Envelope-Icon_at_My-Web-Site.com> wrote:

Quote:
On Tue, 09 Mar 2010 21:38:56 -0800,
"JosephKK"<quiettechblue_at_yahoo.com> wrote:

On Tue, 9 Mar 2010 06:35:44 -0800 (PST), MooseFET <kensmith_at_rahul.net> wrote:

On Mar 9, 12:22 am, Fred Bartoli <myname_with_a_dot_inbetw...@free.fr
wrote:
MooseFET a écrit :



On Mar 8, 8:28 am, "Tim Williams" <tmoran...@charter.net> wrote:
"MooseFET" <kensm...@rahul.net> wrote in message

news:c968f0a3-64bc-46e1-8a14-7b36a8e75d0f_at_b9g2000pri.googlegroups.com....

If you use a quad comparator, you can do some interesting stuff.  With
just 2 more comparators, you can make this:
   ------            ------
---      ---      ---      ---
            ------
I recollect something from Don Lancaster about Magic Sinewaves and how you
can get arbitrarily low harmonics from certain optimal patterns of on and
off, given sufficiently accurate timing, and I suppose some sort of
filtering.  I never did figure out if it's supposed to be a tristate
waveform (as above)

The waveform I drew can be made by simply adding two pulse trains
with
different duty cycles.  The fact that 3 time 60 degrees is 180 degrees
is how you can get the 3rd harmonic to go away.

If you use more steps, you can get the first N harmonics to drop to
zero.  The same is true for line segments instead of steps.

Which is nothing more than the analog variant of a transversal filter
that you can build from a divider, a shift register and a few weighted
summing resistors.

It is the same idea but in this case, it is made from a triangle wave
which we have to start with instead of needing to make a higher
frequency
first.



--
Thanks,
Fred.

Just to be off the wall, what is the integral of a triangle wave?
How about the second and third integrals?

Gradually becomes sine, though smaller and smaller amplitude. I've
used such a scheme over small frequency ranges... in an ASIC, of
course, where parts are cheap Smile

...Jim Thompson

That is what integrating the Fourier series term by term tells us.

whit3rd
Guest

Wed Mar 10, 2010 11:47 pm   



On Mar 9, 9:38 pm, "JosephKK"<quiettechb...@yahoo.com> wrote:

Quote:
Just to be off the wall, what is the integral of a triangle wave?
How about the second and third integrals?

To close the loop and make an oscillator, using a square wave
from a Schmitt trigger, one can use one stage of integration
(to a triangle wave) or three, but not two. Two stages
gets to a double-parabola, three stages to a double-cubic.
The double-cubic has its small pointy defect at the crest
as does the triangle wave.

The three-stage thing is called a phase shift oscillator if you make
it without the Schmitt trigger part.

Alas, those all require multiple-gang variable resistors instead of a
single knob to adjust. Have you ever priced a good three-gang
pot? Or capacitor, for that matter?

Tim Williams
Guest

Thu Mar 11, 2010 12:58 am   



"JosephKK" <quiettechblue_at_yahoo.com> wrote in message
news:kf2gp5deumuuqu0i2lr175n3c5bdnn5mk7_at_4ax.com...
Quote:
That is what integrating the Fourier series term by term tells us.

Or quite simply, when you stack up n integrators, you get 20*n dB/decade
attenuation for frequencies away from fT. For convinience, set your
integrators' fTs to the fundamental.

I suppose you could do the same with differentiators if you had a lot of LF
noise on your signal too (or wanted to bandpass to a harmonic).

Of course, n differentiators and integrators, with the same fT (actually,
with any fT, as long as the total has the desired gain at the peak), is an
excellent description of a particularly narrow bandpass filter. As n -->
infty, you get a delta response, so the circuit's impulse response is a
sinewave, regardless of past or present state. It's an oscillator!

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms

Goto page Previous  1, 2, 3, 4, 5, 6  Next

elektroda.net NewsGroups Forum Index - Electronics Design - Square + triangle = sine (almost)

Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
RTV map EDAboard.com map News map EDAboard.eu map EDAboard.de map EDAboard.co.uk map Opony