Cordellicious results

So, the low distortion oscillator is all put together.

Oscillator innards.

And it works very nicely.

Oscillator working, whee

When the oscillator output is connected straight to the analyser input, it reads around the analyser’s specified floor (0.0021%) between 20Hz and 20kHz. The above picture shows 0.0017% at 1kHz with the 80kHz low pass filter engaged.

I took it home and used it to test my new Selfless Amp against the old Ice Block. The “Selfless” was somewhat degraded from its earlier bench test results because of hum induced by the transformer, but it still managed around 0.002% at 1kHz and 0.008% at 20kHz. (Both about 70W into 8 ohms: the readings at lower powers were inflated by the hum, and noise from the preamp.) The Ice Block couldn’t match this with 0.005% at 1kHz and 0.015% at 20kHz. In fact, one of the channels had 0.3% and whacking the amp made it jump around frantically. (The distortion reading, not the amp itself! :p) Turned out the speaker relay was bad, which gives me an idea for another project…

Cordell oscillator success

Well, the Cordell low distortion oscillator worked a treat! It didn’t work right away: I left a connection out of the PCB. And then I didn’t have a TL074 chip, so I tried a LMC660, and the chip blew up for some reason, which had me puzzled.

(I just checked the LMC660 datasheet: It’s specified for 15V total supply voltage. I fed it +/-16, a total of 32V. Whoops.)

Then, Cordell’s schematic calls for a 2N4091 JFET, a device with a high Idss and low on-resistance, but I couldn’t find any of those. I tried a BF245C, but it wasn’t strong enough. The AGC loop just whacked the gate as far positive as it could go, trying to turn the JFET “more than full on”. So I kept adding more of the things in parallel, until I saw the AGC go negative by a volt or two. I ended up with 5 of them, bodged onto a piece of stripboard.

A J111 would probably have been a better choice. These are the ones Douglas Self recommends as analog switches in “Self On Audio”, and they have a similar 30 ohm Rds(on). JFETs are so variable, though, you never know what you’ll get.

Frequency control with the “Blue Velvet” pot works great! There’s no noticeable amplitude bounce. Well, except for the fact that it’s backwards: anticlockwise to increase. I couldn’t see any easy way to dismantle the pot and reverse the action.

And, first time on the distortion analyser: 0.0015% at 1kHz! 🙂 That’s better than the analyser’s own spec.

Stay tuned as we post some pics and stuff the thing into the spare bay of the DA4084.

A “Cordell” low distortion oscillator

Recently, I accidentally broke my low-distortion oscillator, the “Williams Memorial”. The breadboard was such a mess, that I decided it would be almost as easy to just build the Bob Cordell design.

I altered the design a bit: I replaced the switched attenuator for a plain volume pot, made the output balanced, and swapped the three LM318 op-amps for a single TL074.

I put a rectifier, smoothing capacitors and regulators on board. I’m hoping that my THD analyser mainframe will have a couple of spare transformer windings to power it, and the whole thing can fit in the empty left-hand bay where the SG505 would have gone, if I ever had managed to find one.

For the frequency control, I plan to try a 50k Alps “Blue Velvet” pot. I’m hoping the superior tracking and wiper resistance, combined with Cordell’s non-linear amplitude control scheme, and the integrating nature of the state-variable oscillator, will make it usable. I’m also hoping it can be taken apart and reassembled with the shaft coming out of the other end, to make it reverse log.

If that doesn’t work, I’ll use a binary set of switches, or something. That worked surprisingly well on the Williams Memorial. Eventually I’d like to try with 4066-type analog switches in current mode.

Anyway, here’s the schematic and a preview of the board.

Low distortion oscillator schematic

Image of low distortion oscillator PCB

Tektronix 7603 mainframe repair

Last week I was given a big heap of surplus test gear. It included a Tek 7603 oscilloscope mainframe. I already have a R7603, so it was nice to get another one, but sadly it was sick. On applying power, it just sat there, dead in the water, with wisps of smoke coming from the regulator board.

First of all I downloaded the service manual from bama.edebris.com.

Then I noticed half of the power rails were missing, as was the 130V rail fuse on the regulator board. Someone had obviously been at it before me. I replaced this fuse, and it blew immediately with a sizeable flash and pop.

It turned out that several transistors on the regulator board had failed, some short, some open. I replaced the TO92 ones with 2N5551 (NPN) and 2N5401 (PNP) and the larger metal can ones with 2N2219s, except for one that looked like it needed to stand a higher voltage, so I got a MJE340 and jammed it into the socket. The smoke had been coming from a crispy-looking 1.2k resistor which I replaced too, even though it still measured 1.19k.

After doing this, all rails were correct, and the unit powered up. However ALT mode wouldn’t work. I replaced a 7474 IC on the logic board (with a 74LS74 as I had no originals) and that fixed it.

Then, the readout wouldn’t work. On closer inspection, there was no readout board: I suppose it must have been optional.

The focus was still a bit blurry with the focus knob cranked all the way, but adjusting the focus preset in the HV box cured that.

Last of all, the graticule lights wouldn’t work. Usually it’s because all the bulbs are blown, but this time it was because the cable assembly that drives them was missing, presumed lost by the last guy who tried fixing it. I found a similar 4-pin cable in a box of junk, and the lights came on.

Finally, just when I thought I was done, I noticed the channels were bleeding into each other in Chop mode. I tried replacing the other 7474, but it made no difference. In fact there was nothing wrong with the beam switching, the problem was that the Y amplifier wasn’t settling properly after each switch. Now a scope Y amplifier is a major piece of analog voodoo: it contains dozens of tweaks to compensate its own frequency response, and that of the delay line. My refusal to settle had a time constant of about 50us, though, and the slowest trim listed in the service manual was 50ns, not a lot of use. However the schematic also showed two networks for compensating slower “thermals”, and it turned out that the trimpot in one of these had gone open circuit. I replaced this and since there was no trim procedure in the manual, I just tweaked both networks for minimum bleed between channels. I got it better than my other 7603.

I love how you can take a 40 year old piece of Tektronix gear, and you can find the schematics and fix it in a morning with parts that are lying around the place. They just don’t make ’em like that any more. Now it’s time to have a go at the HP 141T spectrum analyser. 🙂

Blameless finished!

Here it is, pretty much done! The weather was pretty bad this weekend, so I spent most of it in the workshop, wiring everything up.

Besides the stuff I’ve already written about, there is a soft-start module (built rather messily on a tagboard), and a preamp/protection PCB. This contains Douglas Self’s anti-thump and DC offset protection circuit, a thermal cutout circuit using the spare diodes in the ThermalTrak power transistors for junction temperature sensing, and a balanced line input stage using the INA137 and NE5532.

Here are some pics.

Gut Shot 1

The 10kHz square wave response, just short of clipping, into a dummy load.

I’ll do some whole-system THD measurements some other time. (I broke the Williams Memorial Oscillator. 🙂 )

Power up, distortion down

I did some more work on my Blameless amp project. First of all, I built another output stage, so I now have two output stages, but still only one driver board. Then, I improved my distortion measuring setup a bit. I shielded all the cables and rejigged the grounding, which reduced the oscillator + analyser floor to 0.0036%, with the 80kHz filter engaged.

With this extra resolution I was able to do some more tweaking of the Blameless. I found the following issues:

The MJE350 transistor in the output stage pre-driver is much slower than its MJE340 “complement”. I replaced it with a MJE15033. This allowed me to reduce the anti-sproggie resistor on the base. I was running 100 ohms on the NPN side and 200 on the PNP side, so I changed both to 150 and retried the reactive load test. There were no parasitics, and hopefully I’ll get a bit more power before clipping now.

I was only running about half of the amount of feedback that Douglas Self used in his experiments. (I used the same input stage gm and compensation capacitor as he did, giving the same open-loop gain at 20kHz, but I designed for twice the closed loop gain.) To fix this, I reduced the input pair’s emitter resistors from 100 ohms to 51.

The input doesn’t like being driven straight off the wiper of a 20k volume pot: when I buffered it with a NE5532 op-amp, the noise and distortion went down. I think Douglas Self implicitly designed all his circuits to run best with a 50 ohm source impedance, because that’s what an Audio Precision test set has. 🙂 He runs the input transistors at 2mA for high slew rate and lots of gm, but the downside is lots of noise current and a low AC input impedance. So, in the finished unit I’ll buffer the volume pot.

Adding a DC offset trim and tweaking it for minimum offset also reduced 2nd harmonic at high frequencies. Again this is what Self’s theory of the input stage predicts.

The biggest improvement came by swapping out the expensive PNP matched input pair for a pair of ordinary transistors that just had high beta: BC213C’s with 350 min. as opposed to the 100 typ. of the MAT03. Saving money while boosting performance, that’s more like engineering than hi-fi 🙂

When I was finished with all this, I had a THD+N figure at 100W, 1kHz, 4.7 ohm load, of… 0.0036%! The same as the oscillator itself. The residual also looked identical to the oscillator’s own. At 100W, 10kHz, I got 0.008%, and this decreased to 0.0065% at 100W, 20kHz. (Because of the 80kHz filter, I assume.)

The 1W figures were slightly higher than the above, but from examining the residual, the extra seemed to be mostly the noise floor of the amp and oscillator, rather than crossover distortion.

These are pretty much the best results I’ve had, and I can almost imagine that if I had an Audio Precision, I’d be seeing the kinds of figures that Self claims.

What’s all this Black Swan stuff, anyhow?

I’m somewhat of a fan of Nassim Nicholas Taleb’s book, “The Black Swan”. To me at least, the book is about the human tendency to tell ourselves stories about reality, and then substitute the stories for what is really there. This idea should be familiar to any student of Zen. Taleb calls it the narrative fallacy, and explores its messy implications in business and finance.

It struck me today that this is how electronic design proceeds, too. We start by telling ourselves a story about how the proposed circuit will work. The electrons will go down here, some of them will go this way, this part will oscillate at 123 megahertz, and so on. We either make it up in our heads, or orchestrate it on a circuit simulator, but in either case we are dealing with a Platonic approximation to the real circuit.

It follows from this that the lab bench is Taleb’s “Platonic fold”, where our narratives collide with the messy reality of what the prototype circuit actually does. This is the origin of the pearl of wisdom attributed to (the sadly late) Bob Pease or someone similar: that a circuit always works, it just doesn’t always do what you expect. Anyone who has done any practical work with electronics knows the brain-wringing feeling of struggling with a circuit built on wrong assumptions in this way. It simply refuses to do what you want, for no reason that you can see, because your reasoning is based on the same faulty assumptions. The best you can hope is that you have the “Aha moment” and come away with your narratives more firmly grounded in reality.

It also follows that by going into production with a circuit that doesn’t work the way you think, you invite it to start doing things that you didn’t expect when it gets out in the field. This can generate Black Swans in exactly the same way as Taleb’s example of running a hedge fund based on invalid mathematical models.

Usually the results are negative and your company simply goes bust, but once in a while you can benefit, as in Bob Pease’s tale of the Philbrick P2 op-amp. This was a groundbreaking product that contained about $5 worth of components, but delivered enough value-added to the customer that it could be sold for the price of a small car. The P2 made the company, even though (according to Pease) nobody in the company actually understood quite how it worked. But in spite of this they managed to produce it consistently and have it work reliably.

What’s more, if this is true then the world of electronics must have its “Fat Tony” characters, rather than being purely the province of “Dr. Johns” as one might expect. (For those unfamiliar with the book, you might like to mentally substitute Thomas Edison for Fat Tony and Nikola Tesla for Dr. John.) They are probably the same people that George Philbrick called lightning empiricists, after the fashion (though before the time, this being the 1950s) of Taleb’s skeptical empiricists. Indeed, Fat Tony would probably have wholeheartedly approved of the above mentioned P2, if he didn’t actually design it.

Anyway, that’s me on the narrative fallacy in electronic design. Next time I’ll write about the normal distribution and power laws. Taleb has his “Great Intellectual Fraud”, and communications theorists have their AWGN – “Additive White Gaussian Noise”. Until then, what are the odds of Bob Pease and Jim Williams dying the same week? I make it about 1 in 9 million, but sadly it happened, as Pease crashed his 1969 VW Beetle on the way home from Williams’ memorial service. Both were legends of analog electronics, and the impact is hard to overstate: it’s as if Jane Goodall and David Attenborough got trampled by the same elephant.

In a twist that Taleb may have found bitterly amusing, Pease had just self-published a book on safe driving, which didn’t sell.

Finally, a use for Internet Explorer!

So, to cut a long story short, due to my employers’ “interesting” IT policies, I’ve ended up providing my own computer, which can only be connected to the guest wi-fi, not the real network. However, I would still like to access my work e-mail, which is kept in MS Exchange.

Enter “Outlook Web Access”. Now normally this isn’t a great deal of fun to use: the interface is clunky, and it doesn’t even refresh itself to show new messages as they arrive. But this is because you are limited to the “Light” version when viewing it with any browser other than IE.

Load the full version in Internet Explorer, and by some Microsoft magic, it is almost identical to the standalone version of Outlook inside a web browser container! You can even right click things and they do what you expect.

So, that makes two neat pieces of engineering from Microsoft that made my day. The other one was Windows 7.

Make a cappuccino, ghetto style

So, I recently got a copy of Harold McGee’s “On Food and Cooking”. Reading the chapter on milk foams inspired me to make this cappuccino recipe. It wouldn’t fool a Barista, but it looks and tastes better than what you get from a domestic espresso machine with its pathetic steam nozzle.

You will need: A way of making good, strong black coffee, such as a stovetop moka pot, and some ground espresso beans.

Some full fat milk, a jam jar with lid, a microwave oven.

Put the coffee on to brew. When it’s nearly ready, pour about 1 inch of milk into the jar, put the lid on and shake it as hard as you can for about 1 minute. This makes it frothy. Now remove the lid and cook it in the microwave for about 40 seconds on full power, or until it starts to foam up more. This cooks the foam and stabillises it, while making the milk nice and hot, as the steam from an espresso machine would do.

Finally combine the coffee and foamed milk in your favourite mug. You can put the milk in first and pour most of the coffee down the side, and use the last little bit to make a pattern on the foam.

Douglas Self, Jim Williams, and a sunny Saturday morning

Writing this, I was inspired by an article by Jim Williams called “Max Wien, Bill Hewlett and a rainy Sunday afternoon”, which documents his investigation of the Wien bridge oscillator and how to lower its distortion.

1. I’m a fan of Jim Williams, and his crazy cartoons and application notes with names like “Switching Regulators for Poets”.

2. My prototype Blameless power amp was getting good enough that I needed a really low distortion oscillator to test it. Surprisingly, even my 24-bit home studio gear wasn’t good enough: sigma-delta converters generate a lot of ultrasonic noise that inflates the THD figure. And my Twintrak Pro mainly generates smoke.

3. I could not find a Tektronix SG505 or SG5010 for sale at a reasonable price.

4. Neither could I be bothered building the oscillator section of Bob Cordell’s DIY THD analyzer.

5. A search of my kitchen junk cupboard yielded a RA53 thermistor.

6. A Google search of the part number revealed that it’s the magic ingredient for making a really good Wien bridge oscillator. So, using the RA53 and a NE5532 op-amp, it only took about an hour to make an oscillator that ran off a couple of 9v batteries, and measured about 0.007% THD at 10kHz on my analyser. (The remaining THD is probably a combination of ignoring Williams’ Law, thermal modulation in the thermistor, and the dirty mains in our lab.)

7. So, this morning I tested the Blameless using my new low-distortion oscillator. It was clean enough that I could see the “gm-doubling” distortion described by Self when the amp was biased too hot: the first time this effect has ever been reproduced at Conner Labs. 🙂 Optimal bias seemed to be about 8-9mV per side, though it wasn’t clear whether this was just cancelling the oscillator distortion, and the true minimum might be at a higher idle current.

8. The results were really good. The 10kHz, 100W, 4 ohm THD came out around 0.01%. I used the 80kHz low-pass filter, but from inspection of the residual, it wasn’t filtering much: mostly the 200kHz switching noise that our mains is ridden with. At 10kHz, 2W, it was about 0.007%.

9. I cranked it up to 140W and let it get really hot. This only caused about 1mV change in bias, and checking again at 2W, the THD reading and residual looked pretty much the same. Then I rigged up a fan to cool it down again, and that didn’t make much difference either. Yay for those ThermalTrak transistors, then.

10. Renting an Audio Precision test set costs about £600/month for the entry-level one. So, I decided to call it quits at this point. The Blameless is now complete, and it just needs another channel, DC offset protection, and a box. I shall publish the schematics soon.

11. When Jim Williams was done with his oscillators, he cooked some hot dogs. I am ashamed to admit that I ate a McDonalds.

12. Now I am obsessed with trying to make a digitally controlled version of Cordell’s oscillator. 🙂