Monday, 25 March 2013

Class D Audio amplifier - IRS2092S

The problem with traditional amplifiers are the amount of heat generated per unit of consumed energy. Class A amplifiers have the worst efficiency. At best as much as 70% of the energy consumed is wasted as heat and only 30% of the energy consumed is used to drive the speakers. Some hardcore audiophiles swear this is the best topology since it results in the least amount of distortion, due to the fact that the "switches" are always on.

Class D theory has been around for decades. However it's only the availability of recent technology of cost effective semiconductor switches MOSEFTS that operate at high frequency that have made this topology a reality for commercial based applications. Class D audio amplifier topologies are typically around 90% efficient.

Class D - Block Diagram (IR,2003)

Basic PWM Operation (IR,2003)

Pulse width modulation works by a carrier frequency that is fed into a comparator with the desired input signal.The result is a square wave pulse train that is a digital PWM representation of the analog input signal. The square wave pulse train at the amplifier output is then converted into an analog representation by a low pass filter.

The Class D topology is not a silver bullet. It has its own unique problems.

1. The output low pass filter has a poor rolloff typically second order 20dB per decade. This makes EMI a potential nightmare. This EMI/RF propagates through the speakers cables. The cables effectively act as an antenna radiating this as RF energy, potentially causing interference with radio equipment. It would be interesting to look at the radiated emissions using a Spectrum Analyser.
2. Inherently lower damping factor, than class AB amplifiers. The IRS2092S reference design  damping factor is rated at 120 @1kHz & 4 ohm.
3. Bus pumping in half-bridge stereo mode (IRS2092) . Most common at low frequency input signals. This puts energy back into the supply rails. This is a reason why this class D reference design requires a good regulated power supply. In addition more capacitance on the supply rails reduces this effect.
Note there is no bus pumping effect when operating the amplifier in mono full-bridged mode.

Low Cost high performance

Thanks to International rectifier there are now many Class D amplifier modules based on the IRS2092 available at a very modest cost. This gives the DIY'er great performance for the cost.
After looking at buying a Class D kitset, I was tempted to purchase a complete kit from Their kit and build quality looks top notch. Their kits are supplied with large mains toroid transformers, and rectifier and smoothing board.
I am led to believe these designs are based off the International Rectifier IRS2092 reference designs. So how much better can they be than a reference design module? well the SDS kits offer balanced XLR inputs. I don't see the advantage of using an XLR input if you are running a short distance under 1m from the pre-amplifier to the amplifier. For long runs like an event or a music studio sure but for home use its overkill.

This got me thinking I can build one myself if I can source a suitable power supply, Class D amplifier module and enclosure.

Amplifier Module

I settled on a Sure Electronics Model AA-AB32321 125W x 2. Conservatively rated @ stereo 125W x 2 into 8 ohms or 250W into 4 ohms.
It appears this is a direct copy of the IRS2092 reference design. However Sure Electronics have  used International Rectifier AMPS-200 model, with IRFI4019H-117P MOSFETS.
The gain of this module is 39. 
  • The ON-OFF switch has been bypassed and wired on.
  • The bridge switch is set to non-bridge mode.
  • Only the blue LEDs are present one for each channel. These indicate that the IRS2092 is operational, and that the PWM driving signal is present to the MOSFETS.

  1. Potentiometer P1A and P1B have been set to zero ohms. This is configured as a 2 terminal variable resistor. This should be set to 200 ohms. This will give a nominal operational frequency of 400kHz for the amplifier module.
  2. Check the tightness of the devices on the heatsink. 
One other point to note,  this particular amplifier is suitable for speakers with impedance's between 4-8ohms. With a preference towards lower impedance's. Higher impedance's may cause stability issues.

Board changes

1. The IRS2092 reference design is made for 1 VRMS full scale input signal. This is usually too much for most sources, and as a result full power is reached too soon.
2. Solution change the voltage gain of the amplifier. Stock voltage gain is 39. I changed R7 from 3k to 6.2k. This changes the gain to 19.9 (just over half the gain). What this means in that the input signal can now handle a full scale signal of 1.96V RMS (lets say 2V RMS) line voltage levels. The other advantage of this is that it effectively doubles the input impedance to the IRS2092 (6.2kohm). Make sure that your pre-amplifier has a output impedance of 600 ohms or lower using the factor of 10 rule of thumb.
3. DC blocking capacitor CP1 can be removed (and replaced by a wire link) from both channels if you are certain, you have no DC offset at the output of your pre-amplifier / source.

Power Supply

I settled on a Connexelectronic 500W SMPS, -/+60VDC regulated power supply.
The major advantage of using a SMPS unit instead of traditional mains to secondary transformer then rectification and storage / ripple smoothing capacitor banks is the WEIGHT and SIZE!
The SMPS measures 100 x 100 x 40mm high. At only 400grams.
  • The supply can be adjusted to -/+10% of the nominal voltage. The small adjustment trimpot is between both output capacitors.
  • This power supply has a soft start, I like this feature since it puts less stress on the mains switch (inrush current) upon  power on.
  • Also the power supply has a common mode choke EMI filter circuit built in so you don't need to add one.
  • To get near the distortion figures the specifications hint at, the IRS2092 reference design demands a good regulated power supply (PSRR) that can supply enough current at the set voltage.

A slightly larger enclosure would have been better. The power supply has been orientated this way as the high frequency switching section of the board to the back plate, mains section closest to amplifier this keeps the high frequency switching transients as far away as possible from the amplifier module.

Fairly simple to put together the hardest part is drilling out the holes for the connectors, cut out for the power switch and PCB mounting holes and chassis feet, plus some extra holes to allow some air through.

Make sure that the power switch is mains rated and is switching the phase (live)! and also that the chassis is connected to the mains earth. If you have not had any exposure to working with mains voltages, this is not a project you should be attempting.

Minus the top plate screws. Testing still in progress.

The verdict

For 250NZD I was able to build this amplifier. This is my first experience with a Class D audio amplifier.
Surprisingly it sounds great! definitely worth my time and effort. My impression comparing it to my Modified Marantz class AB amplifier - The lower end bass appears to be ever so slightly tighter and hit a little harder. Otherwise the sound quality appears to be of a very similar nature, I can't hear any other differences.

I like when there is no input signal,music being fed into the amplifier, it goes dead silent.

Running the amplifier at modest but comfortable volume setting for 45mins resulted in a heat sink temperature of 41 degrees C, room temperature 25C.
If the heatsink temperature becomes a problem I could look to build a thermal conduction bridge (an aluminium channel of sorts) from the amplifier heatsink to the enclosure heatsink. 

I really dig the temperatures from this amplifier, compared to a Class AB amplifier. You get great quality sound with better energy efficiency, and if using a SMPS power supply a lightweight solution. The weight of the finished amplifier is around 3kg. Most of it is the rather solid aluminium enclosure sporting left and right side heat sinks and a solid front aluminium panel.

The only drawback so far - Sometimes there is a small but noticeable "pop" on power up of the amplifier, and a small but noticeable "pip" on power down. I emphasize small, but I can live with that.

Friday, 8 February 2013

Improving the Zero DAC

The Zero DAC is a low cost Asian designed and manufactured digital to analog converter pre-amplifier. Can be bought on ebay for under USD130 plus shipping for the OPA627 version plus USB, less for the OPA2604 op-amp version.

The Zero DAC uses the Analog Devices AD1852 24bit, 192kHz max as its DAC IC. The unit is most useful interfacing to digital sources such as:
  • CD player
  • PC

This fits the bill exactly on what I want. The PC connectivity is very handy. The Zero DAC uses the TI PCM2704 USB to S/PDIF integrated circuit (IC) which makes the Zero DAC look like a soundcard. Unfortunately this IC is limited to 16bit resolution and 48kHz sampling rates. However for digital music files that have been ripped from CD's this is sufficient. CD quality is typically 16bit, 44kHz.
I intend on using this unit for both as a digital sources pre-amp interfacing to a class d amplifier.

The unit also has a headphone amplifier however this is the weak link of the package see Headphone Amplifier schematic .  Do NOT buy a Zero DAC if you intend on using it solely for headphone output.


  • Digital coaxial input
  • Digital optical input
  • Generic USB soundcard, supported by Win7&8, and latest versions of LinuxMint (Ubuntu?)
  • AD1852 DAC IC
  • Volume control (both a pro and a con!)
  • Line voltage output
  • Toroid transformer
  • Op-Amp upgradable via DIP socket
  • The use of ferrite suppression on PCB layout
  • Able to be modified


  • Headphone circuit sub-standard (refer to headphone circuit upgrade)
  • No unbalanced line outputs. Personally I don't see the need for this unless you need a long run cable between the pre-amp and the amplifier. I plan on using at most a 1m RCA cable! 
  • High quality volume control will need a new headphone amplifier circuit. Since I'm not planning on using headphones I'm going to simplify the existing circuit to use just a pot (stepped attenuator 10k) and an op-amp.  This can be done by utilising the existing headphone PCA. You will need local decoupling capacitors hung off the supply pins of the op-amp say 47nF, I had oscillation at the output. Also a sizable low ESR capacitor should also be hung off the supply pins. The below schematic is of 1 channel. Make sure you use an audio op-amp, the NE5532 is cheap and cheerful that is unity gain stable.

  1. Remove(snip) 2 x 22pF ceramic capacitors  from line input.
  2. Increase capacitance on digital supply add small bypass capacitor on rear of PCB (33-100nF)
  3. Increase capacitance on analog supply add small bypass capacitor on rear of PCB (33-100nF)
  4. Change AC rectification diodes 1N4007 to UF4007.
  5. Upgrade supply capacitors on AD1852, bypass with low value capacitor on rear of PCB (33-100nF).
  6. Upgrade supply decoupling capacitor on TCXO
  7. Modify Amplitude / phase response of Op-amp (refer to Bode Plots)
  8. Remove 4 x AC coupling capacitors from inputs of op-amp. These are not required as any DC is common to both inputs and thus rejected (refer to AD1852 datasheet).
  9. Add local low ESR capacitors to supply rails directly off Op-Amp supply pins.
  10. Change to stepped attenuator if potentiometer begins to cause issues. 

Et voila. If you are handy / know what you are doing when it comes to electronics and want a low cost digital source DAC pre-amplifier with potential this is it. The modifications are tedious without a solder sucker desoldering station. However it can be done with patience desolder wick, and using long component leads to help clear the through holes of solder.

I suggest buying the OPA627 version with USB. For around $20 less the OPA2604 version is probably okay too.
Interestingly the 2012 version of the Zero DAC includes the opa637 as an op-amp and more expensive?! The problem is this op-amp requires voltage gains of at least 5 times to be stable. The op-amp circuit in the Zero DAC is at unity gain!

Photo of Toroid transformer