Searching \ for 'logarithmic ladder attenuators (slightly off toPIC' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'logarithmic ladder attenuators (slightly off toPIC'.

Truncated match.
PICList Thread
'logarithmic ladder attenuators (slightly off toPIC'
1998\05\07@063413 by Jon Nicoll

flavicon
face
Hello all
       I'm thinking about making an attenuator ('volume control') for a
hifi preamp. I don't want to use semiconductor devices for this, and am
considering using a PIC and network of relays and resistors to get the
appropriate range of attenuation. Messy, perhaps, but you know what
these hi-fi types are like ;-)

I know about R-2R ladder networks, but as you know the necessary 'law'
for the ear is logarithmic. So depending on the actual arrangment I use,
(eg. a standard pot. arrangement, or a fixed series resistor and
variable 'shunt' to ground) I actually need a log or anti-log law.

I've puzzled over appropriate ways of doing this using the minimum
number of relays & resistors. The 'logDAC' type semiconnductor devices
seem to use a large R-2R ladder (like, 17 element pairs), giving 2^17
possible settings, and then internally choosing a much smaller set to
give the appropriate law. This seems a bit excessive in terms of relays
even for me! (I'm looking for around 30 discrete attenuation steps)

There is clearly room for experimentating with variation on the 'R-2R'
ladder, to change the law from linear. I'm a bit rusty in this area
however, and I'm not sure if what I'm after can be done. Can anyone
offer me any advice in choosing the resistor ratios, or point me to
references in this area?

Thanks for any help.

       Regards
       jon N

1998\05\07@090857 by Keith Howell

flavicon
face
Jon Nicoll wrote:
>
> I'm thinking about making an attenuator ('volume control') for a hifi preamp.
> I don't want to use semiconductor devices for this, and am
> considering using a PIC and network of relays and resistors to get the
> appropriate range of attenuation. Messy, perhaps, but you know what
> these hi-fi types are like ;-)

Check out the Crystal Semiconductor's CS3310. -95.5 to +4.5 dB range.
60 dB = 1:1,000,000.           (ratio of faintest audible to ear damge?)
100 dB = 1:10,000,000,000       (more than you'll need?)

To pick values off an R-2R DAC, you'd need about 2^34 linear steps.
So I doubt this is what they do.

Assuming you want stereo, you will need to have a pair of attenuators
matched to audiophile demands.

I'm told a simple good-quality pot adds less noise than an attenuator chip,
but you have problems and expense getting matched ones. They don't stay
matched, they wear out, etc. You could try getting a PIC to self-calibrate
a pair of stepper-controlled pots, and receive RC5 commands.

Electronics is not the main destroyer of sound fidelity.
Its the plain old mechanical speakers!

Cheers, Keith.

BTW, we make audiophile hi-fi here! :-)
Quick plug: check out our Alpha 10 amplifiers.
They grabbed a lot of stars in the magazine reviews.

1998\05\07@115537 by Scott Newell

flavicon
face
>appropriate range of attenuation. Messy, perhaps, but you know what
>these hi-fi types are like ;-)

Yep.


>I've puzzled over appropriate ways of doing this using the minimum
>number of relays & resistors. The 'logDAC' type semiconnductor devices
>seem to use a large R-2R ladder (like, 17 element pairs), giving 2^17
>possible settings, and then internally choosing a much smaller set to
>give the appropriate law. This seems a bit excessive in terms of relays
>even for me! (I'm looking for around 30 discrete attenuation steps)

How about something other than a R-2R network?  I've also had plans for a
stereo attenuator, but I wanted to have a binary weighted (in dB) network
of relays and resistors.  You could use 6 DPDT relays for each channel and
have 64 steps, so that would cover 64 dB in 1 dB steps.  (I was thinking
more like 128 dB in 0.5dB steps, but that's only 'cause I've got lots o'
surplus relays ;-)  I haven't built it yet--draw your own conclusions.)

I got the idea for the networks from none other than a Tektronix 'scope
book.  Each stage of the attenuator network (L pad, I think you'd call it)
must have the same input impedance, so you can simply string them together,
using the relays to completely bypass the unwanted stages.

Of course to be really correct, you'd also want to ac compensate the
attenuator stages, much like the scope attenuators.  Might not be a problem
with audio, at least not on the low and moderate attenuation stages.

Each stage of the attenuator would require one DPDT relay and at least two
resistors.  Unlike the R-2R networks, these resistor values are not
standard, and there won't be any in common among the stages.  Some values
might have to be series / parallel combos of 1% values if you wanted to be
really precise about it.  (Remember, you not only have to get the ratio
correct, but the series impedance needs to be fixed as well.  Makes
trimming tricky.)

I can't recall for sure, but I may have written a little program to
calculate the required resistor values for each stage, and it may have
calculated the max error at each setting for different resistor tolerances.


newell

1998\05\07@181234 by Dennis Plunkett

flavicon
face
At 11:22 AM 7/05/98 +0100, you wrote:
{Quote hidden}

Use a Dallas serial LOG pot!

1998\05\07@194608 by Mike Keitz

picon face
On Fri, 8 May 1998 08:13:06 +1000 Dennis Plunkett
<spam_OUTdennisTakeThisOuTspamRDD.NECA.NEC.COM.AU> writes:
>At 11:22 AM 7/05/98 +0100, you wrote:
>>Hello all
>>        I'm thinking about making an attenuator ('volume control')
>for a
>>hifi preamp. I don't want to use semiconductor devices for this
[...]

You could use the standard "Pi" or "Tee" attenuator networks used in RF
work.  A relay would either switch each attenuator in or bypass it.  With
attenuators for 1, 2, 4, 8, etc. dB then the overall attenuation could
vary from 0 to 2^(n-1) dB.  For each stage you need 3 resistors and a
DPDT relay.  You can also buy multi-stage attenuators already built, but
they have a 50 ohm impedance and are expensive.  One nice feature of this
sort of setup is the input and output impedances are constant regardless
of the attenuation setting.  This is essential for most RF circuits and
unnecessary for most audio circuits.  But it may help sell it to the
"hi-fi types."

Another configuration with resistors to ground could save on resistors
and require only single-pole relays instead of double.  But you'll still
need at least N relays for 2^N attenuation steps.  Because the impedance
of the common node, and thus the effect of each resistor, keeps changing,
such a network is more complicated to analyze.  If you play with it for a
while, soem sort of general rule should emerge.  It may not be possible
to have all the attenuation steps evenly spaced.  This will not be
noticeable to the user as long as the attenuation increases by about the
same amount for consecutive steps.

>
>Use a Dallas serial LOG pot!

Exactly the answer the original poster has already removed from
consideration, due to the peculiar demands of the "hi-fi" set.  Using a
semiconductor switch in the signal path can and does produce distortion,
but with some of the newer parts such a small degree that no one would
notice it.  There are many people who think they can notice it though.

Actually, relays can cause distortion (and lots of it) too, if the
contacts become oxidixed.  It may be good to provide a way to switch a
small DC current through the relays once in a while to burn off any
tarnishing of them.  Reed relays should be better for this sort of thing.
Keep the impedance in the attenuator network fairly low so the
capacitance of the open relays doesn't affect it.

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\05\07@195647 by Sean Breheny

face picon face
At 06:52 PM 5/7/98 -0400, you wrote:
>On Fri, 8 May 1998 08:13:06 +1000 Dennis Plunkett
><.....dennisKILLspamspam@spam@RDD.NECA.NEC.COM.AU> writes:
>>At 11:22 AM 7/05/98 +0100, you wrote:
>>>Hello all
>>>        I'm thinking about making an attenuator ('volume control')
>>for a
>>>hifi preamp. I don't want to use semiconductor devices for this
>[...]
>
>You could use the standard "Pi" or "Tee" attenuator networks used in RF
>work.  A relay would either switch each attenuator in or bypass it.  With
>attenuators for 1, 2, 4, 8, etc. dB then the overall attenuation could
>vary from 0 to 2^(n-1) dB.  For each stage you need 3 resistors and a
>DPDT relay.  You can also buy multi-stage attenuators already built, but
>they have a 50 ohm impedance and are expensive.  One nice feature of this
>sort of setup is the input and output impedances are constant regardless
>of the attenuation setting.  This is essential for most RF circuits and
>unnecessary for most audio circuits.  But it may help sell it to the
>"hi-fi types."

I may not be seeing something here, but why don't you just use a stepper
motor connected to a log pot? It is much more cumbersome than the digital
log pot, but it requires less power, board space, and cost than N relays
for 2^N steps.

Sean


+--------------------------------+
| Sean Breheny                   |
| Amateur Radio Callsign: KA3YXM |
| Electrical Engineering Student |
+--------------------------------+
Save lives, please look at
http://www.all.org

Personal page: http://www.people.cornell.edu/pages/shb7
shb7spamKILLspamcornell.edu
Phone(USA): (607) 253-0315

1998\05\07@211353 by Scott Newell

flavicon
face
>I may not be seeing something here, but why don't you just use a stepper
>motor connected to a log pot? It is much more cumbersome than the digital
>log pot, but it requires less power, board space, and cost than N relays
>for 2^N steps.

Don't be so sure.  One of the popular 'high-end' pots is the Penny & Giles
(sp?), and it isn't cheaper than 32 relays, a handful of resistors, and a
handful of transistors.

One big problem with inexpensive log pots is interchannel tracking, so you
hear the soundstage shift back and forth as you turn the knob.

And if you're doing a balanced circuit, you need a pricey, hard to find 4
element unit...


newell

1998\05\08@043051 by Frank A. Vorstenbosch

flavicon
face
Mike Keitz wrote:
>
> >Use a Dallas serial LOG pot!
>
> Exactly the answer the original poster has already removed from
> consideration, due to the peculiar demands of the "hi-fi" set.  Using a
> semiconductor switch in the signal path can and does produce distortion,
> but with some of the newer parts such a small degree that no one would
> notice it.  There are many people who think they can notice it though.

How about having relays AND a Dallas log pot?  Use the IC for the audio
path, and have your PIC control the relays at the same time as setting
the
pot.  The relays would therefore give 'audio feedback' to the hiphilite.
The relays should probably be mounted on the PCB in such a way as to
maximize the clicking sound level outside of the box, and also in a way
that looks as if it is really involved in switching the audio to anyone
opening the box 'just to have a look'.

Frank
------------------------------------------------------------------------
Frank A. Vorstenbosch     <SPAM_ACCEPT="NONE">    Phone: 0181 - 636 3000
Electronics and Software Engineer                 Mobile: 0976 - 430 569
Eidos Technologies Ltd., Wimbledon, London        Email: .....favKILLspamspam.....eidos.co.uk

1998\05\08@043054 by Jon Nicoll

flavicon
face
Hi Mike (mainly)
       Thanks for your reply.

> You could use the standard "Pi" or "Tee" attenuator networks used in
> RF
> work.  A relay would either switch each attenuator in or bypass it.
> With
> attenuators for 1, 2, 4, 8, etc. dB then the overall attenuation could
> vary from 0 to 2^(n-1) dB.  For each stage you need 3 resistors and a
> DPDT relay.  You can also buy multi-stage attenuators already built,
> but
> they have a 50 ohm impedance and are expensive.  One nice feature of
> this
> sort of setup is the input and output impedances are constant
> regardless
> of the attenuation setting.  This is essential for most RF circuits
> and
> unnecessary for most audio circuits.  But it may help sell it to the
> "hi-fi types."
>
Yeah, my concern with this method is that you end up with concatenating
quite a few relay contacts and resistors, in series with the signal
path, for any given attenuation. I'm still considering experiemnting
with this though.

{Quote hidden}

This is the arrangment I have been spending most time with. I'm happy to
use, say 5-6 SP relays per channel to get 30 or so steps. But as you
say, the analysis of such networks is complicated! The R-2R network is
easy, but only due to a peculiarity of the Thevenin equivalent. I was
wondering if there were references or people with experience out there
with a more general form of this cct.

> >
> >Use a Dallas serial LOG pot!
>
> Exactly the answer the original poster has already removed from
> consideration, due to the peculiar demands of the "hi-fi" set.
>
Thanks for spotting this! ;-)

       [...]

> Actually, relays can cause distortion (and lots of it) too, if the
> contacts become oxidixed.  It may be good to provide a way to switch a
> small DC current through the relays once in a while to burn off any
> tarnishing of them.  Reed relays should be better for this sort of
> thing.
>  Keep the impedance in the attenuator network fairly low so the
> capacitance of the open relays doesn't affect it.
>
point taken. I have some high quality SIL relays in mind for this, but
they are not available in DPDT versions, another reason for the network
I was thinking of. Using a PIC I guess I could have a special 'burn-off'
mode ;-)...

Sean Breheny writes:

       I may not be seeing something here, but why don't you just use a
stepper
       motor connected to a log pot? It is much more cumbersome than
the digital
       log pot, but it requires less power, board space, and cost than
N relays
       for 2^N steps.

The main reason is that I don't want a pot. From a hifi point of view, a
proper switched attenuator is FAR superior to the (high quality) pots I
have tried. One thing that _is_ feasible, is a stepper motor connected
to my rotary switch. I'd probably need some sort of opto-mechanical
feedback as well, and it does start to get more cumbersome - but on the
other hand having your volume knob turn as you press the buttons on your
IR remote would be a gas...

Thanks for your suggestions.

       jon N

1998\05\08@050703 by Andrew Warren

face
flavicon
face
Jon Nicoll <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU> wrote:

> I'm thinking about making an attenuator ('volume control') for a
> hifi preamp. I don't want to use semiconductor devices for this,
> and am considering using a PIC and network of relays and resistors
> ....
> I know about R-2R ladder networks, but as you know the necessary
> 'law' for the ear is logarithmic. So depending on the actual
> arrangment I use, (eg. a standard pot. arrangement, or a fixed
> series resistor and variable 'shunt' to ground) I actually need a
> log or anti-log law.

Jon:

I had the same problem a few years ago... On our way to building the
best-sounding preamp in the world, my client and I considered about
twenty different volume-control designs.

None were completely satisfying -- and my client went out of business
after building fewer than fifty units, so the solution that I
eventually DID come up with was never put into production -- but
maybe my experience will help you to design a volume control that's a
good compromise for your application.

There were four basic types of volume controls that we tried:

   #1: The "Big Mojo" Rotary Switch
   --------------------------------

   This was a pair of stepped attenuators, hand-built from two
   100-position rotary switches, four custom PC boards, and 800
   precision resistors, and driven by a pair of stepper motors.

   The thing was SERIOUSLY expensive... The switches cost about
   $100 each, and the pair of attenuators contained about $300 worth
   of resistors.  It sounded real good, of course, but we had
   serious packaging problems -- the switch assemblies were HUGE --
   and we were never able to find stepper motors with enough torque
   and precision to really make it reliable.

   #2: SHAWIACC
   ------------

   We worked on this one for a while... It was basically what you're
   cosidering:  A series of N (or slightly more than N) relays, each
   controlling a voltage-divider, giving N^2 volume steps.

   It took us a long time to discover the right arrangement of
   resistors, but once we did, it sounded fine... Until the volume
   knob was turned.

   At that point, the thing would make a TREMENDOUS racket as
   dozens of relays frantically clicked on and off.  Worse, there
   were big volume spikes whenever we reached one of the power-of-2
   steps in the volume sequence... One relay would switch from "off"
   to "on", and all the lower-order relays would switch from "on" to
   "off".  Since they all switched at slightly different rates,
   there would sometimes be NO attenuation for a few milliseconds,
   and you'd hear loud pops from the speakers.

   One of our British engineers summed it up perfectly:

   "It sounds," he said, "like a skeleton having a wank in a coffee
   can."

   #3: The Ridiculously-Expensive Potentiometer
   --------------------------------------------

   ALPS makes a great-sounding quad potentiometer.  It costs
   Twenty-Five Hundred American Dollars.  Our preamp was to be
   priced at "only" $17,500, so we couldn't afford it.

   #4: Forty Million Cheap-Ass Integrated Amps Can't Be Wrong
   ----------------------------------------------------------

   Don't tell anyone, but we were so frustrated at one point that
   we built a volume control out of four Dallas Semi digital pots.

   We were stunned to discover that it actually sounded good (at
   least, it sounded good once we found the RIGHT Dallas parts).

   However, there were three big problems with them:

       1.  Although the attenuation steps APPROXIMATE the graph
           shown in the data book, they don't EXACTLY follow it.

       2.  The chips aren't precisely matched to each other.

       3.  At low volume levels, the steps are too large.

   We eventually solved -- more or less -- these problems, but the
   solution came at the expense of VERY complicated software and
   awkward hardware.  Not ideal.

If I were you, I'd do one of the following:

1.  Spend some time thinking about how to implement the
   relays-and-resistors volume control.  If you can't came up with
   a better way, use 2N relays, then select (with the aid of a
   computer program that you can run overnight) 2^N more-or-less
   equally-spaced steps out of the 2^2N possibilities.

2.  Pay me a few thousand dollars, and I'll tell you how to do the
   relays-and-resistors thing with a minimum of relays and without
   the problems that I described above.

3.  Use a pair of Shallco or Sonic Frontiers ladder attenuaters;
   32-step dual-mono versions of the Shallco cost about $400
   apiece, and the dual-mono Sonic Frontiers attenuators (which,
   unfortunately, only have 24 2-dB steps) cost around $185 apiece.

4.  Use a single ladder attenuator and a separate balance control.

5.  Buy a bunch of Dallas digital pots and hand-select two pairs
   that are closely matched.  Handle your left-to-right balance by
   stepping each pair individually.

   To solve the "steps are too large at low volume levels" problem,
   add an external pair of fixed attenuators that'll cut the volume
   of each channel by a few-dozen dB, then write software to switch
   those attenuators in (and step the digital pots up to
   compensate) at low volume levels.

   Be prepared to spend a lot of time trying to keep the soundstage
   stable when the volume control is lowered into the
   fixed-attenuator range while the balance control is engaged.

6.  Talk to Keith Dowsett <kdowsettspamspam_OUTRPMS.AC.UK> about the following,
   which he wrote in response to a related question posed here on
   the list by Steve Hardy:

       recently someone asked if it was possible to use the fact
       that PIC pins can be tri-stated to produce a different kind
       of DAC. (Using ideal components of coures.)  The answer is
       that it requires an inverting op-amp with the +ve input at
       Vsupply/2.

       If you then use a R-3R-9R-27R network to sink and source
       current it is possible to get a reasonably linear response.
       (depending on how little current the tri-state input sinks)
       Each output can occupy three states Hi,Lo, or Tri. Here are
       the first few codes. Generating the remainder is left as an
       exercise for the three-fingered student from Sirius.

       [cut]

       It's probably not worth generating these codes from scratch,
       just use an 81 byte lookup table with one nibble containing
       the Port bits and the other the Tris bits.

-Andy

P.S.  Although they mean well, ignore anyone who suggests using
     solid-state amplifier/attenuator chips with internal
     op-amps... Those things sound AWFUL.

=== Andrew Warren - @spam@fastfwdKILLspamspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499 (personal)
=== http://www.netcom.com/~fastfwd (business)

1998\05\08@112233 by Mike Keitz

picon face
On Fri, 8 May 1998 02:05:41 -0800 Andrew Warren <KILLspamfastfwdKILLspamspamIX.NETCOM.COM>
writes:
>Jon Nicoll <RemoveMEPICLISTTakeThisOuTspamMITVMA.MIT.EDU> wrote:
>
>> I'm thinking about making an attenuator ('volume control') for a
>> hifi preamp.
>Jon:
>
>I had the same problem a few years ago... On our way to building the
>best-sounding preamp in the world, my client and I considered about
>twenty different volume-control designs.

Thanks to Andrew for contributing his experiences on exactly this
problem.  It appears that two major complications crop up in practical
application:

* Matching two attenuators for stereo use.
* Preventing transisent improper attenuations in "binary tree of relays"
designs.

First on matching two attenuators.  For designs with lots of steps such
as pots turned by motors or digital pots with extra range, automatic
matching could be implemented.  Audiophiles hate the notions of feedback
and automation.  But it could work really well here without degrading
sound quality.

The general principle is that after adjusting the volume, inject a test
signal into the input of both attenuators and compare the levels of the
test signal after the output.  Then adjust the attenuators until they are
matched.  Once balance is achieved, the test source and analyzer would be
disconnected by relays so that full fidelity is restored until the next
volume adjustment.  Ideally the test signal would be in the audio band,
but then it has to be completely removed from the preamp output to
prevent it from being heard.  Using a sine-wave signal somewhere around
30 KHz should work since audiophile attenuators will process this
frequency the same as other audio frequencies.  Audiophile power
amplifiers will too, so a notch filter would still be needed to trap the
test signal out.  The filter would only be in line during a measurement.

It seems like the simplest design would be to inject an in-phase signal
to one channel and a 180 degree out of phase signal to the other.  At the
attenuator output, a summing network would produce zero if the
attenuators are balanced.  The summed output goes to a phase/level
detector, which indicates the direction/amount to adjust the attenuators
respectively.  Minaimally, only a phase detector that detects in phase or
out of phase as a digital output would be needed.  One attenuator or the
other would adjust up or down until the point where the detector output
switches over.  At this time, the attenuators are matched, and the
measurement circuit would be de-activated.  Again, once the balance has
been adjusted, relays would completely remove the automatic circuitry
from the audio path.

The summing node could be deliberately mis-matched by the user to cause
the autobalance network to put a deliberate unbalance in the attenuators
(the "balance" control).  Since this control is not in the audio path,
any sort of pot or digital pot would work.  It may be necessary to use
several levels of test signal depending on the approximate attenuation.
This would keep the level at the detector (for a given amount of
unbalance) relatively constant.  The test signal attenuator need not be
precise if it is in the highly recommended position of before the phase
splitter.

Several modes of operation could be provided, for example balance after
every adjustment, balance on demand, or (in most cases, if the
attenuators can be set repeatedly) look up a previously determined
calibration value.  The calibration values could be stored in an EEPROM.
The user could take the amplifier out of service once in a while and
request a re-mesurement to generate the calibration table with no signal
passing through so that the automeasure circuit is not disturbed.


Now for the other problem of transients in relay attenuators.  Andrew
said they sound great, other than when changing the volume.  It seems
like the simplest solution would be to place an inexpensive but
smooth-changing parallel "bypass" attenuator in the signal path while the
relays are changing.  The bypass attenuator would maintain smooth changes
in level, though at lower fidelity, while the user is turning the volume
control.  After the volume is adjusted, the relay attenuator would be set
for the corresponding level and switched back in.  This would also save
noise and wear on the relays since they wouldn't need to switch at all
until the user has decided on the volume setting.  Switching could occur
a few seconds after the last change in the volume.

The autocalibration technique described above could be used to match the
bypass attenuators to the relay attenuators, giving nearly seamless
changing from one to the other.  A front panel switch (for thouse
audiophiles who like a lot of front panel switches, many don't), could
even be used to keep the bypass attenuator in line all the time (like
maybe when the kids are using the system, or to prove its inferiority,
etc.)

----------
And now for something different:

{Quote hidden}

To expand on the description, such a converter is current operated.  The
current through each resistor is either +Vdd/2R, -Vdd/2R, or zero.  The
op-amp sums all the currents and converts them to a voltage.  It is
helpful to think in terms of conductance rather than resistance.

For low-precision work, it is acceptable to load the output into a low
impedance to Vdd/2 (resistor to Vdd, resistor to Vss, both considerably
smaller than the converter resistors) and consider it a small voltage.
Also, a section of a CD4069UB CMOS inverter is effectively modeled as "an
op amp with the + input connected to Vdd/2."  The input impedance is very
high, but the output impedance is quite high too.  Feedback resistors on
the order of a Mohm work well.  You get 6 in each package, with all 6
biased into linear operation the chip will still use less than 10 mA
(though maybe much more at high or low ambient temperature, didn't test
that).  Do not use silicon gate inverters such as 74HC04.  They conduct
too strongly and use a lot of supply current.  Also they have much higher
open loop gain and frequency response and are hard to keep from
oscillating.




_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\05\08@125441 by Jon Nicoll

flavicon
face
A couple of thoughts:

> Now for the other problem of transients in relay attenuators.  Andrew
> said they sound great, other than when changing the volume.  It seems
> like the simplest solution would be to place an inexpensive but
> smooth-changing parallel "bypass" attenuator in the signal path while
> the
> relays are changing.  The bypass attenuator would maintain smooth
> changes
> in level, though at lower fidelity, while the user is turning the
> volume
> control.  After the volume is adjusted, the relay attenuator would be
> set
> for the corresponding level and switched back in.  This would also
> save
> noise and wear on the relays since they wouldn't need to switch at all
> until the user has decided on the volume setting.  Switching could
> occur
> a few seconds after the last change in the volume.
>
Using a rotary encoder for the input sensor, one could do all sorts of
things. I wondered about only changing the attenuation _after_ the user
has finished turning the knob. You could have some bypass attenuation as
you mention, or even a mute switch to momentarily mute the O/P whilst
the relays are changing. The behaviour would be rather different from
what most people expect from a potentiometer, though. I actually
experience this at the moment with my attenuator switch - it's a fixed
series / switched shunt resistor arrangment, and the make-before-break
switch means you get a 'burbling' change in volume. This is very
liveable with, though.

My other thought - Andy confirms a worry I had about the relays all
changing at once, and with differing switching times. My thoughts start
turning to Grey codes, but don't ask me how (yet...)

       jon N

1998\05\08@125729 by Scott Newell

flavicon
face
>    At that point, the thing would make a TREMENDOUS racket as
>    dozens of relays frantically clicked on and off.  Worse, there
>    were big volume spikes whenever we reached one of the power-of-2
>    steps in the volume sequence... One relay would switch from "off"
>    to "on", and all the lower-order relays would switch from "on" to
>    "off".  Since they all switched at slightly different rates,
>    there would sometimes be NO attenuation for a few milliseconds,
>    and you'd hear loud pops from the speakers.

Sound to me like it needed a PIC to sequence the relay break before make
order (or make before break).  Could you not mute (or switch in the maximum
attenuation) first, then move all the other relays to the new setting, and
then unmute?  I guess it wouldn't be very user friendly to have the volume
mute every time you turn the knob...


[snipped discussion of Dallas digital pots]
>    However, there were three big problems with them:

What about maximum input level?  Aren't they picky about high level input
signals that go beyond the power rails, or have they fixed that?  I guess
you could attenuate the input, at some cost in noise.


>1.  Spend some time thinking about how to implement the
>    relays-and-resistors volume control.  If you can't came up with
>    a better way, use 2N relays, then select (with the aid of a
>    computer program that you can run overnight) 2^N more-or-less
>    equally-spaced steps out of the 2^2N possibilities.

I wonder how the newer signal level photorelays (HP, IRF, somebody?) would
work.  I think they're just an optically driven fet, so the switching time
should be minimal, the on-resistance is probably low enough not to be a
problem, and you might even be able to 'fade' them in and out over several
tens of milliseconds, if you wanted.

I bet they aren't cheap.


newell

1998\05\08@172614 by Scientific Measurement Group

flavicon
face
This may sound stupid.  I have not followed the entire discussion so I may
be repeating something, or I may be naive about audiophiles, but did you
consider sending the audio signal through an op amp with a log gain
network?  As far as matching is concerned, that could be achieved by
trimming or perhaps muxing the same op amp between both channels.  I
believe that Burr Brown has some very fast settling time audio amps which
might work.  But it has been a while since I saw the specs and you would
have to review the BB data books.  If the settling time is appreciably
greater than the required response, it may be possible to use the same
device which would solve the matching problem.  Just an off-the-cuff
comment.

1998\05\08@172614 by Scientific Measurement Group

flavicon
face
This may sound stupid.  I have not followed the entire discussion so I may
be repeating something, or I may be naive about audiophiles, but did you
consider sending the audio signal through an op amp with a log gain
network?  As far as matching is concerned, that could be achieved by
trimming or perhaps muxing the same op amp between both channels.  I
believe that Burr Brown has some very fast settling time audio amps which
might work.  But it has been a while since I saw the specs and you would
have to review the BB data books.  If the settling time is appreciably
greater than the required response, it may be possible to use the same
device which would solve the matching problem.  Just an off-the-cuff
comment.

1998\05\08@180229 by Joe Little

flavicon
face
    We did a relay ladder attenuator for a RF application last year.
    Switching glitches were not much concern.... We just waited for the
    relays to settle before we read the levels.  I used a optical encoder
    for the control.
    The first pass at the design had a feature that was a little
    unexpected.  The relays would track commands as fast as the knob would
    turn.  The LSB relay could chatter up to the kilohertz range.  I was
    going to learn a song or two until I read specs on number of switching
    cycles the relays were guaranteed to.  I added an additional timer to
    update the relays from the knob register at a 4 Hz rate.  These day
    jobs just aint no fun.

1998\05\08@180245 by Andrew Warren

face
flavicon
face
Scott Newell <spamBeGonePICLISTspamBeGonespamMITVMA.MIT.EDU> wrote:

> > One relay would switch from "off"
> > to "on", and all the lower-order relays would switch from "on" to
> > "off".  Since they all switched at slightly different rates,
> > there would sometimes be NO attenuation for a few milliseconds,
> > and you'd hear loud pops from the speakers.
>
> Sound to me like it needed a PIC to sequence the relay break before
> make order (or make before break).  Could you not mute (or switch in
> the maximum attenuation) first, then move all the other relays to
> the new setting, and then unmute?

   Scott:

   That was the first thing WE thought of, too... It helped, but it
   didn't COMPLETELY solve the problem, for two reasons:

   1.  Particularly at high volume levels, ANY sharp change in the
       speaker volume (either up OR down) was intrusive and
       annoying.

   2.  I was controlling the relays through a series of relay
       drivers that worked like serial shift registers.  Because it
       took a fairly long time to send out the serial bit stream
       that controlled the relays, the user could actually turn the
       knob faster than the relays could follow it.

       When the knob was turned quickly, there were large
       discontinuous jumps in the output volume, as the relays
       skipped steps trying to keep up with the knob.  This was bad
       enough, but when those big steps were interleaved with short
       periods of silence, the "machine-gun" effect was VERY
       annoying.

   We considered a method that involved separate (i.e., not part of
   our attenuation ladder) voltage dividers that were controlled by
   single relays which could be switched in while the ladder was
   muted and being adjusted.  Those separate dividers would only
   switch in at the power-of-2 steps.

   Unfortunately, the complexity of that solution -- and the
   limitations it presented in terms of the balance control -- made
   it impractical.

> [snipped discussion of Dallas digital pots]
> > However, there were three big problems with them:
>
> What about maximum input level?  Aren't they picky about high level
> input signals that go beyond the power rails, or have they fixed
> that?  I guess you could attenuate the input, at some cost in noise.

   Thankfully, that wasn't an issue in our design.

   -Andy

=== Andrew Warren - TakeThisOuTfastfwdEraseMEspamspam_OUTix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499 (personal)
=== http://www.netcom.com/~fastfwd (business)

1998\05\08@180250 by Andrew Warren

face
flavicon
face
Mike Keitz <RemoveMEPICLISTspamTakeThisOuTMITVMA.MIT.EDU> wrote:

> It appears that two major complications crop up in practical
> application:
>
> Matching two attenuators for stereo use.

   Or FOUR attenuators, if you're building a balanced preamp.

{Quote hidden}

   That's a good idea, but -- at least in our implementation
   -- it had a few problems:

       1.  It's hard to "adjust the attenuators until they are
           matched" if they have fixed one-dB (or so) steps.
           Adding a set of fractional-dB "adjustment" dividers might
           solve this problem in some circuits.

       2.  If the left-to-right balance is implemented by
           deliberately mismatching the left and right attenuators
           (as opposed to having a separate balance control further
           downstream in the circuit), your analyzer would have to
           compensate somehow.

> It seems like the simplest design would be to inject an in-phase
> signal to one channel and a 180 degree out of phase signal to the
> other.  At the attenuator output, a summing network would produce
> zero if the attenuators are balanced.
> ....
> The summing node could be deliberately mis-matched by the user to
> cause the autobalance network to put a deliberate unbalance in the
> attenuators (the "balance" control).

   That solves problem #2.

{Quote hidden}

   We thought about switching-in a digital pot while the volume knob
   was being turned, but -- mostly because, as you mentioned,
   "audiophiles hate the notions of feedback and automation" -- we
   never considered automatically calibrating the two attenuators.

   Therefore, we rejected the idea on the grounds that there'd be
   an "unavoidable" volume change whenever we switched from one
   attenuator to the other.  Even though there'd still be SOME
   variation in volume levels with your solution (due to the fact
   that both attenuators move in discrete, non-continuous steps),
   that variation might not be unpleasant.

   It's a really good idea... I hope Jon Nicoll's paying attention.

   -Andy

=== Andrew Warren - fastfwdEraseMEspam.....ix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499 (personal)
=== http://www.netcom.com/~fastfwd (business)

1998\05\09@012603 by paulb

flavicon
face
Jon Nicoll wrote:

> I'm thinking about making an attenuator ('volume control') for a
> hifi preamp.

 The consensus seems to say use a serial attenuator set.  Two little
tricks may help you.  Firstly, if you can get relays (e.g. reed relays)
which have separate N/O and N/C contacts, then you only need one of
each per channel for a single-ended attenuator.  One contact bridges the
attenuator when switched out of circuit, the other grounds the parallel
leg when in-circuit.

 Secondly, when using your PIC to drive such a system, code it to
switch all new attenuator steps into circuit, wait a few ms, then switch
old attenuator steps out of circuit; for any given step.  This is to
avoid *nasty* transients going from say, 16dB to 15dB with binary steps.

> (I'm looking for around 30 discrete attenuation steps)

 Five relays.

 Cheers,
       Paul B.

1998\05\09@124314 by Mike Keitz

picon face
On Fri, 8 May 1998 13:59:52 -0800 Andrew Warren <EraseMEfastfwdspamIX.NETCOM.COM>
writes:
>Mike Keitz <RemoveMEPICLISTEraseMEspamEraseMEMITVMA.MIT.EDU> wrote:
>
>> It appears that two major complications crop up in practical
>> application:
>>
>> Matching two attenuators for stereo use.
>
>    Or FOUR attenuators, if you're building a balanced preamp.

Wouldn't you want to use balanced attenuators (something like the Pi or
Tee networks, but between the two lines rather than one line to ground)
in that case?  Such an attenuator won't attenuate (unwanted) common mode
signals, but (a) there shouldn't be any in the first place and (b) they
should be highly rejected at the far end.  Using two seperate attenuators
which were inevitably mismatched would turn common mode signals into
differential ones, exactly what you're trying to avoid by using a
balanced circuit.


>
>        1.  It's hard to "adjust the attenuators until they are
>            matched" if they have fixed one-dB (or so) steps.
>            Adding a set of fractional-dB "adjustment" dividers might
>            solve this problem in some circuits.

Right, but it should be possible to build attenuators with large fixed
steps more precisely than small steps because there are fewer resistors,
so more expensive and precise resistors could be used.  I was thinking
mainly of designs with potentiometers turned by motors or of the one with
"coarse" and "fine" digital pots.


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\05\09@185748 by Dennis Plunkett

flavicon
face
I said use a Dallas Log pot for this one. And it was rejected! Humm sounds
like you want very good signal to noise and extramely low distortion is
required. Well as pointed out by others, run the signals through a relay and
watch the THD go wild (Unless you are using fully sheiled relays? So are you
trying to sell this expensive volume knob to audiophiles?
Instead of relays, look at using perhaps some analogue switches!.
As for the distortion that the digial pots offer? Is 0.1% uncompensated too
high? I do wonder what the HIFI manufatures use???????????????????????


Dennis

-=====================================================================-

Dennis Plunkett: Embedded Hardware, Software design
NEC Australia DRMASS
Line Interface cards
TRX software
ISDN interface card
ph 03 9264-3867

-=====================================================================-

1998\05\10@131016 by Mike Keitz

picon face
On Sun, 10 May 1998 09:00:29 +1000 Dennis Plunkett
<RemoveMEdennisspam_OUTspamKILLspamRDD.NECA.NEC.COM.AU> writes:
>I said use a Dallas Log pot for this one. And it was rejected! Humm
>sounds
>like you want very good signal to noise and extramely low distortion
>is
>required.

This project is unique.  Audiophiles care not about numbers, they believe
that equipment performance cannot be measured properly by any of the
standard tests.  Instead, the materials and methods of construction are
critical.  Silicon is often not an acceptabe material.  Therefore *any*
design that includes a semiconductor "log pot" will be rejected because
it includes a semiconductor "log pot".

> I do wonder what the HIFI manufatures use???????????????????????

The equipment, even the more expensive models, found in the "hifi"
section of general and discount stores is immediately considered "junk"
by these people.  Actually a potentiometer remotely adjusted by a motor
tends to be used in the higher-end versions of the consumer grade stuff.
The lower-end ones use analog multipliers controlled by a voltage, which
isn't very good by any measure but it is cheap.

So know your engineering, but also know your market.

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\05\10@180912 by Dennis Plunkett

flavicon
face
Hello,

Yes I see your point, perhaps this should have been made at the start! I do
understand about Audiophiles and there quest for purity, one can look at
many arguments on sound reproduction all the way back to which type of thorn
tree is best used for the pickup on the horn arm (The list goes on, all the
way to the present day of digital VS analogue) I do think that you have
asked a question that is beyond the rellms of the PICLIST.

PS I still have may 6 x 1KW valve amps at home, currently connected to a
cheepish KEF reproduction system.


Dennis

1998\05\11@062341 by Keith Howell

flavicon
face
Dennis Plunkett wrote:
> I do wonder what the HIFI manufacturers use?

Our Alpha 10 Integrated Amp (100WPC) uses an Nat Semi LM1972.
About 78dB range. And yes, it is fairly high fi. I have cloth ears but
the audiophile mags seem to be drooling over it.

I'd have preferred the Crystal Semiconductors CS3310.
This has 100dB range, and smarter pin-out (analogue/digital
on opposite sides instead of mixed). More expensive though.

We do know silicon 'pots' have the faults discussed, but we can only
wait for the technology to improve. If you chaps come up with any way
of doing programmable attenuation for a competitive price, I'd be
happy to stick it in our kit!

Jon - what do you think of the log attenuator sketch I stuck through
your
door? And the sales bumph? I think you'd like the Alpha 8SE HDCD player,
but given your house type, the Alpha 10 amp might provoke complaints
from bleeding-eared neighbours!

TTFN, KH

1998\05\13@151905 by Jon Nicoll

picon face
{Quote hidden}

I'd have thought this as well.

{Quote hidden}

FWIW, the concensus amongst those who have done more experimenting than
I in this area is that the preferred law of 'perceived volume' is (going
from loudest) down at a fairly slow rate, then this rate increasing as
the volume is reduced. So they may start with a 1.5db/step rate at the
top, then increase to a 2.5db/step, and onto a 4db/step for the quieter
levels. Personally, this puzzles me a little, but there you go.

Also BTW, I'm not considering having a balance control in at all ;-)

       Thanks
       jon N

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...