Arduino based LDR volume and source selection controller

Calibration complete without any errors, it took approx 10 mins for this. i got default volume shown on display and tested by connecting attentuator to signal.

The sound was good however when i rotate encoder sometimes the volume not moving up/down and its stuck at a specific level. The response is very slow. Not sure whats causing this. The encoder am using is PEC11R-4220F-S0024 obtained from element14.
 
The sound was good however when i rotate encoder sometimes the volume not moving up/down and its stuck at a specific level. The response is very slow. Not sure whats causing this. The encoder am using is PEC11R-4220F-S0024 obtained from element14.

Not sure why, either. Mine is fluid and responsive.
If you can't find a hardware cause, you could try the debug mode to see how the rotary encoder is sending signals.
 
Vincent, I have managed to patch the code to get repeat to also work now. Only residual issue I have now is sometimes volume goes one step in the wrong direction after a remote up/down keypress. I need to observe this more closely to determine the conditions that lead to this.

Some remotes behave differences in repeat mode, some send only a partial code for repeat to preserve battery power.

Best solution is to capture the code on a storage scope end see after the initial instruction VOL+ or VOL- wheter repeat is just a string of 1's for as long as the button is held down.
 
Some remotes behave differences in repeat mode, some send only a partial code for repeat to preserve battery power.

Best solution is to capture the code on a storage scope end see after the initial instruction VOL+ or VOL- whether repeat is just a string of 1's for as long as the button is held down.

Hi Nico, I have resolved all my issues with the remote for IDE 1.6.5 and sent them to Vincent. Everything works fine for me but I can't say if it will also work with other Apple remotes. I am using this remote :

Apple Remote - Apple (AU)

The biggest issue seems to be the PulseIn function which has changed in the Arduinio library with almost every IDE release. Thanks for your suggestions. Documentation on the repeat behaviour of these remotes does seem scant.
 
Voltage regulation: LM340 vs LM7812

Vincent, out of interest, any reason why you're using the LM7808 for the digital regulation and LM340T for the rest? I've read so much conflicting information regarding LM340 vs LM78xx, some say the 340 is a lot better and LM78xx are **** but others prefer the 7812 saying it's a more recent / efficient design.
The datasheet is shared between them and although I haven't been over it with a fine microscope, I can't see anything obvious that stands out.

Do the 340 behave better under a higher load?

Any insights you can give considering you've used both? Why the LM340T-12 instead of the LM7812 ? :)

edit: oh and the LM340 cost about six times the LM78 series!
 
@Vincent, I finally got some time to assemble and hook up the input board. The solderability of the boards from shenzhen2U was poor this time - there must have been some sort of film on them. After cleaning with isopropanol they were OK.

Everything seems to work OK. A few minor issues :

1. There is a loud pop when I switch from a loaded input to an unloaded one. I may look at the code to see if there is any muting ahead of input switching?
2. After switching inputs the -> on the display changes to a square cursor like block. If you press the menu key on the remote it changes back to ->. I guess there needs to be one additional display update added somewhere in the code?

Now I will look into putting it all into a case.
 

Attachments

  • IMAG3213.jpg
    IMAG3213.jpg
    899.9 KB · Views: 1,289
Hi Vincent,

I tested yesterday your LDR volume in my system: Esoteric K-03 -> Viva Solista -> Sonus Faber Amati Anniversario.
?????????? ?? ?? Sonus Faber | AVsite

I have to say that it is the most transparent pre I have ever heard. Congratulations.

I had a small issue with the enconder but I used 2 100n to cw/ccw and is OK now.

One question: Can it drive a power amp. with 10K or a power amp. with 47K input impedance. Why you write in the code that it must be over 100K ?

Thanks.
 
Last edited:
1. There is a loud pop when I switch from a loaded input to an unloaded one. I may look at the code to see if there is any muting ahead of input switching?
2. After switching inputs the -> on the display changes to a square cursor like block. If you press the menu key on the remote it changes back to ->. I guess there needs to be one additional display update added somewhere in the code?

Hello!

There is indeed a faint pop when I switch between the inputs, but in my preamp it is not loud - I didn't notice it before.
But I agree, I should temporarily mute the output while switching the inputs, thanks for the idea! I'll write the code when I have some time. It's not difficult, you might be able to do it yourself.

After switching the inputs or the outputs, the arrow changes indeed to a block, to mark the active line - you can switch the active line with the middle remote button, to choose between the inputs and the outputs.
The block automatically changes back to an arrow after a few seconds.

Vincent
 
Hi Vincent,

I tested yesterday your LDR volume in my system: Esoteric K-03 -> Viva Solista -> Sonus Faber Amati Anniversario.
?????????? ?? ?? Sonus Faber | AVsite

I have to say that it is the most transparent pre I have ever heard. Congratulations.

I had a small issue with the enconder but I used 2 100n to cw/ccw and is OK now.

One question: Can it drive a power amp. with 10K or a power amp. with 47K input impedance. Why you write in the code that it must be over 100K ?

Thanks.

Hello Theodosis,

I am glad that you like the LDR attenuator and congrats for your nice audiophile system!
Sorry I didn't respond earlier, but I was on holidays (in Greece, lovely country).

You can drive an amp with 47K input impedance without problems. Set
#define LOAD_IMPEDANCE 47000
in the code and it will work ok.

I wrote in the code that it should be 100K because usually we want the load impedance to be larger than the source impedance, but 47k or even 25k amplifier input impedance should be ok.

You may also want to try to set the nominal impedance of the LDR attenuator to
#define NOM_IMPEDANCE 5000
and see if you like it more than 10000 (of course you will have to do a calibration process each time you change these parameters).

Vincent
 
Last edited: