# LED modulation circuit help...

Discussion in 'General Electronics Chat' started by liquidair, Apr 23, 2015.

1. ### liquidair Thread Starter Active Member

Oct 1, 2009
89
5
Hi all! I'm trying to design an LED current modulator circuit but I'm stuck. I've scoured the interwebs and have found plenty of circuits but none that will work.

The specification is simple. The circuit idles with the LED at a set current, say 1.7 mA. A full wave rectified control voltage (audio) is the modulator. This control voltage increases the current based on amplitude up to say 5 mA. The problem I'm having is that the control signal modulates the current around the idle current (so from 0 to 5 mA) instead of only adding to the idle current (from 1.7 to 5 mA). I can get either the correct idle current, or the correct range with max control voltage, but never both in the same circuit.

The only caveat is that I must use a single supply, preferably positive. Opamps (preferably one section) and/or transistors would be on the table.

Seems like this should be super simple but it's been 3 days of simulation and nothing. Any clue how to do this? Thank you in advance!

2. ### Hypatia's Protege Distinguished Member

Mar 1, 2015
2,850
1,317
If I correctly understand your question the following paragraph should make sense:

As described idle current = minimum current ergo I[led]=1.7ma at E[ctrl]=Min and I[led]=5ma at E[ctrl]=Max -- Hence I[led] range =3.3ma

Assuming the foregoing correctly describes your intent there are numerous methods by which same may be realized...

Generally speaking your problem lies in the fact that the design allows E[ctrl] to reduce I[led] 'below' I[idle]

Please post a schematic of a design you thought would 'work' such that we may 'point you in the correct direction'...

Best regards
HP

Last edited: Apr 24, 2015

Sep 17, 2013
5,979
1,138

4. ### dl324 Distinguished Member

Mar 30, 2015
3,384
653
Post some schematics...

5. ### liquidair Thread Starter Active Member

Oct 1, 2009
89
5
Hi All, thank you for the replies.

So HP, yes, you nailed it and here are the few basic ideas I've tried but there's been many variations of these themes. The circuits are drawn for dual supply operation, I've been simulating as single supplies with proper amendments.

Circuit A: The idea is R2 sets the idle current through LED1, and the rectified audio signal would add to it, but instead it is biased about the idle current. Fail.

Circuit B: R3 and R5 set the base voltage of the npn, and R4 then sets the idle current. The audio signal again would add to it, but again, it is biased around the idle current.

Circuit C: This is a modification of Circuit B. The summing amp adds the rectified audio signal (this time rectified negatively) with a negative DC bias voltage. The output should then be a positive Vdc + Vrac. R10 then sets the current through the LED. If no audio is present, the idle current is +Vdc - .7 / R10. Any audio signal should add to this, but unfortunately, this circuit does the same as the other two.

Alec_t, thank you. I simulated this but it seems very finicky. I was able to get the desired range after some massaging, but it clips pretty bad if you don't have the perfect R2, R3 combos. I still don't quite grasp the operation though, so I'll keep playing with it. Interestingly it seems at higher peak currents (10-20mA) it doesn't clip which is strange to me. Also, I tried driving it with a buffer and I couldn't get it work that way. A buffer may be needed. Thank you though, this has the best potential so far.

6. ### Alec_t AAC Fanatic!

Sep 17, 2013
5,979
1,138
What is the maximum amplitude of your rectified audio? You might need an amplitude-compressor, or AGC, ahead of the LED driver.

7. ### WBahn Moderator

Mar 31, 2012
18,089
4,917
Keep in mind that your audio signal is wiggling around at anywhere between a few dozen times a second to a dozen thousand times a second or more. So you probably don't want your LEDs tracking with actual audio signal, though the human eye will do a pretty good job of smoothing things out.

The goal of Alec_t's circuit is to rectify the audio signal so that it only goes positive. You might also filter the signal so that you have a signal that is smoother and more closely related to the amplitude of the signal and not the instantaneous value of the signal. It is then a pretty simple matter to add the two signals together -- one for the idle current and one for the amplitude of the audio signal -- so that you can adjust the strength of each independent of the other.

8. ### ian field Distinguished Member

Oct 27, 2012
4,459
792
If you're trying to modulate an LED with audio - passing it through a bridge rectifier will probably make it pretty much unintelligable.

The best method would be to put the LED in the collector feed of a/the textbook single transistor current source.

You'd most likely want to AC couple the signal into the base, but the usual textbook example has 2 or 3 diodes or a green LED providing a stabilised reference voltage for the base, for your circuit is should suffice to provide the base voltage with a potential divider from Vcc to GND.

You could inject the AC into the emitter circuit, but it has a very low impedance - that would basically be using the trasistor in common base configuration; less than unity current gain.

The best results would be had by modulating a carrier - FM is probably the best.

Last edited: Apr 24, 2015
9. ### liquidair Thread Starter Active Member

Oct 1, 2009
89
5
Alec t, the max amplitude is set by a tube at 270V, so the control signal can be set to anything practical. I was playing with around 1 to 10 volts peak.

The LED is actually part of an LDR, so it should smooth out the audio signal anyhow because the cell is slow to change. Really what we are concerned with is our audio signal's peak amplitude, which is why I didn't try to filter it, and keeping the LDR in a set resistance range. A fixed resistor across the LDR doesn't work because it changes the curve of the resistance vs. LED current, which is important... we need it non-linear.

WBahn, what you are describing sounds ideal, if we can do it without filtering the control voltage to keep the change in amplitude fast, at least as fast as the LDR can respond.

Thank you again for the terrific suggestions!

10. ### WBahn Moderator

Mar 31, 2012
18,089
4,917
You can make the filter be as fast or as slow as you want. You can even make it adjustable.

How fast can the LDR respond?

11. ### liquidair Thread Starter Active Member

Oct 1, 2009
89
5
In the range we are looking at, it will respond to an increase in current in about 1ms and 7ms for a decrease, give or take.

What do you have in mind?

12. ### WBahn Moderator

Mar 31, 2012
18,089
4,917
If we pick, say, 5ms and have an audio signal at 5 kHz, then that is 25 cycles of the waveform. So using a mild filter seems a reasonable thing to do.

Now, I'm assuming that the audio signal is either only being used for this indication circuit or is being buffered so that it can be manipulated by this circuit without affecting whatever else is using this circuit. Right?

You can make an opamp circuit that is a precision rectifier and that also has a low pass filter characteristic with a roll-off frequency somewhere in the 200 Hz to 1 kHz range. Then you can add that signal to an Idle Current signal using a summing amplifier and then use the output of that to drive your LED. All of these functions can probably be folded into a single opamp circuit.

13. ### liquidair Thread Starter Active Member

Oct 1, 2009
89
5
Very interesting. In fact, I think I started with a similar circuit. Yes, the rectified signal is both the control voltage AND the signal to be processed, hence the buffer. I'll play around and I see what I can come up with based on this design.

14. ### liquidair Thread Starter Active Member

Oct 1, 2009
89
5
Ok, I've been playing with your idea for a bit and I still can't get it. I've gotta be missing something...I've never had to work so hard at something so simple in electronics.

I did however get a non-inverting summing amplifier to sort of work. The idle current starts at 1.7 mA, but as the rectified signal amplitude increases, the min current rises slightly to 2.13 mA.

I'm thinking what is happening in each circuit posted above, and this one, is the the rectified control signal is adding a small portion of DC offset and that is being summed to the DC voltage as well. So using an inverting summer made it look like the Vac was swinging around the bias point, but in fact it was subtracting it's own offset. In the non-inverting summer, we see it adding to it, so the min current rises.

15. ### ian field Distinguished Member

Oct 27, 2012
4,459
792
Are you working with Vactrols?

Oct 1, 2009
89
5
Yup!

17. ### ian field Distinguished Member

Oct 27, 2012
4,459
792
Pretty sure there's some appnotes on the manufacturers website.

There may also be some circuit examples in the Encyclopedia of Electronic Circuits by Rudolf Graf & William Sheets - but a lot of their stuff is "borrowed" from appnotes you can get elsewhere anyway.

18. ### AnalogKid Distinguished Member

Aug 1, 2013
4,705
1,300
In all of the posted circuits the modulating signal is AC coupled into the circuit that adds in the DC offset voltage or current. This will not work the way I think you want. If the audio signal already is rectified, then DC couple it into the LED through a scaling resistor or whatever. In this way, the minimum LED current when the audio is zero should be the minimum current when the audio is loud. The best way to do this is with both the audio and the dc offset as inputs to an opamp where they can scale and sum at low energy levels, and have the amp output drive the LED.

If this is about audio peak limiting, then you are on the right path. If this is about maintaining a certain perceived volume, the control signal should be the audio's RMS value, not peak value. THAT Semiconductor has parts for this.

ak

Last edited: Apr 25, 2015
liquidair likes this.
19. ### liquidair Thread Starter Active Member

Oct 1, 2009
89
5
I'll check this out. Most of the time I do check appnotes but I didn't this time. Good call!

@ak, thank you. I AC coupled them because I was going to try a single supply, but I think a dual supply will work better so we can DC couple them. Likely necessitates JFET input opamps?

20. ### liquidair Thread Starter Active Member

Oct 1, 2009
89
5
Just wanted to give a huge shout out to all who helped, I learned a lot from each post here.

I just simulated the circuit c above on AnalogKid's recommendation of DC coupling the circuit, and boom, the circuit stayed at the same minimum current regardless of input voltage! That was the whole problem. Kudos man...I mean Kid.