Light Dependant Resistor Current Control

Status
Not open for further replies.
A Light Dependant Resistor LDR is: is a resistor whose resistance decreases with increasing incident light intensity; in other words, it exhibits photoconductivity. It can also be referred to as a photoconductor or CdS device, from "cadmium sulfide," which is the material from which the device is made and that actually exhibits the variation in resistance with light level

A popular circuit for LDR's is to connect them as a L pad attenuator, however all of the Pad forms are readily available to suit LDR's including balanced audio use.

This thread discusses how to go about current control of the anode and cathode terminals of a LDR, a typical device, ( but not limited to ) is the popular Silonex NSL32SR2

The ideal LDR circuit attenuator (a very popular way of using LDR's), would have focus on current being maintained hence controlled whilst a voltage is being varied, as the properties of LDR's ideally suit current control, not voltage control.

A typical attenuator circuit using fixed voltages into potentiometers or any resistance thereafter is a variable ohmic device and therefore has preference altering current straight away before voltage, Such circuits dismiss or abandon current control. This thread will attempt a difficult subject, circuits that do the opposite. That is to have preference or some ability at least, of current control of the anode and cathode terminals.🙂
 
Last edited:
To be more clear, LDR devices have four terminals and include an LED encapsulated with the CdS cell and the current through the LED, varying the LED's brightness, is what causes the resistance of the CdS photocell to change.

Are you speaking of discussing better types of voltage-controlled current sources, for the LDRs' LEDs?

If so, the Howland or Improved Howland topologies should probably be considered. Here is a link to a good application note about them, by the late Bob Pease:

http://www.ti.com/lit/an/snoa474/snoa474.pdf

There are some simple precision current source and current sink circuits, such as those in Figures 17 and 18, in:

http://www.ti.com/lit/an/snoa621b/snoa621b.pdf

which also appear in:

http://www.ti.com/lit/an/snla140a/snla140a.pdf

I'm not really sure what the benefit might be, from using explicit current-control, instead of just using a potentiometer.

What you might be talking about is wrapping a feedback loop around the whole thing, so that the current setpoint is maintained even if other things vary (e.g. voltage noise in a resistor-based current supply). Is that what you meant? If so, an active voltage-controlled current source might be useful, or even necessary.

Cheers,

Tom Gootee
 
Last edited:
Are you speaking of discussing better types of voltage-controlled current sources, for the LDRs' LEDs?

Yes I am referring to voltage controlled current sources,

Here is a LDR attenuator I designed that performs extremely well. It uses and exploits the usually dismissed property of single rail op amps, giving up voltage at their outputs relieving additional circuitry to supply V+ .It contains voltage followed by current regulation within the feedback path, it manages to contain the LDR devices as inputs to the inverting op amp paths, and buffers the wiper to assist current delivery.

The schematic shows a link across the wiper to the upper and lower op amps - this is a schematic error, this point is joined. i will re publish to clarify.

The transistors that are saturated act as band gaps to lower the voltage to the LDR's and improve performance. The combination of 3 on the UAR and two on the LAR provides a reasonable attenuator response, Also 2 series band gaps to each upper arm LDR works equally as well.

Other possibilities are inviting resistance approx 18k across the UAR path to gnd, however band gaps in my opinion provide better aural presentation. 🙂

Cheers / Chris
 

Attachments

Last edited:
I'm still not sure of the need for such a control system, because it seems that in the end it would depend on having a very stable reference voltage with which to set the setpoint and if you had that then you could just use it with the usual potentiometer scheme. What am I missing?

Edit: You posted while I was writing. I'll take a look.

Interesting. I'll have to try simulating your circuit.
 
Last edited:
I'm still not sure of the need for such a control system, because it seems that in the end it would depend on having a very stable reference voltage with which to set the setpoint and if you had that then you could just use it with the usual potentiometer scheme. What am I missing?

Look at a standard LED - at the "knee", or "hockey stick" part of the I-V response. At that key point, a small change in voltage gives a large change in current.

It would be better if you could arrange things in a linear fashion. So a 10% change in control voltage *always* = a 10% change in current, even at the "knee". Of course, it could be any linear I-V relationship, that's just an example. The standard LED I-V curve is far from linear.

Then you use your pot to give the control voltage.
:sax:
 
The measurements of the schematic above, provide: voltage at the UAR LDR's anode to cathode, ranges from 1.35v to 1.66v, and LAR anode to cathode from 1.46 to 1.7v, current is regulated to 24ma , 1.25/26+1 (UAR comprising two LDR's ) and current measured at the anode of UAR LDR (1) ranges between 16.9ua and 24.1ma, and is shared evenly to the other UAR LDR(2) also 16.9ua to 24.1ma.

I consider the design is very close to achieving best possible audio performance from the NSL32SR2, it certainly sounds wonderful. I consider there may be better current control, for instance by lowering the potentiometer resistance to 10k.. which may enable the available current from the LM317 to more fully access the NSL32SR2's... balancing this against the circuit also performing as a attenuator. The circuit has surprised me in the past with earlier revisions, by often doing the opposite of what you consider it might first do. 🙂

Cheers / Chris
 
Last edited:
AndrewT has asked me in another thread:

"....voltage control works Current control is an alternative to voltage control.
If current control can be made to work well, then that does not "prove" that voltage control is wrong nor that is is ineffective nor that it is obsolete and must be replaced ".

If we do not want to make progress with LDR's, then yes stay with voltage.

Silonex have provided research into this http://www.silonex.com/audiohm/levelcontrol.html ( see attenuator configurations ) and state:

"It is better to drive the coupler LED from a constant current source, to minimize the effects of variations in LED forward voltage from device to device and temperature"


Could this be why Voltage control based LDR's require extreme matching ?

My own research using a audio system comprising pioneer pds 801 audio synthesis dsm,Quad 909 into Martin Logan quest z ( a friends audio system ) immediately shows the audio differences of voltage control and current control. current control providing much better resolution detail and stereo channel identity.

The philosophy of progress is a fairly sure and pleasant objective for humans....I believe.🙂

Cheers / Chris
 
Last edited:
With reference to my schematic, and noting additions of transistors as bandgaps. Here are measurements when the potentiometer is paralleled with 2x 22k resistors in effect 50k/44K = 23.4K, so as to increase current across the LDR relative to a 50k potentiometer.
25k looks to be a sensible value of potentiometer overall.

To still achieve a log attenuator response, its necessary to add 2x more series bandgaps to UAR
The approach of increasing voltage across the pot ( remember current is already upper limit regulated by LM317 ) and decreasing it with bandgaps is beneficial to LDR's, providing lower voltage at the device.

Why all these bandgaps ? This is a result of LM7805 setting voltage in the feedback path, then lowered as much as is allowed for Vin to LM317, also within the feedback path, that has drop out as a current regulator if voltage gets too low across its input. Adj terminal measures 4.05v

note: voltage measured at the anode of LDR, current measured at inverting input UAR and LAR, and anode of LDR

UAR
.990v to 1.510v .

.054ma to 21.2ma

LAR

1.531v to 1.785v

.126ma to 15.26ma


Also note at potentiometer end travel there is still voltage and current across LDR.🙂

Another charming feature is that the audio provides silence at beginning of pot travel.

Cheers / Chris
 
Last edited:
I did some sound tests tonight with Model 7 with the 23.4 k pot, comparing it to an earlier model with 50k. Whilst Model 7 is very good, the earlier model is just so much better in sound presentation.... it was referred to as the bench mark.

Its differences are in how voltage is regulated and it keeps the bandgaps with two groups of 3, 1 leading in for each, and 2 each for UAR and LAR . I am updating schematic, but need to research the real reasons why it performs so well.🙂

Is anyone finding this design interesting ?

Cheers / Chris
 
Last edited:
All circuit designs are interesting to me. But I still don't understand what you mean by "current control". i.e. I don't see how it is fundamentally different from using a potentiometer, for this application.

A voltage source and a resistor IS a simple form of a controllable constant current source. The resistor controls the current. If there is no change in the voltage, and nothing to alter the current downstream, then the current's amplitude will be constant.

Sure, there's not much feedback or compensation for changes. But adding those features and controlling with active devices doesn't fundamentally change what you're doing. So should this thread be entitled "BETTER LDR Current Control"?

For LDRs, we only need to set a temporarily-constant current through the LED, and be able to change the current's amplitude when desired. The only need for a control system that is more sophisticated than a pot would be to be able to maintain the constant current even if the voltage source's voltage changes. So we could just as well regulate and filter the applied voltage, and achieve the same result.

There are no major effects from downstream, such as from the LDRs, that can affect the LED current independently, unless we consider the effects of thermal changes in the LEDs' characteristics, due to the current, or due to the CdS cell's temperature changing, or due to the ambient temp changing. But for listening to audio, those would seem to be negligible. It appears that the only changes we would need to worry much about controlling against would be things that were within the audio band, in terms of their rates of change, and things that might cause the current's amplitude to shift, which could also be audible.

But in every case I can think of, controlling the source voltage for a pot setup would accomplish what is needed, and would be equivalent to a controlled current source approach, at least as far as producing a clean and constant controllable current is concerned.

However, what I have written so far was basically all just quibbling about semantics. There definitely could be advantage and disadvantages to various different approaches to providing current to the LEDs that control the LDRs.

I have not analyzed your circuit, yet. In what ways are the regulation and control of the current(s) with your circuit better than using a good voltage regulation scheme with the standard pot circuit?

I would think that one of the most important measurements would characterize the invariance of the current's amplitude, once the controlled level is set.

Also, please define UAR and LAR.
 
Look at a standard LED - at the "knee", or "hockey stick" part of the I-V response. At that key point, a small change in voltage gives a large change in current.

It would be better if you could arrange things in a linear fashion. So a 10% change in control voltage *always* = a 10% change in current, even at the "knee". Of course, it could be any linear I-V relationship, that's just an example. The standard LED I-V curve is far from linear.

Then you use your pot to give the control voltage.
:sax:

Yes, there is a way to use an identical LDR/LED device in a feedback loop, to create a perfectly-linear response from devices like the Silonex, and the very similar Perkin-Elmer Vactrol devices.

This method linearizes the total response of the LED/CdS combination, so that the CdS cell's resistance is a perfectly-linear function of a control voltage.

I have designed and simulated such a circuit (since the one on the Silonex website didn't work at all), several years ago. The main problem with such a circuit is that it requires an exactly-matching LED/LDR device for the feedback loop, and is therefore not overly practical, unless some non-linearity could be tolerated.

These LED/LDR devices are also very slow-responding. So the linearization circuit has far fewer potential applications than it would if the devices responded much more quickly to control inputs. That fact, combined with the requirement for an exactly-matching device, made the circuit too unattractive for me to pursue further.

A better approach might be to sense the voltages and currents (across and through the CdS cells), in real time, and calculate the resistances of the CdS cells on the fly, at some sample rate, and use a feedback control system to change the LED currents as needed, in response to changes in an attenuation setpoint command voltage. Within reason, that should be able to eliminate ALL need for ANY type of matching of LED/LDR devices used in stereo (or even multi-channel) attenuators. And the control contour could be any desired shape, without any regard for device characteristics.

Alternatively, the system could measure and record the characteristics (LDR resistance vs LED current, for many current levels over the entire range) of each of the devices, each time it powered up (or when desired), and simply use a lookup table during operation, instead of sampling currents and voltages and calculating resistances on the fly.

Cheers,

Tom Gootee
 
Last edited:
The package we are talking about has an LED shining on an LDR. The LDR is used as part of an audio attenuator. Changing the way the LED bias is applied changes the sound quality delivered by the LDR? Have I got that right?

The DC LED bias can't do this. The most it could do is change the effective pot law.

What could change the sound is something other than DC getting in. If the LED bias source injects noise or hum along with the DC, or even somehow injects the signal or signal envelope, then all sorts of audio problems could happen.
 
All circuit designs are interesting to me. But I still don't understand what you mean by "current control". i.e. I don't see how it is fundamentally different from using a potentiometer, for this application.

A voltage source and a resistor IS a simple form of a controllable constant current source. The resistor controls the current. If there is no change in the voltage, and nothing to alter the current downstream, then the current's amplitude will be constant.

Sure, there's not much feedback or compensation for changes. But adding those features and controlling with active devices doesn't fundamentally change what you're doing. So should this thread be entitled "BETTER LDR Current Control"?.

Hi Tom
Thanks for interest and your reply,

When i started the thread, I made allowance for designs That is to have preference or some ability at least, of current control of the anode and cathode terminals.

Given that it is a DC current there is unlikely to be any phase angle, as you point out

UAR is Upper Arm Resistance a carry over term I use, from L Pad use (not ideal in this circumstance), but helps me to define that part of the circuit that is Upper Part

LAR is Lower Arm Resistance ditto, defining the Lower Part

The benefits of exploring circuits that have some ability of current control and I refer to the circuit I have designed, but also relate to consumer use of LDR's i have observed thus far ( and these are early days )

The LDR can be made to turn off at lowest volume

The LDR devices are controlled as shown in my measurements to have I and V throughout the entire attenuation range, and are not just depleted with consequences that may arise such as aberration or flicker across the light emitting element .

There are benefits arising for constructors, and that continue to arise from not having to entirely exhaust their skills matching devices.

There is no need for trim potentiometers, and adjustments

Subjective differences are apparent that Stereo balance and detail within recordings are dramatically improved.

Cheers / Chris
 
The package we are talking about has an LED shining on an LDR. The LDR is used as part of an audio attenuator. Changing the way the LED bias is applied changes the sound quality delivered by the LDR? Have I got that right?

The DC LED bias can't do this. The most it could do is change the effective pot law.

What could change the sound is something other than DC getting in. If the LED bias source injects noise or hum along with the DC, or even somehow injects the signal or signal envelope, then all sorts of audio problems could happen.

Hi DF96
Silonex themselves have referred to this subject by stating: It is better to drive the coupler LED from a constant current source, to minimize the effects of variations in LED forward voltage from device to device and temperature.
Silonex Inc.: Technical Reference: Audio Level Control with Resistive Optocouplers

This variation device to device is a real problem for constructors, that leads to differences in stereo presentation and then subjective differences in sound if not attended to. The attempts at current control in this thread are aimed at finding solutions or partial solutions to these difficulties, And to see if a better sound can be achieved by lowering voltage. A property of LDR;s is that their THD improves when greeted with lower voltage. Silonex provide that 2x LDR can be placed in series to achieve that objective ( see 12 of the link ) May be this same effect of better THD has been addressed without the need for series connections in the schematic I have provided.

I am working through schematic of an earlier design at the moment that in an earlier post was referred to sound wise as the bench mark, It has differences in voltage regulation across the feedback path, and in the number of transistor band gaps. I hope to report those findings soon.🙂

Cheers / Chris

Cheers / Chris
 
Last edited:
Is the main benefit of constant current essentially better left/right balance matching? Wouldn't running the optocoupler LED's in series provide the same result? I use this layout for a simple breadboard volume control.
 

Attachments

  • Greenvalve Optocoupler VC Simple.jpg
    Greenvalve Optocoupler VC Simple.jpg
    106.4 KB · Views: 518
Is there an error in your schematic? It shows the outputs of all four opamps joined together.

Hi godfrey
No that is not an error, they all join to then be voltage regulated and then current regulated prior to the wiper.

And there is no external voltage entering other than that supplied to Pin 8 V+ and Pin 4 gnd..( dual TL072 ), which is interesting in many ways. The same voltage then regulated I and V gets reapplied to the inverting inputs. also of great interest is that it works as an attenuator, and has the LDR loads as inputs. also that there is high impedance across the control part.

Cheers / Chris
 
Status
Not open for further replies.