MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

LED Driving
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2  Next [all]
Author LED Driving
marcusriley
Hi everyone,
I know there is *a lot* of information on how to drive LEDs on this forum, so I'm sorry to post anew. I'm just hoping someone can talk me through building a slightly more sensitive design - sometimes I get lost in the more technical discussion.

I've been using the attached design. It works better on some LEDs than for others. I've been using it in correlation with an LDR controlling an oscillator, so I'm gauging my experience from frequency span. I understand this might skew my results further.

What I am noticing is that the amount of brightness between "Off" and "slightly On" is a HUGE jump in responsiveness. Then, I find a disappointing amount of resolution for most of the sensitive part of the spectrum, and a fair bit of the voltage controlling a very small range around the saturation point.

Are there designs with slightly better linearization? Are there modifications that I can make to this design to fine-tune it to the LEDs I have on hand? Does the hFE of the transistor matter?
cackland
No attached design?
marcusriley
Oops, sorry about that.

Picture file
Orgia Mode
So are you using the LED and LDR in a vactrol configuration?
Iv'e been playing with optocouplers and their inherent resistance across the outputs and just like an LDR, the resistance range is not linear. Theres a lot of other problems with this schematic, but it maybe can give someone an idea on how to further help you...

It seems that if you use a similar LED/LDR in the feedback path of an op amp, you can make the output more linear.

***

EDIT: I haven't seen your upload yet....
EDIT2: the optocouplers in my pic are H11F1M
marcusriley
Orgia Mode wrote:
So are you using the LED and LDR in a vactrol configuration?


Yes.

Are you saying there are a lot of other problems with the schematic you attached or the one that I attached?
Orgia Mode
marcusriley wrote:
Orgia Mode wrote:
So are you using the LED and LDR in a vactrol configuration?


Yes.

Are you saying there are a lot of other problems with the schematic you attached or the one that I attached?


Problems with mine, I Just copied and pasted a simulation I was working on for something else.
If you look at my picture though, you can see that the trace "log_out" will very closely relate to the resistance range you are experiencing in your own case. So using a second LED/LDR of the same type as feedback can counteract the Logarithmic response.
marcusriley
That looks like a fantastic solution - I will definitely try it out for a future project. For my current issue, though, it would be helpful to look at some possibilities that use a single pairing, if there are other ideas.
whalemoth
Here's a great page with some LED driver ideas on it -- I usually pick the model that's most suitable. I try and avoid adding op-amps unless necessary, sometimes I'll drive an LED that way to use up a spare.

http://musicfromouterspace.com/analogsynth_new/HOT_TIPS/led_drivers.ht ml
Orgia Mode
whalemoth wrote:
Here's a great page with some LED driver ideas on it -- I usually pick the model that's most suitable. I try and avoid adding op-amps unless necessary, sometimes I'll drive an LED that way to use up a spare.

http://musicfromouterspace.com/analogsynth_new/HOT_TIPS/led_drivers.ht ml


Those are all on/off drivers.

In all honesty, we need an exponential converter to counteract the log response, such as this one: (just grabbed off of google)
https://i.stack.imgur.com/WFN6R.png

The problem is that this type of conversion requires thermal compensation to maintain that linearity across different ambient temperatures as well as across the full range of inputs. Then you have the issue of dialing in the trimmers to make it work with your LDR which is probably has 10-20% error.
Mungo
Linearising an optoisolator by using a pair with one as feedback is better. But there are a range of voltage to current designs that will control the current in the LED. Ti have a document called SNLA140C "AN-31 Amplifier Circuit Collection" (http://www.ti.com/lit/an/snla140c/snla140c.pdf) which has several examples of voltage to current designs, some can be simplified without the darlington/mostfet if you are only driving small currents through a single LED, the Howland Current Pump configuration is widely used for its simplicity and keeping the reference to ground.
marcusriley
Orgia Mode wrote:

The problem is that this type of conversion requires thermal compensation to maintain that linearity across different ambient temperatures as well as across the full range of inputs. Then you have the issue of dialing in the trimmers to make it work with your LDR which is probably has 10-20% error.


Honestly, "improved response" is totally sufficient for me - if an exponential converter improves things even by 50%, I'd be satisfied. Any idea what the value of those unmarked resistors in Rene Schmitz's circuit might be? Strangely, I'm having a hard time finding simple examples of this function.
Mungo wrote:

the Howland Current Pump configuration is widely used for its simplicity and keeping the reference to ground.


Any idea why the Howland Current Pump is drawn with 3 voltage outs? When you say they can be simplified without the mosfet, would I just be placing voltage directly at R3 (4.7k)?
Orgia Mode
marcusriley wrote:
Orgia Mode wrote:

The problem is that this type of conversion requires thermal compensation to maintain that linearity across different ambient temperatures as well as across the full range of inputs. Then you have the issue of dialing in the trimmers to make it work with your LDR which is probably has 10-20% error.


Honestly, "improved response" is totally sufficient for me - if an exponential converter improves things even by 50%, I'd be satisfied. Any idea what the value of those unmarked resistors in Rene Schmitz's circuit might be? Strangely, I'm having a hard time finding simple examples of this function.


"The unlabeled resistor at the bottom is a high value resistor of 1Meg or so"
Here's Rene's site explaining expo converters:
https://www.schmitzbits.de/expo_tutorial/index.html

"simple examples of this function" - probably because there is nothing simple about it. razz
Iv'e read this maybe a hundred times and it's still sinking in:
http://www.openmusiclabs.com/files/expotemp.pdf

EDIT: also, what is your input? e.g. 0-10v or something else?
marcusriley
Orgia Mode wrote:

what is your input? e.g. 0-10v or something else?


Yes, that's right. Thanks for the links to the Open Music Labs article.. might as well start the 100 readings sooner rather than later!
marcusriley
Just beginning to dig in, but reading through the Schmitz article, it seems that my driver is already exponential - it's just not compensated.

Is the variation in thermal drift really significant enough to merit all of the additional circuitry, when it comes to simply driving an LED?

I know that the general circuit we're looking at here is designed to approximate 1v/octave...but if I wanted to make the curve more drastic (maybe 2v/octave?) - would that be helpful? Is there a way to modify the design to produce that output?
devinw1
The original schematic you posted is just an on off driver. It just buffers the signal with an op amp, clips off any negative voltage, and then uses an NPN transistor to drive/buffer the LED (with a max current of 12mA based on that 1k resistor).

If you want to control the brightness of your LED based on voltage, you need something like Mungo has mentioned.
marcusriley
devinw1 wrote:
The original schematic you posted is just an on off driver.


My understanding was that it was a buffer feeding a transistor amplifier - and that transistors naturally produce an exponential response. it definitely doesn't simply produce a hard "off"/"on" - there is some amount of expression throughout the whole voltage range. Am I mistaken?

I can definitely try the Howland Current Pump - but I am a bit confused about how it operates based on the Application Note schematic. Would you suggest sending the input through R3 and grabbing the output from that op amp?
devinw1
marcusriley wrote:
devinw1 wrote:
The original schematic you posted is just an on off driver.


My understanding was that it was a buffer feeding a transistor amplifier - and that transistors naturally produce an exponential response. it definitely doesn't simply produce a hard "off"/"on" - there is some amount of expression throughout the whole voltage range. Am I mistaken?


There is an exponential response to a transistor something like I=exp(aV+b). but that is not what your first circuit is trying to accomplish. It will have a exponential type response for a tiny bit for really low voltage, and then it will be saturated and will work like a switch. This circuit is intending to use the transistor like a switch (to pop on and off when you apply gate or LFO or something).

You need something totally different if you want to have the brightness vary perceivably and evenly in response to a voltage.
J3RK
This is what I use for nearly all of my LEDs. It's a bidirectional driver, so you can use a two-lead bicolor LED, or just simply use a single LED for unidirectional indication. This circuit was introduced to me by Dave Brown several years ago, and I haven't used anything else since. Tweaking the input resistor helps a bit under some circumstances (depending on what's driving this). I usually put this after an output buffer.

For more logic-oriented on-off applications, I use a CD4041 to drive blocks of four LEDs. The current has to be limited quite a bit using this IC though. Typically 3K+ series resistor per LED. The benefit though, is that you have two states for logic on and off, so can use biclor LEDs to represent each state without one state being off. (or you can do tri-state with color1, color2, and off) I can post what this one looks like later.

Anyway, here is the op amp driver:

J3RK
Here's the "BiColor Logic" driver that I use. When logic level is 0/Low one color is displayed. When logic level is 1/High the other color is displayed. You can drive four LEDs per CD4041 IC.



You can see it working here with the BitStation. Incidentally, you can see the driver I posted above working on the VCO's in this video.

executiveBlaster
+1 for the op-amp circuit J3RK posted, works very well. current through the led varies linearly with the input voltage.

caveat: if you're only using a single LED instead of a two-lead bi-color, a diode should be anti-parallel with the LED (parallel, facing the other way) If a positive voltage is applied to the input, it all works great. if the input goes negative, the op-amp output swings to its negative rail, leaving -11ish volts across it, which will damage most LEDs.

you can also buy two-lead red LEDs that are just two reds in anti-parallel. positive and negative voltages then just light up.
marcusriley
Thanks for the suggestion, J3RK - it would be a relief to get this into a single op-amp. Putting in the feedback loop compensates for the bias, right?


Found this in the Muffwiggler archive, which uses a bias trimmer - is this a hard switch also?


[/img]
J3RK
That one from Tim will fade, but I'm not sure how smoothly. I simulated it, and it works pretty much as expected, however, I couldn't get a perfect balance using the trimmer in the sim. I suspect that is easier with physical parts though. I've never tried to build it since the op amp circuit works so well.

You can also do a simple follower type for positive only, by ditching the D2/R4 portion, and the bias trim, then adding a reverse biased diode on the base of the transistor to ground/0v. Works ok. Once again though, I think the op amp one is a touch better.
executiveBlaster
that driver from tim servo will also smoke Q1 (aka blow up) if you turn the trimmer all the way to V+ !!!

and yes, totes, the LED in the feedback loop of the op amp compensates for the led forward voltage.

edit: that driver from Tim was one of the first things I built into a module. it smoked hilariously and readily! then someone here set me straight

I also built that op amp led driver into a module I made hundreds of, only to find it was definitely smoking the LED as I had put a regular unipolar led in. had to solder tiny diodes to the back of every one d'oh!
J3RK
executiveBlaster wrote:
that driver from tim servo will also smoke Q1 (aka blow up) if you turn the trimmer all the way to V+ !!!


Nice catch, I didn't really think about that. BOOM! He did run "Magic Smoke Electronics" for quite some time.
marcusriley
Hey there-
Just tested the Op Amp "Bicolor LED" circuit - noticed a few things:

1. The LED never turns completely off. I can experiment a bit more with the input resistor and the LED used. In some ways, this doesn't matter.. except for:

2. There is still a major jump in the LDR response from darkness to light in the early part of the curve. I imagine this has to do more with the LDR than the LED, but I am still trying to compensate for it.

3. Just to clarify, if I use a unipolor LED in the Op Amp circuit, I need to have a diode facing the other direction, wired in parallel?
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2  Next [all]
Page 1 of 2
Powered by phpBB © phpBB Group