Kara-Moon Forum
May 07, 2024, 07:00:32 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Fast Work - almost done!  (Read 16729 times)
folderol
Kara-Moon Master
****
Posts: 5310

Who? Me?


WWW
« on: August 26, 2013, 07:55:03 PM »

A short(ish) missive about one of the many things that has been taking up my time lately.

About 6 years ago I decided that I needed to build an amplifier to go with my DAW, rather than plugging in to the domestic HiFi. After about 2 years I had the design sorted out and a basic rats-nest build that proved it would work, so I set about buying most of the parts I'd need.

Around 2-3 years ago I got fed up with the big HiFi speakers that were great for 'normal' stuff but no good at all for composing and mixing, so I got a pair of nearfields - still plugged into the main HiFi though.

Finally, over the last few months I've made a determined effort to actually build the thing Roll Eyes

Here are my notes - I might even turn the whole thing into a sort of blog ... eventually Tongue

Preamble.

The design 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.

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

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.

Techy Stuff.

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 25-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 @ 200mA - 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 helps 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 30dB.

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


Further development and testing.

Warning - Amplifier Porn!

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 it 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 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. An astute observer will notice there are three sets of outputs. That's because the middle one will eventually be for a sub-bass Smiley
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). I have now decoupled the BC550C pre-driver. Before I did so, distortion was mostly third harmonic, now (although 6dB lower overall) it's more even order. There is also some residual hum showing - that's what's making the trace seem to jump about.
http://www.musically.me.uk/images/1kHz_THD.JPG

Then there is a 1kHz square wave at nearly 50W (square waves give more power for the same peak voltage). Nice clean trace - sorry, I moved the camera!
http://www.musically.me.uk/images/1kHZ_Square.JPG

Next we have a 6V P:P triangle wave. We 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 8 ohm resistive load and an 8 ohm 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

I have yet to build up tone controls, sub crossover etc. I'm also intending to use an Arduino board as a System Health Monitor and Speaker Manager. So quite a lot to still be going on with!

Oh, one last point...
Even in it's incomplete state it sounds great Grin Better detail and clearer stereo positioning than the HiFi.

« Last Edit: March 27, 2014, 08:03:43 PM by folderol » Logged

If you have a poem, I have a tune, and we exchange these, we can both have a poem, a tune, and a song.
- Will
Marc JX8P
Moderator
Kara-Moon Master
*****
Posts: 1087



WWW
« Reply #1 on: August 27, 2013, 08:20:05 AM »

Very cool project! Cool I like these build-threads so keep 'em coming! Smiley
Logged

Also known as Marc JXP
Oren
Moderator
Kara-Moon Master
*****
Posts: 5444


...just looking for clues...


« Reply #2 on: August 27, 2013, 08:43:41 AM »

Very cool project! Cool I like these build-threads so keep 'em coming! Smiley

Even order harmonics - gotta love them!
Sweet bit of kit you display here, Mr. G. Kiss
Logged

MarioD
Kara-Moon Master
****
Posts: 4346


« Reply #3 on: August 27, 2013, 12:47:22 PM »

You are a multi-talented man Will.

All I can do with a soldering iron is repair guitar and MIDI cables.
Logged

The older I get the better I was!
folderol
Kara-Moon Master
****
Posts: 5310

Who? Me?


WWW
« Reply #4 on: September 05, 2013, 06:23:09 PM »

Hi, it's me again.
I'm very pleased people are interested in this, so here's a bit more to read Smiley

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 Smiley
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'.

Logged

If you have a poem, I have a tune, and we exchange these, we can both have a poem, a tune, and a song.
- Will
Oren
Moderator
Kara-Moon Master
*****
Posts: 5444


...just looking for clues...


« Reply #5 on: September 05, 2013, 09:08:09 PM »

We have just reached the point in our audio-tech limbo dance where I can no longer achieve the necessary mental contortions to make the trip under the bar.  Roll Eyes

Still a very interesting exercise in breathing the air at high altitudes, though... Bring it on!  Grin
Logged

Marc JX8P
Moderator
Kara-Moon Master
*****
Posts: 1087



WWW
« Reply #6 on: September 06, 2013, 01:14:51 PM »

Very cool! Don't worry Oren, it's getting too technical in points for me as well Cheesy . Love the display pics btw.!
Logged

Also known as Marc JXP
folderol
Kara-Moon Master
****
Posts: 5310

Who? Me?


WWW
« Reply #7 on: September 07, 2013, 05:59:38 PM »

Oh dear! Thanks for staying with me guys Grin

It's very hard trying to pitch something like this at the right level. Too much info and people's eyes glaze over - not enough, and they think you're dumbing down Huh
Logged

If you have a poem, I have a tune, and we exchange these, we can both have a poem, a tune, and a song.
- Will
Marc JX8P
Moderator
Kara-Moon Master
*****
Posts: 1087



WWW
« Reply #8 on: September 10, 2013, 02:25:31 PM »

Don't let that stand in your way too much - we can always look some stuff up on Wikipedia, as long as we can follow the general gist. And pictures always help. Wink
Logged

Also known as Marc JXP
Oren
Moderator
Kara-Moon Master
*****
Posts: 5444


...just looking for clues...


« Reply #9 on: September 10, 2013, 08:50:23 PM »



Cheesy   ....    Grin
Logged

folderol
Kara-Moon Master
****
Posts: 5310

Who? Me?


WWW
« Reply #10 on: September 13, 2013, 07:46:16 PM »

Thanks again guys. Been a busy week so no more developments yet, but I'll be back... as the man said.
Logged

If you have a poem, I have a tune, and we exchange these, we can both have a poem, a tune, and a song.
- Will
folderol
Kara-Moon Master
****
Posts: 5310

Who? Me?


WWW
« Reply #11 on: October 11, 2013, 07:07:37 PM »

Hi again all Smiley

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.
Logged

If you have a poem, I have a tune, and we exchange these, we can both have a poem, a tune, and a song.
- Will
Marc JX8P
Moderator
Kara-Moon Master
*****
Posts: 1087



WWW
« Reply #12 on: October 11, 2013, 09:10:08 PM »

Very impressive!
Logged

Also known as Marc JXP
folderol
Kara-Moon Master
****
Posts: 5310

Who? Me?


WWW
« Reply #13 on: October 17, 2013, 07:04:53 PM »

Thanks Smiley
Onwards and upwards!
Logged

If you have a poem, I have a tune, and we exchange these, we can both have a poem, a tune, and a song.
- Will
folderol
Kara-Moon Master
****
Posts: 5310

Who? Me?


WWW
« Reply #14 on: November 20, 2013, 12:21:08 AM »

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!
« Last Edit: November 20, 2013, 12:26:14 AM by folderol » Logged

If you have a poem, I have a tune, and we exchange these, we can both have a poem, a tune, and a song.
- Will
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.056 seconds with 20 queries.