DIY preamp component choice - Page 1
Forum section: electronics / projects

author: cowana
author_rank: Frequent Contributor
timestamp: June 30, 2012, 06:51:21 pm
content: I recently purchased a set of Tannoy V4 speakers to run with a Quad 405-2 amplifier. I'm an electronic engineer with lots of experience with digital electronics - however I'm fairly new to the world of audio.The Quad 405-2 amplifier has no controls or variable attenuator on it, so requires an external volume control. The amp currently takes a 0.5v input - I plan to convert it to a standard 1.5v input.So, I need to make a box that will:- Provide volume control- Provide adjustable balance (L/R)- Provide adjustable bass/treble levels- Allow for input selection of line level analogue inputs (PC/Mp3 player/etc)As digital electronics is an area I'm familiar with, I plan to have:- A graphic LCD display showing current settings- A rotary encoder and user interface for the graphic LCD- Presets, selectable with a remote controlI've been searching for chips that provide volume/balance/tone control through a digital interface (such as SPI or I2C). I have found several chips which look suitable, however the datasheets all mention 'car audio' rather than 'hifi audio'. I'm concerned that I could spend a few months designing and making this product, then find that it degrades the audio signal so much that it is unusable.Does anyone have any experience with any of the below chips, or if not, do the specifications look suitable for home audio?PT7313 - I2C control of volume, tone, gain and inputLC75342 - SPI control of volume, tone, gain and inputTDA7313 - SPI control of volume, tone, gain and input(mentions hifi, but no distortion figures)The only digitally controlled part I could find that has excellent specifications and would definitely be suitable for hifi applications is thePGA2311- however this doesn't provide any control of bass or treble. If the other options are going to distort the signal too much I could just use the EQ built in to the MP3 player/PC/etc, however I would prefer if the preamp had it's own settings.Any thoughts or opinions are much appreciated!Cheers,Andy

author: jahonen
author_rank: Super Contributor
timestamp: June 30, 2012, 07:37:31 pm
content: For any serious hifi application, I'd skip those tone controls altogether, they really are not that useful if everything else is ok. They just add noise to the signal and you would most probably find that they sound best when tone controls are in middle position. Instead if you want to tweak the frequency response for the room correction, then a parametric equalizer (or even better, a digital room correction) would be much more useful.One possible alternate implementation might be something like TI's TAS3004 or equivalent audio processor, which is a simple audio DSP with preprogrammed structures and needs just coefficients. But that of course adds its own noise due to mandatory AD/DA conversion.Regards,Janne

author: cowana
author_rank: Frequent Contributor
timestamp: June 30, 2012, 08:23:53 pm
content: Thanks Janne, that's very helpful.The TAS3004 looks like a very capable chip, and ideal for my application. It seems the TAS3004 is very hard to get as it's discontinued - however its replacement seems to be the PCM3070 (£4 on Farnell). I'm reading through the datasheet at the moment - however from what I can see, the PCM3070 seems to lack the bass and treble control registers the TAS3004 has.If this is the case, does anyone have any ideas where I could buy a TAS3004 or something similar?Thanks,Andy

author: T4P
author_rank: Super Contributor
timestamp: July 01, 2012, 02:12:29 am
content: As he said, skip the tone controls altogether, if you want to compensate use a proper parametric equalizer

author: StubbornGreek
author_rank: Frequent Contributor
timestamp: July 01, 2012, 03:25:48 am
content: Quote from: jahonen on June 30, 2012, 07:37:31 pmQuote from: DaveXRQ on July 01, 2012, 02:12:29 amI'll be the third to chime in and suggest a parametric equalizer instead of something that will distort what your music 'should' sound like.That said, please update as you go along the process, I'd enjoy reading about the progress.

author: cowana
author_rank: Frequent Contributor
timestamp: July 02, 2012, 11:43:11 am
content: Thanks again for all the very helpful replies.The speakers and amplifier are both very high quality - the amp is rated at <0.01% distortion at 100W! Therefore, as everyone's said, putting anything that will distort the signal further is probably a bad idea.Because of that, I think I'll lower my specification to volume control (of each speaker independently) and source selection.For source selection, I'm thinking of using a digital switch - possibly theFSA2367(which seems to be an audio switch).I might then have a summing opamp (gain of 1) in case I want more than one source on at a time.For volume control, I'll probably use a PGA2311 - an extremely high quality SPI digital pot designed for audio. The volume can mute during switching/power on/off to stop any pops or clicks.Control will most likely be through a rotary encoder, with either an OLED charater LCD or TFT graphic LCD showing current selections.Andy

author: T4P
author_rank: Super Contributor
timestamp: July 02, 2012, 12:46:35 pm
content: No point deviating much from <0.01% I bet you noise is going to dominate even 0.1% THD

author: jahonen
author_rank: Super Contributor
timestamp: July 02, 2012, 02:44:23 pm
content: One word of caution, based on my experience on the PGA chips, the output of PGA23xx will pop during power on/off transient. You would want some kind of muting mechanism to suppress that and prevent possible damage to your speakers. Even if no damage, it will sound nasty.For mux/analog switch, you might want to use something that accepts ±15 V as supply voltage since PGA will need it anyway. That reduces distortion since on-resistance variation along with signal voltage is smaller. Take a look at MAX4665.Regards,Janne

author: cowana
author_rank: Frequent Contributor
timestamp: July 04, 2012, 11:47:12 am
content: Thanks for the warning Janne. It's helpful to hear from someone with experience of the IC. I was planning to ground pin 8 (~MUTE) during power on and off, and I was hoping that would suppress the power on/off pop. However that may well just disconnect the source and not solve the problem - I'll have a look at the range of pop/click removal ICs that exist.Thanks,Andy

author: cowana
author_rank: Frequent Contributor
timestamp: July 04, 2012, 11:55:40 am
content: Interestingly, I've just found a very similar project on another forum - his end product seems pretty good!http://www.diyaudio.com/forums/chip-amps/106377-pga2311-preamp-selector.html]Link to DIY Audio foumOne thing I've noticed is that almost all other designs use relays for source selection, rather than a solid state switching method such as the MAX4665. Is this a good idea to reduce noise, or is it just a waste of space and power on the PCB?Andy

author: digsys
author_rank: Unknown
timestamp: July 04, 2012, 01:05:37 pm
content: QuoteOne method we used in days gone bye, was to clamp the input to the power stages ie clamp stayed on untilit was "released" after the system started up. Some even put in a soft-start at that point.Relays have other issues, mainly at LOW signal voltages (mVs) - Many have a MIN voltage that they will switch, also issueswith eV / contamination (unless the contacts are hermetically sealed in Nitrogen etc) AND stray field pickup from the coil.By the time you find a relay that is ideal - you're up to shoebox size and sold a liver to pay for it.

author: cowana
author_rank: Frequent Contributor
timestamp: July 10, 2012, 07:11:35 pm
content: Thanks for all the replies and ideas so far - I've attached v1 of the schematic.Power:Three regulators - analogue 5v and -5v, and digital 5v.Audio:Source selection using a MAX4908Volume control using a PGA2311Output to my amplifier (very high input impedance)Digital control:Controlled by an ATmega48 (possibly with the arduino bootloader)Inputs:Rotary switch (rotation and push select)Infrared remoteOutputs:Winstar oLED display (no contrast adjustment, no backlight)Power and status LEDsPlease make any comments, suggestions or questions regarding the schematic so far!Cheers,Andy

author: jahonen
author_rank: Super Contributor
timestamp: July 10, 2012, 07:46:59 pm
content: PGA2311 needs to be driven from a low impedance source. Add a buffer amplifier (LME49710 or similar works fine for that) before PGA, otherwise it is fine. Move AC-coupling caps before this buffer amplifier and add some resistors (100k or so) on each side of the cap to ground to discharge the capacitor so that no pop will occur when signal is plugged in. You could also add a EMI suppression capacitor at each input (100 pF) in parallel of the input and ferrite in series to inside circuitry to prevent RF rectification on the buffer opamp.Also, the muting probably does not prevent pops during power up, PGA2311 probably pops regardless of the state of \MUTE-pin. For reliable operation, you'll need a mechanical relay, which could be controlled by your MCU.The digital/analog ground makes whole thing difficult to route properly, just use one ground (plane) and place components so that no digital (or AC rectifier pulsed current, that needs special care) current will flow through the analog section and you are good. I haven't ever bothered with separated grounds and have just placed components like that. Works fine without any noise. For more information:http://www.hottconsultants.com/pdf_files/june2001pcd_mixedsignal.pdfRegards,Janne

author: cowana
author_rank: Frequent Contributor
timestamp: July 10, 2012, 09:11:42 pm
content: Thanks Janne.I had hoped my inputs would have sufficiently low impedance to avoid a buffer, but it's probably good practice to put one in. In addition, the amplifier inverts the signal (so another inverter corrects the phase), as well as the amp requiring 1.7v rms for a full 100W output. That's more than most of my devices produce, so it's probably better to have a small amount of gain in the buffer than having to rely on the PGA2311 to amplify.That's why I've decided to go with an inverting amplifier, probably with a gain of ~1.3. I've added a ferrite to the buffer inputs to stop any RF, and the pulldown resistors on the decoupling capacitors.I'll also add decoupling capacitors between the input connectors and the MAX4908 - it has internal resistors to discharge those.As for the popping on power on, I think I'll leave it as it is - I'm hoping to fit this on a 5x5cm board so want to keep mechanical components to a minimum. The preamp will be on or (software) asleep most of the time - it will rarely be powered down when the amplifier is switched on. For space reasons, I plan to have the fuse, transformer, rectifier and pre-regulator smoothing capacitors mounted in the case next to the PCB. This means high ripple AC signals shouldn't be an issue on the board.I'll have a look at ground planes when I start routing.Any more suggestions are greatly appreciated!Thanks,Andrew

author: DrGeoff
author_rank: Frequent Contributor
timestamp: July 10, 2012, 10:13:53 pm
content: Are you more interested in sound quality or bells and whistles?If you are after a simple preamp with very low noise, buy a handful of NE5532 devices and forget about all the digital control stuff. I'd also recommend adding LF and HF controls with a fixed broad Q and sweepable centre frequency. Fully parametric EQ is unnecessary since it is more likely the listening room has multiple artefacts anyway. If you can get hold of Douglas Self 'Small Signal Audio Design' then this will help you design a robust, low noise preamp for audio.

author: cowana
author_rank: Frequent Contributor
timestamp: July 14, 2012, 09:54:38 pm
content: I'd like to have a balance between quality and bells and whistles. I'm not too bothered with tone controls - volume and source selection will be fine.I've attached version 3 of the schematic - as usual, I'd appreciate any thoughts!Major changes from V2:- The MAX4908 has a THD of 0.02% - higher than the amplifier's and RGA2311's. For that reason, I'm going to switch to using relays for source selection - this seems to be what most DIY hifi preamps use. In addition, having a group of relays means I can use one for muting the output during powerup.- The opamps are now reconfigured as summing opamps - meaning multiple sources can be listened to at once (although there's no independant volume control for each source).- The mute pin on the PGA2311 is now held at Vcc (unmuted) - as the output relay will mute during powerup, and the PGA can be muted through software if required.Cheers,Andy

author: DrGeoff
author_rank: Frequent Contributor
timestamp: July 14, 2012, 11:16:46 pm
content: The summing amp (mixer) idea works quite well, I've used it myself occasionally.However, since the input sources have different output impedances and certainly different output levels you really need to include a buffer for each and a trim control to match the level of each. The output from a CD player can be very hot compared to that of a tuner or ipod for example. You can put the trim controls on the back and set them once for each input source and there's no need to touch them again. In the current circuit, the switching of the sources will have an effect on the signal level due to the output impedance of the source being switched in and out and adding load to the summing point. This is why buffering is a good idea (after the source relay switch).There's no component values shown in the schematic, so it's hard to comment on the noise figures yet.Why have you chosen to limit your audio amp supply rails to +/-5V? It seems quite low and does not give much headroom. This might be another reason to include buffering and trimming for each input source.If you are concerned about noise, be sure to use something the LM317 and LM337 regulators over the 78XX and 79XX regulators for a reduction in power supply noise.I'm not sure what the output offset voltage would be from your Volume circuit block, however it may be prudent to add series capacitors to avoid thumps when the output relay switches on and there is any DC offset from the circuit.It appears that you have RF filtering on your input board. The best place for this is at the input terminal (ie solder it directly on the RCA socket) prior to the source select relays. If you are using PCB mount sockets then have the LC filter directly at the PCB connection point.Your relays should be signal relays (not power relays) to avoid contact problems with insufficient wetting current.

author: SeanB
author_rank: Super Contributor
timestamp: July 15, 2012, 06:09:43 am
content: The relays should be gold plated contact ones, or sealed relays. Power relays have either tungsten or nickel alloy contacts for power handling that are very poor performers at low signal levels, and cause distortion. Preferably use latching relays, as this lowers the power consumption of the input stage, and can reduce switching noise as well.

author: cowana
author_rank: Frequent Contributor
timestamp: July 15, 2012, 10:22:25 am
content: Quote from: DrGeoff on July 14, 2012, 11:16:46 pmI was planning to change the value of the resistor going into the summing circuit when I construct it - that will change the sensitivity of that input. If I can find some small SMD ones, I may use potentiometers on the PCB.Quote from: DrGeoff on July 14, 2012, 11:16:46 pmThe effect will be quite small as the summing point should be at ground potential. While there may be a small effect, listening to multiple sources at once will not be done very regularly, so having to readjust volume for this isn't too much of an issue.Quote from: DrGeoff on July 14, 2012, 11:16:46 pmThe PGA2311 requires +/-5v analogue rails, so I am using these throughout for the analogue sections. You can get a PGA2310 with +/-15v rails, however it is amost twice the cost at Farnell, so I'd like to avoid using it. The absolute largest voltage I would ever want to output (which drives the amp into clipping at 150W/channel) is 2.1v RMS - so 2.96v peak. On a +/-5v supply, the buffer opamps (LME49710) can swing to 4v, which is 2.8v RMS.Quote from: DrGeoff on July 14, 2012, 11:16:46 pmThanks - I've made that change.Quote from: DrGeoff on July 14, 2012, 11:16:46 pmThe output DC offset voltage of the PGA2311 is max 0.5mV, so I should be okay with no series capacitor.Quote from: DrGeoff on July 14, 2012, 11:16:46 pmAgain, thanks for that - I'll move it to the input select board or to the sockets.Quote from: DrGeoff on July 14, 2012, 11:16:46 pmThe relays I am using are very high sensitivity signal relays designed for switching high-end audio. They have gold overlay silver-palladium contacts, 100mOhm contact resistance, and the datasheet lists a minimum switching load of 0.01mA at 10mV.

author: cowana
author_rank: Frequent Contributor
timestamp: August 05, 2012, 12:21:14 pm
content: Right! It's been a while since I posted a version of this schematic - I feel it has got to the stage where the design is almost complete. I'd apprentice it if you could have a quick look over it - if there aren't any glaring errors, I'll move onto the PCB layout.The circuit has changed a lot since version 2 - it now includes a large digital audio section as well. It now has an onboard USB audio decoder, a digital (SPDIF) source selector for changing between optical, digital and USB sound inputs, and a DAC for producing the audio output.The analogue signal path hasn't changed much - the sources are summed through a buffer opamp, and passed through the PGA2311. There's a peak voltage detection on the input of the PGA2311, so the AVR can measure the volume level coming in.Please ask any questions you might have!Andy

author: poptones
author_rank: Frequent Contributor
timestamp: August 18, 2012, 10:27:05 pm
content: That's quite a project you've made! I have a question: Where do the "left buffered" and "right buffered" signals for the "peak detect" leds come from? I don't see any "buffers" in your schematic save for the preamp itself. If you just hang those led/rc circuits on the signal path without their own buffering you'll be seriously screwing with the sound.

author: djsb
author_rank: Super Contributor
timestamp: August 19, 2012, 03:46:07 pm
content: If I was to replace my current Rotel RC-970BX pre-amp (uses NE5532's-Sounds lovely on BBC Radio FM) I would choose this simple discrete designhttp://www.passdiy.com/pdf/B1%20Buffer%20Preamp.pdfAnd I'd forget about all the MCU stuff. I love the sound of relays clicking though and the contacts are better quality than multipole switches so maybe I could be persuaded.

author: StubbornGreek
author_rank: Frequent Contributor
timestamp: August 19, 2012, 06:54:15 pm
content: Quote from: djsb on August 19, 2012, 03:46:07 pmI've been looking at (planning on putting one together) that preamp for a while now. Have you heard one live? If so, can you give an example of comparison? I've heard so many wonderful things said about it but never actually had an opportunity to have a listen.

author: poptones
author_rank: Frequent Contributor
timestamp: August 19, 2012, 10:03:59 pm
content: Funny. I have no turntable, no tape deck, no cd nor dvd player nor even a videogame or TV set and thus no need for a "preamp" of any sort. I often forget there are other ways and that some folks might still need these quaint devices called "preamps." I believe I have purchased perhaps two DVDs and one or two CDs in the last decade - to me, the PC is where it's at.I am, however, about to build a small gainclone amp (just ordered the chips last night) to replace my ancient Marantz 2220. Its sound, being of a single ended power supply amp with giant output coupling caps, is dated; I have no need for most of its function, and it occupies a good third of the top of my desk. I like old equipment, but if it doesn't have tubes then to me it's not wholy - and for now, I have no room for a pair of tube monoblocks.Purists should, however, remember that modern MCUs are designed for compatibility with rf sensitive systems. When the ram, rom and cpu are all contained within a tiny package and the cpu is running at just a couple of mhz (or even a few khz) the only switching signals are going to be those output pins going 1 or 0 at your direct command. And, should you really believe these are causing trouble, you can always mount a tiny toroid over the top of it or build a small mumetal box to contain it.

author: cowana
author_rank: Frequent Contributor
timestamp: August 20, 2012, 08:22:49 am
content: I finished the design about a week ago - see the attached V7 schematic.The USB circuitry is fully isolated from everything else, as are the digital inputs. This should eliminate any issues with ground loops or noise from the USB circuitry.I sent off the board to Itead Studios - it's a 100x70mm board, and should turn up very soon! The board layout is attached to this post.Quote from: poptones on August 18, 2012, 10:27:05 pmThe peak detect feeds into the MCU's ADC, rather than directly to LEDs. The purpose of this is for the MCU to tell what volume it is at - I may program in an 'auto volume' feature, or I may just use it for fancy graphics on the front panel's LCD. The 'left buffered' and 'right buffered' signals are taken after the opamps (just before the PGA2311). I plan to use an RC network of 100K and 1uF, which will present very little additional loading onto the signal.This design has come a long way since my first post here and V1 of the schematic. The final design has the following inputs:- USB audio- 2x digital audio over coax- Digital audio over fibre optic- 2x analogue audio- IR remote control- Rotary encoder with push-to-select- ADC of right and left volume levelsAnd outputs:- 16x2 oLED display- Source selection- Output mute- Variable output gain/attenuation- Analogue audio output- Solid state relay for amplifier switching (240v AC)- Plenty of debugging LEDsAndy

author: djsb
author_rank: Super Contributor
timestamp: August 20, 2012, 11:04:46 am
content: Quote from: StubbornGreek on August 19, 2012, 06:54:15 pmNot had a chance to build one yet. It's one of those things that would be nice to try but would be a lot of work. I'm quite happy with my current set up. This is turntable,CD,tuner,PC output feeds the Rotel pre-amp and the pre-amp outputs feed into 2 marchand active filters (2 hi frequency outputs and 2 low frequency outputs). The outputs of the active filters feed into 2 off Rotel RB-970BX stereo power amplifiers. This means each loudspeaker has its own amplifier directly coupled to it (2 Morel tweeters and 2 morel bass-midrange speakers). There are no passive crossovers between the amps and the speakers themselves.The main weakness with my system at the moment is loudspeaker/room tuning as I cant tweak the response of the speakers easily (no passive crossovers to tune).It still sounds pretty good though and I'm happy to keep it as it is for now.

author: StubbornGreek
author_rank: Frequent Contributor
timestamp: August 20, 2012, 04:24:42 pm
content: @ cowana: This looks pretty neat. Do you plan on posting some measurements? When do you think you'll have it all together?@ djsb: nice setup.

author: merlinb
author_rank: Contributor
timestamp: August 22, 2012, 04:00:33 pm
content: Quote from: cowana on July 15, 2012, 10:22:25 amIncidentally, you can get free samples of the PGA2310 and others from TI, if you can open an account (or know someone else who can).

author: poptones
author_rank: Frequent Contributor
timestamp: August 22, 2012, 10:10:14 pm
content: Anyone can, you just need a company name. Maxim, Atmel, Microchip - they all do it. National is sending me some LM4780s for my new power amp...