Heck, the rotary switches were the big problem even back when the article was published. If you can find a source of wafers, building up the switches isn't that tough, but it took me a couple years to complete the whole device. IMHO, it's a superb analyzer even today.
Thanks, Conrad.
If I had to do it over again today, I would definitely use miniature relays for the band switch and the frequency switch. I've toyed with these thoughts over the years.
Coming up with a scheme that was efficient with number of relays and how best to control them (perhaps with a microcontroller) requires some thought. Depending on the relay arrangement, the chosen frequencies might be a little different than those I used. Interestingly, in practical use, I virtually never measure at frequencies that are not part of a 1-2-5 sequence. Limiting frequency selections to a 1-2-5 sequence would hugely simplify matters. 3 frequencies per decade instead of 11. Obviously, other sequences, perhaps with 6 frequencies per decade might be a good compromise between frequency granularity and number of relays required.
Using relays greatly simplifies wiring as well.
Another feature of my analyzer that added to switching complexity was the use of tracking filters for the residual, both high-pass and low-pass. The second-order Bessel high-pass filter always has a cut-off frequency 10 times that of the fundamental to limit HF noise. A modified second-order Butterworth low-pass filter always has a cutoff below the fundamental to reduce hum and LF noise. Many professional units merely have selectable HPFs at 30 kHz and 80 kHz, and a selectable HPF at 400 Hz. Doing just this can save a lot of switching complexity.
Another lower-cost approach I have considered for a less expensive version is to use a high-quality 4-gang pot for frequency control. The use of state variable filters for the oscillator and analyzer make such an approach possible, and the availability of such multi-gang pots for surround sound applications can help. Audio taper pots are often less accurate in tracking among gangs, but offer a better frequency vs. rotation characteristic. Use of such pots would probably require more auto-tune control range, and that would likely increase the distortion floor. Use of linear-pot attenuators for frequency tuning that use the Baxandall active volume control circuit could also be an attractive option, since that yields a somewhat logarithmic frequency vs. pot rotation characteristic while using linear taper pots that typically have better tracking among the gangs.
Yet another simplification is to drop the high band in my analyzer, which operates for fundamentals from 20 kHz to 200 kHz. An analyzer that covers fundamentals from 20 Hz to 20 kHz requires only 3 bands.
Cheers,
Bob
If I had to do it over again today, I would definitely use miniature relays for the band switch and the frequency switch. I've toyed with these thoughts over the years.
Coming up with a scheme that was efficient with number of relays and how best to control them (perhaps with a microcontroller) requires some thought. Depending on the relay arrangement, the chosen frequencies might be a little different than those I used. Interestingly, in practical use, I virtually never measure at frequencies that are not part of a 1-2-5 sequence. Limiting frequency selections to a 1-2-5 sequence would hugely simplify matters. 3 frequencies per decade instead of 11. Obviously, other sequences, perhaps with 6 frequencies per decade might be a good compromise between frequency granularity and number of relays required.
Using relays greatly simplifies wiring as well.
Another feature of my analyzer that added to switching complexity was the use of tracking filters for the residual, both high-pass and low-pass. The second-order Bessel high-pass filter always has a cut-off frequency 10 times that of the fundamental to limit HF noise. A modified second-order Butterworth low-pass filter always has a cutoff below the fundamental to reduce hum and LF noise. Many professional units merely have selectable HPFs at 30 kHz and 80 kHz, and a selectable HPF at 400 Hz. Doing just this can save a lot of switching complexity.
Another lower-cost approach I have considered for a less expensive version is to use a high-quality 4-gang pot for frequency control. The use of state variable filters for the oscillator and analyzer make such an approach possible, and the availability of such multi-gang pots for surround sound applications can help. Audio taper pots are often less accurate in tracking among gangs, but offer a better frequency vs. rotation characteristic. Use of such pots would probably require more auto-tune control range, and that would likely increase the distortion floor. Use of linear-pot attenuators for frequency tuning that use the Baxandall active volume control circuit could also be an attractive option, since that yields a somewhat logarithmic frequency vs. pot rotation characteristic while using linear taper pots that typically have better tracking among the gangs.
Yet another simplification is to drop the high band in my analyzer, which operates for fundamentals from 20 kHz to 200 kHz. An analyzer that covers fundamentals from 20 Hz to 20 kHz requires only 3 bands.
Cheers,
Bob
Bob, I was one of the guys buying your PCBs at the time and successfully completing the analyzer. I must confess, to my chagrin, that I sold it many years ago...
Anyway, I have also been speculating on frequency and filter control done more efficiently than with rotary switches. Noting that AP uses custom MDACs, I thought a CS3318 would be a possible option.
This particular chip has 8 channels of digitally set attenuation, feeding an opamp. Step size can be as low as 0.25dB, gain matching between channels is +/-0.1dB. Distortion and noise is exemplary, to which I can attest from own experience in the DCX2496 active output mod.
The way I thought this could be used is as a replacement for the rotary-switched resistors in the integrators of the filter circuits. After all, a variable attenuator (the CS3318 goes from -96dB to +22dB or thereabouts) has the same effect as a variable resistor. And it might even be possible to use the build-in output opamp as the integrator opamp. And you would have 256 steps in each band, a simple rotary encoder and a simple AN LED display would take care of the user interface.
What do you think of the basic idea?
Edit: you could even cover the whole audio band with 256 steps, the microcontroller taking care of bandswitching automagically!
Jan
https://statics.cirrus.com/pubs/proDatasheet/CS3318_F1.pdf
Anyway, I have also been speculating on frequency and filter control done more efficiently than with rotary switches. Noting that AP uses custom MDACs, I thought a CS3318 would be a possible option.
This particular chip has 8 channels of digitally set attenuation, feeding an opamp. Step size can be as low as 0.25dB, gain matching between channels is +/-0.1dB. Distortion and noise is exemplary, to which I can attest from own experience in the DCX2496 active output mod.
The way I thought this could be used is as a replacement for the rotary-switched resistors in the integrators of the filter circuits. After all, a variable attenuator (the CS3318 goes from -96dB to +22dB or thereabouts) has the same effect as a variable resistor. And it might even be possible to use the build-in output opamp as the integrator opamp. And you would have 256 steps in each band, a simple rotary encoder and a simple AN LED display would take care of the user interface.
What do you think of the basic idea?
Edit: you could even cover the whole audio band with 256 steps, the microcontroller taking care of bandswitching automagically!
Jan
https://statics.cirrus.com/pubs/proDatasheet/CS3318_F1.pdf
Last edited:
Hi Jan,
That seems like a good idea, also, especially if a microcontroller is used. If the MDAC has eight channels, and four are used for the tuning, it might be practical to use the remaining 3 channels semi-coarse oscillator agc, analyzer frequency tracking and analyzer amplitude tracking. I say coarse because those functions need to have analog lack of granularity. Using the MDACs would potentially significantly reduce the needed control range for the likely JFET part of the control function, perhaps reducing injected noise and distortion. Also, MDACs can probably be used to replace the pair of VCAs that I use for scaling.
There are always 4 main issues with the frequency setting devices:
1. Distortion (at all settings)
2. In-circuit Noise (at all settings)
3. Tracking
4. Frequency and phase response
If the MDACs have low enough noise and distortion over a 10:1 attenuation range, they should do well. Bear in mind that the noise and distortion must be superlative at all settings over this 10:1 range and that the noise performance must be maintained at significant levels of attenuation in combination with the external circuitry.
The Gold standard is a selectable metal film 1% resistor forming the input to an integrator that employs a very high quality capacitor and a very good op amp with wide bandwidth.
It sounds like the tracking among the MDACs would be fine.
The frequency response and phase response must be pretty flat out to a high frequency, perhaps 1 MHz+ in order to have the state variable filters operate properly to 20 kHz and beyond. This was especially an issue on the high band of my analyzer that covered 20 kHz to 200 kHz. This requirement would be relaxed for an analyzer that only had to go to 20 kHz.
Cheers,
Bob
That seems like a good idea, also, especially if a microcontroller is used. If the MDAC has eight channels, and four are used for the tuning, it might be practical to use the remaining 3 channels semi-coarse oscillator agc, analyzer frequency tracking and analyzer amplitude tracking. I say coarse because those functions need to have analog lack of granularity. Using the MDACs would potentially significantly reduce the needed control range for the likely JFET part of the control function, perhaps reducing injected noise and distortion. Also, MDACs can probably be used to replace the pair of VCAs that I use for scaling.
There are always 4 main issues with the frequency setting devices:
1. Distortion (at all settings)
2. In-circuit Noise (at all settings)
3. Tracking
4. Frequency and phase response
If the MDACs have low enough noise and distortion over a 10:1 attenuation range, they should do well. Bear in mind that the noise and distortion must be superlative at all settings over this 10:1 range and that the noise performance must be maintained at significant levels of attenuation in combination with the external circuitry.
The Gold standard is a selectable metal film 1% resistor forming the input to an integrator that employs a very high quality capacitor and a very good op amp with wide bandwidth.
It sounds like the tracking among the MDACs would be fine.
The frequency response and phase response must be pretty flat out to a high frequency, perhaps 1 MHz+ in order to have the state variable filters operate properly to 20 kHz and beyond. This was especially an issue on the high band of my analyzer that covered 20 kHz to 200 kHz. This requirement would be relaxed for an analyzer that only had to go to 20 kHz.
Cheers,
Bob
Interestingly, in practical use, I virtually never measure at frequencies that are not part of a 1-2-5 sequence. Limiting frequency selections to a 1-2-5 sequence would hugely simplify matters. 3 frequencies per decade instead of 11.
Hi Bob,
Great idea! It means that you can cover frequencies from 20Hz - 100kHz with a standard 12-position rotary switch if you go for a relay driven solution.
Regards, Rob.
Last edited:
Hi Rob,
Actually, in practice that would probably compromise performance, since you would be giving up either changing resistors or changing capacitors. In other words, you would not have a decade band switch to switch the capacitors.
If you switched resistors only, and used a reasonable size integrating capacitor that would be OK at the high end of 100 kHz, you would end up with a rather large resistor working with a very small capacitor at 20 Hz, since you are covering a little less than 5 decades in frequency. Just throwing numbers out, if you used 1000 pf and 1k for 100 kHz, that 1k would become 5 Meg for 20 Hz.
On the other hand, you might keep the resistor at 10k and the capacitor at 200 pF at 100 kHz and use different capacitors for each frequency. For 20 Hz you would then need 1 uF. This would actually work much better because it keeps the impedance the same at all frequency settings. I would probably go for something like 5k and 400 pf at 100 kHz and end up with 2 uF at 20 Hz.
Switching a large number of high-quality capacitors would cost more and take up more space than switching resistors, but would yield better performance.
Cheers,
Bob
Actually, in practice that would probably compromise performance, since you would be giving up either changing resistors or changing capacitors. In other words, you would not have a decade band switch to switch the capacitors.
If you switched resistors only, and used a reasonable size integrating capacitor that would be OK at the high end of 100 kHz, you would end up with a rather large resistor working with a very small capacitor at 20 Hz, since you are covering a little less than 5 decades in frequency. Just throwing numbers out, if you used 1000 pf and 1k for 100 kHz, that 1k would become 5 Meg for 20 Hz.
On the other hand, you might keep the resistor at 10k and the capacitor at 200 pF at 100 kHz and use different capacitors for each frequency. For 20 Hz you would then need 1 uF. This would actually work much better because it keeps the impedance the same at all frequency settings. I would probably go for something like 5k and 400 pf at 100 kHz and end up with 2 uF at 20 Hz.
Switching a large number of high-quality capacitors would cost more and take up more space than switching resistors, but would yield better performance.
Cheers,
Bob
Can't you switch two (four) relays with one switch? Use some diodes for the logic. It would not be difficult and you can optimize with more caps and fewer resistors if that helps.
You could even switch integrating caps in the oscillator. But soon you will have a LOT of relays$$$.
With relays and a microprocessor it would not be hard to autorange etc. Still it would quickly get as expensive as a used commercial analyzer with good performance and the benefit of working out of the box.
Maybe better as a front end for a soundcard or Quantasylum. . .
You could even switch integrating caps in the oscillator. But soon you will have a LOT of relays$$$.
With relays and a microprocessor it would not be hard to autorange etc. Still it would quickly get as expensive as a used commercial analyzer with good performance and the benefit of working out of the box.
Maybe better as a front end for a soundcard or Quantasylum. . .
I think relays and a microprocessor are the way to go if one was going to do it today.
Performance of a stock used HP339A is not that great. The used price of a Tek SG505 + AA501 is a better benchmark; or the used price of an AP-1.
A Quantasylum is hard to beat these days for price vs performance.
Cheers,
Bob
Performance of a stock used HP339A is not that great. The used price of a Tek SG505 + AA501 is a better benchmark; or the used price of an AP-1.
A Quantasylum is hard to beat these days for price vs performance.
Cheers,
Bob
Hi Bob,Can't you switch two (four) relays with one switch? Use some diodes for the logic.
Sorry I wasn't clear, the above mentioned solution of Demian was what I had in mind.
To cover 20Hz - 100kHz in 12 steps you need a single deck 12-postion rotary switch, 3 frequency steps per range and 4 ranges.
Your original design is still in tact, only some frequencies (resistors) are skipped (and of course relays and diodes are added).
Nowadays it's easy to use a microprocessor to drive the circuits, but an extra dimension of the hobby (programming skills) is needed. That is something I can't at the moment.
If you want to use an uP, relays would still be needed I guess, to switch frequencies and ranges (in a low distortion environment).
Regards, Rob.
Last edited:
All good points, especially adding the extra dimension of the hobby when including microcontrollers. I myself am toying with coming up to speed with Arduino microcontrollers, and finding the time to do that is a challenge.
Cheers,
Bob
Cheers,
Bob
If you do not mind using a PC/NTB for the control instead of buttons, you can easily create a simple GUI app controlling your arduino pins using the firmata USB-serial protocol, e.g. How to Create a Windows 10 Arduino App (For Absolute Beginners)
I'm not really a processor guy but take a look at the Teensy boards- Teensy USB Development Board They offer a huge amount of power for not too many $$. If I were building a uP controlled instrument, that's probably what I'd use. Though I like antiquated stand-alone instruments, it also lets you do a sophisticated PC GUI if desired. Also, I tend to think of high quality film capacitors for these things, but remember you can now get NP0/C0G MLCCs that are really good. That might make switching a large number of capacitors easier.
You really wouldn't use a 12-step, or any, switch. Drive the uP with a rotary encoder and let the sw do the up/down stepping through the band.
Using a switch on the encoder will let you switch between going through a band or step bands. Up/Dn is the direction of rotation. Once you decide to use a uP it becomes a whole new ball game!
Jan
Using a switch on the encoder will let you switch between going through a band or step bands. Up/Dn is the direction of rotation. Once you decide to use a uP it becomes a whole new ball game!
Jan
True, Jan. But then you also need an additional display for reading out the value. In that case you need more space on the front panel than a simple rotary switch.You really wouldn't use a 12-step, or any, switch. Drive the uP with a rotary encoder and let the sw do the up/down stepping through the band.
Using a switch on the encoder will let you switch between going through a band or step bands. Up/Dn is the direction of rotation. Once you decide to use a uP it becomes a whole new ball game!
Jan
Or you must omit the analogue meter and do that also via the same display.
Is someone already enthusiastic enough to start developing a fancy UI/readout?
or make it emulate a sound card and use off the shelf software to drive it and present the results. ???
I hear the little brain cells working: they are thinking things over🙂
Regards
Mike
I hear the little brain cells working: they are thinking things over🙂
Regards
Mike
- Home
- Design & Build
- Equipment & Tools
- Another realization of Bob Cordell's THD Analyzer