Author Topic: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)  (Read 11255 times)

0 Members and 3 Guests are viewing this topic.

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4901
  • Country: gb
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #50 on: July 12, 2022, 05:05:26 am »
It was only when I finished drawing the schematic, I found out, the difficulty.
This happens to me all the time –– so much so that I need to sketch out or test my suggestions first, before posting it (wrt. programming advice; hence the archive of test cases I have). ;)

It's so very, very easy to miss one, ever so tiny detail, in electronics.  But that then ruins the entire concept/idea, and needs a major rethink.  Like you power it up for the first time, there is a huge bang, you then go    :palm:   as you immediately realize the mistake, such as 'of course, those regulators are only good to around 40V input, but it is currently 50V in'.

EDIT: Made much shorter.
« Last Edit: July 12, 2022, 05:48:58 am by MK14 »
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4901
  • Country: gb
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #51 on: July 12, 2022, 05:39:45 am »
The common cathode ones like TI LM27951 seem to be difficult to obtain, that's all.  Do you know of any suitable parts that are still available?

No, I tried, but no luck.  Either dodgy (significantly poor) feedback ebay China sellers, an apparently trustworthy seller from ebay Israel, with x15 TI LM27951 for around 30 to 40 Euros (depends on currancy conversion factor), so way too expensive overall, including postage, but not necessarily taxes.  The rest seem to turn out to be common-anode, or unavailable for too long, from suppliers such as Digi-key.

I'm surprised there isn't more noise (complaints) on the public news, about this electronic component shortage situation.  It does rather rarely get mentioned, very briefly (I suspect).  But is almost entirely absent from the news, the vast bulk of the time.

I suppose, in practice, shops mostly seem have the right final goods for sales, so most people are probably unaware of the situation.

EDIT:  £15 + £15 postage (approx) for 15.  Too much, but I'll let you do some window shopping and crying (joke):  https://www.ebay.co.uk/itm/274790185466
« Last Edit: July 12, 2022, 05:54:57 am by MK14 »
 
The following users thanked this post: Nominal Animal

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19897
  • Country: gb
  • 0999
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #52 on: July 12, 2022, 11:33:00 am »
It's true a Howland pump could be used. The trouble is, 20mA, into 3V LEDs off a 5V supply, is marginal for most rail-to-rail op-amps.

The only way to get rid of the thermal effects is to move the voltage reference to the positive rail and put an op-amp in the feedback loop of each of those transistors. A pass transistor could be used with a Howland pump but it's much more complicated and needs well-matched resistors, so it's not worth it.
 
The following users thanked this post: MK14, Nominal Animal

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4901
  • Country: gb
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #53 on: July 12, 2022, 03:44:36 pm »
Given the partial difficulties caused by the lack of availability of the ideal parts you wanted, or decent substitutes.  How about the "Any port in a storm" or "Don't look a gift horse in the mouth".

So, as you seem to have better explained the goals and requirements.  Why not stick to the existing/working hardware, but add a mosfet (other solutions are possible), between the ground and LED-common-cathode connections.  Then use the 600 MHz MCU, to PWM it at (with or without speedup assistance, such as gate drivers), 22KHz (or 32KHz, or whatever), then that should give you the adjustable brightness capability.  Which should be significantly better than what you have now, as regards display brightness.

I don't think it would be a good idea to worry too much about the LEDs being fractionally out of balance, or the PWM minimum width, being too big, for minimum brightness.  You can always modify the software, to reduce any problems, at least as regards the brightness.

Using 4 separate anode resistors (if not already done), can allow re-balancing them if necessary.  I suspect it won't be necessary, especially for the use case, you seem to be describing.

Hopefully, eventually the chip shortages will be history.  Then you can more easily be adventurous.  I really like the look of that LED driver chip you pointed out earlier, it seems really neat. 
 
The following users thanked this post: Nominal Animal

Online Benta

  • Super Contributor
  • ***
  • Posts: 6218
  • Country: de
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #54 on: July 12, 2022, 04:58:34 pm »
This is slowly blooming into a "Defense" project.
I like the "Skunk Works" approach better (aka KISS).
 
The following users thanked this post: Nominal Animal

Online Nominal AnimalTopic starter

  • Super Contributor
  • ***
  • Posts: 6836
  • Country: fi
    • My home page and email address
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #55 on: July 12, 2022, 06:36:05 pm »
It's true a Howland pump could be used. The trouble is, 20mA, into 3V LEDs off a 5V supply, is marginal for most rail-to-rail op-amps.
Right.  MCP6009 (and MCPthat I looked at lists output short-circuit current at at least 20 mA at 5 VDD for all temperatures, about 25mA at 25°C, but I've only played with op-amps in the voltage domain –– sensor buffers, instrumentation amplifiers, and so on.  I have no experience to say what margin is safe, and this current control/regulation stuff is completely new to me.

Mouser search for quad op-amps in stock, yields LM324D's, LM2902's, MCP6009's, TL074H's, TL084Hs.. The first promising one is Rohm LMR934FVJ-E2, which can dissipate over 400mW at +85°C (5V×80mA=400mW), double that at 25°C, and source enough current.  The datasheet lacks a "Output Source Current vs. Output Voltage" curve at Vdd=5V, but the Vdd=2.7V curve shows that for 20mA output, output voltage needs to be under (Vdd+ - 1V) or so (at +85°C).

The only way to get rid of the thermal effects is to move the voltage reference to the positive rail and put an op-amp in the feedback loop of each of those transistors. A pass transistor could be used with a Howland pump but it's much more complicated and needs well-matched resistors, so it's not worth it.

Right; I've read about the resistor balancing in the TI appnote.

Now, this schematic is very interesting.  The only annoying thing is that DACs using internal bandgap references can only swing to 2.5V or so, so I still need a second, 3.3V reference.

By the way, which simulator and schematic capture programs do you use to do those you attached?

How about the "Any port in a storm" or "Don't look a gift horse in the mouth".
I'm not in any hurry, nor is this "blocking" me in any way.  It is research to find out how to do it in a way that gives me the most options going forward, without doing early compromises, and to learn about this stuff in practice.

Sure, many people are quite happy with Arduino stuff that works only when their tongue is exactly in the right position.  I'm not, I want to learn to do it better.

Now, if this was a commercial project, or I was making these to give out or something, then sure.  It would have made sense to not waste time and just go with 100 Ohm current-limiting resistors per LED, limiting the total current to between 58mA and 78mA (14.5mA to 19.5mA per LED), depending on the supply voltage swing and the forward voltage of the LEDs.  I've already done this.

This is slowly blooming into a "Defense" project.
I like the "Skunk Works" approach better (aka KISS).
8)
  • I do this exploration to learn, and understand what is possible and how.
     
  • This is a hobby project, for literally single devices.  I might make five of the boards, and even populate them, but I only have two of the displays, and no use for more right now.  Maybe a different sized panel, which means a different controller, and quite likely a different backlight arrangement.  (Most are common anode, not common cathode like this is).
     
  • Yes, KISS is good, practical advice.  However, this is not a practical project; see the above two points.
     
Thus, to be precise, this is a hobby research project for me, done at a nearly zero budget, but with basically no limit on time spent.  I do intend to work this until I either find a solution that caters to all needs I have, or until I get bored.  It is a very good way to learn.

Therefore, all of your (all of youallses!) advice, suggestions, schematics, and points are greatly appreciated; even the "Uh, you're going too deep, NA" ones.  ^-^
 
The following users thanked this post: MK14

Online Benta

  • Super Contributor
  • ***
  • Posts: 6218
  • Country: de
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #56 on: July 12, 2022, 07:38:42 pm »
This is slowly blooming into a "Defense" project.
I like the "Skunk Works" approach better (aka KISS).
8)
  • I do this exploration to learn, and understand what is possible and how.
     
  • This is a hobby project, for literally single devices.  I might make five of the boards, and even populate them, but I only have two of the displays, and no use for more right now.  Maybe a different sized panel, which means a different controller, and quite likely a different backlight arrangement.  (Most are common anode, not common cathode like this is).
     
  • Yes, KISS is good, practical advice.  However, this is not a practical project; see the above two points.
     
Thus, to be precise, this is a hobby research project for me, done at a nearly zero budget, but with basically no limit on time spent.  I do intend to work this until I either find a solution that caters to all needs I have, or until I get bored.  It is a very good way to learn.

Therefore, all of your (all of youallses!) advice, suggestions, schematics, and points are greatly appreciated; even the "Uh, you're going too deep, NA" ones.  ^-^
I understand your motivation 100%. But a question an engineer always has to ask is: "Is this good enough for what it's supposed to do?"
If yes, then any added effort is money out the window.
If no, back to the drawing board.
For a hobby project, you can use a 32-bit DSP with 24-bit D/A converters if you like. But that's not engineering.
I'm too much of an engineer to appreciate over-engineering.

« Last Edit: July 12, 2022, 07:40:32 pm by Benta »
 
The following users thanked this post: MK14, Nominal Animal

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19897
  • Country: gb
  • 0999
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #57 on: July 12, 2022, 09:29:45 pm »
It's true a Howland pump could be used. The trouble is, 20mA, into 3V LEDs off a 5V supply, is marginal for most rail-to-rail op-amps.
Right.  MCP6009 (and MCPthat I looked at lists output short-circuit current at at least 20 mA at 5 VDD for all temperatures, about 25mA at 25°C, but I've only played with op-amps in the voltage domain –– sensor buffers, instrumentation amplifiers, and so on.  I have no experience to say what margin is safe, and this current control/regulation stuff is completely new to me.

Mouser search for quad op-amps in stock, yields LM324D's, LM2902's, MCP6009's, TL074H's, TL084Hs.. The first promising one is Rohm LMR934FVJ-E2, which can dissipate over 400mW at +85°C (5V×80mA=400mW), double that at 25°C, and source enough current.  The datasheet lacks a "Output Source Current vs. Output Voltage" curve at Vdd=5V, but the Vdd=2.7V curve shows that for 20mA output, output voltage needs to be under (Vdd+ - 1V) or so (at +85°C).
It's the transistors which carry the current in my circuit. Note the common mode input range of some op-amps doesn't include the positive rail, even if the output sometimes does.
Quote
The only way to get rid of the thermal effects is to move the voltage reference to the positive rail and put an op-amp in the feedback loop of each of those transistors. A pass transistor could be used with a Howland pump but it's much more complicated and needs well-matched resistors, so it's not worth it.

Right; I've read about the resistor balancing in the TI appnote.

Now, this schematic is very interesting.  The only annoying thing is that DACs using internal bandgap references can only swing to 2.5V or so, so I still need a second, 3.3V reference.

By the way, which simulator and schematic capture programs do you use to do those you attached?
I use LTSpice, a Windows program which runs well under WINE.

That circuit divides the 1.235V from the LT1004-1.2 down to -200mV referenced to the positive rail. There's no reason why a different voltage couldn't be used.

You probably don't need any references or DACs. PWM from the regulated 3.3V will probably do. Here's a circuit based on Benta's original design, but it only uses one diode rather than two, which minimises the temperate coefficient. Two diodes overcompensated the effect of the voltage changing due to temperature. Using one just the right amount of temperature compensation.

I think PWM is better than changing the current because there's less change the colour of the LED will drift, which can sometimes happen at very low/high currents. PWM makes it more constant. The frequency needs to be high enough to avoid flicker, but there's no point in going too high. I've found 1kHz is generally good enough.
 
The following users thanked this post: MK14, Nominal Animal

Online Nominal AnimalTopic starter

  • Super Contributor
  • ***
  • Posts: 6836
  • Country: fi
    • My home page and email address
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #58 on: July 12, 2022, 10:34:32 pm »
I'm too much of an engineer to appreciate over-engineering.
I can appreciate that.  I share the sentiment when it is about actual stuff handed to other people, just not when it's for research and learning.

It's the transistors which carry the current in my circuit. Note the common mode input range of some op-amps doesn't include the positive rail, even if the output sometimes does.
Yep; I'm reading the relevant datasheets quite carefully.  I was also referring to the Howland op-amp only pump configuration, not to your schematic there, with the op-amps.  (In that Mouser search, I selected only higher-current quad op-amps.)

That circuit divides the 1.235V from the LT1004-1.2 down to -200mV referenced to the positive rail. There's no reason why a different voltage couldn't be used.
True, but the DAC needs a reference to negative rail, and using an extra op-amp or something is just not worth the effort.

You probably don't need any references or DACs. PWM from the regulated 3.3V will probably do. Here's a circuit based on Benta's original design, but it only uses one diode rather than two, which minimises the temperate coefficient. Two diodes overcompensated the effect of the voltage changing due to temperature. Using one just the right amount of temperature compensation.

I think PWM is better than changing the current because there's less change the colour of the LED will drift, which can sometimes happen at very low/high currents. PWM makes it more constant. The frequency needs to be high enough to avoid flicker, but there's no point in going too high. I've found 1kHz is generally good enough.
Oh, I fully agree that I don't need those.  It's just that for my purposes, having an analog potentiometer control overall brightness without having to store the brightness value in EEPROM (emulated in Flash in Teensy), but still be able to turn it on or off in software either instantly or smoothly makes me happy: I like it.

Now that I have these circuits, my next task is to do a lot of simulations, to understand how they behave and so on.
Any kind of decisions as to what I'll go with will depend on those simulations.


[/quote]
After I've verified my simulation models reproduce datasheet curves, this will be the circuit I'll start with.

Thank you, Zero999, Benta, MK14; I definitely owe you one!
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19897
  • Country: gb
  • 0999
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #59 on: July 13, 2022, 08:39:25 pm »
Don't simulate. Build it.

In the circuit I posted above, D1 should ideally be thermally coupled to Q2 to Q4, which should be matched. It's unlikely it's practical. Using transistors from the same batch will improve the matching and you could place D1 as close to one of the transistors as possible, with a nice thick trace to conduct the heat.

If you're using through hole components for prototyping, the BC857 can be substituted for the BC557, as it has very similar characteristics.
 
The following users thanked this post: MK14, Nominal Animal

Online Nominal AnimalTopic starter

  • Super Contributor
  • ***
  • Posts: 6836
  • Country: fi
    • My home page and email address
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #60 on: July 13, 2022, 09:39:24 pm »
Don't simulate. Build it.
This too is good advice (just like Benta's and MK14's KISS): I will, as soon as I decide what I'll go with.

One reason for simulation is that I don't have any parts I trust at hand, just assortments (of fakes) off eBay, and will have to order stuff anyway from a reputable seller.  A hundred of these transistors in SOT-23 costs about 2.5€, so it makes sense to experiment to get a real feel for sure.

I am now using Qucs-S with the Nexperia-provided SPICE subcircuits modeling BC847C and BC857C, including at different temperatures (which the stock BC847C and BC857C parts do not support), and I've replicated the base-emitter voltage curves as a function of the collector current as shown in the datasheets (with minor differences as to be expected; as Zero999 said, there quite a lot of component-to-component variation in real life).

I do fear I might have to start working on creating a better ngspice GUI interface for us Linux users, because this is exactly the kind of UI task where multiple CPU cores and many threads (and processes, running individual ngspice simulator instances) can make a big difference.  The biggest thing that needs fixing is the awkward interface to SPICE simulation subcircuits, and having to discover things by hand, instead of the UI examining the SPICE definitions to find out the tunables and ports and part names available and such.  Qucs-S does a pretty good job at this, though there still is a lot of looking up by hand and knowing SPICE parametrization and such.  What Qucs-S does not have, is a SPICE visual symbol editor, so you can easily represent a subcircuit as a part in a schematic.  There are only a few built-in ones, and there is no real editor for them yet.  The currently working approach is to edit a subcircuit as a schematic/drawing, and then copy-paste its source to a symbol file.  Something dedicated to simulation only –– that is, schematic and part symbol editor, with on top of a ngspice or compatible backend –– with import/export to KiCad and others, could fix all that stuff quite cleanly.

I really like Unix philosophy and modular design, and the idea that any SPICE model or subcircuit is a symbol usable in a simulation, with the simulator handling the recursion down to SPICE level.  Multiple ngspice instances in parallel are useful when you want to simulate the same circuit in different temperatures, or with different models or subcircuits for specific components, and have cores to spare.  For transient simulations, just calculate the results, and give me a virtual timeline at the bottom of my window, so I can "virtually probe" different parts of the circuit (including relative voltages, current flowing through a point, and so on), and don't make me define graphs.  Same for DC simulations (without the timeline), too.

Project sprawl, the enemy of every hobbyist.  :palm:

In the circuit I posted above, D1 should ideally be thermally coupled to Q2 to Q4, which should be matched. It's unlikely it's practical. Using transistors from the same batch will improve the matching and you could place D1 as close to one of the transistors as possible, with a nice thick trace to conduct the heat.
I'll get a bigger batch of the transistors anyway (I like the SOT23 footprint better than TO-92), and will try to pick units that match best.  As to the component placement, my carrier board will be larger than the display module (68mm by 74mm), with components on the open backside, so with SOT-23 footprints probably in a line, I can use thermal adhesive to glue a "heat spreader" over all five (one diode, four PNP transistors).  I'll probably need (low) forced air cooling in the enclosure anyway as 4G/LTE modems do tend to generate a bit of heat occasionally.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6218
  • Country: de
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #61 on: July 13, 2022, 10:31:06 pm »
It's unlikely it's practical. Using transistors from the same batch will improve the matching and you could place D1 as close to one of the transistors as possible, with a nice thick trace to conduct the heat.
The thing about "same batch" is wishful thinking. The only thing that the date code tells you is the assembly/final test date. The die come from anywhere, no one knows.

Now, I've done a bit of experimenting (MK14's scepticism about the diode/transistor matching got me thinking).
That led me to explore further, and I found that voltage and temperature matching between the two does not work well. Until now I've only used the
diode/transistor current source for totally uncritical applications.
That led me to the attached schematic instead.
Voltage tracking is great, simply due to using the same devices.
And VBE spread is much narrower and more precise than diode VF.
As BC847s or BAS16s are in SOT-23 anyway, what's the difference?

Comments to the schematic: the LED current spread is due to different input voltages (I wanted to make it universal). At 3.3 V it's pretty much spot-on at 15 mA.
Fun project! I've stored it in my library for future reference. :)

EDIT: just for fun, I checked how fast the circuit really is (OP had reservations about PWM accuracy in an earlier post). I attach a trace showing input PWM (blue trace) and "LED" current (red trace) at 200 kHz, 10% PWM.
The soft tops of the "LED" current may be due to my using Zeners instead of white LEDs, impossible to say. But I'd say that there's no reason to worry about PWM imprecision, no?

« Last Edit: July 14, 2022, 06:31:31 pm by Benta »
 
The following users thanked this post: MK14, Nominal Animal

Online Benta

  • Super Contributor
  • ***
  • Posts: 6218
  • Country: de
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #62 on: July 13, 2022, 10:42:44 pm »

For a circuit with a 3.3 V fixed (or PWM) input, my only improvement suggestion is: replace the 1N4148 with a BC857 E-B junction (see my previous post). Then it's almost perfect.
Your IC of around 2.6 mA is absolutely right.
 
The following users thanked this post: Nominal Animal

Offline eugene

  • Frequent Contributor
  • **
  • Posts: 496
  • Country: us
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #63 on: July 13, 2022, 11:36:06 pm »
Not being as smart as you guys, I would do something like this and expect it to work fine.
90% of quoted statistics are fictional
 
The following users thanked this post: Nominal Animal

Online Nominal AnimalTopic starter

  • Super Contributor
  • ***
  • Posts: 6836
  • Country: fi
    • My home page and email address
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #64 on: July 14, 2022, 12:02:16 am »
Not being as smart as you guys, I would do something like this and expect it to work fine.
A smart person would have kept to the four 100 Ohm resistors per LED, and dealt with the brightness by manipulating ILI9341 gamma curves...

One interesting detail I learned from the simulations that even if one were to give the transistor a short pulse, the capacitances et cetera involved means that the transistor will turn on, and then off, in a much more longer period than one would think from the pulse itself.  This in turn means that the shortest "blink", i.e. time that the LEDs are turned on, can be quite long, somewhere in the tens of microseconds.  And that in turn means that if you want to reach low intensities, say only 1% of maximum intensity, your PWM period needs to be 1/1% = 100 times as long; i.e. on the order of a millisecond, i.e. 1 kHz PWM.
At these currents, that will/should work absolutely fine.  Even I don't perceive flicker above 250 Hz or so (but I do 100 Hz, especially in peripheral vision).

But, when the currents are higher, the pulses can cause the affected components to generate actual physical noise.  I think this most often occurs with inductors and capacitors.  I can also hear the whine from many cheap switchmode supplies.  With the old CRT TVs and monitors and their horizontal retraces in the 16-20 kHz range, I didn't need to see the CRT to be able to tell whether it was on or not; most TV's I could tell if they were on in the next room.  I am definitely more on the sensitive side about those.

A lot of the stuff in this thread may not seem like sensible solutions the stated problem, but they do provide options when the simple solutions no longer cut it, and provide ways of understanding how the underlying idea, current control works; and what considerations (like temperature effects, supply voltage dependence) one should be aware of, and how to deal with those.  And that makes it very valuable, in my opinion.
 
The following users thanked this post: eugene

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4901
  • Country: gb
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #65 on: July 14, 2022, 12:30:28 am »
A smart person would have kept to the four 100 Ohm resistors per LED, and dealt with the brightness by manipulating ILI9341 gamma curves...

Which will be just fine.  Until the smart super genius, tries it in practice.  (I just did something somewhat similar, to confirm my suspicions).  Unfortunately, they will find in near complete darkness, the backlight will continue to (dimly but perfectly visibly), shine through.  On my reasonable or better quality IPS, display.

Usually LCD's are NOT perfectly black/opaque, and so controlling the backlight level, is a good idea, as well.  Especially in dark or very dark environments.
 
The following users thanked this post: Nominal Animal

Online Nominal AnimalTopic starter

  • Super Contributor
  • ***
  • Posts: 6836
  • Country: fi
    • My home page and email address
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #66 on: July 14, 2022, 12:49:11 am »
A smart person would have kept to the four 100 Ohm resistors per LED, and dealt with the brightness by manipulating ILI9341 gamma curves...

Which will be just fine.  Until the smart super genius, tries it in practice.  (I just did something somewhat similar, to confirm my suspicions).  Unfortunately, they will find in near complete darkness, the backlight will continue to (dimly but perfectly visibly), shine through.  On my reasonable or better quality IPS, display.

Usually LCD's are NOT perfectly black/opaque, and so controlling the backlight level, is a good idea, as well.  Especially in dark or very dark environments.
Ha!  Just shows you how non-smart I am! :P

Really doing the research and work to understand how things work, i.e. honest practical experience and intuitive understanding, seems to beat 'smart' any day anyway.

(But really, remember that I only intend to use the PWM or DAC when turning the display on or off, smoothly, instead of instantaneously; steady state will be either off or completely on.  But I do want an analog pot to adjust the overall brightness down from the maximum a bit if necessary; say 10mA .. 19mA per LED or so.  No menu hassle, physical "memory" to keep the setting across reboots and brownouts, etc; what's not to like?)
« Last Edit: July 14, 2022, 12:51:21 am by Nominal Animal »
 
The following users thanked this post: MK14

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4901
  • Country: gb
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #67 on: July 14, 2022, 12:49:24 am »
(MK14's scepticism about the diode/transistor matching got me thinking).

I'm disappointed, with (myself) my earlier response, to you, as regards that, on later reflection.  To say "agree to disagree", is still fine and ok.

But, I should have pointed out, that the first claim (signal diodes, need a reasonable bias current), was because of an apparently, rather decent (very reliable looking), report on the issue, which ideally, I should have both mentioned and linked to.
But unfortunately, I just can't either find it, or remember what it was called, or where it was from (other than the internet, somewhat obviously).

Secondly, it is fine to have different opinions or ways of doing it, relative to that report.  Because it is more of a strong recommendation, for some groups of engineers.  Rather than a strictly definitive issue.

Thirdly, my other disagreement, later turned out, to be NOT because what you had done was wrong as such.  But because I was significantly over-optimistic, as to the accuracy specification, I thought you were trying to achieve.

I.e. Your circuit may well have met your specification.  My issue, was I assumed a different specification, instead of checking/asking/clarifying with you, what the intended accuracy was suppose to be.  I didn't realize, it was as inaccurate (but still somewhat reasonable), as it was later, specified to be.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6218
  • Country: de
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #68 on: July 14, 2022, 06:41:39 pm »
MK14, I don't understand why you're berating yourself this way.
The remark about the diode biasing was enough to lead me to explore it, and you were right. I found a much better solution, and will use it in the future.
Good for me (and perhaps other readers of this thread).
Pat yourself on the back instead.
 
The following users thanked this post: MK14, Nominal Animal

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4901
  • Country: gb
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #69 on: July 15, 2022, 12:08:01 am »
MK14, I don't understand why you're berating yourself this way.
The remark about the diode biasing was enough to lead me to explore it, and you were right. I found a much better solution, and will use it in the future.
Good for me (and perhaps other readers of this thread).
Pat yourself on the back instead.

Thanks for the nice reply!

Your latest circuit in simulation, seems to be responding VERY quickly (high speed current regulation, is not necessarily easy), and using the identical type of transistor, to compensate for some of the changes, is a neat (and somewhat under used) technique.
 
The following users thanked this post: Nominal Animal

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19897
  • Country: gb
  • 0999
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #70 on: July 15, 2022, 08:44:35 am »
The LM317L can be used as a reference.

There are also transistor array, such as the MMPQ3906 and MMPQ2907A, which have better matching than discrete parts.
« Last Edit: July 15, 2022, 09:04:47 am by Zero999 »
 
The following users thanked this post: MK14

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4901
  • Country: gb
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #71 on: July 15, 2022, 11:06:52 am »
The LM317L can be used as a reference.

There are also transistor array, such as the MMPQ3906 and MMPQ2907A, which have better matching than discrete parts.


I think I see how you expect it to work, and it seems to have been cleverly engineered!
Also neat idea to use cheap, transistor arrays, to get nicely matched transistors.

But the LM317L's, can be a bit tricky.  So I raise the following possible concerns (friendly technical comments hopeful, NOT argument starting).

Minor thing, I think R3 .. R6, would have around 600mV, so around 27mA, but the LEDs want (a max of) 20mA.  So, perhaps 30 Ohms or more, might be better.

The LM317L  https://www.ti.com/lit/ds/symlink/lm317l.pdf  seems to need at least 2.5 volts across it, input to output terminals.
VI – VO Input-to-output voltage differential, which seems to be specified as 2.5V minimum.
But it also needs around 1.2V to be across R7 470 Ohms, to create the minimum 2.5mA output current (for it to be regulated).
Which would be rather tight, because the 5V rail may be a bit under, Q1 (assuming saturated), may still have a bit of voltage drop, and then Q6, could be more like 0.7V (transistors tend to be doped (complicated subject area, but needed to make it a good transistor) to have ever so slightly higher Vbe voltages, than typical small signal diodes).

2.5V (VI-VO) + 1.2V (to get current via R7) + 0.1V Q1 (could be less or more) + Q6 Vbe 0.7 + R1 220 Ohms (at desired current), 0.6V = 5.1V

N.B. Opinions on some of the figures I just estimated, can easily vary.  E.g. Some will say Vbe is 600mV, also some might say Vsat on Q1 is zero, etc.

But anyway, my estimate seems to be it would need 5.1V or more on the 5V rail, and good design should allow a 5% or 10% drop on the 5V rail, and it should still be expected to work well.

Sorry if I seem to be nit picking.   :-[   :-[

Also the LM317L can be a bit tricky to analyse (for me at least), so I readily accept I could be mistaken.

EDIT: Where I have doubts in my criticism.  Is can the adjustment pin of the LM317L, count as the minimum current source.  If it can, then you could be good to go, or does it have to come from the output pin, which the wording of the datasheet seems to imply (to me).

EDIT2:  Because the currents are so low, and the datasheet bit I mentioned, is a recommendation, rather than an essential requirement.  My estimates could easily be too high, which could easily make the real minimum voltage, perhaps 4.8V (wild estimate), which would begin to be fine.
« Last Edit: July 15, 2022, 11:32:28 am by MK14 »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19897
  • Country: gb
  • 0999
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #72 on: July 15, 2022, 11:30:38 am »
The LM317L can be used as a reference.

There are also transistor array, such as the MMPQ3906 and MMPQ2907A, which have better matching than discrete parts.


I think I see how you expect it to work, and it seems to have been cleverly engineered!
Also neat idea to use cheap, transistor arrays, to get nicely matched transistors.

But the LM317L's, can be a bit tricky.  So I raise the following possible concerns (friendly technical comments hopeful, NOT argument starting).

Minor thing, I think R3 .. R6, would have around 600mV, so around 27mA, but the LEDs want (a max of) 20mA.  So, perhaps 30 Ohms or more, might be better.

The LM317L  https://www.ti.com/lit/ds/symlink/lm317l.pdf  seems to need at least 2.5 volts across it, input to output terminals.
VI – VO Input-to-output voltage differential, which seems to be specified as 2.5V minimum.
But it also needs around 1.2V to be across R7 470 Ohms, to create the minimum 2.5mA output current (for it to be regulated).
Which would be rather tight, because the 5V rail may be a bit under, Q1 (assuming saturated), may still have a bit of voltage drop, and then Q6, could be more like 0.7V (transistors tend to be doped (complicated subject area, but needed to make it a good transistor) to have ever so slightly higher Vbe voltages, than typical small signal diodes).

2.5V (VI-VO) + 1.2V (to get current via R7) + 0.1V Q1 (could be less or more) + Q6 Vbe 0.7 + R1 220 Ohms (at desired current), 0.6V = 5.1V

N.B. Opinions on some of the figures I just estimated, can easily vary.  E.g. Some will say Vbe is 600mV, also some might say Vsat on Q1 is zero, etc.

But anyway, my estimate seems to be it would need 5.1V or more on the 5V rail, and good design should allow a 5% or 10% drop on the 5V rail, and it should still be expected to work well.

Sorry if I seem to be nit picking.   :-[   :-[

Also the LM317L can be a bit tricky to analyse (for me at least), so I readily accept I could be mistaken.

EDIT: Where I have doubts in my criticism.  Is can the adjustment pin of the LM317L, count as the minimum current source.  If it can, then you could be good to go, or does it have to come from the output pin, which the wording of the datasheet seems to imply (to me).

Data sheets will often give figures like this, based on the full load, over the entire temperature range, but it's important to take into account how the part is being used in the design. The differential of 2.5V between the input and output is specified with a load current of 100mA. In this case, the current is 2.7mA so the drop-out voltage will be much lower, more like 1.8V so there's more than enough headroom. Older LM317L data sheets used to have a graph on them with the drop-out vs load current. This has vanished from the more recent one. It does frustrate me when manufactures remove information from data sheets.

To answer your question about the adjustment pin: no it can't be used as a current source. The circuit works because the voltage drop between the output and adjustment pin is fixed at 1.25V, which appears across the sense resistor.
 
The following users thanked this post: MK14

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4901
  • Country: gb
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #73 on: July 15, 2022, 11:38:16 am »
Data sheets will often give figures like this, based on the full load, over the entire temperature range, but it's important to take into account how the part is being used in the design. The differential of 2.5V between the input and output is specified with a load current of 100mA. In this case, the current is 2.7mA so the drop-out voltage will be much lower, more like 1.8V so there's more than enough headroom. Older LM317L data sheets used to have a graph on them with the drop-out vs load current. This has vanished from the more recent one. It does frustrate me when manufactures remove information from data sheets.

To answer your question about the adjustment pin: no it can't be used as a current source. The circuit works because the voltage drop between the output and adjustment pin is fixed at 1.25V, which appears across the sense resistor.

That makes a lot of sense, I agree.   :-[   :-[

My estimating mechanism, is too use to there being a fair wack of current being thrown about, which would have made my estimates more realistic.  Hence my edit2, done at around the time you made this NICE reply.  Because rather low currents (such as 2.7mA's), will tend to make the voltage drops/losses, significantly less, especially in the LM317L, like you just mentioned.

Thanks, your answer has taught me more about the LM317L's and LM317's.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6218
  • Country: de
Re: LED backlighting suggestions (4 in CC config, 3.2-3.4V 20mA)
« Reply #74 on: July 16, 2022, 08:47:42 pm »
The LM317L can be used as a reference.
The LM317 is a slick idea for a current sink, sure.
But I seriously question it's dynamic response to PWM.

I've simulated several of the discrete circuits here.

The most precise is the one using the PNP VBE junction for temperature compensation:
20...50 C sweep: ILED 15.3...16.0 mA.
Unfortunately it has inferior switching characteristics (which was to be expected) with a significant "current tail". Not recommended for use above 1 kHz.

The fastest is the one using only transistors and resistors, but the temperature response is worse:
20...50 C sweep: ILED 13.3...15.1 mA.
But it will perform beautifully at 20 kHz PWM, and with a  bit of lack of PWM precision up to 100 kHz.

As always, it's a design decision: which is more important? Temperature stability or PWM precision? I can't decide, it's your choice.

I keep both designs in my my arsenal for future use. :)
 
The following users thanked this post: Zero999


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf