From: Jon Kirwan on
On Sun, 7 Feb 2010 16:10:14 +0530, "pimpom"
<pimpom(a)invalid.invalid> wrote:

>Jon Kirwan wrote:
>> On Sat, 06 Feb 2010 10:48:16 -0800, John Larkin
>> <jjlarkin(a)highNOTlandTHIStechnologyPART.com> wrote:
>>
>>>
>>> A few percent distortion at power levels is essentially
>>> inaudible.
>>> Speakers do that already. Low-level crossover distortion is
>>> obvious
>>> and obnoxious.
>>
>> Yes, I think that's now much clearer to me now than it was
>> say two weeks ago -- without needing my ears to say so. Just
>> on understanding better _what_ crossover distortion is and
>> does.
>>
>Jon, to see a graphical illustration of JL's point, see this
>screenshot of some simple simulations I just ran:
>http://img694.imageshack.us/img694/8967/crossoverdistortion.png

One of the really nice things about imagining mathematical
functions in my own head is that I actually _saw_ this,
already. Exactly as it shows, in fact. The way I approached
it in my head was to realize that the gain effectively goes
to near zero around the zero-volt output area with the
crossover issue in play. I also realize that while it may
not go to zero in other cases where the bias is more usefully
set up, it will droop a little just the same. So it's not
far to go from there to those graphs.

By the way, I'd _also_ imagined the idea of driving the
center of the diode pair, rather than jacking up and slugging
around one side or the other. And I liked seeing that
schematic idea being applied in your PNG.

>On the right, the complementary output stage is driven without
>any bias, . The upper trace shows the output when the input
>amplitude is +/-1V peak. The transistors are operating in Class C
>and manage to conduct for less than half of each half cycle. Now
>that's going to sound awful by any standard. I _know_ it sounds
>awful because, when I was doing a lot of repairing work on
>consumer products in the 80s, I came across some amps whose
>biasing circuit had developed a fault.

Just as a note, you only include the output stage, which is
effectively a bipolar emitter follower. So your input
amplitude of +-1V peak is after any input stage and VAS. But
I get the point. It is noticeable, especially when the VAS
output peak is approaching the 1V level. Which, if I'm
gathering things okay may very well be the case more
especially for low-wattage amplifiers where that is more
nearly always the case.

>Do a Fourier analysis and you'll get lots of harmonics. Reduce
>the input amplitude even further and there won't be any output at
>all below a certain amplitude.

Yes, I can _see_ that.

>The lower trace shows the output with +/-9V input. Crossover
>distortion is much reduced, though still evident. This may or may
>not be acceptable depending on the application. For anything that
>needs good audio quality, any waveform distortion that can be
>clearly seen in graphical form is still too high, especially in a
>low-resolution bitmap trace like this.

I have to believe you've made this subject so crystal clear
that anyone reading this thread must now understand it, if
not before.

>On the left, we have the same amp with diode biasing added.
>Visible distortion of the waveshape has disappeared. The slight
>irregularities in the sinusoidal shape are due to limitations of
>the low-res, non-antialiased bitmap image.

Neatly illustrated with clarity. Not only that, but even the
modification to the schematics is done, parsimoniously, which
aids understanding. The bias resistors are added in the
latter case, because of course they are needed. But no more
is required to make the point. I really like that approach
to teaching -- keeping the basics in view and simplifying,
but not oversimplifying. Cleanly handled.

Jon
From: Jon Kirwan on
On Sun, 7 Feb 2010 19:28:34 +0530, "pimpom"
<pimpom(a)invalid.invalid> wrote:

>Correction: I interchanged left and right parts of the image in
>my description. Sorry.

I had no problem following your points.

Jon
From: pimpom on
Jon Kirwan wrote:
> On Sun, 7 Feb 2010 16:10:14 +0530, "pimpom"
> <pimpom(a)invalid.invalid> wrote:
>
>> Jon Kirwan wrote:
>>> On Sat, 06 Feb 2010 10:48:16 -0800, John Larkin
>>> <jjlarkin(a)highNOTlandTHIStechnologyPART.com> wrote:
>>>
>>>>
>>>> A few percent distortion at power levels is essentially
>>>> inaudible.
>>>> Speakers do that already. Low-level crossover distortion is
>>>> obvious
>>>> and obnoxious.
>>>
>>> Yes, I think that's now much clearer to me now than it was
>>> say two weeks ago -- without needing my ears to say so. Just
>>> on understanding better _what_ crossover distortion is and
>>> does.
>>>
>> Jon, to see a graphical illustration of JL's point, see this
>> screenshot of some simple simulations I just ran:
>> http://img694.imageshack.us/img694/8967/crossoverdistortion.png
>
> One of the really nice things about imagining mathematical
> functions in my own head is that I actually _saw_ this,
> already. Exactly as it shows, in fact. The way I approached
> it in my head was to realize that the gain effectively goes
> to near zero around the zero-volt output area with the
> crossover issue in play. I also realize that while it may
> not go to zero in other cases where the bias is more usefully
> set up, it will droop a little just the same. So it's not
> far to go from there to those graphs.
>

In my late teens almost 40 years ago, during the only time I ever
worked under someone else, my boss in a research lab once asked
me why I kept doing calculations in my head when I could use a
calculator. I said that it helps keep my brain sharp and also
lets me visualise the outcome even before I arrive at the final
figures. I do also use pen and paper, and a calculator for
complex sequences. But it's only very recently that I've started
using a calculator (mostly Windows' scientific calculator) for
routine work.

That said, I think it's also a good idea not to rely too much on
mental imaging. We do sometimes make mistakes, and what we
visualise may not at all be what actually happens.

In a way, I kind of miss the old days when the average EE and
tech didn't have access to computer simulation. Back then, when I
designed a tube amp for instance, I drew a load line on the tube
characteristics curves and marked the outputs for as many grid
voltages as possible. Then I plotted the input-output curve on a
separate graph paper, chose an operating point and marked the
appropriate points for a Fourier analysis of harmonics expected
without feedback.

I was less diligent with transistors because I felt that the much
wider tolerances made such a procedure less worthwhile.

> By the way, I'd _also_ imagined the idea of driving the
> center of the diode pair, rather than jacking up and slugging
> around one side or the other. And I liked seeing that
> schematic idea being applied in your PNG.

That was for the purpose of illustration with a symmetrical
drive. It's less convenient with a practical design that includes
all the other associated circuits.

>
>> On the right, the complementary output stage is driven without
>> any bias, . The upper trace shows the output when the input
>> amplitude is +/-1V peak. The transistors are operating in
>> Class C
>> and manage to conduct for less than half of each half cycle.
>> Now
>> that's going to sound awful by any standard. I _know_ it
>> sounds
>> awful because, when I was doing a lot of repairing work on
>> consumer products in the 80s, I came across some amps whose
>> biasing circuit had developed a fault.
>
> Just as a note, you only include the output stage, which is
> effectively a bipolar emitter follower. So your input
> amplitude of +-1V peak is after any input stage and VAS. But
> I get the point. It is noticeable, especially when the VAS
> output peak is approaching the 1V level. Which, if I'm
> gathering things okay may very well be the case more
> especially for low-wattage amplifiers where that is more
> nearly always the case.

The output stage is an emitter-follower in most designs.


From: Jon Kirwan on
On Mon, 8 Feb 2010 02:53:51 +0530, "pimpom"
<pimpom(a)invalid.invalid> wrote:

>Jon Kirwan wrote:
>> On Sun, 7 Feb 2010 16:10:14 +0530, "pimpom"
>> <pimpom(a)invalid.invalid> wrote:
>>
>>> Jon Kirwan wrote:
>>>> On Sat, 06 Feb 2010 10:48:16 -0800, John Larkin
>>>> <jjlarkin(a)highNOTlandTHIStechnologyPART.com> wrote:
>>>>
>>>>>
>>>>> A few percent distortion at power levels is essentially
>>>>> inaudible.
>>>>> Speakers do that already. Low-level crossover distortion is
>>>>> obvious
>>>>> and obnoxious.
>>>>
>>>> Yes, I think that's now much clearer to me now than it was
>>>> say two weeks ago -- without needing my ears to say so. Just
>>>> on understanding better _what_ crossover distortion is and
>>>> does.
>>>>
>>> Jon, to see a graphical illustration of JL's point, see this
>>> screenshot of some simple simulations I just ran:
>>> http://img694.imageshack.us/img694/8967/crossoverdistortion.png
>>
>> One of the really nice things about imagining mathematical
>> functions in my own head is that I actually _saw_ this,
>> already. Exactly as it shows, in fact. The way I approached
>> it in my head was to realize that the gain effectively goes
>> to near zero around the zero-volt output area with the
>> crossover issue in play. I also realize that while it may
>> not go to zero in other cases where the bias is more usefully
>> set up, it will droop a little just the same. So it's not
>> far to go from there to those graphs.
>
>In my late teens almost 40 years ago, during the only time I ever
>worked under someone else,

You sound a LOT like me... age and work history... unless I'm
projecting too much. I'm 54 now and I've been self-employed
almost my entire adult life.

>my boss in a research lab once asked
>me why I kept doing calculations in my head when I could use a
>calculator. I said that it helps keep my brain sharp and also
>lets me visualise the outcome even before I arrive at the final
>figures. I do also use pen and paper, and a calculator for
>complex sequences. But it's only very recently that I've started
>using a calculator (mostly Windows' scientific calculator) for
>routine work.

I feel comfortable with what you just wrote.

>That said, I think it's also a good idea not to rely too much on
>mental imaging. We do sometimes make mistakes, and what we
>visualise may not at all be what actually happens.

The way I think about this, in agreeing, is that in our minds
it is far, far too easy to over-simplify the world around us
to the point of serious distortion if not wild inaccuracy.
When I _think_ about "building a house" there are so many
things that do NOT enter my thinking, so of course it seems
easier than it actually is to get right. (I'm using that
example because I recently forced myself to do just that for
my son, doing __all__ of the work myself including digging
the foundation, testing soils, leveling the surrounding area,
designing and placing foundation forms, rebar work and
clamps, designing and verifying quality of cement mixes, and
so on, all the way to doing the overall design for 3' snow
loads and 80 MPH side wind loads on the broadest side, for a
gambrel roof, balloon-framed two story.) When you put hands
to reality, you find yourself faced with far, far more than
your brain was able to hold in one spot at one time long
enough to figure things.

I suppose all this relates to the widely told, apocryphal
story that we cannot hold more than 3-7 concepts in mind at
one time. We simplify to think. We hope we don't over
simplify, but there's a phrase, "reality impinges," which
captures what happens when we do over-simplify.

>In a way, I kind of miss the old days when the average EE and
>tech didn't have access to computer simulation. Back then, when I
>designed a tube amp for instance, I drew a load line on the tube
>characteristics curves and marked the outputs for as many grid
>voltages as possible. Then I plotted the input-output curve on a
>separate graph paper, chose an operating point and marked the
>appropriate points for a Fourier analysis of harmonics expected
>without feedback.

I've used load lines for self-imposed homework. So I think I
know some of what you mean. Of course, I haven't designed
any realistic amplifier systems. So it goes only so far with
me. However, I very much liked the visualization it affords.

>I was less diligent with transistors because I felt that the much
>wider tolerances made such a procedure less worthwhile.

I considered trying that with BJTs, too, after having applied
my "homework" for tubes. But none of my books really went
that direction and so I left the idea and tried to follow
what _was_ being taught. By the way, the thing that really
lost me with tubes (and I was studying them as a teenager,
not since) was computing the grid leak resistor. I never did
find a satisfactory explanation to me, because no reference I
had access to back then helped me gain a quantitative
estimate of the grid current so I was left without knowing
how to compute a resistor value. I haven't returned to that
to fix that error in my understanding. I still imagine today
that it was a hit-and-miss affair, starting with values in
the 200k range and tinkering around from there.

>> By the way, I'd _also_ imagined the idea of driving the
>> center of the diode pair, rather than jacking up and slugging
>> around one side or the other. And I liked seeing that
>> schematic idea being applied in your PNG.
>
>That was for the purpose of illustration with a symmetrical
>drive. It's less convenient with a practical design that includes
>all the other associated circuits.

It was nicely handled for the purpose.

>>> On the right, the complementary output stage is driven without
>>> any bias, . The upper trace shows the output when the input
>>> amplitude is +/-1V peak. The transistors are operating in
>>> Class C
>>> and manage to conduct for less than half of each half cycle.
>>> Now
>>> that's going to sound awful by any standard. I _know_ it
>>> sounds
>>> awful because, when I was doing a lot of repairing work on
>>> consumer products in the 80s, I came across some amps whose
>>> biasing circuit had developed a fault.
>>
>> Just as a note, you only include the output stage, which is
>> effectively a bipolar emitter follower. So your input
>> amplitude of +-1V peak is after any input stage and VAS. But
>> I get the point. It is noticeable, especially when the VAS
>> output peak is approaching the 1V level. Which, if I'm
>> gathering things okay may very well be the case more
>> especially for low-wattage amplifiers where that is more
>> nearly always the case.
>
>The output stage is an emitter-follower in most designs.

Yes. I also considered the idea of using current mirrors on
both rails at the output _before_ I started this thread, not
knowing what someone might suggest and just stretching my
imagination along different lines. But I figure on leaving
such thoughts to the very end.

....

You triggered something in writing, "In a way, I kind of miss
the old days when the average EE and tech didn't have access
to computer simulation." Me, too. In the case of computer
software, where I specialize, the advent of cheap debuggers
has led, I think, to becoming intellectually "flabby" there.

I have watched as professional programmers "hack" their way
to solving bad code design, placing in if..else conditions in
what almost seems random locations to fix up design errors
rather than going back and crafting an appropriate design.
Debuggers _enable_ sloppy thinking, by making it more
successful to apply.

Having calculators and computers ever at the ready for "brute
force" analysis, while important in well-educated hands
because these tools _will_ be knowledgebly applied then, in
the hands of those lacking deeper understandings they can
lead to a false sense of confidence and, penultimately,
disasterous results.

Also, imagination can be developed and trained and that does
NOT happen when you are asking some program to do your work.
Daily exercise is important, here.

However, you also counter your own suggestion shortly later
by saying, "That said, I think it's also a good idea not to
rely too much on mental imaging." On this point, I can add:

Sloppy thinking also means that even excellent tools are
misapplied, ignorant of what is going on. A case in point
relates to an area I care about, which is the computation of
slopes of exponential decays. The k in Ae^(-kt)+C equation.
When taking measurements, there is noise. Most folks just
"linearize" the data and use a bog standard least squares on
the result. However, while equal treatment of the noise on
individual data points in the linear domain is assumed by the
usual lsq fit algorithm, it turns out that equal treatment of
the noise in the log domain is inappropriate to the problem
at hand and the method needs to be modified in a very
specific way to properly account for noise after the log has
been applied to the raw data.

It takes a clear __imagination__, and good understanding of
mathematics and the boundary conditions for its many tools,
to recognize the need to investigate further and to develop
an appropriate algorithm. So one cannot discount that need,
either.

A failure to _imagine_ is also what takes place when you try
and apply the usual standard deviation calculation using the
floating point system. Often, the computer programmer does
become aware of the dual-summation variety of it, but is
completely _unaware_ of the fact such variety of calculating
standard deviations takes, in the end, the difference between
two large, and similar values, sometimes leaving only a very
few bits of precision in the result. A failure to _imagine_
here could mean a calculation that carries significant
inaccuracy and, if relied upon for some automated process,
could result in occasional and unpredictable failures. A
solution would be to presort, before computing the sums, so
that smaller values have a chance to accumulate into middle
sized values before being truncated in the sum.

To cap this off, I recently discovered a way to self
calibrate gain and offset by using a _feature_ of the
measurement system projected into a particular mathematical
manifold. Without mathematical imagination skills, I can
assure you that no practitioner would have the chance of a
snowball in hades of uncovering the technique through
obseration and circuit experiments.

The point here is that imagination, while often unable to
fully account all the details of complex processes, also is
vitally important to use and exercise and not ignore. Just
like neither theory nor observation can ignore each other, I
suppose.

Saying all this reminds me of some lost arts, for which I'm
sure you can add piles to my own. I'll provide one beauty I
love, that has been "lost" to programmers and remains alive
in this one brain and, it seems, few others' -- conversion of
octal to decimal and back again. I wrote about this in
..basics back in 2003. Might be good to unearth it.

CONVERSION OF DECIMAL TO OCTAL

(0) Prefix the number with "0." Be sure to include
the radix point. It's an important marker.

(1) Double the value to the left side of the radix,
using octal rules, move the radix point one digit
rightward, and then place this doubled value
underneath the current value so that the radix
points align.

(2) If the moved radix point crosses over a digit
that is 8 or 9, convert it to 0 or 1 and add
the carry to the next leftward digit of the
current value.

(3) Add octally those digits to the left of the radix
and simply drop down those digits to the right,
without modification.

(4) If digits remain to the right of the radix, goto 1.

CONVERSION OF OCTAL TO DECIMAL

(0) Prefix the number with "0." Be sure to include
the radix point. It's an important marker.

(1) Double the value to the left side of the radix,
using decimal rules, move the radix point one digit
rightward, and then place this doubled value
underneath the current value so that the radix
points align.

(2) Subtract decimally those digits to the left of
the radix and simply drop down those digits to
the right, without modification.

(3) If digits remain to the right of the radix, goto 1.

For example,

0.4 9 1 8 decimal value
+0
---------
4.9 1 8
+1 0
--------
6 1.1 8
+1 4 2
--------
7 5 3.8
+1 7 2 6
--------
1 1 4 6 6. octal value

Let's convert it back:

0.1 1 4 6 6 octal value
-0
-----------
1.1 4 6 6
- 2
----------
9.4 6 6
- 1 8
----------
7 6.6 6
- 1 5 2
----------
6 1 4.6
- 1 2 2 8
----------
4 9 1 8. decimal value

There's also a very interesting way to visualize the _shape_
of the dynamics of systems that leads to better understanding
that I've never seen or read about anywhere, but which I've
uncovered through practice and trying to teach to high school
students without the use of calculus. When I showed the idea
to a physics teacher at the local high school, and started to
erase the chalk board, he stopped me. He said he needed to
keep it there and think about it more. So I left it.

I'd be happy to discuss the concept. But the point isn't
that discussion, but that imagination _is_ important. It's
just not the _only_ important thing. We need to develop it
continually and that is part of why I like to use things I
find an interest in (amplifier design, for example) as an
excuse to _also_ visualize and exercise thoughts. I'm not
merely trying to build an amplifier some day, though I want
to do that, too. I'm staying mentally in shape, while also
learning something, and at some point trying my hand building
it. It's all of a piece, I guess.

And I cannot express just how wonderful it is to have folks
to talk with like this. I _am_ learning to think better and
better also about practical details, too. But the discussion
is also just plain pleasant. As a hobbyist, it's very hard
to find it with local neighbors, you know? Community college
may immerse me and allow me some of this kind of talk, but it
also requires a regular pace that one cannot always afford
while taking care of a family, too.

Jon
From: Jon Kirwan on
On Fri, 05 Feb 2010 17:06:54 -0800, I wrote:

>On Fri, 05 Feb 2010 16:46:22 -0800, I wrote:
>
>><snip>
>>I tracked down a very nice transformer in my box which may be
>>okay. It has two secondaries and was intended for 60Hz use.
>>It weighs in at 2.8 lbs (1.25 kg.)
>>
>> Primary:
>> 115VAC, 5.0 Ohms, 16 gauge
>> Secondaries: (Tested using 120.5VAC RMS on primary)
>> 16VAC RMS CT, 0.05 Ohms, 14 gauge
>> 30.4VAC RMS CT, 2.6 ohms, 22 gauge
>>
>>The 16VAC RMS outer winding across a 56 ohm resistor yields
>>15.88VAC RMS. (I don't have a large wattage resistor with
>>lower values of resistance, so that needs to suffice.) Half
>>of the 30.4VAC RMS winding (CT to one side) yields 14.75VAC
>>RMS loaded with the same 56 ohm resistor. Across the entire
>>30.4VAC windings it is 28.9VAC RMS. (The poor thing is just
>>a 5W, so I didn't measure for longer than a few seconds.)
>>
>>The 30.4VAC secondary looks reasonable, I think, for the two
>>amplifier rails and ground. The 16VAC might make another
>>supply for some other reason or, perhaps, provide another
>>pair of rails to use for a 2 ohm speaker?
>>
>>I hadn't thought about that aspect, but as you earlier
>>pointed out the 25.2VAC CT standard transformer might be a
>>little light for a 10W amplifier... unless I spec'd a 4 ohm
>>speaker, I suppose. Then it might be fine.
>>
>>Anyway, it looks like it may be a reasonable choice as
>>something I have available and ready from the junk box.
>
>Second thoughts. The 30.4VAC RMS CT secondary shows 2.6 ohms
>and is 22 gauge. That's 1.3 ohms per half. I believe from
>calculation that the peak diode current _might_ be 8-10 times
>the load current in the ideal case (0 ohms.) Taking into
>account the winding resistance, I may need to think more
>closely about using this transformer in this application. The
>winding resistance will limit the current and thus the energy
>per unit time that can be transferred to the caps and that
>will very likely lower the achievable rail voltage on the
>other side of the bridge since the bridge itself simply won't
>ever see the idealized peak voltage even right up to the
>moment of peak where the dv/dt goes to zero. By the time
>that happens, the cycle will already be on a decline again
>while the resistance continues to limit inflow of charge.
>Cripes.
>
>Darn it. Back to monster caps to get a slight decent rail
>voltage there.
>
>Jon

An addition or two. The transformer mentioned above uses 18
gauge, not 16 gauge, for the primary. And since I'm still
wrestling with why there are 5 ohms, measured, I think it's
likely that is merely the wiring to the outside and that
perhaps even smaller diameter wire was used to wrap around
the core. So externally labeled gauge probably is NOT a
precise indication of what was used in the core.

I took a look at the weight of some similarly shaped 60Hz
power transformers, available from Stancor. It seems that
similar weights are on the order of 80 VA. (I've seen a few
rated 100 VA, but I'm betting less.)

For now, I'll assume that transformer is too small, not
because of my guessed-at VA rating but because of the
measured resistance in the 30.4VAC secondary.

I want to get back to the power supply design and finish
that.

I understant that at 10W, the 8 ohm speaker will experience
sqrt(2*10W*8 ohms) or 12.65Vrms and 1.58Arms. I could always
modify this to fit what I have available but rather than do
that, I think it's better to "stay on target" and see where
that goes.

So that's what is expected "at the speaker." The peak figure
required will be rounded up to 18V. To reach that peak, the
output BJTs will need some headroom of their own. Staying
out of saturation and assuming the output stage might use two
BJTs on either side, requiring perhaps two diode drops if
either of these quadrants uses both NPN or both PNP, I would
best figure another 4V of headroom on each side. So 22V
minimum there, __under load.__

And I begin to see why 25V isn't a bad target.

Which brings in the question about a linear regulator. It's
my vague feeling that there is NO need for one. I should be
able to arrange the circuity (current sources, etc.) so that
they are sufficiently immune to modest ripple that the 60Hz
(and other components due to loading causing cap voltage
changes, as well) can be rejected well enough. Besides, a
linear regulator would mean just that much more headroom and
wasted power/heat. So unless something very difficult is
shown to me, I'd like to take the position that a linear
regulator is a lot extra trouble without worthwhile payback.
(And dealing with the added poles/zeros would seem to make my
worries compounded, as if the rest weren't enough.)

The filter capacitors will probably have to be spec'd at 50V
given what I've read here. It seems 35V wouldn't be entirely
safe, given the comments about regulation at 15% and another
7% margin, as well. And something else that is bothering me.
Charging only takes place for short bursts and happen
_before_ the windings reach peak voltage. So there is a
small duty cycle during which usable energy is transferred.
Does this suggest that one might _under specify_ the VA
rating for the transformer to save cost and weight and get
away with it?

Jon