12 Mar 2014

Speaker Design V2




I've modified the previous design that I posted. This one now has internal bracing and a nice white LED power indicator.

I'm currently working on the LED resistors to get the right brightness. This is more important than some might realise as when sitting on-axis with an LED they are considerably brighter. My uncle has sent me some resistors and I'll do some trial and error until it's just right.


Here is the cutting list for one loudspeaker. The only thing missing is a cut-out for a power switch..

14 Feb 2014

Introduction & Early Project Ideas


Hi,


My name is Ollie Marshall and this is my blog about my speaker design project that uses digital signal processing (DSP) at its core. I'm currently in my final year studying Bsc Music Tech at Leeds Metropolitan University. I've always had an appreciation for decent sound quality, my dad gave me his old stereo hi-fi set when I was a kid so I've always had a pair of speakers at my desk since I was about 12. They were nothing special but I hadn't heard anything better (or louder!) at the time. I'm now age 21 and the course I am studying has reinforced my interests in accurate sound reproduction. I now own a pair of KRK VXT6's which sound great.

I'm a musician but I also like to think I'm quite academic when it comes to understanding the world. I took A-Level Physics and Chemistry. My course is a balance between science and creativity (although I'd probably prefer a little more science). I knew I wanted to do something with loudspeakers for my final year project but I wasn't sure exactly what. I thought it would be cool to build some transducers to put in a speaker enclosure, so I bought some enamelled copper wire and wrapped a voice coil by hand. I wrapped it around a card former that I also made.





I took apart an old speaker for the magnet assembly and placed the voice coil/former in the gap. I made a cone out of some card and glued it to the former. The enclosure was from another old loudspeaker. I didn't have any rubber for a surround and I was at home so I got the masking tape out to hold the speaker cone in place (not a very elegant solution I know). After a while I decided to make a spider by stretching some fabric over the empty masking tape roll. This improved the sound quality. The speaker was powered by a solid state amplifier, I had to keep replacing the fast blow fuses in it (the speaker was probably <2ohms although I never measured it). I used the graphic EQ in Foobar 2000 to attempt to improve the speakers response which actually worked really well. Here is a video with a quick A/B comparison. With the EQ turned off there is a very large, broad peak centred around about 1.5kHz. This is only an educated guess though really as no measurements were made, only subjective listening and free hand corrections were made using my ears and the EQ.

I enjoyed tweaking the EQ to try and improve the speakers response, and this project encouraged me to take the DSP further. I decided that building the transducers was probably a bad idea as my final year project due to the tolerances involved. Instead I decided to use pre-existing drivers and focus on the design of the enclosures and use of DSP.


13 Feb 2014

Final Year Project

I'd established that I wanted to do speaker design but I wanted my work to stand out from other people doing speaker design. Most importantly I wanted my loudspeakers to have a unique selling point. Not that I will ever sell them when they're finished!  After some research around different crossovers I stumbled across a company called MiniDSP. They specialise in relatively low cost digital signal processing hardware focused on audio processing. Their flagship device is a palm sized circuit board called the MiniSHARC, It allows the user to plug it in to their PC and program it to :
  • Create a crossover network
  • Time align the drivers
  • Apply equalisation to each driver
  • Apply equalisation to the overall systems response.
  • Adjust the phase response independently from the amplitude response.

This last point is possibly the most exciting one as it is only really achievable with DSP. This allows the crossover to have steep slopes but maintain a linear phase response (in theory). A traditional analogue crossover, or even a 'normal' digital filter crossover introduce phase shifts to the signal (its how they work). This causes cancellations centred around the crossover frequency because the two drivers are playing the same frequencies but out of phase relative to each other. A linear phase filter works by adding a time delay to the signal (this allows all of the phase shifted components of the signal to be 'realigned' in time).

I had now decided that I wanted my project to focus on DSP, I titled it:


An evaluation of the use of digital signal processing within a loudspeaker design project.


12 Feb 2014

MiniDSP and my take on the uses of DSP in speaker design



After doing some research it became apparent that MiniDSP was the most suitable company to get the DSP hardware from. They also sell DACs and accessory boards that allow you to have a physical volume control and SPDIF inputs. I opted for their flagship device, the MiniSHARC along with two accessories, the VOL-FP and DIGI-FP. I also ordered two stereo I2S DACs. While researching MiniDSP it became apparent that their user forum is very active. It's full of people who know a lot about their products and are willing to help you out if you have any problems. The dev (development) team also write replies in the forum, its a great tool to help you understand the products, their capabilities, and their limitations.

Here is all the kit: The one in the middle is the MiniSHARC, bottom is the VOL-FP, back left is the DIGI-FP and on the right are the two DACs.



Power Supply Woes

My boards arrived 2 days ago and after a few teething problems with the firmware it all works. I have yet to test the DACs as I don't have the correct power supply for them. I originally tried to power the MiniSHARC and one of the DACs with the bundled power supply but when I connected the DAC the DSP board turned off! I think their is too much voltage sag (I doubt the PSU is regulated) I measured it to be 5.25V at no load but I guess its not good enough. I might try a seperate 9V DC wall plug I have (the MiniSHARC is happy with 5V-24VDC but I'm not sure of the max voltage that the accessories connected to it can take).

I will build a 'proper' power supply from a Traco switch mode power supply and a filter circuit to remove all the switching noise. The designer of the miniDSP DAC (aka the user curryman) has posted a filter design on the forum and I am in the process of buying a PCB off him. I need to order the parts for it too then put it all together. The 'proper' PSU should be able to power the MiniSHARC and the two curryman DACs


Software

I'm using the MiniSHARC 4x8 'plugin'. The board is first connected to the PC with a USB cable and then you can sync it with the software so any changes you make happen in real time. This is a great tool for crossover design even if the speaker doesn't use DSP at the end because analogue filters can be made to match the IIR digital filter designs used in the crossover. In fact the presets in the software like the Linkwitz-Riley filter shapes were originally analogue designs that have been emulated in the software! I wouldn't be surprised if DSP like this is used by crossover designers.

























Here you can see a filter that could be used for a LF driver (woofer). It includes a subsonic filter too. The cutoff frequency for this driver is set at 2.5 kHz but could easily be changed by changing the number in the box, its really that simple! Below is the filter that would be used for a HF driver (tweeter).


That's not all, EQ can be applied to each driver individually to correct their non-linear amplitude response. I plan on doing this. I need to book some time in the anechoic chamber at my University to measure each drivers frequency and phase response. I can then apply EQ to the drivers to approach a flat response, well that's the idea... I'll take multiple measurements on and off axis and combine them for an averaged response. This should serve me better when applying equalisation because the response changes depending on the angle of the driver compared with the listener.

The digital filters that make up the crossover are called bi-quad IIR filters (Infinite Impulse Response). These filters create phase shifts in the transitional period between the pass band and stop band, much in the same way an analogue filter would of the same design. The beauty of the MiniSHARC is that it also employs FIR filters (Finite Impulse Response). These filters add a time delay to the signal to 're-align' all of the phase shifted components relative to each other. Furthermore they can shift the phase independently from the amplitude meaning the crossover network can be implemented with 'phase-shifting' IIR filters but 're-aligned' using the FIR filters.

At this point you may be wondering something along the lines of:

"I didn't realise that crossover networks did that, but I'VE never noticed so what's the big deal? Don't fix it if it ain't broke right?" 

Chances are that you probably have heard the artefacts of a crossover networks phase shifts. It usually equates to an uneven frequency response at and around the crossover frequency. Its because the phase of the signal to the woofer and tweeter are effected in different ways meaning that at and around the crossover frequency (where the drivers are playing the same frequencies) the signals are out of phase. The situation can sometimes be improved slightly by inverting the polarity of one of the drivers which, depending on the crossover filter will bring the relative phase of each driver closer to being in phase at the crossover frequency than if you just left them. Obviously the rest of the signal in each of the drivers pass bands is 180 degrees out of phase but this doesn't matter because humans aren't sensitive to absolute phase.

My point is that standard analogue AND digital filter designs cause problems and are by no means perfect. FIR filters could offer a solution but they have drawbacks too.

FIR Filters

FIR filters require more processing power to implement than IIR filters and are prone to a phenomenon known as pre and post-ringing. The audibility of this is questionable and is in fact a big part of my final year project. The steeper the filter slopes the more 'extreme' the ringing. It is most audible when a transient is passed through the system. I tried to test this in a Reaper. I set up a 'brick wall' FIR filter which was literally a straight line down from 0 dBFS to something like -110 dBFS. I then set up a transient that played every few seconds and listened to see if I could hear any ringing before or after the transient. I found that it was clearly audible in this configuration. This was an extreme example though and would not (and could not) be implemented with the MiniSHARC DSP.

Another thing to point out is that the exact same 'ringing' is reproduced from the other driver but inverted, meaning that in theory they cancel out perfectly*. This was not implemented or even considered in my quick test. *As two electrical signals travelling to each driver, if they were summed electrically they would cancel out perfectly but in a speaker system they sum in the air acoustically. Depending on the listeners position they may not (probably wont) sum perfectly, but again this brings up the question of how audible it can be in a real system. Remember a real crossover network uses much shallower roll-offs than my test, and no 0-1-0 pulse transients are present in real music reducing the severity of any ringing considerably. I plan on hosting a listening test where I'll play music with the normal IIR crossover filter, then the same music but with the FIR filters active and see if people: 

A. can hear any difference at all.
B. have a preference.


Time-Alignment

Another great feature of the MiniSHARC is that you can add a time delay to the signal to each driver. This is useful because usually the tweeter is closer to the listener than the woofer because the woofers cone protrudes back into the speaker enclosure. This means again that there will be phase cancellations at and around the crossover frequency because the sound from each driver arrives at the listener at different times.


Conclusions of DSP within speaker design

DSP offers many benefits to a speaker designer, in terms of improved flexibility and extra functionality over analogue systems. Some people may feel uncomfortable with the idea of DSP because it adds an extra layer of signal processing that could be deemed unnecessary and may degrade audio quality. They might say they want to hear the audio with no alterations; maybe in a totally analogue system (which is totally fine) but they are mistaken if they think their analogue crossover and drivers non-linear frequency response are not altering the music they hear. Of course a poorly designed badly implemented DSP will cause problems and reduced audio quality. Unnecessary conversions between digital and analogue should be avoided (the miniSHARC accepts a digital input).








11 Feb 2014

P3A Power Amplifier



For my project I needed 4 channels of amplification because I am bi-amping each loudspeaker. The crossover is before the amplifiers (unlike passive loudspeakers where the crossover is between the amps and drivers which wastes energy and causes all sorts of problems). Rod Elliot explains the benefits of bi-amping in great detail on his site ESP - Elliot Sound Products. He also designed the P3A amplifier that I built two of for my project. Both the links to these pages can be found here:

Benefits of Bi-Amping (Not Quite Magic, But Close)



I built the amplifiers with my uncle as he's very experienced with working with electronics. He restores old radios and builds radio transmitters for Universities and Schools! The last time I did any soldering was in secondary school about 7-8 years ago so I thought it was best to get some help for the amps. He agreed to do one stereo amp each although it ended up more like 60% - 40% as he soldered the transistors and did the mains wiring (I don't want to burn my house down!).

The Power Supply

With the 300VA transformer I'm using, the amplifier is capable of outputting 75W peak (65W continuous) into an 8 ohm load. With bigger power supplies 100W peak can be achieved per channel. The only problem with a more powerful power supply is the inrush current of the transformer and larger capacitance of the capacitors. It causes a sharp spike in current which puts strain on some of the components and will often blow the fuses. A soft-start circuit can be built (again on the ESP website) but I thought I'd keep it simple and just use the smaller (well 'standard') power supply recommended I did increase the capacitance slightly which should prevent the supply sagging during transients. Music is of a transient nature after all.

The supply is not regulated (self regulating?) and consists of a Toroidal Transformer > Bridge Rectifier > Filter Capacitors. For those that don't know what all these things do I'll explain. The Transformer takes the 230Vrms UK AC mains voltage and outputs +25V, Gnd and -25V and Gnd. These are connected to the bridge rectifier. This Rectifies the AC signal which looks like this: v^v^v^ and turns it into this: ^^^^^^. The filter capacitors then smooth this out into a constant DC voltage (usually there's some ripple too).




















































































Heatsinks

The heatsinks ended up costing more than I would have liked (£75 for two). I called a few companies some had a minimum order charge of £100 which wasn't very helpful. Rod Elliot states that a pair of amps will be happy with a 1C/W (1 degrees Celsius per watt) for normal use. He also said that if you intend to push the amp then it should be more like 0.5C/W. I ended up with one closer to 0.4C/W which has even better thermal performance.

The company also messed up the order in my favour. I paid for a 22cm long heatsink, the box they arrived in said 24cm and when I measured them they are 25cm long. 3cm of extra heatsink for free, thanks!






Building the Amps


I went to my Uncles to build the amps as he has a workshop with test equipment and a workbench. We spent about two days building them. 



Some of the parts from Mouser

My Uncles analogue meter





Some of my uncles radio equipment

Radios that are in need to repair


We used a special analyser to work out which leg was what (base, collector, emitter) to ensure we were putting the transistors in correctly


More components



Here they are



My uncles DIY analogue tone generator he built 20 something years ago!


We did some quick testing with a DC bench supply at a lower voltage and a speaker load. Nothing blew up or got too hot so we proceeded to build the power supply.

Like I mentioned earlier, I left this part to my uncle because I wasn't really qualified. I watched him build it and helped hold things steady while he soldered.

Here is another DIY piece of apparatus. Its called a variac and adjusts the mains voltage from 0% to 110%. I had to think about the extra 10% for a moment too! I think he said the casing for the variac is an upturned plastic plant pot. After building the power supply we tested it using this by slowly increasing the voltage to 100%.

We used this large resistor as a dummy load for the amp output. It got very hot!


Here are the two finished amps

This picture shows the power supply connected to the amp, the amp outputs and audio inputs.
Setting the Quiescent Current

Once we got the amps up and running we needed to set the quiescent current. This is done by changing the value of the multi turn variable resistor with a screw driver. The greater the resistance the less current there is flowing through the output transistors. To little and distortion will occur, too much and the output transistors will overheat. We made sure the variable resistors were set to their maximum resistance before any testing for this reason. We played a sine wave 1kHz test tone through the amplifier and hooked up the output to the oscilloscope. There was some clear distortion in the waveform (it looked like a little wiggle). We reduced the resistance until the distortion disappeared on the scope. Later on we measured the current and adjusted it slightly to the recommended setting of about 75mA.






Integration into the speakers

The amps will be mounted in the back of the speaker enclosures with the heatsinks protruding. The power supply will be mounted inside the enclosure.



10 Feb 2014

MiniDSP - Part 2


I've had the MiniDSP equipment for a few days now and I've only been able to use the MiniSHARC, VOL-FP and DIGI-FP accessories. I haven't been able to test the DACs because I didn't have the right power supply. I found a 9V DC wall plug and as the miniSHARC can accept anything from 5V to 24V I thought I'd use that to power the MiniSHARC + accessories and then the 5V power supply to power the DACs. I plugged it in and the LEDs came on. I then successfully synced it with the software but about 2 minutes later it lost connection and I noticed some smoke above the boards! PANIC! I unplugged the power straight away but any damage was done. I plugged it back into the 5V supply but it wouldn't sync. I tried it again about 5 minutes later and it started working again! FHEW!

I think I was lucky not to brick it. I'm not sure where the smoke was coming from because I instinctively blew on it. I'm not going to plug it back into the 9V supply to find out which thing it was either... I think I've worked which component it was, take a look at this picture:




The component in question is about  1.5 mm long, its tiny! I have no idea what it is either. Possibly a resistor. Here's another photo from the side:




Here's a zoomed out picture to get some perspective. The silver box in the bottom left is a USB port.



I should have just kept on using the standard power supply but unfortunately MiniDSP don't sell a power supply for their DACs so I was trying to use it for the DACs. Obviously the accessories have different voltage requirements than the MiniSHARC, which is fine but they don't specify them or even warn the user. In the MiniSHARC manual it states that if you are using the AN-FP accessory you must use 5V. I'm not using that so I thought using something a bit higher than 5V would be fine. I guess not.

Connection of MiniDSP to Amplifier

The whole reason I was using a different power supply was so I could use the 5V one to power the DAC. I wanted to test one of the DACs with the amplifier and a woofer, so I wired the amp input to one of the DACs outputs and put the amp on my table and plugged it into the mains. When I switched it on the MiniSHARC lost its connection with the software. I tried it a few times to no avail. After calling my uncle (the electronics expert) he said I should try disconnecting the earth from the plug (not permanently) to see if it was some sort of ground loop causing problems. It seemed to work and I managed to get the DSP online AND the amp switched on and wired to the DAC. There was no sound though, not even any noise or hum coming from the speaker. By this point I was quite frustrated so I thought I should put it all away for a day and come back to it later. 












9 Feb 2014

Drivers and Bass Ports


After lots of research into loudspeaker drivers and loudspeaker configurations I decided on a two-way bass reflex design. I would have preferred to do a three-way bass reflex design or a sealed two-way with a sub woofer. It was simply too expensive to create such a set up as I would need 6 amplifier channels for a three-way design.


I found a UK supplier called Falcon Acoustics, they sell loads of drivers from different companies. The Scan-Speak drivers stood out to be good value for money, particularly there 'budget' range called the discovery range, they are by no means 'budget' drivers though. I got a 6.5-inch woofer and 1-inch tweeter. Both are 8ohm which is a bit unusual for a tweeter (most are 6ohm or 4ohm).

The woofer is the Scan-Speak 18W/8434G00 (Midwoofer)
and its datasheet: Woofer Datasheet

The tweeter is the Scan-Speak D2608/913000
and its datasheet: Tweeter Datasheet




I balanced the woofer and tweeter on some random stuff so they are all lined up with the port on what would be the baffle. Also, here is a size comparison of the woofer compared with one of my KRK VXT 6's which has a 6-inch woofer. I'd say at 1st glance the KRK woofer looks larger because it has a larger dust cap and the rubber surround is much larger. I imagine the KRK woofer has a larger xmax and maximum mechanical excursion because of these features but I don't know because they don't tell you those sort of things... I measured the diamter of each and the Scan-Speak woofer is indeed the larger of the too.