D.I.Y. amp

Customising, building or repairing your own gear? Need help with acoustic treatment or soundproofing? Ask away…

D.I.Y. amp

Post by Folderol »

After something like a 5 year delay I've got working on building my (discrete component) amplifier again. With two channels now complete (and apparently stable over 0-50W) I find I've enough bits left over and enough heatsink real estate for a sub driver too. Now I don't actually have a Sub box, but you never know...

The filter design I'm going for is a 2nd order state-variable one which seems to tick all the boxes for something middle-of-the-road and only needs a total of 4 switchable elements to cover a range of crossover frequencies. I'm thinking of covering the range 70-150Hz with an 'off' position for normal stereo without the sub.

Anyone got any thoughts on this.

P.S.
Why self-build a discrete amp? Because it's fun :D
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: D.I.Y. amp

Post by vinyl_junkie »

Interesting stuff, can't say I have any real input but I'd like to read more about your 2ch amp you made :-D
vinyl_junkie
Frequent Poster
Posts: 1579 Joined: Tue Jun 24, 2003 12:00 am Location: Kent, UK

Re: D.I.Y. amp

Post by Folderol »

A bit disappointed that nobody had any thoughts on the crossover frequency range :frown:

However, the design of the amp itself is a based on a combination of ideas gleaned from Practical Wireless and Wireless World from a long time ago. It flies in the face of accepted practice, is a power hog and quite uneconomic :tongue:

Not having done any serious audio hardware work for very many years my remaining test gear is rather primitive, except the sig. gen. which I built in the early 70s and after 40 years still works - and I'm insanely proud of it :D

However... The amp -1dB points are 16Hz and 30kHz. Hum and noise is -80dB. THD @ 1KHz half power into 8ohms is < 0.1%. No idea about crosstalk yet.

If anyone really is sufficiently interested I could probably put a schematic up somewhere.

The output and driver transistors are way over specified. This means that even at full power they are still running in a pretty linear part of their gain characteristic. It also means that nothing more than a simple fuse is needed for S/C protection.

The output transistors are current driven not voltage. This could limit the top end due to charge storage, but in practice doesn't seem to. The advantage is that while transistors are extremely sensitive to temperature when driven from a voltage source, they are far more forgiving when current driven. Indeed, the ones I used show only a 20% increase in collector current over the temperature range 30-60 deg C - this is measured at the middle of the tab with no heatsink so is likely to be pretty close to the actual junction temperature.

The complementary drivers for these are configured so that there is 20dB gain over the entire combination, and bias stabilisation is done at the level of the drivers, the bias transistor being identical to the NPN driver (all these parts are in close proximity on the heatsink).

This whole output module is running in class AB, with the quiescent current set higher than normal @ 100mA - this is done not only for distortion reasons but also so that the temperature doesn't change dramatically over the working power range.

The local feedback resistors dissipate about 7W in total, which means there is always some resistive load, which hopefully will help damp any highly reactive speaker - certainly a 1kHz square wave looks good with a quite inductive dummy speaker - slight rounding on the leading edge and no overshoot or ringing.

The drivers are fed from a single-ended circuit with an undecoupled emitter resistor on the pre-driver (for want of a better term) giving significant local feedback, this transistor has a total supply voltage of 40V but only has to deliver about 6V P:P swing. This in turn is fed from a pre-amp transistor which gets 100% DC feedback from the output and is partially decoupled to give an overall gain of 40dB.

Having a single-ended stage like this would suggest an increase in even harmonic distortion, but in practice a simple twin T notch filter showed mostly 3rd harmonic.

So much for the instrument readings. I haven't actually heard it yet, as there is still no input circuit that I can safely connect to a decent audio source.
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: D.I.Y. amp

Post by Hugh Robjohns »

Folderol wrote:A bit disappointed that nobody had any thoughts on the crossover frequency range :frown:

I don't see why, your stated intention is perfectly fine! ;) Most systems crossover somewhere between 85 and 110Hz, lower if the 'satellite speakers' are 'full range'.

H
User avatar
Hugh Robjohns
Moderator
Posts: 42172 Joined: Fri Jul 25, 2003 12:00 am Location: Worcestershire, UK
Technical Editor, Sound On Sound...
(But generally posting my own personal views and not necessarily those of SOS, the company or the magazine!)
In my world, things get less strange when I read the manual... 

Re: D.I.Y. amp

Post by Folderol »

Thanks for the confirmation anyway Hugh :)

Oh, and there's a typo in the above ramble :blush:

The quiescent current is 200mA not 100!

{mutter}{mutter} I'm sure someone keeps moving the keybiard while I'm typing!
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: D.I.Y. amp

Post by Folderol »

I've actually heard the beast for the first time this evening, so thought I'd give you an update.

There is still no proper pre-amp, just an input buffer and volume control, not even basic tone controls.

First the bad news. There is a very faint buzz (rather than hum) slightly more from the LH channel, which is closest to the mains TX - rather points to radiated field. I'll have a go a screening but am not too optimistic. Hum and noise measures at -80dB, but that is relative to 50W, and I'm sitting just over a metre from my nearfields :roll:

I might also drop the gain by about 10dB and make it up on the first stage buffer. If the amp is stable like that (should be) it might also improve distortion figures slightly.

Now the good news. It sounds gorgeous! Up to now I've been working using a domestic HiFi plugged into my nearfields. Not a cheap one but a Nakamichi Receiver2. Nevertheless my amp sounds much cleaner. I haven't an A/B switch setup so can't do anything resembling blind comparisons, but playing a few reasonably good commercial tracks, detail and stereo positioning seem better - and I'm not one for audio superlatives.

A surprise was the total absence of switch on or off thump. The reason I was surprised is that the output relays come on immediately with the power and switch off in a quite leisurely manner as the supply fades. Eventually they will be controlled by an arduino acting as a speaker management system.

However, the next stage will be building the crossover filters and preamp, with simple bass and treble controls. I'll take a step on the dark side here and use OpAmps ;)

I don't know how long this will take as I can only work on this during quiet times in the workshop. I don't want things to get too quiet though otherwise I could be out of a job :shock:
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: D.I.Y. amp

Post by vinyl_junkie »

Nice one, glad it sounds good!

Can't say I'm a big fan of output relays or eq's though, but then I am a very lucky person where the output relays in all my amps like to fail and go crackly.

What kind of input switching are you using? Solid state or a proper switch?

What kind of speaker loads can the amp handle? Some bastard speakers I've had in the past had a nominal impedance of 4 ohms and I read the load could drop to 2 ohms at low frequencies hence requiring quite a bit from the amp.

Also damping factor.. These are things that go over my head but I like to read about them hahah
vinyl_junkie
Frequent Poster
Posts: 1579 Joined: Tue Jun 24, 2003 12:00 am Location: Kent, UK

Re: D.I.Y. amp

Post by Hugh Robjohns »

Folderol wrote:I might also drop the gain by about 10dB and make it up on the first stage buffer. If the amp is stable like that (should be) it might also improve distortion figures slightly.

Good plan. I was surprised when you said overall gain was 40dB. Most commercial pro amps have a voltage gain somewhere between 25 and 30 dB in my experience.

H
User avatar
Hugh Robjohns
Moderator
Posts: 42172 Joined: Fri Jul 25, 2003 12:00 am Location: Worcestershire, UK
Technical Editor, Sound On Sound...
(But generally posting my own personal views and not necessarily those of SOS, the company or the magazine!)
In my world, things get less strange when I read the manual... 

Re: D.I.Y. amp

Post by Folderol »

Back again.
Some parts failed to turn up at work this afternoon, so I had to abandon the job and find something else to do :)

The relays I've used are these. They are reasonably cheap, have good current rating and with standard industrial spade terminals quick and easy to replace.

Switching is ordinary contacts. With something as simple as this what's the point of doing anything else?

The amp is designed for 8ohm speakers. The output stages can easily handle as low as 4ohms, but the power supply would sag a bit so I don't know exactly how much undistorted power you'd get out. Also the mains Tx is only rated at 200VA so would get unhappy if it was run with sustained high power bass.

Damping factor? Adequate :) I'd have a hard job actually measuring the output impedance.

I did drop the gain by 10dB. Hum is now only discernible with your lug 'ole right by the speakers. I have to cart the amp to work to make changes, then bring it home in order to get a quiet enough background to check the results!

I was expecting distortion to drop as well, but it didn't make much difference (which was rather a surprise). However,decoupling the emitter of that pre-driver, thus increasing the open-loop gain, dropped distortion by a further 6dB.
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: D.I.Y. amp

Post by Folderol »

Warning
Amplifier Porn!

I wonder if it's possible to change the title :roll:

As promised here are some drawings and pictures.

The workshop scope is a digital one, which is not ideal for looking at audio traces. Also I can't find a way of stopping splurting all sorts of unwanted info over the traces when I save them so I resorted to camera shots. The images are quite large so to save forum space I've just listed the clickable html links

First the Chassis, as built so far. It's a bit untidy but then there is still a lot of work to do. Output relays are underneath the chassis as close as practical to the fuses.

http://www.musically.me.uk/images/Chassis.JPG

Next the all important distortion trace. 1kHz at half power. Note that the lower trace is actually fed from a 40dB gain stage in the notch filter, so the level is really 100th of that shown (makes it nice and easy for percentage calculations). Before I decoupled the second transistor this was mostly odd order harmonics, now (although less overall) it's more even order. There is also that residual hum showing.

http://www.musically.me.uk/images/1kHz_THD.JPG

Then there is a 1kHz square wave, at near, but not quite, full power. Nice clean trace - sorry I moved the camera :blush:

http://www.musically.me.uk/images/1kHZ_Square.JPG

Next we have a 6V P:P triangle wave. Were are looking for crossover distortion here. Wiggles around the mid-point - can't see any :)

http://www.musically.me.uk/images/1kHz_Triangle.JPG

Last trace, a 10kHz square wave just under half power. Nice gentle rounding, no overshoot. What is also interesting is that the trace looks exactly the same with an 8ohm resistive load and an 8ohm dummy speaker.

http://www.musically.me.uk/images/10kHz_Square.JPG

No doubt you'd love to know what high tech equipment I used, so here is my trusty signal generator. Built in the 1970s then modernised in the 1980s (I fitted an LED power indicator).

http://www.musically.me.uk/images/Sig_Gen.JPG

... and the precision, cutting edge notch filter :)

http://www.musically.me.uk/images/Notch_Filt.JPG

Some drawings you say?

One channel of the amp itself.

http://www.musically.me.uk/drawings/Amp.pdf

And the part developed PSU:

http://www.musically.me.uk/drawings/PSU.pdf

Quite a lot to still be going on with :roll:
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Amplifier Porn

Post by Hugh Robjohns »

Folderol wrote:I wonder if it's possible to change the title

You should be able to change the title in the Subject box at the top of the response page when you reply to a post -- your new post and all others related to it will take on the new thread title. And failing that, the mods can change it at any time for you.

H
User avatar
Hugh Robjohns
Moderator
Posts: 42172 Joined: Fri Jul 25, 2003 12:00 am Location: Worcestershire, UK
Technical Editor, Sound On Sound...
(But generally posting my own personal views and not necessarily those of SOS, the company or the magazine!)
In my world, things get less strange when I read the manual... 

D.I.Y. amp - Speaker Management

Post by Folderol »

I have been too busy at work to do anything on the audio side, but have been able to lash up an Arduino with a few switches, pots etc. to fake inputs. There is a 4 line 20 column LCD display attached, and I've been working on this at home during free moments.

The final assembly will be an Arduino on a carrier PCB containing additional logic, amplifiers and a DC-DC converter.

I use 3 of the analogue inputs to monitor the Left, Right and Sub channel outputs, and a further 2 for monitoring the DC supply rails. 8 digital outputs are used for the data lines to a 4 row, 20 column LCD display and a further 2 are control lines for this.

So, that's 15 inputs and outputs from a maximum possible 20, but I also wanted to have 4 digital inputs and 5 outputs, as well as being able to still use the serial port (which itself takes out another 2).

There were three solutions to this that came to mind.

Use an Arduino Mega - over 50 lines available on that, but massive overkill.
Use a second Arduino for the display - frees up 10 lines but adds complexity.
Matrix some of the lines - support chips needed.

I went for the last option as being cheap, fairly easy to implement, requiring only one programmed plug-in chip, enabling me to take the chip out and breadboard it if I wanted to, and above all... more interesting!

How to go about this?

In the first place the LCD data lines are only needed when the display is being changed. Realistically this can't be very fast as the display is quite slow to visibly respond. I actually update it every 10th of a second (100mS), so when the display is dormant I use just one more precious output to enable an 8 bit digital latch. This reads, then stores whatever is on the data lines at the time the enable is pulsed, so I now have three more outputs than I need - it's always nice to have spares. The chip costs about 50p, and requires no further components.

That leaves me with 2 spare lines, not including the serial ones, but I want 4 more inputs so had to use a different trick. There are shift register chips that can have 8 digital inputs read in at once, then sent out one at a time every time a 'clock' line is pulsed. This is what I used. The line that enables data transfer to the output latch is used to read in the inputs to the shift register at the same time. After this, one of the control lines of the dormant LCD is pulsed very quickly 8 times, and each time, the shift register output is read by another of our dwindling supply of lines. But I now have 4 more inputs than I needed, and still one unused line on the Arduino. Oh, and this chip also costs about 50p and needs no further support.

So much for the hardware, now the control functions I've set up.

The program in the Arduino is continually reading the Left, Right and Sub levels into analogue inputs. It manages a reading speed of just under 3kHz. By using op-amps to create artificial zero points I can read + & - peak levels pretty acurately, as well as long term averaged (just under 1S) DC levels. Every 100mS there is just a brief hiccup in order to read the supply rails into two more analogue inputs and do the processing and display stuff. Although the supplies are only about 32V, I've callibrated the inputs for 40V to give some wiggle room.

I now have a display of the actual supply voltages, and warning messages if they become too low or fail. There are peak level bargraphs of 15 (approx 3dB) steps for the outputs. Also a warning message if any of the outputs develop a DC bias above 0.5V and which way it is going. Finally, a clipping level warning message that takes into account the real rail voltage (not what it's supposed to be) and whether its the + or - one. The clipping waveform could quite possibly be asymetric.

I have software to read switch inputs for Sub, Phones and Mono, then provide the correct operations with appropriate messages. Also, delayed switching of output relays until all voltages are correct, and instant disconnection if any one goes seriously wrong. Finally there is another input monitoring the mains (via a safety isolator), with instant disconnection of outputs at switch-off.

As icing on the cake, I'm considering preventing speaker/phones connection if any channel is already being driven fairly hard by whatever is connected to the inputs at the time the amp is switched on. This is purely to protect my ears! The bargraphs will make it obvious which channels are being driven, along with a warning message. Once the level has been reduced the relays will click over and then the inputs can be driven as hard as wanted.

Some more pictures. Supply assumed to be +-40V. DC inputs were faked, but real audio used for the bargraphs.

All OK, but negative rail lowish

http://www.musically.me.uk/images/Display_OK.JPG

Negative rail low enough to be a problem (less than 25V) making the outputs clip. If it's less than 19V (the point where the amp's DC stability starts to deteriorate) it is shown as 'DEAD' and all relays are opened.

http://www.musically.me.uk/images/Display_Low.JPG

Switched to phones.

http://www.musically.me.uk/images/Display_Phones.JPG

Oh dear, we have a DC offset. This voltage is just on the threshold of making the RH channel shut down.

http://www.musically.me.uk/images/Display_DC.JPG

Running Phones in mono - there's that slightly low negative rail again :)

http://www.musically.me.uk/images/Display_Mono.JPG

Mains just disappeared or was switched off. Normally there is a 2 second delay at switch on with just the 'Speaker Manager' legend. In this state all relays are open.

http://www.musically.me.uk/images/Display_power.JPG

Hmmm. I don't seem to have a picture with the Sub channel active. That simply shows another bargraph below the right hand one. Labelled 'S'.
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

Re: D.I.Y. amp

Post by zenguitar »

This might help save some Arduino pins...

A piggy back I2C board for the display. Like this or a display with the board fitted like this.

And maybe look at an I2C port expander if you are still a few pins short.

Andy :beamup:
User avatar
zenguitar
Moderator
Posts: 13022 Joined: Thu Dec 05, 2002 12:00 am Location: Devon
Is it about a bicycle?

Re: D.I.Y. amp

Post by Folderol »

Hi Andy,

Yes both of those would have given the I/O I wanted, but I really am a 'nuts-and-bolts' person so wouldn't have had anything like so much fun using pre-designed solutions. Besides, I rechecked the cost of the components I used - 79p total :)

Also, my first excursion into LCD display control was when the Arduino just come out and the default libraries weren't very reliable or flexible, so I developed my own - which I will fiercely defend as being the best ever :tongue:
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

D.I.Y. amp - more developments

Post by Folderol »

I've finally had time to do a bit more on this project. The control logic is now complete and quite thoroughly tested.

Here is the logic board itself sans Arduino.

http://www.musically.me.uk/images/Logic_Bare.JPG

I've deliberately photographed it at an angle so you can see how I've bent the pins to allow the oddball Arduino spacing to be matched to standard stripboard. The wiring is not as tidy as I would have liked, and although functionally the same as I described earlier, I had to make a couple of design changes. I've saved some board space by placing the serial input chip inside the Arduino footprint.

And here is the board with the Arduino in place, and the display and mains isolator connected.

http://www.musically.me.uk/images/Logic_Complete.JPG

I was able to capture this with an audio signal that was varying quite rapidly, and you can see the 'phantom' bar segment that results when this is close to the response time of the LCD.

This is the mains isolator/detector module I've used.

http://www.musically.me.uk/images/Logic_Isolator.JPG

It's a technique that I've used many times in enclosed environments. The optocoupler will turn on reliably when the incoming voltage reaches about 50V (either polarity), resulting in very short 'off' pulses when mains is there. The capacitor stops it responding to occasional random spikes. The 100k resistor is actually running at less than 1/2 watt, but I like to play safe when dropping substantial voltages. The 4 tiny holes you can just about see provide enough ventilation to keep it at a sensible temperature (a thermocouple probe reads 50 deg C after 3 hours) whilst protecting stray fingers etc. A simple external RC filter on the output ensures that there is solid indication, but a fast release at switch-off or if the mains dies for any reason.

Originally, I had intended to mount the board on the underside of the amplifier chassis, and screen the ribbon cable and display - mounted on the front panel. This was to keep all the digital noise away from the audio stuff. Unfortunately I made a 10mm error on the dimensions! The plan now is to make an aluminium tray that will sit above the 24V PSU. This has the benefit that I can take it right up to the front panel so it also screens the display, as well as a much shortened ribbon cable.

Finally, a fairly complete schematic of the logic.

http://www.musically.me.uk/drawings/Logic.pdf

An astute observer will notice I've wired in spare inputs and outputs. This means I can easily add other controls if I want to later, and just reprogram the Arduino. Also, I haven't shown the output relays or driver. I haven't yet made up my mind whether to to use individual transistors or an 8-wide driver chip.

A point to remember about the Arduino is that during the bootup period all I/O pins are high impedance so if being used as outputs they are undefined until everything is settled. For this, reason I fitted the resistor network to the data lines feeding the 74537 chip to ensure the outputs are definitely off during this time.

The amp itself has been running quite happily at home in its basic form for some time now without any problems. No RFI or clicks, pops etc when household stuff switches on and off. I'm hoping it won't be too long before I can make a final push on the preamp sections and then pretty up the front panel.
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

D.I.Y. amp - correction :(

Post by Folderol »

Gah! silly mistake on the schematic. Sorted now - sorry :blush:
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

D.I.Y. amp - Onwards and Upwards

Post by Folderol »

At last I've been able to get back to work on this project... for a while!

First I've done some relatively minor improvements to the logic section. I've also finalised the PSU, using decent voltage regulators. After this, I went through all the drawings updating them and making them clearer.

The ones that are significantly changed are:

http://www.musically.me.uk/drawings/PSU.pdf
http://www.musically.me.uk/drawings/Logic.pdf

There is also a better picture of the bare logic PCB:

http://www.musically.me.uk/images/Logic_Bare.JPG

And now the new stuff!

I've completed the design of the preamp. It's not fully built and might need a few tweaks but the attenuator/volume control is done and tone controls and filters have all been tried out in breadboard form and seem OK.

The input attenuator, which is already in place in the amp with just a basic buffer following, gives approximately 10dB steps when fed from a low impedance source - the volume control being an integral part of the attenuator ladder. I wanted this so that whatever overall level I was listening at, I would always have a wide range for the volume control itself. A side benefit I've found is that when checking fade-outs of music I'm working on, I can step through the attenuator increasing the output in sensible steps while listening for discontinuities etc.

The tone controls are pretty conventional, but the centre frequency is a little lower than usual at about 800Hz, which seems nicer to me.

The crossover filters use fixed capacitors and switched resistor chains to cover the range 70 - 125Hz. The pattern of resistors I've used gives quite good precision relatively easily with preferred values. The caps are 1% and so are the higher value resistors (the rest are 2%). I probably didn't need to go that far, but I like the idea of a really close match of all 4 frequency determining sections. Sub drive is summed from the low pass sections of both L & R filters. Gain is set at +- 12dB which I hope will be adequate. If and when I get a sub unit I would expect to set these controls up then leave then severely alone.

If the preamp is switched for simple stereo, there is an overall phase inversion. I could have messed around using the first stage of the filter as a plain inverting amplifier instead, but that would have required more complex switching, and I really don't think it's important enough. I don't know if anyone else can detect absolute phase, but I'm pretty sure I can't!

As well as a drawing for the preamp, I've also put up one showing the ground routing which should make sure I have no internal ground loops. Although the logic is powered separately it has to be tied to the main ground in order to measure the various voltages.

http://www.musically.me.uk/drawings/PreAmp.pdf
http://www.musically.me.uk/drawings/Grounds.pdf

The relay control is done in principle but not installed yet (not much point until everything else is there). K1,2 & 6 could have all been operated by the same driver, but I had spares in the chip. Currently K4 and K5 are directly wired to the 24V supply. Drawing is here:

http://www.musically.me.uk/drawings/Control.pdf

Headphone output hasn't been done at all yet. I'm thinking of again using switched resistors to give the phones a fairly low impedance source along with a range of levels so that the apparent output from them can be set similar to that of the speakers. The logic selects phones or speakers, not both. I can't think of any reason for wanting both at the same time, and in the past, I have been caught out listening on phones and not realising the speakers were on as well!
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

D.I.Y. amp - a little set-back

Post by Folderol »

Things had been going well, perhaps too well.

The preamp board is built, but as there is a lot of gain around the opamps I've been populating it stage at a time looking carefully for any hint of instability. I'd just completed the tone controls and had needed, as I expected, to add a couple of extra caps to kill a bit of ringing when set for maximum treble. Controls were behaving really nicely with just the right amount of cut and lift.

By chance I shorted a makeshift attenuator I had hanging on the inputs resulting in a massive overload that pushed the amp so far into limiting it went asymmetric. The good news is that the logic (now also fully connected) picked up the effective DC offset and disconnected the output relays as it should. Once I'd pulled the input, the relays snapped back again quite correctly.

The bad news is that there was now about 1/2 volt of really weird HF crap on the outputs. A quick check all round and voltages all seemed normal, so was the current on the output stages. Switched off, did some more checks and had a good look around, then switched on again and everything was back to normal. Deliberately overloaded the input and the same thing happened. What's more I found I could set this off with just a high amplitude pulse on the input. Now I was worried!

Disconnecting the preamp and going straight into the main amp inputs cured the problem, so I started to think it was a preamp stability problem, even though that seemed really unlikely. This actually tuned out to be a red herring. Eventually I thought about putting the scope on the supply rails. Everything was fine ... till I looked at the -12V rail which was going absolutely nuts!

If you look at the PSU drawing, you'll see the supplies are symmetrical, so why was just the negative regulator misbehaving? I carefully checked the wiring for silly mistakes and examined the decoupling capacitors but everything seemed OK. Then I just tapped an additional cap across the -12V line to ground. The oscillations instantly stopped. Thinking I had maybe a dud cap I replaced it, but the fault was still there. However, additional caps on just the negative line cured the fault.

Confession time!

I'd looked up the LM7812 data sheet to confirm the decoupling I needed, which was >= 330nF on the input and >= 100nF on the output, then just repeated that for the LM7912. Just a mirror image, right? Well, wrong! When I thought to look up that one's data sheet it had >= 2u2 on the input and >= 1u on the output.

I've left the 100nF caps in place and now added 10u caps on both + and - outputs. The thing is now perfectly stable no matter what I hit the input with. Only a couple of days wasted. Phew!
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

D.I.Y. amp - getting there!

Post by Folderol »

Well first off I found another 'gotcha'. Wiring the sub signal and power channels together was a mistake. If the sub channel develops an overdrive fault it will switch off of course. This presents two problems. The first is that the normal speakers will now be handling the bass (and in some future setup that might not be advisable). The second is that with the routing changed, there will no longer be the signal condition that caused the fault, so after a second or two it will be reconnected. Rinse and repeat!

The advantage of having spare I/O comes to the rescue. I already had separate drivers for the relays, so all I needed to do was take another line back to the controller and make a minor software change. Now, when selected, the sub signal routing remains in place if there is an output fault registered, and just the output is disconnected with an appropriate warning on the display.

The following drawings have been updated to reflect this:
http://www.musically.me.uk/drawings/Logic.pdf
http://www.musically.me.uk/drawings/Control.pdf

A minor change has also been made to the preamp as I found there was an overall 3dB 'hump' at the crossover point when the sub channel was enabled. At the moment I've just lowered the value of two resistors to reduce the 'Q' of the filters, but I'm considering making this user adjustable too so that there is a better match to whatever speakers are employed.

New drawing is:
http://www.musically.me.uk/drawings/PreAmp.pdf

The board itself (without the 56pF caps I added later) is:
http://www.musically.me.uk/images/PreAmp_Bare.JPG

The idea of switched resistors for the headphone gain matching has been tested and seems to work reasonably well, but still isn't installed in the amp yet. I don't exactly have a huge range of phones, so there's a fair bit of guesswork involved, and (no doubt) later adjustment.

Finally here is a picture of the current state of the chassis:
http://www.musically.me.uk/images/Chassis_2.JPG

You can clearly see the new voltage regulators above the main reservoir caps. Its mounting plate is also the heatsink for the 4 voltage regulators, and is easily removable (hence the two cut-outs in the PCB. The logic is also pretty thoroughly shielded from the rest of the amp, with just very short leads to the display. Also, all the signal connections between the preamp board, controls & main amp are fully screened, and I did a quick crosstalk check which seemed to indicate better than -50dB @ 10kHz, and buried in the noise @ 1kHz. The screened wires to the input sockets tuck nicely into the groves in the side frame!
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

D.I.Y. amp - a bit of a hiatus

Post by Folderol »

Well, we've had a major shunt around at work, (where all this fun stuff gets done in my free time) and with the holiday period as well, things have rather come to a standstill :frown:

Our office is a very old converted granary. Since the shuffle I'm now one floor up in the building. which means more light and some nice countryside views.

Anyway, all my bits and pieces - gathered over many years - are in place, and I've actually got a little more floorspace than I had before. The bench itself is my pride and joy and has followed me around for about 12 years, even though the bosses keep saying I should have something more 'modern' (i.e. smaller).

So for a change instead of drawings here is the workshop.

P.S.
A small safety point. Although those side frames are metal, they are completely isolated - not even connected to each other, and everything else is heavy duty plastic coated chipboard, including the drawer unit.
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

DIY amp - lifting her skirts

Post by Folderol »

Sometimes you get a feeling that something isn't quite right and even though the amp seems to be behaving perfectly I've had that nagging doubt for a while. In an earlier writeup I mentioned that a severe overload, well into clipping, would make the amplifier output become asymmetric, giving an effective DC offset. It was this that was bothering me.

Eventually I found time to drag the amp into the workshop again and do some more detailed testing. What I discovered was that the offset developed far more rapidly than I would have expected, almost instantly in fact, and I didn't remember seeing that in my earliest trials. Referring back to my original drawings, apart from some minor adjustments of values, the only significant change in the amp itself was the addition of the cap across the 220 ohm resistor feeding the emitter of the BC550 pre-driver transistor. OK, so if it was charging up for some reason that would certainly do it.

Disconnecting the cap on the left channel and comparing it with the right one, proved this was the case. The precise cause took a little while to work out and was due to a little cascade of issues, originating in a couple of resistors who's only function was protection! The 100 ohm resistors going from the drivers to the bases of the output transistors are there to ensure that under overload conditions the driver current can't exceed a safe level, but this has a knock-on effect as under these conditions the drivers saturate and stop behaving like transistors with the input resistance of the drivers' bases rapidly dropping.

On the positive half-cycle this simply means the 2k2 pull-up resistor determines the current into the upper transistor, while on the negative half-cycle the current is determined by the pre-driver and it's emitter resistor, which could be near ten times as much. It is this that gives the asymmetric behavior, but this does no harm as everything is working well within spec.

Adding the capacitor dramatically changes the situation. When the bottom driver saturates the pre-driver briefly has an effective short circuit on its emitter, this means there will be a current pulse that may be well over it's specified maximum while the cap charges up. If it's a maintained overload, the charging of the cap will reduce this pulse quite a lot for each successive half-cycle while at the same time shifting the bias point and causing the rapid DC offset. A worse situation is where high amplitude bursts of signal keep hitting this point, then let the cap discharge again.

So, with some reluctance I've removed the caps, and accepted a slightly higher distortion figure, although I don't hear any difference. Which neatly brings me to some new info.

I have found a reasonably good software spectrum analyzer that uses my sound card. The frequency scale is linear rather than logarithmic but that has some benefits when looking at harmonic distortion. I'm driving the amp with the sound card pushing out about 3dB below its maximum, then attenuating the return from the amp so that peak voltage (fractionally below the clipping point) indicates at 0dB.

The traces are in pairs, first with a 7.5 ohm resistor (two 15s in parallel), then with a dummy 8 ohm speaker load. Note that these are all peak levels, and I'm afraid I've forgotten the formula for adding harmonics to get a total RMS figure.

Anyway, first at 1kHz.

http://www.musically.me.uk/images/Resistor-20db1kHz.jpg
http://www.musically.me.uk/images/Dummy-20db1kHz.jpg

Higher than I would have liked, but almost entirely 2nd harmonic which subjectively adds a tiny amount of 'warmth'.

http://www.musically.me.uk/images/Resistor-10db1kHz.jpg
http://www.musically.me.uk/images/Dummy-10db1kHz.jpg

Distortion becoming more noticeable, and 3rd harmonic climbing, but quite a good match between levels with resistor and a dummy loads.

http://www.musically.me.uk/images/Resistor0db1kHz.jpg
http://www.musically.me.uk/images/Dummy0db1kHz.jpg

Here we have full power. This is right on the verge of the clipping point at just over 60W, but still distortion is acceptable. However there is more of a difference between the resisitive and the dummy loads.

Next we have (not quite) 100Hz. I fiddled the frequency to minimise beat effects with mains.

http://www.musically.me.uk/images/Resistor-20db100Hz.jpg
http://www.musically.me.uk/images/Dummy-20db100Hz.jpg

As expected, the dummy load has a higher 3rd harmonic as its impedance is going to be dropping somewhat at this frequency, thus putting more load on the output transistors.

http://www.musically.me.uk/images/Resistor-10db100Hz.jpg
http://www.musically.me.uk/images/Dummy-10db100Hz.jpg

Again following a similar pattern.

http://www.musically.me.uk/images/Resistor0db100Hz.jpg
http://www.musically.me.uk/images/Dummy0db100Hz.jpg

For these last traces I had to cut the feed to my soundcard by 10dB. I was more than a little annoyed to discover it didn't like the peak signal at 100Hz.

There is more to come!
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

D.I.Y. amp - Almost Done

Post by Folderol »

Well, so much for having more free time these days. I seem to find it harder to get to work on this project.

Anyway we're approaching completion - Woo!

First off, we have the completed phones resistor network. This gives approximately 6dB steps (depending on the actual phones) and for my AKG240s half way up the range gives a pretty close match to my speakers. The choice of values was a multiple compromise between power dissipation, S/C protection, impedance and level. In the drawing there's a greyed out inductor. If I can work out the correct value I'm debating being able to switch this in to approximate the behaviour of speakers.
http://www.musically.me.uk/drawings/Phones.pdf

And now and underside view. The resistor network is pretty obvious in the top LH corner. and the switching relay is in the tiny board to the right and below it. Further across is the Relay drivers board. The decisions about these were all rather piecemeal, and I should probably tidy it all up with a new board for everything. It works, so I probably won't! The three relays at the bottom are for the speakers. I changed from my original choice as these are half the price for the same rating.
http://www.musically.me.uk/images/Underside.JPG

I also decided to add in the ability to change the Q factor of the crossover point and this is shown on an updated pre-amp drawing. You'll see I've started putting in function names and component numbers - there was no point while everything was still in development. This is the sort of work I always hate doing.
http://www.musically.me.uk/drawings/PreAmp.pdf

The front panel layout was settled a long time ago, and I chose control knob positions and sizes to reflect their importance. This is likely to be the biggest headache now, actually producing a front panel overlay. I not only need to get the legends in place, but also to mask over the edges of the display and cover up an 'oops' (a hole in totally the wrong place!)
http://www.musically.me.uk/drawings/Layout.pdf

Some minor alterations to the software. In the picture below, the amp was switched on while there was a strong signal being applied to the RH channel. You can see it on the bargraph, but there is also an 'X' at the end giving visual indication that the output has been disabled. As soon as the level is dropped, the relay will click in and everything behaves normally.
http://www.musically.me.uk/images/Start_Hold.JPG

In a similar way it has been blocked due to a DC offset (I faked it with a resistor on the logic board). Once again if the fault clears everything returns to normal.

http://www.musically.me.uk/images/DC_Hold.JPG

So there you go, only six years to not quite finish :)
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

I aint ded yet... as Granny Weatherwax would say.

Post by Folderol »

Some news!

The amp has been in daily use for quite some time now, and mostly I'm pretty pleased with it. However, watch this space as there are a couple of improvements I'm working on :)

P.S.
I still haven't found somewhere I can get a front panel made that won't require a home re-mortgage :frown:
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?

D.I.Y. Amp still going strong.

Post by Folderol »

Wow! It's been some time since the cleaners were in. Look at all the dust round here :frown:

Anyway, I've made two changes to the amp. The first is replacing the mains transformer with a torroidal one. This gives a slightly higher supply voltage and a slighty improved hum level - you need to get your ear right on the speakers to hear it now :)

The second change is that I've fitted (switchable) isolation transformers to the input. This is because there was one particular combination of hardware synths that produced some annoying but inaudible hf. Without the transformers you've got effectively infinite overload margin, with them it's around 40dB.

I'll try to update the drawings soon... ish :tongue:

I still don't have a tidy front panel. Anyone know a place that does bespoke ones, 3U rack size?

I'm thinking the best idea would be a thin-ish one that fits on top of the exisiting thick ally front plate and hides all the defects. It would be held in place by all the pot nuts, and the rack mounting bolts.
User avatar
Folderol
Jedi Poster
Posts: 19871 Joined: Sat Nov 15, 2008 12:00 am Location: The Mudway Towns, UK
Seemingly no longer an 'elderly'.
Now a 'Senior'. Is that promotion?
Post Reply