LED slightly ON using constant current driver - Page 1
Forum section: electronics / projects

author: kuon
author_rank: Regular Contributor
timestamp: September 01, 2020, 10:13:41 pm
content: Hello.I use the following schematic to control a LED with a low current 1.2V control line from a CPU.The LED is VLDB1232R-08‎, the driver is NCR402TR and the transistor is PDTC124XT,215.My problem is very simple, when the control line LED_BLUE is at 0V, the LED is not 100% off, it is very slightly ON. And if I measure the LED anode, it's at about 2V.This leads to the following questions:- Why is it happening?- Is it "normal" that it's happening, or is my design flawed?- If it's "normal", should I add high value resistors in parallel with the LED to workaround it?

author: KT88
author_rank: Frequent Contributor
timestamp: September 01, 2020, 10:27:18 pm
content: The DS doesn't mention leakage current but it is likely a few uA. That already is sufficient to produce a slight glowing of the LED. Something in the ballpark of a MOhm should solve the issue.

author: Cerebus
author_rank: Super Contributor
timestamp: September 02, 2020, 01:47:40 am
content: More than slight glowing if it's several uA. I use a single white LED as a night light in my bedroom. Supplied with a mere 1uA it chucks out enough light to illuminate the room sufficiently that you can get up in the middle of the night and see well enough to not bang into the furniture. It's just a 9V alkaline battery, a current limiting resistor and an LED - basically it pulls no more current than the battery's self discharge would, it lasts years of 24 hour operation on one battery. Modern LEDs are (1) very efficient, (2) produce light over about 5-6 decades of drive current.

author: kuon
author_rank: Regular Contributor
timestamp: September 02, 2020, 01:52:00 am
content: A 1MOhm resistor did dim the LED to something even lighter, but to get it completely off, I had to use 100kOhm. At 2V that's 20uA, that's not much "in absolute", but that's more than I thought.

author: Zero999
author_rank: Super Contributor
timestamp: September 02, 2020, 09:58:13 am
content: Connect D2's cathode to Q4's collector.

author: Vovk_Z
author_rank: Super Contributor
timestamp: September 02, 2020, 10:06:24 am
content: I don't see any OFF characteristics provided by manufacturer at all (that bad to him). So we may only guess.To investigate it further we need a voltage at Q4 collector when LED must be off.I had very similar problem with LED-diode of a 817 optocoupler, so I had to "shunt" it by about 100k resistor too (if I'm not wrong).

author: Zero999
author_rank: Super Contributor
timestamp: September 02, 2020, 12:24:19 pm
content: Do you really need the NCR402TR? Can't you just use a resistor? If the power supply voltage is regulated and you don't plan to change the LED, the current won't vary that much anyway.

author: KT88
author_rank: Frequent Contributor
timestamp: September 02, 2020, 12:28:18 pm
content: The reverse voltage of .5V (p3. in the DS) hints that they have a Shottky diode for reverse voltage protection across the pass transistor. Shottkys can be quite leaky...

author: kuon
author_rank: Regular Contributor
timestamp: September 02, 2020, 03:45:41 pm
content: Quote from: Zero999 on September 02, 2020, 12:24:19 pmWell, strictly speaking a resistor is enough as the input should be quite well regulated. But I have different colors, and they are all rated for same current, but voltage vary from 1.5 to 4.5v, and I thought it would reduce component complexity to not have different resistor values. And it actually comes cheaper on assembly than having 3 R values. Also, this led board is on a daughter board, and if tomorrow I want to supply it with 9V it won't be a problem.And what I didn't mention, is that when I probe the collector the LED being probed turns on "slightly more" and the voltage on my scope is 4.5V (and the 5V of my bench supply is actually 5.1V on my scope).To be honest, I copied this design from the NCR402T application note (fig 7), I did not expect it to be so sensitive. I spent so much time on the mainboard, I thought this would be a formality, and the funny part is that my mainboard with the SOC works perfectly and I have an issue with a small indicator daughter PCB.So now I can either put my 100kOhm resistor in // of the LED (but 3 components to drive a LED?). Connect LED cathode to transistor collector instead of GND (I have not tried that yet because because I need to solder a test circuit and didn't have time yet). Or just do another design with another driver.

author: magic
author_rank: Super Contributor
timestamp: September 02, 2020, 04:11:27 pm
content: I wonder if there is some protection diode from GND to OUT which allows this driver to slightly turn on when OUT is connected to a grounded load? But in such case it's a mystery why would they recommend switching the driver like that.Quote from: Zero999 on September 02, 2020, 09:58:13 amJust do it.

author: KT88
author_rank: Frequent Contributor
timestamp: September 02, 2020, 05:40:57 pm
content: QuoteGND is pulled LOW for turning the output on. In off-state there is no connection to circuit GND. The control transistor would only contribute a few nA. A quick litmus test would be to remove the collector of control transistor. The only path internally would be VS to VOUT. As mentioned the -0.5V max rating for the voltage between VS and IOUT points at a Schottky for reverse- and ESD protection. The leackage current would even increase when the part gets hot. The would result in some sort of afterglow if the shunting resistance is not small enough...

author: magic
author_rank: Super Contributor
timestamp: September 02, 2020, 08:02:01 pm
content: I was thinking about an internal diode from GND to OUT, but on second thought, it's impossible. It would turn the device hard on as soon as VS > Vled + 0.7V + 4.5V.BTW, the 0.5V maximum rating probably refers to forward voltage of a normal diode, over temperature.

author: KT88
author_rank: Frequent Contributor
timestamp: September 02, 2020, 08:33:50 pm
content: QuoteYou are right: usually it's 0.3V in most cases. But it also depends on the process node and the current rating. A normal silicon diode probably wouldn't leak that much. In case of a silicon diode there is likly something else going on... hmmm.However a possible remedy without using additional parts could be to connect the kathode of the LED to the collector of the control transistor. In off-state the transistor would block the leakage current.

author: KT88
author_rank: Frequent Contributor
timestamp: September 02, 2020, 09:36:30 pm
content: Just an example of a 1A schottky series...

author: kuon
author_rank: Regular Contributor
timestamp: September 02, 2020, 09:46:25 pm
content: I will connect led cathode to transistor collector. Even if I don't see why it shouldn't work, I will try before ordering a new PCB.

author: free_electron
author_rank: Super Contributor
timestamp: September 02, 2020, 09:54:00 pm
content: you cut the GND pin of an integrated circuit and expect it to behave ? That is an untested and unspecified condition.

author: KT88
author_rank: Frequent Contributor
timestamp: September 02, 2020, 10:25:35 pm
content: QuoteHow do you expect the part to misbehave if it is completely unbiased? It is basically a single transistor with some additional parts attached.There are only two states the part can be in: ON (biased) or OFF (unbiased). In on-state every node of the circuit is tied to GND (if you don't mind a few mV of saturation voltage) that is supposed to be tied to GND.The only possible trap comes into play if the LED is tied to longer leads. In that case additional slew rate limitation is nescesary.CheersAndreas

author: ejeffrey
author_rank: Super Contributor
timestamp: September 02, 2020, 10:48:08 pm
content: Quote from: free_electron on September 02, 2020, 09:54:00 pmYou mean in the original circuit or with the LED connected to the collector?The original circuit is bad because the output pin gets pulled below -- possibly several volts -- outside the rail voltages. This is unspecificed in most ICs.Once you connect the LED cathode to the transistor collector you have a well behaved circuit that can be either powered up or down by the transistor.The only downside here is that the transistor has to take the full LED current and needs correspondingly more base current.

author: KT88
author_rank: Frequent Contributor
timestamp: September 02, 2020, 11:23:12 pm
content: The circuit is fine both ways. Pin1 is meant to be more negative than the rest of the IC. This would only be bad if the internal resistor is within the ESD protection.The spec states Vs= 40V; Vout=38V; GND would be 0V.The chosen control transistor is in fact not usable. With the internal base resistor it won't be able to reliably handle the LED current (Rb: 22k plus hfe: 80 (min)) won't even work at 5V...

author: kuon
author_rank: Regular Contributor
timestamp: September 03, 2020, 01:04:32 am
content: Well, I have a feeling I should change my design.I will search what I can find, but if you have a suggestion with the following requirements:- can be driven with 1.2V line, with minimal current on the control line- can accept 5 to 9V power input- 20mA LEDs constant current- can be PWM

author: mark03
author_rank: Frequent Contributor
timestamp: September 03, 2020, 03:11:29 am
content: It is worth pointing out (and I don't believe anyone has) that the NXP datasheet for this part specifically endorses the OP's original circuit diagram (Figure 10).

author: free_electron
author_rank: Super Contributor
timestamp: September 03, 2020, 01:48:24 pm
content: Quote from: KT88 on September 02, 2020, 10:25:35 pmi should have checked the datasheet. This is one of these cases where the schematic is crap. The thing is drawn as an integrated circuit but is basically a biassed transsitor. I would have made a symbol that represents that similar to how q4 is drawn : show the guts of that thing.still. if this thing is really a monolithic integrated circuit there may be parasitic elements that cause leakage through the substrate .

author: KT88
author_rank: Frequent Contributor
timestamp: September 03, 2020, 02:18:00 pm
content: I assume these parts come out of the former Pilips fab in Hamburg. They do discretes and discretes plus thin film over there. Some parts are even more than onecrystalnot die, as they call it, in one package.The internal schematic is likely almost 1 to 1 exept the culprit causing the leakage current. That said you do nothing wrong treating the part as a transistor.I didn't find the original DS mentioned by mark03. An opamp shown there would be an abstraction of the single transistor circuit....

author: Peabody
author_rank: Super Contributor
timestamp: September 03, 2020, 02:42:09 pm
content: I'm confused. If you disconnect the processor line from the transistor's base, does the LED still light up? And if you disconnect the transistor collector from the driver chip, does it still light up? Maybe I missed it, but it's not clear to me exactly what component is misbehaving.Also, if you duplicate this setup with discrete components, will it work properly? Seems like it ought to, but it might be worth a test.It's hard to believe that a part specifcally designed to drive an LED would leak current when it's off. Maybe LED_BLUE isn't really low or hi-Z, or maybe the grounds aren't really common. It's just unlikely that either of these parts is actually bad. More likely that something we're assuming is true - isn't.

author: KT88
author_rank: Frequent Contributor
timestamp: September 03, 2020, 02:52:53 pm
content: The part is basicalla a PNP current souce with two diodes as reference (one to compensate Vbe). The input tied to GND provides bias current to the reference and the transistor base. Left open, the input is high and without bias current the collector (IOUT) goes high-Z and the LED turns off.The issue is a not shown Schottky diode which provides some leakage current to the LED in high-Z state.

author: mark03
author_rank: Frequent Contributor
timestamp: September 03, 2020, 02:58:59 pm
content: Quote from: KT88 on September 03, 2020, 02:18:00 pmOver here, it's the first google search result for "ncr402":https://assets.nexperia.com/documents/data-sheet/NCR402U.pdf(See Figure 10.)But yeah, it's not unheard of for datasheets to give bad advice.

author: KT88
author_rank: Frequent Contributor
timestamp: September 03, 2020, 03:09:35 pm
content: I thought you mentioned an older NXP DS with a different schematicQuoteas this DS is now by Nexperia...@kuon: The suggested remedy would work with a logic-level 20V MOSFET like theRUM001L02from Rohm.

author: Peabody
author_rank: Super Contributor
timestamp: September 03, 2020, 03:12:26 pm
content: Quote from: KT88 on September 03, 2020, 02:52:53 pmI understand, but that would imply that it was designed that way unless this particular copy has a particularly leaky Schottky. I think it's unlikely it was designed that way. Another explanation might be that the input at the NPN base isn't really low when it's supposed to be. After all, this is essentially a Sziklai pair, so there's lots of amplification available.If the problem is the Schottky, then the LED would still light up if the NPN is disconnected entirely. Does it?

author: KT88
author_rank: Frequent Contributor
timestamp: September 03, 2020, 03:55:37 pm
content: The Schottky is located between VS and VOUT protecting the PNP against inductive spikes.Schottky diodes have a lower Vf at the cost of higher leakage - in this case some tens of microamps...

author: magic
author_rank: Super Contributor
timestamp: September 03, 2020, 09:06:08 pm
content: There is zero reason to use Schottky. Standard diode would clamp to 0.7V and every transistor can withstand that much reverse voltage.

author: KT88
author_rank: Frequent Contributor
timestamp: September 03, 2020, 09:23:59 pm
content: QuoteNo dispute on that...it might have been easyer/cheaper for them to implement.It's not even clear if it is a Schottky at all that is causing the off-current - it's just most likekly - given the few specs hinting it...QuoteIn case of using longer cables the inductive EMF may cause degradation over time and early failures...The Schottky may also work as a snubber to suppress EMI in case of inductive loads. The fairly high Vf could help to absorb more energy instead of reflecting it - again more of an educated guess....

author: KT88
author_rank: Frequent Contributor
timestamp: September 04, 2020, 05:33:02 pm
content: ...it still bothered me.A single NPN plus resistor should work. Slightly higher TC though (at 1.2V).

author: magic
author_rank: Super Contributor
timestamp: September 04, 2020, 06:27:35 pm
content: Indeed, your current will be about perfectly proportional to absolute temperature.(That being said, NXP's schematic doesn't suggest significantly lower tempco either).

author: KT88
author_rank: Frequent Contributor
timestamp: September 04, 2020, 06:30:59 pm
content: ...which is simelar to the NCR402U which depends a diode Vf as reference....

author: kuon
author_rank: Regular Contributor
timestamp: September 07, 2020, 10:20:07 pm
content: For the records, I changed my design for something simpler:D6 is a NSI45020AT1G and Q2A is FDG6335N.This works fine, has a wide input voltage up to 45V, and will draw only around 1.8uA on the control line at 1.8V (my control line is actually 1.8V, 1.2V was a typo).

author: KT88
author_rank: Frequent Contributor
timestamp: September 07, 2020, 11:21:31 pm
content: Nice little part...

author: magic
author_rank: Super Contributor
timestamp: September 08, 2020, 05:06:20 am
content: You do realize that the simple NPN + resistor circuit (see KT88 above) has better accuracy and is infinitely cheaper than those CRDs?And that this particular CRD is not that great at 3V (red LED) and worse yet at 2V (blue/white).

author: kuon
author_rank: Regular Contributor
timestamp: September 08, 2020, 10:30:23 am
content: Quote from: magic on September 08, 2020, 05:06:20 amYes, but unless I am missing something, the resistor won't allow for a wide input range, no? The use of this CRD chip let me use whatever voltage I need on the power rail.

author: KT88
author_rank: Frequent Contributor
timestamp: September 08, 2020, 11:06:10 am
content: The drive voltage should not be too low: the smaller the voltage drop across the resistor the more pronounced the tempco of the PN junction will be. At 1.8 Volts it already outpereforms both integrated parts.The single transistor circuit is a very basic constant current sink (from V+ into the collector).At the collector (LED) your only limtations are the properties of the NPN. You could deal with 100s of Volts if the Transistor can handle both power and voltage.You could put a simulation into LTSpice within a few minutes and study the behaviour of the circuit - which I would recommend anyway...CheersAndreas

author: Peabody
author_rank: Super Contributor
timestamp: September 08, 2020, 02:03:55 pm
content: Did you test the NCR402 to see if it leaks current when its ground pin is NC? I'd kinda like to know.

author: magic
author_rank: Super Contributor
timestamp: September 08, 2020, 02:44:01 pm
content: Quote from: kuon on September 08, 2020, 10:30:23 amIt's not the usual "dumb" way of driving LEDs with resistors, study KT88's schematic carefully. The only limitation is that the power rail has to be at least one LED voltage higher than the GPIO voltage, maybe a bit lower, but not much.CRDs also work poorly if there isn't enough volts across them.

author: Damianos
author_rank: Frequent Contributor
timestamp: September 08, 2020, 08:54:19 pm
content: The circuit presented at #31, by KT88, is simple, cheap and I had used it in the past, in some situations. But comparing it with the IC solutions, referred here, has some drawbacks:- The load current depends on the voltage level of the control input.- The current has a positive TC, that is opposite of the ICs. This means as the transistor warms-up the current increases, that increases the temperature ... ...- If the load supply voltage is increased, the above TC will give worse results.- If the load is disconnected or the load supply is off, the control source will "try to give" all the "missing" current, through the base of the transistor. This may introduce some problems.Even if I like the simple solutions, with a few generic parts, as this one, it must be studied if it is appropriate for the present situation.

author: KT88
author_rank: Frequent Contributor
timestamp: September 08, 2020, 09:47:18 pm
content: @Damianos:You are right, the simple circuit ist not perfect. For consistent brightness more effort is required.Between 5V and 9V there are about 80mV difference across the emitter resistor for a SOT23. If the voltage doesn't change the emitter resistor can have a few more or less Ohms to take that into account. Same for different control voltages. The value can be set to the current at hot state (the integrated parts also take a few seconds to settle).But optimisations are possible: SOT223 or other packages with less Rth, instead of SOT23 reduces the temperature rise by variing power dissipation...The integrated parts are indeed more convenient once the corner cases are confirmed working.

author: jimmc
author_rank: Frequent Contributor
timestamp: September 09, 2020, 10:27:25 pm
content: Returning to the original circuit, I cannot see the justification for assuming a schottky diode in the IC, to me the 0.5v reverse spec. is normal for (almost) any IC and is limited by the substrate isolation diodes.The DTC124X has a specified leakage current (ICEOof 500nA at 50v obviously at 5v this will be less but there does not appear to be any path for this current other than into the base of the transistor in the NCR402U.This transistor appears to have a current gain of about 40 at 20mA, at 20uA this could be more or less.I would be very interested to know the effect of adding a resistor from the collector of the DTC124X to the supply, say 100k to provide a path for the leakage current.Jim

author: jimmc
author_rank: Frequent Contributor
timestamp: September 10, 2020, 11:20:33 am
content: Thinking about it I'm not convinced that the datasheet circuit is correct, it is more than unusual for a datasheet to suggest running the device outside its absolute maximum ratings.I would suggest modfying the original circuit by connecting GND to 0v, and adding a Pchannel mosfet between (Vs and the external resistor) and supply. Gate to collector of the DTC124X with a pull up resistor to the supply. Something like an NTR0202PL would be more than adequate up to 20v supply voltage.Two extra components but at least everything is run well within its ratings and the LED current is constant as before.Jim

author: Krotow
author_rank: Regular Contributor
timestamp: March 02, 2025, 05:13:15 pm
content: Quote from: magic on September 08, 2020, 05:06:20 amIt depends. When PCB isn't space constrained and all required parts already are in your shelf then separate transistor and resistors are cheaper. Otherwise if you need to purchase the transistor, NCR402U will cost the same or even cheaper and take less space on PCB. Particularly for me NCR402U solved the power indicator LED driving problem in space constrained board with possible input voltages from 12V to 36V where usual current drop resistor became red hot or higher voltages or LED on 12V was too dim.