This is only a preview of the April 2011 issue of Silicon Chip.
You can view 35 of the 104 pages in the full issue, including the advertisments.
Items relevant to "Portable Headphone Amplifier For MP3 Players":
Items relevant to "Fixing Transformer Buzz In The Class-A Amplifier":
Items relevant to "Cheap’n’Simple 100V Speaker/Line Checker":
Items relevant to "A Speed Controller For Film Projectors":
Items relevant to "The Maximite Computer, Pt.2":
Purchase a printed copy of this issue for $10.00.
Fed up with the sound from your iPod or MP3 player? Build this headphone amplifier and be amazed at the difference! By NICHOLAS VINEN I F YOU ARE USING ear buds with your iPod or MP3 player, you are getting the equivalent of sonic garbage. Nor does using a high-quality pair of headphones do much to improve it. You need to use a good-quality external headphone amplifier and a goodquality set of headphones and then you will be really travelling (riding, walking, whatever) in style. So why put up with sonic garbage? You can have much better sound quality. The headphone amplifier described here has low noise and distortion, as well as a long battery life. So why are these portable players so poor? While the digital-to-analog converter (DAC) in your music player may be quite good, in many cases it is let down by a feeble headphone driver. This not only limits the maximum volume but can also introduce a lot of distortion even at lower volume levels. With an external amplifier, the headphone driver in the music player is no longer required to supply high 28 Silicon Chip currents into a low impedance. It only has to provide a signal voltage into a high impedance load (in this case, about 5kΩ). The external amplifier takes on the more demanding job of driving the low (and variable) impedance headphones to a sufficient power level. There are a lot of different music players out there and it is not possible for us to try them all but from the tests we have run, it seems that the majority of even better-quality players can benefit significantly from an external amplifier such as the circuit presented here. While various different styles of headphones and ear-buds are available, from this point on we shall simply refer to them as “headphones”. Performance comparison To see how much of an improvement this headphone amplifier can provide, refer to Fig.1. This is a graph of total harmonic distortion and noise (THD+N) against frequency for an iRiver iHP-140 music player. This is an older model with an internal 40GB hard drive and we tested it because it has a reputation for reasonable sound quality (and we had one handy). The red line shows the distortion from its line output. Not all portable players have a line output but if it is present, it usually provides the lowest distortion signal. As can be seen, the performance of this unit is quite good, with distortion below 0.01% up to 4kHz and 0.015% at 10kHz. However, if we connect a load to the headphone output (to simulate headphones), the distortion is considerably higher. The green line shows the distortion into a 32Ω load and the blue line into a 16Ω load, which is considerably worse. Most ear-buds present a 16Ω impedance or thereabouts. In that case, THD+N at 1kHz is above 0.07%. The two additional lines (mauve and pink) show the same player operating under the same conditions but this siliconchip.com.au 03/07/11 11:08:08 THD+N vs Frequency, 20Hz-20kHz BW 1.0 0.5 0.5 Total Harmonic Distortion + Noise (%) Total Harmonic Distortion + Noise (%) THD+N vs Frequency, 20Hz-20kHz BW 1.0 0.2 0.1 0.05 0.02 0.01 0.005 0.002 03/08/11 11:10:45 0.2 0.1 0.05 0.02 0.01 0.005 0.002 0.001 20 50 100 200 iHP-140 Line Output 500 1k Frequency (Hertz) 2k 5k 10k 0.001 20 20k iHP-140 Headphone Output (32Ω, 12mW) iHP-140 Headphone Output (16Ω, 24mW) 50 100 200 iPod Nano Line Output 500 1k Frequency (Hertz) 2k 5k 10k 20k iPod Nano Headphone Output (32Ω, 8mW) iPod Nano Headphone Output (16Ω, 8mW) SILICON CHIP Headphone Amplifier (32Ω, 12mW) SILICON CHIP Headphone Amplifier (32Ω, 12mW) SILICON CHIP Headphone Amplifier (16Ω, 24mW) SILICON CHIP Headphone Amplifier (16Ω, 24mW) Fig.1: a comparison of the distortion from an iRiver iHP140 MP3 player with and without our headphone amplifier, both channels driven. For both 32Ω and 16Ω loads, the distortion is lower when using our amplifier up to around 15kHz. Between 1kHz and 10kHz, the reduction in distortion with the external amplifier is dramatic, in some cases by an order of magnitude. THD+N vs Frequency, 20Hz-20kHz BW Fig.2: a comparison of the distortion from an iPod Nano 8GB with and without our headphone amplifier, both channels driven. In the case of a 32Ω load, the distortion with the external amplifier is the same or better and again the largest gains are between 1kHz and 10kHz. For 16Ω loads, the same applies except that the iPod output is slightly better between 30Hz and 120Hz. 03/07/11 11:48:29 THD+N vs Frequency, 20Hz-80kHz BW 1.0 03/04/11 12:41:59 0.1 0.5 Total Harmonic Distortion + Noise (%) Total Harmonic Distortion + Noise (%) 0.05 0.2 0.1 0.05 0.02 0.01 0.005 0.02 0.01 0.005 0.002 0.002 0.001 20 50 100 200 500 1k Frequency (Hertz) 2k 5k 10k 20k iHP-140 Headphone Output (Apple ear-buds, 20mW) SILICON CHIP Headphone Amplifier (Apple ear-buds, 20mW) Fig.3: this shows the distortion when driving small Apple ear-buds (both channels) from the headphone driver in an MP3 player and then the distortion from the same player via our amplifier. The reduction in distortion is clear from DC up to 12kHz. Above 12kHz, the light loading on the player’s output with the external amplifier allows its distortion to rise sharply (a quirk of the player). time the headphone amplifier has been connected between the line output and the load. As you can see, the distortion is much lower and not much worse than the line output signal by itself siliconchip.com.au 0.001 20 50 100 8 Ohms, 25mW 200 500 1k Frequency (Hertz) 16 Ohms, 25mW 2k 32 Ohms, 25mW 5k 10k 20k 600 Ohms, 4mW Fig.4: the Total Harmonic Distortion plus Noise (THD+N) over the audible frequency range, for our amplifier only. In the critical mid-band region of 300Hz-3kHz, the distortion is below 0.005% for 32Ω and below 0.01% for 16Ω. For higher load impedances, the performance is even better although maximum power drops. The high-frequency distortion for 600Ω rises quickly due to the high output voltage. (which provides the lower limit). At 1kHz, the THD+N into 32Ω and 16Ω is 0.009% and 0.013% respectively – a large improvement. These figures are worse than the those specified for the headphone amplifier because the distortion from the amplifier is being combined with the distortion from the player itself. Also, some portable players have April 2011 29 THD+N vs Power, 20Hz-22kHz BW, 1kHz 03/04/11 12:36:43 Frequency Response, 1kHz, 25mW 0.1 03/04/11 12:47:45 +0.2 +0.1 0.02 Level (dBr) Total Harmonic Distortion + Noise (%) 0.05 0.01 +0.0 0.005 -0.1 0.002 0.001 0.1m 8 Ohms 0.2m 0.5m 1m 16 Ohms 2m 5m Power (Watts) 32 Ohms 10m 20m 50m 100m 600 Ohms Fig.5: this graph shows the THD+N at 1kHz for common load impedances over the full power range. The distortion falls as power climbs because the rising signal amplitude swamps the noise signal. More power can be delivered into lower load impedances. Most MP3 players can only deliver up to about 20mW whereas this amplifier will deliver 60mW and more in most cases. significant headphone output impedance and this can result in poor frequency response. This only occurs with specific player/headphone combinations that we don’t have to test. Our headphone amplifier does not suffer from this problem since its output impedance is uniformly low (around 0.1Ω). iPod measurements We also made some measurements with an iPod 8GB player – see Fig.2 (the colour coding is the same as Fig.1). There are some interesting differences from Fig.1. Firstly, we can see that the headphone driver in the iPod has less rise in distortion with a 16Ω load compared to the iRiver but it can’t deliver as much power (it starts clipping at about 10mW). Also the iPod’s DAC has a more sudden rise in distortion above 10kHz. Because the iPod’s distortion is relatively low below 200Hz, the summing of the distortions from it and the headphone amplifier mean our amplifier’s output is slightly higher in distortion at low frequencies. In the high-bass and the critical mid-band frequencies though (200Hz12kHz), using the external headphone amplifier results in a big improvement in the distortion figure. At 1kHz it goes from 0.25-0.3% down to 0.009-0.011% 30 Silicon Chip -0.2 10 20 50 100 8 Ohms, 25mW 200 500 1k 2k Frequency (Hertz) 16 Ohms, 25mW 5k 10k 20k 50k 32 Ohms, 25mW Fig.6: the frequency response for our amplifier is essentially flat over the range of audible frequencies (note the vertical scale). The 0dB voltage level was not changed for the different load impedances so this also demonstrates the low output impedance of the amplifier, ie, changing the load impedance barely has any effect on the voltage level delivered to it. and at 5kHz the distortion from our amplifier is about 1/5th as much. The majority of musical content exists between these frequencies so not only do you get much more output power to play with but significantly improved sound quality too. Unfortunately the iPod’s rise in distortion above 10kHz is almost entirely from the DAC or its filter so we are stuck with it, regardless of whether we use the internal or external amplifier. We also did a simple comparison using the iRiver iHP-140 and some Apple brand ear-buds, to see what effect a reactive (rather than purely resistive) load would have on the amplifier. Resistive load testing is all very well but sometimes you need to use the real thing. As you can see from Fig.3, the measurements confirm what we expect; the external amplifier drives the ear-buds with much lower levels of distortion. Note that the measurements at high frequencies (ie, above 10kHz) for the players do not tell the full story. This is because we have had to use a 20Hz20kHz bandwidth due to high levels of DAC noise above 20kHz from both players. This means that the highfrequency distortion from both players is actually much worse. Impressions In practice, the difference in sound quality is dramatic and unmistakable. The output from our amplifier sounds much cleaner and less distorted. Bass is clean and powerful with our headphone amplifier and by comparison, distorted and weak when listening to the iRiver by itself. It isn’t just at high power levels that the difference is apparent; we made measurements at 1mW (a more sensible listening level) which show just as large a disparity in performance. In part, this improvement at low volume levels is due to the fact that virtually all MP3 players have a digital volume control. These are usually quite a bit noisier than an analog volume control (ie, potentiometer) at their lower settings, where they will be commonly used. Because our design uses a pot, the resulting signal-to-noise ratio is superior. With the external amplifier connected and set to the appropriate gain, you can operate the player at maximum, reducing the player’s contribution to both noise and distortion. For more details on our amplifier’s performance, refer to Figs.4-7. Fig.4 shows the THD+N against frequency for common headphone load impedances. The increase in distortion at lower frequencies for lower load impedances is due to the amplifier IC’s internal supply sagging under load. We presume that the 600Ω high-frequency siliconchip.com.au Specifications 8Ω THD+N* (1kHz) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . THD+N* (10kHz) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Signal-To-Noise Ratio (unweighted, 20-20kHz) . . . . . . . . . . . Signal-To-Noise Ratio (A-weighted) . . . . . . . . . . . . . . . . . . . . Channel separation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Input impedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Operating battery voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . Current drain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Battery life . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Practicality To be useful, the external amplifier must be small and light and have a long battery life. The battery should be cheap and easy to charge or replace. It also needs to work with virtually any headphones. To this end, we have chosen to house it in an Altronics H0352 handheld plastic case. The complete unit measures 120 x 75 x 25mm and weighs 300g including the battery (or about 200g without the battery). It can fit in a pocket. Changing the battery is quick and easy thanks to the slide-off battery cover. This battery consists of two AA cells which can be alkaline, dry cell, lithium or NiMH. Alkaline and lithium types give the best performance because of their higher nominal voltage. siliconchip.com.au 32Ω 0.016% 0.007% 0.017% 0.010% -88dB -91dB -90dB -93dB better than -64dB up to 5kHz 5kΩ (approximately) 2V – 3.8V 15mA Approximately 200 hours * Total Harmonic Distortion Plus Noise distortion is worse than 32Ω because of the larger voltage swing involved, exposing non-linearities in the amplifier’s output stage. Fig.5 shows THD+N for the same load impedances but this time against power output. As expected, distortion falls as power increases due to the signal level increasing while the noise level is fixed. This occurs until the onset of clipping, which is due to current limiting for low load impedances and the limited voltage swing into 600Ω. Fig.6 shows the frequency response which is essentially flat from below 10Hz to above 50kHz (note the vertical scale!). The 0dB point was not reset when the load impedance was changed so this also illustrates the low output impedance which is around 0.1Ω. Finally, the channel separation is also fairly respectable at better than -60dB over most of the audio spectrum. 16Ω When on, the current draw is around 15mA, whether idle or delivering moderate power levels. This increases slightly at higher volume levels. A good pair of alkaline cells should last around 200 hours. As a bonus, because your player won’t have to drive the headphone load, its battery should also last slightly longer. While the driver IC is specified for 16Ω and 32Ω loads, we have found that it will drive 8Ω loads as well, provided they do not have any large impedance dips. Higher impedances are not a problem although power delivery falls to about 5mW for 600Ω (in practice that’s usually enough). So it should work with virtually any headphones. Since higher voltage operation is preferred, rechargeable alkaline cells may be a better choice than NiMH. Having said that, it will work with NiMH cells until they are quite flat (1V per cell). In order to give some idea of the battery state, the power LED dims as the battery voltage drops. It’s quite bright with fresh cells and ends with a dull glow when they are flat. The charge state at a particular brightness depends on the type of cell used but most cells are running out of puff by 1V, which is about where correct operation ceases. Warnings This headphone amplifier can deliver lots of power; much more than most amplifiers internal to music players. This is both a benefit and a hazard. Some players can’t develop much volume with certain headphones. This may be on purpose, in an attempt to prevent hearing damage. To give you an idea of how efficient headphones can be, they can have 0.004% 0.009% -94dB -96dB 25mW, 3V Supply, 1kHz, 20Hz-80kHz Bandwidth TABLE 1 Sound Maximum Recommended Pressure Level Exposure (per 24 hours) 88dBA(SPL) 4 hours 91dBA(SPL) 2 hours 94dBA(SPL) 1 hour 97dBA(SPL) 30 minutes 100dBA(SPL) 15 minutes 103dBA(SPL) 7 minutes 106dBA(SPL) 3 minutes 109dBA(SPL) 1 minute 112dBA(SPL) 30 seconds 115dBA(SPL) 15 seconds ratings as high as 106dB(SPL)/mW or more. With highly compressed pop music, the kind of volume that can be produced will damage your hearing very quickly. It can also be a problem if you put the headphones on and press play without noticing that the volume control is turned up high. The solution to the latter problem is simple: always turn the volume down to minimum before putting the headphones on and then slowly turn it up after pressing play. Stop when you reach a comfortable volume level. The issue of long-term hearing damage is more tricky. This is especially likely if you are often listening in noisy environments (eg, on a bus) as the temptation to turn the music up to overpower the background noise can be great. In this case, you are much better off using noise-cancelling headphones or in-ear units, to seal out as much outside noise as possible. It’s OK to listen to loud music using headphones occasionally but April 2011 31 K A K 10k 10k 1k 1k S1 ON/OFF λ LED3 A λ LED2 100nF A 100pF 100 µF 100pF 100 µF 47k K D2 1N4148 47k 10 2 3 13 12 100nF VOLUME 7 IC3e VR1a 10k LOG 100 µF VR1b 10k LOG 100 µF 11 14 100nF S CP 2 D 1 R 3 4 IC4a Q Q IC4: 74HC74 IC1d 3.0k 6 5 3.0k IC1: OP462 14 1 7 14 Vdd Q 9 S 11 CP IC4b 12 D 8 13 R Vss Q 10 4 IC1a 47k PORTABLE STEREO HEADPHONE AMPLIFIER K 10 9 5 6 10k 11 IC1c 10k IC1b 100Ω ZD1 5.1V 100nF A K S 8 7 G 10k –Vss 100nF 10k 13 12 1 10 A A ZD1 K K 1N5819 2.2k LED1 λ (INSIDE S1) –Vss K A 100nF D Q1 DMP2215L INR SHDNR 14 4 SVss PVss 7 6 10k 11 5 3 8 10k 220 µF LOW ESR 220 µF LOW ESR 220 µF LOW ESR K K LEDS2 & 3 A 14 S D 1 7 CON2 MAX4410EUD G 6 4 2 OUTPUT IC3c IC3b IC3a DMP2215L 5 1 IC3: 74HC14 1N4148 A OUTR C1N C1P OUTL 2 PVdd IC2 MAX4410 SHDNL INL 9 SVdd +Vcc 100 µF 8 3 IC3f IC3d 12 13 9 Fig.7: the full circuit for the headphone amplifier. The main component is IC2 which contains both the voltage inverter & output amplifiers. IC1 buffers & amplifies the signal while VR1 is the volume control. Power is switched by Mosfet Q1 and this is controlled by D-type latch IC4b and Schmitt Trigger inverter IC3e so that pushbutton S1 toggles the power on or off. SC 2011 CON1 INPUT – 3V BATTERY A D1 1N5819 PGND + SGND 32 Silicon Chip siliconchip.com.au don’t make a habit of it. We find that when the audio quality is high and the frequency response is flat, there is less temptation to listen at excessive volumes in order to compensate for lack of bass or treble. In addition, the human brain adapts to the volume level being experienced and after a while even quite moderate volume levels can be adequate to hear all the details in a passage. Table 1 shows the maximum exposure to various sound levels before permanent hearing damage is likely to occur. Hearing loss can be a real problem (as can tinnitus) so pay attention to these figures. Note that with headphones capable of 106dB(SPL)/mW and a headphone amplifier that can deliver at least 60mW into such a load, a sound pressure level in excess of 123dB(SPL) can be achieved! +Vdd +Vdd +3V +3V 9 SVdd iC2 2 9 iC2 2 SVdd PVdd PVdd C2 i1 C2 i2 3 C1P <+3V C1P 3 0V C1 C1 C1N 5 0V PGND 4 i1 5 0V i1 (IC2) –3V C1N PGND 4 i2 (IC2) C3 SVss 7 –3V PVss 6 iLOAD PHASE 1: C1 CHARGES, C2 & C3 DISCHARGE 0V i2 C3 SVss 7 PVss 6 >–3V iC3 PHASE 2 : C1 DISCHARGES, C2 & C3 CHARGE Fig.8: the MAX4410 (IC2) includes an internal switched capacitor voltage inverter. This generates a negative rail using two external capacitors (C1 & C3) plus a supply rail bypass capacitor (C2). It works by rapidly switching the connections between capacitor C1 and the supply rails (see text). Circuit description Refer now to Fig.7 which shows the complete circuit diagram. The heart of this circuit is IC2, the MAX4410 headphone amplifier IC. This contains the left and right-channel amplifiers, which are inverting (they share a single non-inverting input, SGND). Each channel also has a shut-down input (pins 1 & 12, SHDNL-bar and SHDNR-bar) but since we cut power to the entire IC when the device is off, these are tied permanently to Vcc. If we had used the shut-down function instead, the batteries would not last as long in the “off” state. IC2 contains a switched capacitor voltage inverter which generates a negative supply rail for the amplifiers. We also make use of the negative voltage it generates to power IC1, an external gain stage/buffer op amp, as well as the power indicator LED (more on that later). This inverter is a charge pump and it allows the amplifiers to operate at twice the battery voltage. This results in good power delivery with low distortion because it allows the use of a more linear output stage. It also eliminates the need for DC-blocking capacitors at the output, which introduce distortion and also reduce bass frequency response. Charge pump Fig.8 shows how the charge pump operates. The circuit rapidly switches between two states, shown as Phase 1 siliconchip.com.au and Phase 2. The switching frequency is around 320kHz, so each phase lasts 1s ÷ (320kHz x 2) = 1.5625µs. During Phase 1, capacitor C1 is charged up to the supply voltage, Vdd. In this state, C1’s positive terminal is connected to Vdd and its negative terminal to ground by two electronic SPDT switches. These are formed from Mosfets but we have shown them as switches for simplicity. Some of C1’s charge current is supplied by supply bypass capacitor C2 (labelled iC2) while the rest comes from Vdd. The sum of these currents is i1. It diminishes over time as the voltage across C1 approaches Vdd. When the switch to Phase 2 occurs, C1 is disconnected from Vdd and its positive terminal is instead connected to ground. Since the charge across the capacitor remains the same, that means its negative terminal goes to -Vdd. Current then flows from C3 into C1 (iC3) charging C3 up to -Vdd while discharging C1. The charge current for C3 isn’t the only drain on C1. During Phase 2, C1 also supplies the negative supply load current for the amplifiers, from SVss. During Phase 1, this load current (iLoad) is supplied by C3, since C1 is no longer connected to SVss. As C3’s charge current during Phase 2 (iC3) must replace the current lost from C3 during Phase 1 and since i2 = iC3 + the load current, we can see that i2 represents the SVss load current during both phases. Also, i2 must equal i1 to keep the charge in C1 constant from cycle to cycle. So ignoring inefficiencies (which are small), the sum of the Vdd supply currents in both phases equals the sum of the SVss load currents in both phases. This means that the negative supply current is ultimately drawn from Vdd, confirming that the law of conservation of energy still applies. Gain and phase Returning to the circuit of Fig.7, we see that four 10kΩ resistors are used as the feedback network for the two headphone amplifiers, giving a gain of -1. IC2 is driven by IC1b and IC1c, two sections in quad op amp IC1, an OP462. Each is configured as an inverting amplifier with a gain of -3.3 (10kΩ/3kΩ). Because the headphone driver IC also inverts the signal, the signal phase is preserved from input to output. The series 1kΩ input resistors at the input, designed to protect IC1 from excessive input voltages (as well as forming part of the RF filter), reduce the overall gain since they act as dividers with the volume control potentiometer. So the overall maximum gain is about three (3.3 x 10 ÷ 11). IC1a and IC1d are configured as unity-gain buffers (ie, voltage followers) and these drive the inverting amplifiers formed by IC1b and IC1c. This is necessary because the invertApril 2011 33 IC2 IC1 22P Q1 UNDERSIDE OF PCB, SHOWING SURFACE-MOUNT COMPONENTS Fig.9: the three SMD components (IC1, IC2 & Mosfet Q1) are mounted on the copper side of the PCB. Use a fine-tipped soldering iron for this job & note that the two ICs are orientated in different directions. ing amplifiers have a relatively low input impedance (3kΩ) and if this were connected directly to the volume control potentiometer, it would affect its operation quite drastically. We chose the OP462 for a number of reasons. First, its supply voltage will vary in the range of about 3.66.2V, depending on the battery voltage (typically 2-3.3V). Most low-voltage op amps have a supply range of 2.75.5V so a specialised op amp like the OP462, with its wider range of 2.712V, is required. Second, there is its performance, which we have detailed in a panel later in this article. Third, the MAX4410 data sheet states that if we are to draw current from its voltage inverter, we should draw no more than 5mA or else its distortion may increase. Quiescent current for the OP462 at 40°C and 6.2V is around 2.2mA. Then there is the current which it must drive into its loads. This is computed as follows. Maximum undistorted power from the MAX4410 into 32Ω (60mW) is with an output voltage of around 1.4V RMS (V2/R = 1.4V2 ÷ 32Ω = 61.25mW). IC1b & IC1c each deliver the same signal voltage into two 10kΩ resistors (one for their feedback and one to IC2) which in parallel form a 5kΩ load. This takes 1.4V ÷ 5kΩ = 0.28mA RMS each, or 0.56mA total. Since IC1b and IC1c have a gain of 3.3, this means that IC1a and IC1d will be delivering a 420mV RMS signal into their 3kΩ loads for a total of 0.42V ÷ 3kΩ = 0.14mA RMS each, or 0.28mA total. So adding it all up, at maximum 34 Silicon Chip power into a 32Ω load, IC1 consumes a total of 3.04mA, well below IC2’s limit. Vss is also used to power LED1, via a 2.2kΩ current-limiting resistor. At maximum voltage (Vdd - Vss = 6.2V), this will draw about (6.2V - 2.0V) ÷ 2.2kΩ = 1.9mA. Taking this into account, we reach 4.94mA so we just squeak in below the limit. This is almost a worst-case figure. Input circuitry Signals fed to the input connector (CON1) are loaded with 10kΩ resistors in each channel, which is required for some music players (eg, certain iPods) to operate correctly. Following this is an RF filter consisting of 1kΩ series resistors and 100pF capacitors to ground. This network attenuates RF signals picked up by the input leads (although the plastic case means that some RF signals may still break through). The left and right-channel signals are then AC-coupled using back-toback 100µF electrolytic capacitors, effectively forming two 50µF non-polarised capacitors. This is large enough to avoid any significant low-frequency roll-off or distortion. We didn’t use non-polarised capacitors because their physical size varies so much. The signal then passes into the volume control pot, a 10kΩ dual-gang logarithmic type, and thence into the buffers and gain stages already described. Power supply Space is at a premium on the end panel of the case so there isn’t room for a separate power switch and power indicator LED. The obvious solution is to use an illuminated toggle switch or illuminated latching pushbutton. We needed a very small unit, so we decided to use a right-angle tactile pushbutton switch with integral LED (Altronics S1179). We must convert its momentary action to have a latching effect and with the power off, the battery drain much be zero or very close to it. This is achieved as follows. Schottky diode D1 provides reverse polarity protection, in case the battery is put in backwards (it happens!). Its low forward voltage (about 0.23V) minimises power loss. Following D1, power for IC1 and IC2 is switched by Q1, a DMP2215L P-channel Mosfet. This was chosen because it has a very low turn-on voltage (about 1V) and a low on-resistance, minimising voltage loss and allowing enough current for IC2 to operate at high output powers. Q1 is controlled by IC4, a dual CMOS D-type latch. This is powered directly from the battery but it consumes very little – at 25°C, it draws less than 0.1µA. IC4b is unused; IC4a controls Q1. Its role is to “remember” whether the power is currently on or off and drive Q1 appropriately. IC4 is toggled on and off by repeated presses of switch S1 which is debounced by one section of IC3, a 74C14 hex Schmitt trigger. We use an RC filter to smooth out the button action, rejecting short bounces. It consists of two 47kΩ resissiliconchip.com.au OUTPUT INPUT S1+LED1 D2 + SC 10k 3.0k IC1 100nF 100nF 3.0k 100 µF + + + + ZD1 3 x 220 µF Q1 5.1V (UNDER) LOW ESR 100Ω 2x100nF 5819 + (UNDER) 10k 10k 10k 100nF 2x10k IC2 88t 47k BAT 1k + (UNDER) – 2x10k 1k 2x100pF 47k 2.2k 100nF IC3 74HC14 + 4x100 µF 47k R R + © 2011 S T CON2 S T CON1 VR1 2 x 10k D1 IC4 74HC74 LED3 LED2 + TO BATTERY – HOLDER tors, a 100nF capacitor and a 1N4148 small-signal diode. This provides better symmetry in combination with the momentary button than a simple RC filter. When the battery is inserted, the input to IC3e is held high by the 100nF capacitor and kept discharged by the resistors and diode. Therefore, its output remains low, preventing a false button press when the battery is inserted. When S1 is pushed, the capacitor begins to charge as current flows through the lower resistor to ground. Eventually, IC3e’s output goes high. When S1 is released, a similar process occurs but in reverse, with the capacitor discharging through the upper resistor and the diode. The result is that each press of S1 triggers a valid clock transition for IC4, toggling the latch and switching the power on or off as appropriate. Finally, we come to LED2 and LED3. These are not included for visible effect but rather form a simple shunt regulator, akin to a 4V zener diode. This helps protect IC2 in case there is a brief spike in supply voltage above Fig.10: follow this layout diagram to install the parts on the top of the PCB. As shown, some of the resistors are installed end-on to save space. The photo above shows the fully-assembled PCB. 3.6V (its maximum rating), at which point the LEDs will begin to conduct and shunt current away from it. This helps reduce the chance of damage from static electricity. The breakdown voltage for LEDs is more predictable than for a low-voltage zener diode. best insurance against static. Solder IC2, the MAX4410EUD, to the PCB first – see Fig.9. Find the dot on the package which indicates pin 1 and orientate it as shown. Carefully apply a small amount of solder to the upper-right pad (or upper-left if you are left-handed). Pick up the IC with angled tweezers, melt the solder on that pad, slide the IC into position and then remove the soldering iron. If this takes more than a few seconds, stop, wait and try again. Ensure the IC is correctly lined up with its pads and centred between them. If not, wait a few seconds before melting the solder and re-positioning it. It may take several attempts to get the position and alignment right. Be careful not to get any solder on any other pins or pads. Construction All components are mounted on a single-sided PCB coded 01104111 and measuring 67 x 58.5mm. The overlay diagram for the copper side is shown in Fig.9, while Fig.10 shows the topside components. The PCB has corner cut-outs for the box pillars. If yours doesn’t already have these cut-outs then cut and file them to shape. Check that the PCB fits in the case and that the mounting holes line up with the plastic pillars. Also check the copper side for any defects such as under-etched areas or hairline cracks and repair if necessary. Begin construction with the two surface-mount ICs (IC1 and IC2). Before unpacking them, ensure that they will not be damaged by static electricity. An anti-static mat is the Table 3: Capacitor Codes Value µF Value IEC Code EIA Code 100nF 0.1µF 100n 104 100pF NA 100p 101 Table 2: Resistor Colour Codes o o o o o o o siliconchip.com.au No. 3 8 2 1 2 1 Value 47kΩ 10kΩ 3kΩ 2.2kΩ 1kΩ 100Ω 4-Band Code (1%) yellow violet orange brown brown black orange brown orange black red brown red red red brown brown black red brown brown black brown brown 5-Band Code (1%) yellow violet black red brown brown black black red brown orange black black brown brown red red black brown brown brown black black brown brown brown black black black brown April 2011 35 The completed PCB assembly is installed inside a plastic case and is secured to integral pillars using four self-tapping screws. Take care to ensure correct polarity of the leads running to the battery compartment tabs. 13.25 A 11 7.25 9.25 B C A 10.5 10.75 16 8 58 HOLES A: 6.5mm DIAM. HOLE B: 7.5mm DIAM. HOLE C: 4.75mm DIAM. ALL DIMENSIONS IN MILLIMETRES Fig.11: use this template to drill the four holes in the plastic end-plate of the case. Once it is in place, rotate the board 180° and carefully apply a small amount of solder to the diagonally opposite pin. Re-check the orientation, as the IC may have moved slightly during this procedure and adjust if necessary. With the IC held in place by those pins, apply solder to the others without re-melting the first two. Don’t worry about bridging them, it is unavoidable. It’s more important to be sure that solder has flowed fully onto all the pins and pads. Once they have all been soldered, apply a small amount of flux paste along the pins on both sides and use fine solder wick to soak up the excess solder, a few at a time. Be careful to avoid applying too much heat during this process; wait between each session with the iron, as the tracks are very fine and can lift off the board. As you can see from our photos, with some care this process results in a neatly-soldered IC. IC1 goes in next, using the same 36 Silicon Chip approach. Alternatively, you can solder the pins individually using a fine-tipped iron as they are larger than IC2’s. As before, ensure that the pin 1 dot is orientated correctly and avoid applying heat for too long. That done, mount Q1. Its pins can be soldered individually. This is the most static sensitive of all the components so don’t touch the pins. If they stick up in the air, flip the part over, but otherwise it can only go in one way. To install Q1, place a small blob of solder on one of the pads, then heat it and slide the part into place. Re-adjust its position if necessary, until the other two pins are over their pads and then solder them one at a time. As soon as you have finished, flip the board over and fit the 5.1V zener diode as shown on Fig.10, with the indicated orientation. This helps to protect Q1 from static damage. Through-hole components Now for the easy part. Install the four wire links using tinned copper wire. Follow with those resistors which lie flat on the board. Use a DMM to check each value, as the colour codes can be hard to read accurately. That done, install the two remaining diodes, orientating them as shown (don’t get them mixed up). Now solder the two DIP package ICs in place. Check that the notch or dot at one end is orientated as shown on the overlay diagram. You may use sockets but they are not necessary. Following that, mount the two 3.5mm jack sockets. The edges should be parallel with the PCB; if not, enlarge one hole slightly before soldering. Fit the two 3mm LEDs right down on the board, with the flat edge of each LED to the left. Follow with the two ceramic capacitors and the six MKT capacitors, then install the four electrolytics, Make sure that the latter are all orientated correctly. Note that one capacitor is squeezed between two others and in this case you will need siliconchip.com.au Capacitor Selection For IC2 Preparing the box Use a copy of Fig.11 as a drilling template for the panel at the end of the box (it can also be downloaded as a PDF from the SILICON CHIP website). Tape or glue it onto the panel and then drill 3mm pilot holes. Carefully expand each hole to size using a tapered reamer. Clean them up with an oversized drill bit, on both sides. Be careful with hole placement for the on/off pushbutton The others can siliconchip.com.au PHONES LINE IN VOLUME to kink its leads slightly so that it will fit upright (see photos). Now cut or file 2mm from the end of the potentiometer shaft. This prevents the knob from sticking out too far. Avoid distorting the splines or bending the two halves drastically while doing this as it will make attaching the knob difficult. The potentiometer and pushbutton switch can then be fitted. Ensure they are both pushed all the way down onto the board and parallel with the edge before soldering them. You may need to bend the pushbutton switch pins slightly to get it to fit. After that, install the remaining resistors, which mount vertically, with one lead bent over. Again, check each with a DMM first. Finally, strip 5mm from each end of two 50mm hook-up wires and twist the strands together tightly. Insert one end of the red wire through the hole marked “Bat +”, then solder it to the pad and trim it. Do the same for the black wire and the hole marked “– Bat”. is to use low-ESR electrolytics. They fit in the tantalum capacitor mounting locations with a little lead-bending and the performance is consistently good. They are also quite cheap. You need to be careful though. We bought two batches of capacitors from our local parts store, all of which were supposedly 220µF 10V low ESR. The first batch had green sleeves and gave good performance while the second batch were black and resulted in worse performance. ESR measurements of this second batch were in some cases over 1Ω so we think that these may have been regular capacitors that were accidentally placed in the low-ESR bin. ON/OFF The three 220µF low-ESR (equivalent series resistance) capacitors connected directly to IC2 are critical to obtaining good performance. The MAX4410 data sheet suggests the use of tantalum capacitors with values as low as 2.2µF. The problem is that most through-hole tantalum capacitors have too high an ESR for good performance. This leaves us with three options: (1) use surface-mount tantalum or ceramic capacitors with low ESR; (2) find some through-hole tantalum capacitors with a guaranteed low ESR value; or (3) use low-ESR electrolytic capacitors. We made extensive tests with various capacitors and found that the best option Parts List NE O PH IER D A LIF E H MP A SILICON CHIP Fig.12: this front-panel artwork can be copied, laminated & attached to the case lid. Alternatively, you can download the artwork in PDF format from our website and print it out. be made larger if necessary, as they are covered by the nuts. When ready, remove the nuts from the potentiometer and jack sockets and check that the panel fits over them. It’s a good idea to fit the potentiometer nut as it reduces the chance of damage if the unit is dropped. However, one side of the nut has to be filed down so that it doesn’t interfere with the lip of the case. To do this, first fit the pot and nut to the front panel and do the nut up 1 PCB, code 01104111, 67 x 58.5mm 1 hand-held plastic case, 105 x 75 x 25mm (Altronics H0352) 1 2 x AA battery clip to suit case (Altronics H0355) 4 No.4 x 9mm self-tapping screws 1 front panel label, 54 x 84mm 1 10kΩ logarithmic dual-gang 9mm potentiometer 1 small knob to suit potentiometer (Altronics H6560 or similar) 2 3.5mm stereo switched PCBmount jack sockets (CON1, CON2) 1 right-angle PCB-mount tactile switch with integral LED (S1) (Altronics S1178) 2 14-pin DIL sockets (optional – see text) 1 50mm length 0.7mm diameter tinned copper wire 1 50mm length red light-duty hook-up wire 1 50mm length black light-duty hook-up wire Semiconductors 1 OP462GSZ quad low voltage op amp (IC1) (Element14 or DigiKey) 1 MAX4410EUD headphone driver (IC2) (Element14 or DigiKey) 1 74HC14 hex Schmitt trigger inverter (IC3) 1 74HC74 dual D-type latch (IC4) 1 DMP2215L P-channel Mosfet (Q1) (Element14 or DigiKey) 1 1N5819 1A Schottky diode (D1) 1 1N4148 small signal diode (D2) 1 5.1V zener diode (0.4W or 1.0W) (ZD1) 2 green 3mm LEDs (LED2, LED3) Capacitors 3 220µF 10V low ESR electrolytic 5 100µF 16V electrolytic 6 100nF MKT 2 100pF ceramic (NP0/C0G) Resistors (0.25W, 1%) 3 47kΩ 1 2.2kΩ 8 10kΩ 2 1kΩ 2 3kΩ 1 100Ω April 2011 37 Semiconductor Highlights: A Look At IC1, IC2 & Mosfet Q1 The high performance of this portable headphone amplifier is made possible by three special purpose devices, IC1, IC2 & Mosfet Q1. IC1: OP462GSZ Manufacturer Description Fabrication Process Package Supply Voltage Quiescent Current Noise Input Voltage Range Output Voltage Swing Input Offset Voltage Input Bias Current THD+N Analog Devices, Inc. Quad 15MHz Rail-to-Rail Output Op Amp XFCB (trench isolated bipolar transistors) Small Outline Integrated Circuit (SOIC), 14 pins 2.7-12V Typically 0.5mA per amplifier, maximum 0.7mA per amplifier 9.5nV/√(Hz) at 1kHz 0V to Vcc-1V 0.065V to Vcc-0.06V (5mA) Typically 45µV, maximum 325µV (800µV over full temperature range) ≤600nA ≤0.001% (Vcc = 5V, gain = 1, Vin = 1V RMS, RL = 10kΩ) Comments: the OP462 has exceptional performance for a low-voltage, low-power op amp. This is the quad version; the single and dual versions are the OP162 and OP262 respectively. They are only available in surface-mount packages: SOIC, TSSOP and MSOP (in order of largest to smallest). Most low-voltage op amps have a supply voltage range of 2.7-5.5V and are typically characterised for 2.7V and 5V supplies. With its 12V upper limit, the OP462 can run off ±5V rails as well. Its quiescent current is 0.4-0.7mA per amplifier, depending on supply voltage and temperature but is typically 0.50-0.55mA. The noise performance is excellent for a device with such a low quiescent current. Low-current op amps don’t have especially low noise voltages because they must operate their input transistors with a low collector current; this figure can’t go much lower without increasing the quiescent current. While this is a rail-to-rail output amplifier, its input common mode range only extends to 1V below the positive rail. Input voltages down to the negative rail cause no problems. For rail-to-rail output then, a small amount of gain is required (around 1.25x). The distortion performance is excellent considering the low supply voltage and current. As with the noise performance, it is not as good as some higher power op amps but it does not rise at high audio frequencies (with a measurement bandwidth of 20Hz-20kHz), unlike many other op amps, due to its high dominant pole frequency. The reason it can achieve this performance (and why it’s quite expensive) is the XFCB fabrication technology, which places each transistor in a separate trench within the silicon die. This reduces stray capacitance between the transistors, improving high frequency performance. While this op amp is primarily intended for high-speed DC applications, it clearly works very well for audio too. IC2: MAX4410EUD Manufacturer Description Fabrication Process Maxim Integrated Products 80mW DirectDrive Stereo Headphone Amplifier BiCMOS (bipolar and complementary Mosfet transistors) firmly. Mark the side of the nut that’s closest to the adjacent edge, then remove the nut, place it in a vice with scrap wood on either side and file away about half its thickness from the marked edge. You can check that it has been filed correctly by temporarily sliding the end-plate into the plastic case and placing the nut over the potentiometer hole, with the filed side against the adjacent edge of the case. If it fits then you’ve filed away enough material. When finished, spray paint it black so that it blends in with the case, then push the end panel up against the PCB and do up all three nuts. 38 Silicon Chip Next, take the side of the box that incorporates the battery holder and install the two battery clips. These are simply pushed into place. The part with the solder tabs goes on the side shown in our photos. If you have trouble pushing them in, a screwdriver can help but be careful not to scratch the plastic. That done, slot the end-panel into that half of the box, so that the PCB sits on the plastic pillars. Secure it using four No.4 x 9mm self-tapping screws. Push the black wire through the hole in the solder tab which connects to the spring battery clip and solder it in place (if in doubt, refer to the photos). Bend the tab over so that it’s flat against the rear of the battery holder. Testing Connect a DMM, set to milliamps mode, between the red wire and the battery holder. Alligator clip leads are invaluable in this situation. Insert two cells into the battery holder (if you have a bench supply, set it to output 3V with a current limit of 50mA). The initial current flow should measure 0mA (or very close to it) and the LED in the on/off pushbutton should be off. Now press the on/off pushbutton. It should immediately light up and the current consumption should increase siliconchip.com.au Package Supply Voltage Quiescent Current Input Offset Voltage Output Power THD+N SNR Channel Separation Frequency Response PSRR Charge pump frequency Features Thin Shrink Small Outline Package (TSSOP), 14 pins 1.8-3.6V With 3V supply, typically 7mA, maximum 11.5mA Typically 0.5mV, maximum 2.4mV 65mW/32Ω, 80mW/16Ω, 100mW/8Ω* (3V supply) Typically 0.003% (1kHz, 32Ω/25mW and 16Ω/50mW) Typically 95dB Typically 70dB DC-500kHz, +0,-0.5dB Typically 90dB at 1kHz 272-368kHz (320kHz nominal) 0V-referenced output, shut-down, click and pop suppression Comments: the MAX4410 is one of the best performers among the various single-chip headphone drivers available. It also requires a fairly minimal set of external components. Low-power speaker driver ICs used with single supplies often operate in bridge mode, driving the speakers differentially, so that no bulky DC-blocking capacitors are required for the outputs. This is not possible when driving headphones because in most cases, the two drivers share a single ground line and thus can not be driven differentially. The MAX4410 solves this by using an internal switched capacitor voltage inverter to generate a negative rail. The analog circuitry then runs off the split supply and so its output is ground-referred. This results in lower cost, smaller size and improved performance. This also means that the analog circuitry has twice the voltage to work with, allowing for a design with more inherent negative feedback and thus lower distortion. It also incorporates a per-channel shut-down, allowing a microcontroller to turn off the output drivers when they are not needed without an external power switch. Both the shut-down function and the power on/off incorporate click and pop suppression which prevents large transients from occurring and causing loud noises on the headphone outputs. The amplifier gain is adjustable by the use of varying feedback resistor values. The minimal set of external components is the four feedback resistors, AC coupling capacitors for the signal inputs (assuming it isn’t already ground-referenced) and three relatively small low-ESR capacitors for supply bypassing and for the switched capacitor charge pump. * Not specified in data sheet; determined by testing. Q1: DMP2215L Manufacturer Description Package Maximum Drain Voltage Maximum Gate Voltage Gate Threshold Voltage Drain-Source On-Resistance Maximum Drain Current Drain Leakage Current Diodes, Incorporated P-Channel Enhancement Mode Mosfet SOT-23 (Small Outline Transistor, 2.9 x 1.3mm), 3 pins -20V ±12V Typically -0.89V, maximum -1.2V Typically 165mΩ, maximum 215mΩ (Gate = -2.5V) 2.7A <at> 25°, 2A <at> 70° Maximum 800nA (Gate = 0V) to about 15mA. If it doesn’t light or if at any time the current exceeds 20mA, cut the power and check the board for faults such as reversed or incorrect components, wrong component values, solder bridges or short circuits. Assuming you get a reading of about 15mA when the power is on and the on/off switch operates normally, turn the volume all the way down and plug in a signal source (eg, an MP3 player) and some headphones. Play some source material, put on the headphones and slowly turn the volume up. If you hear undistorted sound then all is well. It’s then just a matter of soldering the siliconchip.com.au remaining battery wire, screwing the case together, attaching the front-panel label and pushing the knob on. The front-panel label is shown in Fig.12 and can either be copied or downloaded from the SILICON CHIP website and printed out. Laminate it and use spray adhesive to hold it in place. To get the knob position correct, set the potentiometer to its mid-point and then push the knob on so that the pointer is straight up (ie, at right-angles to the end of the case). Using it You will need a short cable with 3.5mm stereo jack plugs at either end to connect your music player to the headphone amplifier’s input. As mentioned earlier, it’s always a good idea to turn the volume knob down before putting the headphones on. You can then turn the player volume up to maximum, to maximise its signal-tonoise ratio. Note that the MAX4410 driver IC has click and pop suppression so there should be no loud noises if the amplifier is turned on and off while you are wearing the headphones. If, after some use, the power LED is dim and/or the sound is distorted, or the unit will not switch on, it’s time to recharge or SC replace the battery. April 2011 39