A precision LED/LDR-based Attenuator

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Have done some tweaking of the control code, here are latest results from my test board which I have programmed to be a 10K pot. I don't know how these numbers would translate in dB error, but I think the channels will track very nicely. I'm particularly happy because these numbers show not only 'relative' accuracy in a curve, but also an absolute accuracy to the specific curve I was intending. Just shows the system works well.
 

Attachments

  • Commanded vs Actual R2.jpg
    Commanded vs Actual R2.jpg
    55.8 KB · Views: 521
Last edited:
The LDR control card is finished, it works beautifully and sounds fantastic.

As I finished loading the programming into the second prototype -- which I will put in the mail today or tomorrow -- the UPS guy showed up and delivered three audiophile-quality CDs from Amazon and I listened right away. I've never owned a system that sounds as good as this one does with the LDRs controlling the attenuation, and the CDs sounded fantastic; I now have a very large collection of mostly mediocre CDs that I don't want to listen to anymore.

This card can be used standalone by connecting a volume and balance pot and a mute switch. It can also be used with my rotary encoder / IR / Display card or with my motorized pot / IR card.

Calibration takes about 11 minutes -- power off, move jumper, power on, wait 11 minutes, power off, move jumper, listen. Resistance range is 40 ohms + 1/2 ohm to 10K ohms +/- ~250 ohms at 10K.

LED shows power status, calibrating, finished calibrating, muted, and balance centered.

My main design goals were to keep it practical -- small as possible, easy to install and simple to operate. I think it's looking good.
 
Today I shipped a board out to be tested by someone besides me.

I'm looking forward to hearing comments from experienced listeners. This morning I auditioned my mediocre system with the LDR controls inserted for some non-audiophile friends and they were both astonished at the quality of sound. One said it was the clearest he'd ever heard music outside of a live venue. I have to agree those little LDRs make a really big difference.
 
Here is what I believe is the final solution of the problem of how to mount the LDRs on the board -- very similar to George's 8-pin DIP, but individually on a 4-pin DIP header.

It uses the least space while keeping the LDRs user-replaceable without soldering -- which I view as essential -- and the legs of the header are very firmly held in the DIP socket.

Total height above the board is just at one-half inch, exactly the same as my earlier design. This works so well it could become the new standard.

:)
 

Attachments

  • LDR Carrier.jpg
    LDR Carrier.jpg
    406.7 KB · Views: 433
Last edited:
It is imperative to use heat sinks on the leads if you are going to solder with the leads this short. As you will cause heat damage to the led or ldr.

When using an 8 pin DIL socket the leg length is left as it is from the factory, and you have to be a very fast solderer as not to damage the led/ldr this way.

Cheers George
 

Attachments

  • S1033081.JPG
    S1033081.JPG
    251.4 KB · Views: 413
It is imperative to use heat sinks on the leads if you are going to solder with the leads this short. As you will cause heat damage to the led or ldr.

When using an 8 pin DIL socket the leg length is left as it is from the factory, and you have to be a very fast solderer as not to damage the led/ldr this way.

Cheers George

I went back and looked at the spec sheet -- it specifies 260 degrees max at 2mm from the case for 5 seconds. It's not as bad as you suggest, but it's not as good as I need to use my solution, either. Back to the drawing board.
 
Folks, this LDR control is showing up the deficiencies of my stereo system in a big way -- compared to the LDR preamp, everything is deficient.

I'd like to start with a better DAC and there are so many choices out there I'm asking if there is a choice of one or two or three DIY DAC kits that give really good bang-for-the buck.

I don't want to pay for ultra-fi because the rest of my system won't match a very high end DAC. I just need to go with something much better than the M Audio PCI computer sound card I'm currently using.

My only definite requirement is that it be USB capable.

Any suggestions?
 
If all your playing Wapo is RedBook 16/44 or 24/96 and are not interested in the hi-rez hysteria, I would steer clear of any Delta Sigma, 1Bit, Bitstream, or ESS, while sweet and detailed they have no jump factor, and go for a good old school true R2R Multibit dac like PCM1704/2 and like.

As nothing does RedBook rhythm and drive like good Multibit can, but it needs a very good I/V stage well thought out and implemented, not just a opamp with feedback as many do.
Or you can do your own feedback free I/V stage using the AD844 amp as I have outlined here that has it's own feedback free output buffer built in as well. Very good sounding I/V for Mutibit
http://www.diyaudio.com/forums/digital-source/227677-using-ad844-i-v.html

I believe Audio GD has their flagship dacs you can purchase s/h that incorporate these PCM1794 or 1792 dacs with well thought out I/V stages and have USB inputs. And there will be others as well, you just have to search.

Cheers George
 
Last edited:
George, thank you for the basic advice, it is very useful as I have never looked at DACs very closely at all.

I used to be an audio fanatic decades ago, but got sidetracked into computers in the early 1980s (anybody remember CP/M and the S-100 bus?) and then more recently into programming PICs. I've been out of audio for a long time and my system reflects that neglect.

I don't want to jump in at the deep (expensive) end until I know what I'm doing, but I really need to clean up my source. I will build a simple purpose-specific Linux box that outputs a clean unmodified signal and then I need a DAC to convert that signal to analog. Almost anything at all will be an improvement over my current neighbor's cast-off XP SP3 box with audio card, but I want to do more than just improve it -- I want to get maximum bang for the buck while not spending too many bucks. Hence the search for a DAC that I could either build or buy inexpensively. And you're right, for now at leasst my sources will not be esoteric -- just plain CD-DA.
 
I don't want to jump in at the deep (expensive) end until I know what I'm doing, but I really need to clean up my source. I will build a simple purpose-specific Linux box that outputs a clean unmodified signal and then I need a DAC to convert that signal to analog. Almost anything at all will be an improvement over my current neighbor's cast-off XP SP3 box with audio card, but I want to do more than just improve it -- I want to get maximum bang for the buck while not spending too many bucks. Hence the search for a DAC that I could either build or buy inexpensively. And you're right, for now at leasst my sources will not be esoteric -- just plain CD-DA.

Raspberry Pi and a HiFi-Berry ? =
simple purpose-specific Linux box that outputs a clean unmodified signal + maximum bang for the buck while not spending too many bucks

Raspberry Pi 2 Raspberry Pi | Raspberry Pi 2 | 832-6274 | Welcome to RS Online
https://www.hifiberry.com/
https://volumio.org/
 
I know, there's the old saying -- "If you want it bad, you'll get it bad" -- but a) I'm in a hurry and, b) I have an old netbook that'll work great as a Linux audio server and, c) I don't know enough to make any better choice than this one.

So, I'm going to wipe the Asus netbook which I don't carry with me anymore and install a version of Linux and a Linux music player application and take the USB output for the DAC.

For a DAC upgrade, I'm getting a Topping D-20 from Amazon, $120. It has USB, optical, and coaxial inputs, and uses the TI 1793 DAC and Burr-Brown op-amp. The reviews everywhere I looked were really good. The picture of the internal seems to show good quality caps used. Courtesy of Amazon Prime I get it day after tomorrow with free shipping. :)

Found the specs at head-fi.org

Inputs: Optical, Co-axial and USB
Outputs: RCA L/R 2Vrms
Decoder: Texas Instruments PCM1793 + PCM1793
Sample Rates:
- Optical/Coaxial: 32 to 96kHz
- USB: 44.1 to 48kHz
Bit Rate: 16-24 bit
Resolution: 44.1kHz, 48kHz, 88.2kHz, 96kHz
Output impedance: 200 ohm
Opamp: Burr-Brown OPA2134
THD Distortion: 0.0013% @ 1kHz
Connectors: High quality Gold Plated RCA
AC Input Voltage: 100V-240V 50-60 cycle with power supply included
Size: 11.4cm (4.5")" x 14.3cm (5.5") x 4.4cm 1.75) (W x D x H)
Weight: 530g net
Package Contents: 1 x Topping D20, 1 x Power Supply, manual, USB cable

http://www.amazon.com/TOPPING-Function-Optical-Coaxial-Decoder/dp/B00A2QLD80/ref=sr_1_1?ie=UTF8&qid=1423663516&sr=8-1&keywords=topping+d20
 
Last edited:
Well, that was a flop. Unless there's huge improvement to be found in 'breaking in' the device or some other fix, this box is going to wind up permanently on a shelf.

Connected it up and put on some familiar female vocal jazz which is particularly well recorded. Immediately felt it was not good -- the music sounded brittle or harsh, and the term 'hearing fatigue' came immediately to mind. Didn't like it at all, went back to my M Audio sound card and was reassured by the liquid sound.

Can I fix this with a better opamp at the output? I think it's not socketed but I could cut the pins to remove it and install a socket and then play with opamps.
 
The description of that thing is a bit confusing - If I got it right, it seems that the usb input uses a 1704 to change data stream into spdif (16bit/44/48k only) then the 9001 convert this, and the optional separate spdif signal, into I2S then feeds this to the 1793 24 bit dac chip and then onto the 2134 output chips - it seems a pretty well proven signal processing path, but no mention about filtering

I played around with chip output stages awhile ago where I replaced the 'regulation' 5534s with the 2134, and then onto the 627s with great results (the signal resistors around the o/p stage were quite critical) and finally onto the 844 o/p stage of Pedja's as George linked to above #511 - this was with the 1541A dac chip, but I would expect similar stages of improvement, particularly with the better signal quality volume control in use.

Before any of this, though, I'd find a better power supply than the wall wart - they're pretty disastrous for sound quality anywhere, even the non-switcher ones aren't going to get anywhere nearly the potential from this unit, imo.

Another thing - with your M-Audio sound card, the signal goes thru the PCs audio kernel mixer that alters the sound a lot - you can download a free jRiver program and after turning on it's internal Wasabi switch, the usb signal bypasses the troublesome kernel mixer for a much cleaner signal - worth a try either way ...

[Incidently, I use the current Version 20 jRiver with the Ayre QB-9 usb dac (playing with the usb interconnect at present) with the ldr volume control - the recently arrived beta tester unit too is getting assembled now!]
 
Here is one solution for the LDR mounting problem -- it does meet the published requirement -- 2mm distance from body of LDR to solder point.

This is surprisingly sturdy -- much more so than it looks.

I'll probably go with the 8-pin DIP rather than the 4-pin to ensure the correct LDR is used in the correct position -- the shunt must do 40 ohms at 10ma, the series doesn't need to come even close to that.
 

Attachments

  • ldr 2mm 5 sec rule.jpg
    ldr 2mm 5 sec rule.jpg
    153.8 KB · Views: 363
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.