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.
Did the mute code today -- now I can touch a button and the circuit mutes, touch it again and it goes back to normal volume.

Also did a crude shot at a 50K pot, it was not quite right because I didn't have the right value resistors for the calibration board at 50K, but it worked fine at 45K ohms . . .

Last software module is the 'stereo' mode -- where one pot acts as a balance control and the other as master volume. With that done, then the software is done. Hee hee. Hmm, July 2010 to August 2014; it took a while.
I wish I could understand what you "digital thinkers" can do.
 
You need another challenge, in case you get bored!

I know - expand that 'mute' function so it has 2, 3 or 4 levels, like those multi-level hand touch bedside lights - just the thing to keep you occupied for a little while, eh!

As a matter of fact, James, that would be very easy to implement in software.

Problem is, how would you command it? Who would put up with two, three, or four presses on the mute button to finally get the system to fully mute?
 
I finished the main board yesterday. There was one leftover issue because moving the balance pot caused the volume to go negative [!] in some circumstances, and I fixed that this morning.

As of right now everything works and I'm going through the code again to insure there are no logic glitches that could intermittently misbehave and cause problems.

I suppose I need to order and test a final version of the board, since I moved from one voltage regulator to a dual voltage supply plus a constant current supply for the LED in order to entirely separate the digital circuit regulator from the analog regulator. Three total LM317 regulators on board so should be a very quiet power supply all around.

Must now ponder what to do next. Clearly, some expanded testing is in order. Stay tuned. :)
 
Ah, I was just 'whistling on the breeze' there altho it might be a good sales gimmick!



For the mute situation: restricting it to 2 cases (say) - the simple 'total mute' signal shut-off situation, and then the 'maybe' idea of something like an extra 10dB reduction (for things like annoying adds, peak signal levels, conversations, etc and so on)

So this would still involve a 3 stage routine of (maybe) normal vol, low vol, mute vol, with perhaps a green, orange & red indicator light - how quickly these 'simple' ideas get more complicated, or completely out of hand, eh!

If you have room left in the chip, perhaps 'low volume' could be externally selected - it sounds like you've got a pretty 'good handle' on the program

[Naturally, this would also be available on the remote control unit too! Just for lazy buggers like me!]

I'm not sure if I'm correct with this next one - a 'standby' might be a reduction of current thru the leds to say, 1 - 2mA for both series and shunt ldrs (without regard to any particular impedances) plus a mute relay (drop-out?)on the signal line - a 'sort of' safe low current setting just to keep those ldrs 'warm', without any aging problems, so to speak.

The reason for my enthusiasm for this is that we had one of the simple LightSpeeds showed up some problems and attributed most of the trouble to turning the volume knob down to zero with the unit on continuously (plus, with the led currents set too high) - maybe just whistling in the breeze ...
 
Member
Joined 2009
Paid Member
I finished the main board yesterday. There was one leftover issue because moving the balance pot caused the volume to go negative [!] in some circumstances, and I fixed that this morning.

As of right now everything works and I'm going through the code again to insure there are no logic glitches that could intermittently misbehave and cause problems.

I suppose I need to order and test a final version of the board, since I moved from one voltage regulator to a dual voltage supply plus a constant current supply for the LED in order to entirely separate the digital circuit regulator from the analog regulator. Three total LM317 regulators on board so should be a very quiet power supply all around.

Must now ponder what to do next. Clearly, some expanded testing is in order. Stay tuned. :)

Too late to implement a loudness?
 
I'm not sure if I'm correct with this next one - a 'standby' might be a reduction of current thru the leds to say, 1 - 2mA for both series and shunt ldrs (without regard to any particular impedances) plus a mute relay (drop-out?)on the signal line - a 'sort of' safe low current setting just to keep those ldrs 'warm', without any aging problems, so to speak.

The reason for my enthusiasm for this is that we had one of the simple LightSpeeds showed up some problems and attributed most of the trouble to turning the volume knob down to zero with the unit on continuously (plus, with the led currents set too high) - maybe just whistling in the breeze ...

I understand the possibility of current damaging the LDR, but before you get too cautious, can you tell me even approximately where the max current was set to cause that permanent resistance change? The Lightspeed configuration is great as long as you keep the pot in the middle of the range, but control of current at each end isn't so great and max current can go too high; (the recommended 100 ohm trimmer is inadequate, do the math) and the 100K pot can't reliably and accurately limit the current enough on the series side well enough to provide a wide range of attenuations. The result is surely a temptation to run shunt with too much current to make up for the series that cannot be turned down far enough.

In the case of my device, current is precisely controlled at all levels, and my present configuration is operating at a maximum of 11.5ma and I have been considering lowering that to 10ma for some time. The NSL is rated at either 20ma or 25ma depending on where you look, so I'm operating at maximum of 50% of rated current with pot turned to maximum attenuation. At 11.5ma some LDRs deliver resistances in the 30~40 ohm range so if you want to get good attenuation you can do it with fairly low current with selected LDRs for the shunt side. The series side can be populated with the less capable group of LDRs because other than losing a half db of gain, anything below about 100 ohms is not useful on the series side.

BTW, recalibrating my LDRs requires only the temporary attachment of a very simple daughter board during a calibration cycle that takes about 5 minutes, so any long-term change in resistances can be easily corrected -- and this is to correct for drift that I really don't see happening except maybe over very long periods.

For effective muting, it seems to me, the answer lies in sending the series resistance very high into the megaohm range. This would involve cutting off all current to the series LDR; the shunt LDR could then loaf along at just a few milliamps which would put it at around 100 ohms. What's the attenuation when R1 is 1 meg ohm and R2 is 100 ohms?

Not sure what benefit "standby" would be if in "mute" the series set is drawing essentially zero milliamps and the shunt set is drawing maybe 2ma. I see my device being left on continuously.

In the past I have considered making the last tiny bit of pot travel put the pot into the mute range, but if you have a mute button on the front panel and a remote control with a mute function, why bother with putting it into the pot travel as well?

Don't know what would happen if both R1 and R2 are in the megaohms -- that would turn the pot into a megaohm pot wouldn't it? Whereas if you left R2 at 100 ohms (2ma) the amplifier would see 100 ohms as a source rather than a multi-megaohm "open" circuit. I know very little about how all that stuff plays together but I think I'd rather have my amplifier seeing the 100 ohms. What do you think?
 
Last edited:
20k LDR in the shunt location and 100r LDR in the series location gives a ladder type attenuation of ~ -0.04dB, 20log(20000/20100)

1k upper and 8k lower gives ~ -1dB attenuation.

If this attenuator was feeding a 50k input impedance, then 1k upper and 10k lower, would result in -1dB after the input resistor.

The loss through the attenuator at "max volume" is virtually insignificant.
 
Last edited:
I think most of the casual readers are more interested in the finished design rather than follow on the development experience and to understand the smaller points in the device's operation - understandable, I guess.

Yes, the guy had set the current up in the shunt ldr about 15mA to get the resistance below 40R in some vague idea about having low/no series/shunt impedances - he boxed them up in epoxy glue too! - he just 'missed the boat' about understanding the device's limitations and compounded the problem by turning the volume all the way down after a listening session - frustrating, as he had a really well matched set of ldrs too.

I'd forgotten what you can do with the programming and so, as you said, won't need any relays at all - a high series and reasonable low shunt will do the trick nicely - the shunt doesn't need to be anything below 100R at all to give all the benefits of a low impedance source feeding the input of the following stage
With half a meg R in series & a couple of hundred R in shunt, it'll be an effective 'mute' - maybe the theory guys mightn't agree but they also don't like the idea of not providing 'zero volume' instead of -40dB, or more, attenuation anyway, so they aren't likely to be a customer - wouldn't 'lose any sleep' over it.

So that takes care of 'mute' and 'standby' - I can't think of anything else - no doubt there'll be something but if it's just a matter of programming the chip ...

I just added an 'add killer' pad onto my vol control via a relay and couple resistors set for -3 dB, then upper it to -6dB - pretty crude but quite effective for average quality sources like online streaming and such - should have done this a long time ago.

Playing around with an active tone control - a high quality (or high end version) developed/posted by our very well known 'Thorsten L' a couple of years ago - it requires a pair of 11kR pots for bass and treble that would be suitable for those 23 position switches for a stepper type adjustment - would suit your device as right in the middle of your specs - playing with Uriah's 'resistor replacer' little units at present but they're not designed for this sort of precise impedance settings - surprising things!
 
100k in the series position and 40r in the shunt position gives -67.96dB
1M in the series gives ~-88dB
Those two attenuations are pretty deep mute values for answering the phone/wife/door.

How about adding an input so that when the door bell rings and/or the phone rings, the systems goes straight into mute?
 
As a matter of fact, James, that would be very easy to implement in software.

Problem is, how would you command it? Who would put up with two, three, or four presses on the mute button to finally get the system to fully mute?

What if you did a long press for total mute and multiple short presses for the stepped mute, eventually reaching total mute. Exit from total mute would then be the same mechanism (short press) regardless of how you got there.
 
Having been on the receiving end of sarcasm in another thread, I find myself increasingly unwilling to tolerate it silently.

Disagreement is inevitable and welcome. However, I ask that in this thread everyone express their disagreement either with silence or with reasoned response. Sarcasm is inevitably unkind; interestingly, I note that some people who are sensitive to sarcasm directed at themselves seem willing enough to direct it at others. Please don't do it here, this is my thread and I'd like to set the parameters of participation.

Thank you for understanding.
 
What if you did a long press for total mute and multiple short presses for the stepped mute, eventually reaching total mute. Exit from total mute would then be the same mechanism (short press) regardless of how you got there.

That probably would not work with an IR remote which is my goal -- if you hold a button down, it sends a continuous stream of short coded values rather than one long continuous value. It would be very difficult indeed to identify a long press as such, since it would look like a long string of short presses.
 
Having been on the receiving end of sarcasm in another thread, I find myself increasingly unwilling to tolerate it silently.

Disagreement is inevitable and welcome. However, I ask that in this thread everyone express their disagreement either with silence or with reasoned response. Sarcasm is inevitably unkind; interestingly, I note that some people who are sensitive to sarcasm directed at themselves seem willing enough to direct it at others. Please don't do it here, this is my thread and I'd like to set the parameters of participation.

Thank you for understanding.

With due respect, took the trouble to read back to post #271, may 29th , and found no sarcasm anywhere, just comments on the main point, or suggesting practical uses, such as padding Music down when something requiring your attention happened, such as door bell or phone ringing.

Or when some Family member required your attention, to me a very valid use.

JM2C
 
Not sure who the sarcasm post was directed at, hopefully not me, I was actually trying to be helpful. Making changes after a product is in production is never easy, but some times good ideas come from the field. As this product is not yet in production and others have commented on possible enhancements, I didn't think my suggestion was out of line. FWIW, long/short press can be done easily on the local control and there are ways of doing it with an IR control (some remotes send different codes for sustained button presses). If this is something that does not interest you, then let's move on.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.