arduino audio controller in *stereophile* magazine

I've been working on various incarnations of audio and audio-related controllers (one is what we call the LCDuino-1). it started out as an LCD backpack with a port expander, RTC chip and some user proto-holes. it was meant as a building block for doing audio remote control systems (volume, on/off, sleep timer, i/o selector, etc).

later, we added a proper 8-bit relay R/2R resistor attenuator and a matching 8 port i/o selector. my partner designed a motherboard for it and we had this to show for our effort:

then, in oct 2010, my partner and I took our DIY modules to an annual audiophile gathering called 'burning amp' (yes, really) in san francisco to show to the local audio/builder community. there was a reporter from stereophile magazine there and he interviewed us. here's our equipment - and yes, its all arduino-powered :wink:

here's a better shot (my own photo) of the setup we brought to 'burning amp':

one way or another, people are going to hear about arduinos (and controllers, overall) :wink:

just wanted to share my success using arduino.

Awesome! I bet you're proud (and you should be)! That's a nice piece of equipment you've built.

:slight_smile:

thanks :wink:

what I built was on-the-cheap. I had a spare metal cover from a network router - I inverted it and made a bottom/side chassis for it. (there is no top. its always in perma-tinker mode).

but for an on-the-proper build, see what my partner, Ti, did:

semi expensive metal work and fairly expensive front/rear panels (CNCd). all 8 ports are wired up (I only did a few on mine).

we measured these with audio test gear and the noise level and distortion was at our test gear level (130dB down at points). no 'arduino computer noise' coming thru at all thru the analog line (you can see 2 very visible ground plane separations on the motherboard; for analog and for digital).

http://www.amb.org/forum/lcduino-1-display-i-o-processor-f21/lcduino-1-delta1-delta2-alpha20-sigma22-sigma25-alpha10-preamp-t283-70.html#p6008

I was worried about backlight (pwm) bleedthru, but again, our test gear shows this to be noiseless andn flat from dc thru about a mhz or so (well beyond audio needs).

what that thing is, btw: its an audio preamp that selects 4 inputs and routes to 4 outputs (all assignable to in or out); along with a 'stepped attenuator' volume control using relays, resistors and 256 steps of half-dB per step. the output of the attenuator board go into a pair of discrete (fet/bpl) buffer boards that give voltage gain and are nearly noiseless, with near zero output impedance. that would go to your power amp or set of amps.

you control it via a learning remote (arduino learns your remote) OR you twist the knob to change volume. if you use the IR remote, the knob is motorized and catches up (in the background) to the IR-set value. in this respect, whether you use the IR remote or the knob, itself, it always 'points the right way' due to the motor and arduino controlling it. ie, if you had used the IR remote to set the volume to halfway, then the knob will motor over to point to 50%.

Nice job. I do have a question about how you handled volume moves in your software. Did you use a 'linear' type ramp up/down, or did you try and simulate a standard audio log type taper? Is the motorized pot of linear or log taper?

Thanks;

Lefty

hi lefty,

the two are decoupled, so that you can control either one. the way the user talks to the vol-control engine (or subsystem) should be different from the actual way the analog signal is attenuated.

on the motor pot side, its a linear track. simple obvious voltage divider going into an arduino a/d pin. cap across signal and gnd to kill noise and settle some of the 'wander' that pot-driven inputs sometimes have. in this config, no audio goes thru or even near this pot, its simply a control device.

I considered, for a short while, using log-tape motor pots and de-logging them (lol) in software. I found the curves to not be very nice, in the real world, and so delogging would not be all that practical. perhaps a painstakenly done data point lookup table to map the current pot you have.

but then you run into other issues; at one end, its very 'wide' and at the other, very compressed. you can't get resolution to 'unlog' stuff like that with a cheap a/d that we have on the arduino. it becomes impractical to delog (grin) things unless you have a lot of bits of precision. so I gave up and just decided to limit the design to the assumption of a linear track motor pot. digikey/mouser has alps brand for $15 or so, so its realistic to spec for that kind of thing.

as for the engine itself, it has no taper. its 0db down to -127.5db in half db steps. or, if you prefer, you run our cheap-n-dirty CGI web gui and pick your own!

http://www.amb.org/audio/delta1/r2r.cgi

pick the top 3 parameters and it will compute the rest. order the parts, solder onto the blank boards and that takes care of the vol engine (2 channel attenuator).

if you are on a budget, don't use all 8 relays. for a while, I was doing proto builds with 7 bits and that would give me 0-127db but in 1db steps. saved me the cost of a $5 relay (lol) but it also is a little faster and less noisy (chattery) since only 7 relays (max) would have to change, and not 8.

there is no 'taper'. if you want a value, you send that value and the complement of it to the 2 adjacent PE chips and they pulse the relays to get the dB value you wanted. that's the scheme.

LW;

Thanks for the explanation. I'm still somewhat interested in home stereo Hi-Fi stuff. About 20 years ago I started seriously checking the thrift stores and e-bay for vintage hi-gear, mostly those made in the 70s. The stuff was really well made and designed back then. Most worked fine, only needing pots and switch contacts cleaned well. Even those needing repair was not hard as schematics were usually obtainable and output transistors were still available if searched for. Lots of Marantz, Sansui, Kenwood, Pioneer, etc were being donated as people 'upgraded' to five channel and other BPS (black plastic sh#t) equipment. I would keep the best and sell off the others. Then things started to dry up as the rest of the world started wising up to how great that vintage stuff was and e-bay prices soared on the higher end items. Still have a nice silver Sony component set-up and haven't been able to want to part with the Pioneer SX-1980 (270 watts per channel!) receiver.

Lefty

what I found is that analog stereo pots don't track well from left to right (esp. at lower volume levels) and also the high freq. response 'merges' (crosstalk) as the freq goes up. its very measurable even with a $100 pc sound card. but once you remove the cheap analog pot and put dual mono attenuators in, crosstalk is highly improved and you get essentially identical tracking if you use 1% resistors (don't really need .1%).

the weak spot is usually (imho) the preamp section. if you disable that in your vintage gear (or bypass/jumper around it) and use an outboard preamp or attenuator, you get a combo that makes the best of both.

for amp sections, I'm using 'chip-amps' that cost about $15/channel to build and they give about 50w/channel. very good cost/perf ratio. good for bi- and tri-amping :wink:

I hear you. However I could never 'bypass' my favorite preamp:

Lefty

that preamp would be a fun one to gut and re-do as a control-plane front-end with a more modern back-end.

I do like the older analog GUIs (lol). but the old electronics is rarely as good as what can be made, diy-wise, today.

there's probably even enough room in that chassis if you remove all but the front UI parts and put in arduino controlled stuff behind it.

that preamp would be a fun one to gut

Your a heretic to even suggest such a thing. :wink:

Do you realize that this pre-amp uses 100% fets running at over 100vdc power rail? This, grasshopper, was the peak of analog engineering design back when electrons were not ordered to simply turn on or off, but rather gently caroused into audio blissful movements.

Seriously this thing is designed and built like a piece of expensive H.P. test equipment. It has a passive vertical mother board with about six plug in boards. Nasa would have no problem letting with go on board a space craft. Except maybe for the weight penalty. :wink: These can fetch to $400 or higher on E-bay at times.

Lefty

I have not seen the schematic for that so I don't know it. sounds interesting.

still, a LOT has changed in noise level, alone, over the years. even what was 'pro level' in the 70's and 80's is far behind what we have for consumer playback systems, now.

modern things like quiet power supplies (toroidal, as well), very low noise fet-based op-amps adn not to mention elimination of the pots and mech switches.

I have no doubt that the specs can be significantly improved by gutting and re-doing. I know its heresay to say that, but I would still keep the nice metal work and shiny knobs :wink:

I would guess that there are probably also ugly caps in the audio path, too.

old is romantic but in so many cases, old IS surpassed by current state of the art parts.

still, a LOT has changed in noise level, alone, over the years. even what was 'pro level' in the 70's and 80's is far behind what we have for consumer playback systems, now.

I know its also hearsay to say that human hearing hasn't improved sense the 70's, but I really don't want to punch that bees nest called audiophiles golden ears. ;D

Can't help myself, they still selling $100+ caps to those guys? How about those $300+ 300A Western Electric 7 watt tubes? $500 AC power cables? $50 Wood thingees to place on top of your speakers?
;D

Lefty

being serious - there are things that are easy to measure, even using simple spdif sound cards and good dacs and a/d's.

what costed a thousand dollars in the eighties may not even compete with stuff 1/10 the price, today. the modern decent op-amp quality, alone, is shockingly good; you don't even have to go discrete to have studio-grade audio paths these days.

I'm not talking about magic capacitors; but just replacing all the (likely) carbon resistors and ceramic/electrolytic caps with film types. not $100 caps but $5 caps at the most. competant upgrades, not boutique stuff.

being serious - there are things that are easy to measure,

I was being serious, but I was talking about things one can hear, no matter if measured better or worst. Under double blind testing conditions of course. Of course the audiophiles distrust measurements, they will just say you are measuring the wrong things. ;D

Lefty

if you want to compare that ancient boat anchor to some modern gear, I'm up for it. lets put both of them on the same test harness and see what the computer says.

shall we?

I have audio test suites and hardware that can measure down quite low (m-audio firewire a/d d/a box). it will show - impartially - how the 'old classic' gear compares.

up for it?

lets put both of them on the same test harness and see what the computer says.

You seem to keep missing my main point. If something measures better, but is undetectable with normal human hearing, is it really 'better'. Does it need to be better?

Your preamp might have a flat response out to 10Mhz, but does that make it sound better or even different from a preamp that is flat only out to 40khz? You got noise down to -130db, that's impressive. But can you hear a difference between a -90db and -130db noise floor in a normal listening environment, again under double blind testing? Color me skeptical. I understand electronics and I understand that -130db is an impressive specification to meet. I just don't think it has anything to do with listening to quality Hi-Fi music. Your just testing your test equipment. :wink: Electronic measurement masturbation perhaps. ;D

Your preamp may have nice .5db level steps, but can you hear a difference in +.5, -.5, or 0 db change in a double blind hearing test? You know what Mr. Bell was trying to come up with when he came up with the decibel scale? A unit of hearing measurement of just detectable levels of amplitude change by the average person.

It should really be about ones enjoyment of music. The vast popularity of portable MP3 players, with their less then state of the art audio specifications, suggest that people like to listen to the music, not the equipment.

I love nice stereo music played on well designed and constructed equipment. But I have long ago lost faith is specmanship, and spending excess money on parts that don't improve the end product.

Have you ever looked at the real world frequency response specifications (verified and measured by 3rd party) of even expensive high end loudspeakers? Do you think a better then good enough preamp will improve such a system? Hi-fi is a system, and the final results can be no better then it's weakest links, speakers and human hearing. The electronics has been 'good enough' for many decades.
Now show me some new digital controlled servo operated loudspeaker with flat 20-20khz response and maybe I would be interested in checking it out or up for a serious 'showdown' test.

Rambling I know, but what say you? :wink:

Lefty

addressing some of your points:

  • noise level and being audible: yes, in headphones and good speakers, you can hear these things. as each stage improves (the dac, the pre and the final amp) you do hear more of the recording (which most people do consider a good thing). and yes, 130db down is still audible in headphones on classical music that has good dynamic range. its not flat 130db either, that's a best-case null point. on average, things that are 'good' these days tend to be 100db or better but that's a real honest 100db, not some marketing specs.

  • upper frequence response matters. you need a few times the audio passband worth of FR to pass the audio band cleanly. modern pre's tend to want to have good response up to 50khz, 100khz and beyond just so that the '20-20k' gets thru easier. send a square wave thru at even 10k and watch it as it goes thru a high bandwidth amp vs one that is 'just enough' to pass 20k. the fidelity of that wave is visible on any scope.

  • 0.5db steps, it matters to get you a smooth transition as you vary the knob. I tried single db steps (for almost a year, on one of my protos) and thought 1db was pretty ok for daily use. then I built a half db stepper and liked it a lot more. costed 1 more relay and a few more resistors. was worth it. and for a subwoofer box, I built one that uses 8 relays and only gives 25.5db for total range but it moves in 0.1db steps. yes, for a subwoofer level control, you do want that level of granularity. try getting that from your sony :wink:

  • re, high end spkrs; yes, I have looked at the FR graphs. some of the modern tweeters are truly amazing. you can buy tweeters for $50 or less that are flat out to 30k. modern tech is WAY beyond what we had even 10 yrs ago (its a good thing, btw). along the same lines, if you use good headphones (my ref pair is sennnheiser hd580 and hd650) you will hear every little detail and it will be quite flat sounding. cheap speakers and phones are limiting but modern systems are not.

  • servo speakers; not necessary. even conventional cone (boring) spkrs are very high fidelity these days. I think you're just quite out of touch and not willing to update your world view, sorry to say. a LOT has changed since the days the dinosaurs walked the earth. old classic gear can be treasured for its 'sound signature' but performance wise, its usually not competitive. there are a lot of exceptions but I would not consider a mass market sony box of any kind - no matter what the company claims - to be competitive with custom made DIY audiophile gear. for lots of reasons.

  • noise level and being audible: yes, in headphones and good speakers, you can hear these things. as each stage improves (the dac, the pre and the final amp) you do hear more of the recording (which most people do consider a good thing). and yes, 130db down is still audible in headphones on classical music that has good dynamic range. its not flat 130db either, that's a best-case null point. on average, things that are 'good' these days tend to be 100db or better but that's a real honest 100db, not some marketing specs.

You say -130 down is audible, I say it's not under any conditions. Only an independent double blind testing protocol could determine which of us is correct. Your opinion, or any one's opinion, even mine, is not fact and should not be stated as such. Your making the claims, so the burden is on you to prove those claims if you wish. Otherwise you have posted your opinions well, but they remain just opinions. Measurement is not listening, and opinions are not provable repeatable facts.

  • upper frequence response matters. you need a few times the audio passband worth of FR to pass the audio band cleanly. modern pre's tend to want to have good response up to 50khz, 100khz and beyond just so that the '20-20k' gets thru easier. send a square wave thru at even 10k and watch it as it goes thru a high bandwidth amp vs one that is 'just enough' to pass 20k. the fidelity of that wave is visible on any scope.

That sir is rubbish. You can see extended FR with a scope, but you can't hear a difference past the upper FR of human hearing. Content above a given hearable upper limit does not modify the content below that limit. Plus, what audio media do consumers use that have content past normal human hearing frequency response. Most don't listen to frequency generators!

  • 0.5db steps, it matters to get you a smooth transition as you vary the knob. I tried single db steps (for almost a year, on one of my protos) and thought 1db was pretty ok for daily use. then I built a half db stepper and liked it a lot more. costed 1 more relay and a few more resistors. was worth it. and for a subwoofer box, I built one that uses 8 relays and only gives 25.5db for total range but it moves in 0.1db steps. yes, for a subwoofer level control, you do want that level of granularity. try getting that from your sony

Again I'm sceptical, but as stated before only double blind testing is capable of separating fact from opinion. My current Sony component setup is just one of a large number of systems that have passed through my hands. I'm not even sure it has the best specifications of the stuff I've owned, just the system I enjoyed using the most.

  • re, high end spkrs; yes, I have looked at the FR graphs. some of the modern tweeters are truly amazing. you can buy tweeters for $50 or less that are flat out to 30k. modern tech is WAY beyond what we had even 10 yrs ago (its a good thing, btw). along the same lines, if you use good headphones (my ref pair is sennnheiser hd580 and hd650) you will hear every little detail and it will be quite flat sounding. cheap speakers and phones are limiting but modern systems are not.

I too enjoy owning a pair of Sennheiser HD580 cans. And of course a tweeter does not a complete loudspeaker make, it's just one of many parts that comprise a modern loudspeaker, including crossover, other drivers, cab design, etc. I'm sure some speakers have improved over time, but I'm also still sure that speakers,normal human hearing and listening room properties, are still the ultimate limits or FR and distortion and further improvements in up stream electronic components is just gilding the Lilly.

  • servo speakers; not necessary. even conventional cone (boring) spkrs are very high fidelity these days. I think you're just quite out of touch and not willing to update your world view, sorry to say. a LOT has changed since the days the dinosaurs walked the earth. old classic gear can be treasured for its 'sound signature' but performance wise, its usually not competitive. there are a lot of exceptions but I would not consider a mass market sony box of any kind - no matter what the company claims - to be competitive with custom made DIY audiophile gear. for lots of reasons.

I'm still a member of a popular audio forum and I think I have tried to keep up with audio evolution. However I'm still of the opinion that the vast majority of audiophile 'golden ear' equipment is designed only to separate dollars from their gullible customers. That is OK, if they can afford it, it is their privilege to waste their discretionary money anyway they wish, just don't tell me all the claims are fact. I love those Lexus TV commercial showing a audiophile staring at his tube audio amplifier and saying "there is real gas in those tubes". :wink:

Lefty

too much stuff to address point by point, but in general, I think you are painting with too broad a brush. the audio field is truly filled with the spectrum from non-science to real science. and when you buy commercial stuff, you often have little idea where in that spectrum your gear's design and implementation fit.

otoh, with DIY gear you can verify its design and performance (like the whole open source thing). and so, I'll leave it there. if people want to do their own builds and then compare the sound of this kind of system vs their existing one, they're more than welcome. I do believe that if given a fair chance, the sonic clarity of the relay attenuator vs the typical $1 dual gang volume pot will justify the cost to the DIYer. what does a typical preamp (decent one) cost these days? then how much would it cost to build a DIY relay attenuator? the relay thing is in the $100 range, give or take what you want to do to it (PSU wise and buffer/gain stage wise). you can build it quite cheap (passive, just relays and resistors in the audio path) and nothing commercial can even come close in price or performance.

and finally, you get control over your UI when you go the DIY route. this is a non-audio side of the project but you'll never be able to modify or customize a sony UI, for example. and often, the commercial gear is very crass and raw in how its UI works.

I did used to think genuine analog pots were fine for audio use. after I did tests on typical pots and saw the tracking errors and crosstalk as the frequency went up - I changed my 'world view' on attenuators in the audio path. if you opened your mind and gave a new system a fair chance, maybe you'd see things in a new way as well.

the only downside, really, is that the relay attenuators are clicky as you turn the volume knob or run up/down the volume range. it runs a binary sequence and so each time you cross a binary boundary (31db to 32db, etc) you get a massive click via a bunch of relays being pulsed to 'roll over' the count. a few binary boundaries are noisy (lol) but not noisy in the speakers (I mute the relays during volume-change events). the relay chatter, physically, is noisy though. that's the only down side I can think of. all the rest are positives compared to conventional volume controls.

Well stated. I, in any of my points wished in no way to discredit the quality or craftsmanship of your posted work. It really is nice looking product and I'm sure it meets your posted specifications. Besides it has an Arduino inside, which I would assume both of us approve of.

We can part friends and leave the rest to rest. :wink:

Lefty