Opto attenuator, will it work? and more... - Page 1
Forum section: electronics / beginners

author: FriedMule
author_rank: Frequent Contributor
timestamp: June 05, 2018, 03:27:24 am
content: First, the attenuator are ment as a "do not touch audio" attenuator and should be fairly independent of the components audio quality on the diode-site of the circuit.But will it work?Second I have tried to design a simple PSU that shall be used for many light tasks in my DIY amplifier.What I do not know is how the PSU part would react with different loads.i.e. the attenuator on +10V and GND, an other load between +10V and -10V, a third load between some other combination. All with different resistance and different current needs.

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: June 05, 2018, 03:47:03 am
content: Have a look at this:http://diyaudioprojects.com/Solid/DIY-Lightspeed-Passive-Attenuator/The important thing is that the resistance/current response between devices is sufficiently variable that you'll need to buy many devices and find two that have close responses.

author: FriedMule
author_rank: Frequent Contributor
timestamp: June 05, 2018, 04:05:27 am
content: Great, it looks like the original post that inspired the description I found.So it would work?What about the PSU question?Oh, forgot to ask abaut the grounding of the audio signal?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 05, 2018, 06:57:02 am
content: More or less.But:1. Can you still get vactrols? Must not be many out there. Fine for one-offs, even if you need second hand parts to do it, but keep that in mind in case anyone else wants to try it!2. You may want a regulated supply, as the supply ripple modulates the output.3. Dual gang log potentiometer is probably not what you want, for a couple of reasons. One, the logs don't track (they aren't opposite). Two, you need one exponential (the normal kind, actually; why they're called log, well, who knows), one log (the inverse of the usual curve!). Three, they need to go in opposite ways (give or take pinout). Fourth and final, the vactrol response itself is probably not proportional, so you ideally need something even different from that.This is more of an argument about subtle aspects of the control: how smoothly the attenuation follows the setting, and how stable the load side impedance is (which affects bandwidth, and maybe gain of the source/load as well).The overall response should be about right. But it may be sloppy enough that, for example, you find better results with a linear than log type pot, and still that it's not really all that nice.The "duh"-iest question, though:You're using potentiometers. Dual ganged. You're adjusting stereo signals (in the linked case, not in the OP case I guess?).What's wrong with putting the signal through the stupid pots in the first place?Photoresistors are unquestionably worse than pots for signal quality. Their distortion is surprisingly low (except for photoFETs, but those aren't being used here), but, not as low as a normal resistor.Tim

author: FriedMule
author_rank: Frequent Contributor
timestamp: June 05, 2018, 10:09:20 am
content: Hi T3sl4co1l thanks for your reply, some of it did go way over my head but I'll try to respond:-)Quote from: T3sl4co1l on June 05, 2018, 06:57:02 amIt looks like DigiKey still sells them:https://www.digikey.com/product-detail/en/luna-optoelectronics/NSL-32SR2/NSL-32SR2-ND/5039808Quote from: T3sl4co1l on June 05, 2018, 06:57:02 amI properly may but here are we way over my head:-)I'll try to answer and hope that you bare with my "answer".The transformer are way over sized for it's needs. So I think that it will not dip voltage or current. The components I use can operate between 5 and 48 voltage (i think) so I hope that it will not effect anything to use a normal supply.Quote from: T3sl4co1l on June 05, 2018, 06:57:02 amYes I see (I hope) It will give a lot more sense to use linier pot instead of log! :-)Quote from: T3sl4co1l on June 05, 2018, 06:57:02 amWay over my head again:-)Both pot are on the same turn-pin, hope that it answers your question?Quote from: T3sl4co1l on June 05, 2018, 06:57:02 amI have several reasons for using LDR instead of pot (do not know if they are good:-)1) I can use a pot that I like, without having to think of it's "sound".2) The attenuation is in mid circuit, without any wires in the signal path.3) When the pot gets old and noisy, it wont be audible in the speakers4) The high praise it gets form audio listeners:http://www.dms-audio.com/lightspeed-attenuatorandhttp://diyaudioprojects.com/Solid/DIY-Lightspeed-Passive-Attenuator/5) Funny to try to do old things in a "new" way. :-)

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: June 05, 2018, 12:24:03 pm
content: Quote from: T3sl4co1l on June 05, 2018, 06:57:02 amAccording to the linked article:QuoteHe-he.

author: FriedMule
author_rank: Frequent Contributor
timestamp: June 05, 2018, 04:14:03 pm
content: I have modified a bit and added a diode between U4 and GND, wont that prevent noise from going into the audio signal?

author: Zero999
author_rank: Super Contributor
timestamp: June 05, 2018, 04:22:20 pm
content: Quote from: FriedMule on June 05, 2018, 04:14:03 pmNo, it will rectify and clip the signal, causing lots of distortion.

author: FriedMule
author_rank: Frequent Contributor
timestamp: June 05, 2018, 04:24:00 pm
content: Quote from: Hero999 on June 05, 2018, 04:22:20 pmThank! I'll change it back! :-)

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: June 05, 2018, 05:06:30 pm
content: I think you need to look carefully at the specification sheet for the optocoupler. The current-resistance curve is very nonlinear. Depending on where your circuit operates, you may end up with very low sensitivity or very high. As far as I can tell by briefly reading the sheet, the impedance of your source affects the response. Also bear in mind your cd player expects 600ohm impedance as far as my old brain recalls 😊

author: IDEngineer
author_rank: Super Contributor
timestamp: June 05, 2018, 05:38:55 pm
content: OMG, not another audiophile discussion.I got into electronics when I was a very little kid specifically because of my love of music. I feel prey to the whole "audiophile" thing, and its endless pursuit of specsmanship, when I was in high school. Pre and main amplifier manufacturers one-upping each other every week. Quoting spec sheets was like trading baseball cards decades earlier. But I got into actual electronic design, which led me to taking physics courses, which led me to take a "Physics of Acoustics" course. Extremely specialized, focused exclusively on high fidelity sound reproduction across the entire signal path.In this class we had access to the university's anechoic chamber and so every student brought in their best speakers for testing. One by one we ran the chamber on our speakers. It had a turntable in the middle that rotated the speaker relative to the fixed array of microphones so you could get a plot that looked a lot like an antenna beamwidth plot. And the equipment also measured distortion in addition to the usual frequency response, phase response, etc.What we proved in that chamber was that speakers distort 2-5%. That's not a typo... those are integers to the left of the decimal point. Some of the "hot" speakers, such as from Bose and JBL, were close to 10% distortion. Then the instructor brought in his baby: A Klipschhorn (anyone here even heard of those?). He claimed it was the best he'd ever seen, or even heard of. And it distorted over 1%.What an eye-opener. I'd been obsessing over hundredths of a percent of harmonic distortion, picking poly caps from specific manufacturers and even specific manufacturing lots (!!!), etc. Meanwhile, the physical transducers at the start and end of the signal path were distorting in whole percents! We researched phono cartridges, both moving magnet and moving coil (the best were still several percent), microphones (several percent), you name it. The best physical transducer we found were certain headphones that had ultra-low-mass drivers, they could get close to 1%.Furthermore, all of the physical transducers were fraught with phase distortion and phase intermodulation (unavoidable unless you have a separate driver for every instrument, and impossible to avoid for things like pianos that have multiple individual resonators), nonlinear amplitude compression effects, etc. The list is endless.That week in the anechoic chamber ended my obsession with specsmanship in audio. The electronics was already so good it didn't matter anymore. The wisdom of that old adage about spending half your budget on speakers, and the other half on everything else, suddenly crystalized into gospel truth. Except that I extended it to say "spend half your budget on yourphysical transducers", to include the input side (mics, cartridges if you're into vinyl, etc.) as well as the output side (speakers, headphones).The takeaway truth: The worst electronics is already better than the best transducers. There is no point in wasting money to shave another tenth of percent off the distortion figure, because your input signal will already be corrupted far past that point before you ever get your hands on it and whatever is converting those electrical signals into sound waves for your ears will corrupt it again by at least as much."But what about digital sources like CD's and DVD's?", I hear the audiophiles scream. Setting aside the corrupting effects of the brickwall filtering necessary to avoid aliasing, and the quantization errors no matter how much you oversample, unless you're listening to nothing but synthesizers that were jacked straight into the mixing console there was a microphone or some other physical transducer in the signal path - and your signal is already corrupted. That beautiful human voice? Microphone. That sweeping orchestra? Multiple microphones. If it was acoustic before it was recorded, the corruption is already baked in. Period. And that's ignoring the further damage from your speakers or headphones... unless you have some secret cochlear implants that are better than anything of which I'm aware (and I track that technology pretty closely), the transition from electrical to acoustic is an insurmountable enemy.Seriously... save yourself and your sanity. You don't have to trust me, do some research on your own. Think about the WHOLE signal path, from the original musician playing their instrument in the recording studio to your speakers in your home. All the magic film capacitors and opto-attenuators in the world cannot undo the damage that happens along the whole signal path. Accept that, and start making rational choices.Whew. With that rant out of the way, let's address this opto-attentuator topic. Unless it's a fully digital board, guess what professional, studio level mixing consoles use for each channel's master fader? Conductive plastic linear pots. I used to design analog mixing consoles and we did a LOT of research on faders. Sure you can run the signal through an analog multiplier and just use a control voltage coming off the fader (to avoid running the audio through the pot), which is basically what your opto-attenuator does in a passive way, but guess what? That control voltage coming off the fader is still a component of the output signal. "Multiplier" means all input parameters are present in the output. Noise, glitches, wiper degradation, etc. are all still going to be present. You haven't eliminated the effects of the fader, you've just moved them around.Meanwhile, you've introduced two more "active" components into the signal path (not active in the sense of semiconductors or tubes, but active nonetheless in the sense that their behavior changes with some control input). Active components are never perfect. They're not perfectly linear, they never have infinite dynamic range, etc. Even passives have nonlinear parameters, and the photocells in those opto devices are no different.Engineers in the audio profession addressed the problems associated with pots decades ago. Where they once used carbon composition pots, they now use conductive plastic (CP). True for rotary and linear pots. Carbon comp pots do indeed have lots of noise (which you can see with any oscilloscope) due to the grain structure inherent in their elements. Basically, the wiper "skips" across the microscopically rough surface of the element and you get glitches as a result. But CP's are microscopically "smooth", and their wipers don't glitch like that. CP's also wear more gracefully without developing the scratchy, grindy noises that old pots exhibit. And their cycle lifetimes are 10-100-1000X better too. Pots are about as linear and non-distorting as any component you're going to find.The bottom line: Just pass the signal through a good CP pot. Optoisolation isn't going to offset the effects of having a garbage pot just because the audio isn't "passing through the pot". And since you will thus need a good pot anyway, just use it the way it's intended. If the varying input/output impedance is an issue you'll need to buffer it, but even with matched opto's used in pairs they're going to have different absolute impedances, likely even channel to channel within the same "passive attenuator"... how come nobody is bothered by that?!?A last word... am I the only person bothered by the phrase "passive preamp"? Is such a device built using "straight wire with gain" fabricated from sintered unobtanium? I have yet to see a passive device provide amplification, but hey, I'm open-minded and willing to learn!EDIT: OK, transformers can provide passive gain for certain definitions of "passive" (like ignoring power and only thinking about voltage or current). Can't wait to see someone Rube up a "variable audio transformer" as a "passive preamp". The mind reels....

author: FriedMule
author_rank: Frequent Contributor
timestamp: June 05, 2018, 06:23:43 pm
content: IDEngineer this is exactly how I think!:-)I have newer understand the meaning with spending thousands of dollars to hunt for the perfect sound!The signal are often from a dead studio on microphones costing way less then a single "hi-fi" speaker and are afterward run trough so much gear and cables, that you are lucky if it is not at least 50% distorted!! On top of that the signal is adjusted 100 times to form the sound to be nearly 100% different from what was recorded.What I look for as an audiolistner are if the music swings and you can easily find cheap systems that are fare more musical then "high-end" detailed systems.And I do not belive that the human ear can hear 0.03% destorsion in the midtone or a 1dB raise in the upper 23Khz.What I do belive in, are that if I like the music then is the system good enough! :-)Now to my project:I am not building this amplifier to chase the ultimate sound, to impress the high-end nerds or to invent the new holy gral.What I am trying to do is to learn, it is wary easy to just download a simple circuit, solder it and listen, but what I want to do is to "play in my sandbox" and see if I can arrive at the same goal, but via a different rout. :-)So my goal are to build a decent okay quality amplifier that sounds fine enough but using other routs and tricks. Or more truthfully, you could say that the amplifier is not the goal, but my goal is to have fun taking the loong rout arround:-)

author: IDEngineer
author_rank: Super Contributor
timestamp: June 05, 2018, 06:36:16 pm
content: Quote from: FriedMule on June 05, 2018, 06:23:43 pmI respect your desire to learn, and audio is a good area to do that since the frequencies aren't crazy high (so reasonably priced R&D gear can be used) and your own ears can provide immediate feedback on many things.However, I'd recommend focusing on practical projects. An opto-attenuator isn't going to teach you nearly as much as, say, throwing together an opamp-based preamp. The latter will allow you to play with filters, AC vs. DC coupling of the signal path, the relative noise performance of high vs. low value resistors, the relative noise and distortion performance of different opamps (which are often pin compatible in singles and duals so you can do lots of A:B:C comparisons very quickly), the effects of proper power supply design on audio performance, etc. You could spend a lifetime just on these topics - many Engineers have - and all the while you'll be gaining very practical experience that will transfer into lots of other electronics disciplines in case your life doesn't stay focused on audio exclusively.As just one example: What happens to your audio when you increase or decrease the slew rate of the opamp by a factor of 10? The above setup would let you experiment with that very easily.Another idea: Once you have a decent opamp based preamp section working, then try adding a power amplifier backend to it. You don't need hundreds of watts... just enough to drive a speaker at reasonable volume. Learn about closing the loop around the front end AND the power transistors, and what happens when you don't. That sort of thing.You'll be an analog guru before you know it.

author: FriedMule
author_rank: Frequent Contributor
timestamp: June 05, 2018, 08:10:48 pm
content: Quote from: IDEngineer on June 05, 2018, 06:36:16 pmI am glad to hear that I have not started with something on the same niveau as NASA. :-)I did had to find something I could use and something that give "immediately" results and can cheaply be changed and so on, as you say. :-)Quote from: IDEngineer on June 05, 2018, 06:36:16 pmYou are of course completely correct and I listen to everything you say! My thought was to start with making the "easy" parts, so I have an easy start and know every little part of my "amplifier-nest", that I can change amps in as often i want. :-)Quote from: IDEngineer on June 05, 2018, 06:36:16 pmyes yes yes! Fantastic suggestion, one I 100% will follow!! :-)Quote from: IDEngineer on June 05, 2018, 06:36:16 pmI hope so:-)

author: FriedMule
author_rank: Frequent Contributor
timestamp: June 06, 2018, 01:27:32 am
content: Quote from: JohnnyMalaria on June 05, 2018, 05:06:30 pmThanks to you, I have done a lot more snooping around for better candidates.I have found two different optocouplers that sayes it can be used as resistors:il300 :http://www.vishay.com/docs/83622/il300.pdfH11F3M :http://www.onsemi.com/pub/Collateral/H11F3M-D.pdfHope that one of them can bee used instead, it looks like they are fare more linear. :-)