Author Topic: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...  (Read 11316 times)

0 Members and 8 Guests are viewing this topic.

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4161
  • Country: nl
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #25 on: October 12, 2022, 06:06:12 pm »
The voltage drop across the resistor is, by definition, the residual voltage after the LED’s voltage drop. The current of the LED + resistor system finds an equilibrium. LED Vf rises —> resistor voltage drops —> current drops —> LED Vf drops —> resistor voltage rises —> current rises —> LED Vf rises. (Additionally the LED’s temperature also comes into play but let’s ignore that for today.)

And to make an example calculation it is not a crime to assume something. It was to show that the voltage across the resistor does not drop when the current increases. The whole relation between the current, the LED forward voltage and the resistor is that it will reach a balance based on input voltage.

Which is what you and I understand, but the OP seems to fight this somehow, seemingly being obsessed with the led forward voltage being very variable over current.

When I use a led and need to calculate a suited series resistor I just take the typical forward voltage from the spec and subtract it from the supply voltage. Then I take the typical forward current and calculate the resistor value. Match it to the nearest E12 or E24 range and use that resistor with the needed wattage of course. When it is to bright I just increase the resistor value, or when it is to dim I decrease it.

When I have an unknown led I use my adjustable power supply with current limiting and directly connect the led to it and look for the forward voltage over current that way.

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6157
  • Country: es
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #26 on: October 12, 2022, 10:40:32 pm »
When he finally plugs in that HiFi-UltraHD-4K-Nuclear-powered LED:
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #27 on: October 12, 2022, 10:52:34 pm »
This whole thread is about finding a new resistor value (or equivalent regulator).
Nope, I can put many different circuits inside this quite big LEDs cover bottom (heatsing) case cylinder 14mm in diameter and 16mm high, including easy NPN transistor based current limit, but in more  sophisticated scenario even small tiny MPU like ATTiny eg. to detect whether internal circuit is powered by car battery or higher voltage (~14Valternator) when engine starts and I can turn this thing on automatically as day light car lights  8)
I have another LEDs based car replacement light bulbs (up to 5W) in similar case and as I noticed there is also  bloody standalone resistor, so that is why my guess was than inside those LEDs mentioned in this thread in automotive case might be ONLY resistor to limit current, so that i swhy I wanted to make its teardown before using in a car  :popcorn:
---|--||||||----|||---|||-----
 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #28 on: October 12, 2022, 10:58:56 pm »
When he finally plugs ...
I have much more comfortable seat in my room with 3m in diagonal projector output screen on white painted wall, since It is custom made based on F-16 fighter jets seats geometry  :-DD
« Last Edit: October 12, 2022, 11:01:42 pm by szan »
---|--||||||----|||---|||-----
 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #29 on: October 13, 2022, 12:25:24 am »
When I have an unknown led I use my adjustable power supply with current limiting and directly connect the led to it and look for the forward voltage over current that way.
I do not have to use any adjustable power supply since... I have adjustable current limit based on LM317L  >:D

Now I've connected those LEDs to 12.25Vcc battery (under load) via such LM317L based current limit with 22R and... and additional 1R(1%) resistor in series, and I've got exactly what we can expect:
1.25V/22R=0.05681A~57mA  based on LM317 datasheet and real mesurements gave us 8.24Vf@57mA current :clap:
This means that in this case we have:
12.25Vbat-8.24Vf-1R*0.057A=3.95Vreg~4Vreg
voltage drop on LM317L which gives us total power losses in regulator with added 22R resistor:
4Vreg*57mA=0.228W~0.23W  8)

NOTE: I have also connected those LEDs to 12.28Vbat with 147R+1R(1%) current sensing resistor and we had: 8.01Vf@29mA in this case  :popcorn:


---|--||||||----|||---|||-----
 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #30 on: October 13, 2022, 01:22:32 am »
When I use a led and need to calculate a suited series resistor I just take the typical forward voltage from the spec and subtract it from the supply voltage.
I have NO spec for those LEDs, but I've made a plot of a few measured Vf(I) and now we can see that  we can expect at 100mA current LEDs forward voltage around ~8.6Vf  :-DMM

Now, when we connect those LEDs to 12.3Vbat I have with 47R we can expect ~8.4Vf@83mA since:
(12.3Vbat-8.4Vf)/47R=0.0829~83mA
which leads to expected power loses in this 47R resistor:
0.083^2*47=0.3237~0.32W
while LEDs power ~0.7W

However, when we connect to running car 14Vbat by using this plot Vf(I) we can expect something like 113mA LEDs current (total in -> out regardless how those small 12 LEDs are internally connected):
 (14Vcar-8.7Vf)/47R=0.1128~113mA
so we have power dissipation in 47R:
0.113^2*47R ~0.6W (teardown shows very small resistor which looks like 0.25W )  :rant: 
as well as LEDs power:
8.7Vf*0.113A=0.9831W ~1W
« Last Edit: October 13, 2022, 01:25:22 am by szan »
---|--||||||----|||---|||-----
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12297
  • Country: ch
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #31 on: October 13, 2022, 06:40:39 am »
This whole thread is about finding a new resistor value (or equivalent regulator).
Nope, I can put many different circuits inside this quite big LEDs cover bottom (heatsing) case cylinder 14mm in diameter and 16mm high, including easy NPN transistor based current limit, but in more  sophisticated scenario even small tiny MPU like ATTiny eg. to detect whether internal circuit is powered by car battery or higher voltage (~14Valternator) when engine starts and I can turn this thing on automatically as day light car lights  8)
Soooo… a regulator. (A regulator can be a circuit, doesn’t have to be an IC.)

When I use a led and need to calculate a suited series resistor I just take the typical forward voltage from the spec and subtract it from the supply voltage.
I have NO spec for those LEDs, but I've made a plot of a few measured Vf(I) and now we can see that  we can expect at 100mA current LEDs forward voltage around ~8.6Vf  :-DMM

Now, when we connect those LEDs to 12.3Vbat I have with 47R we can expect ~8.4Vf@83mA since:
(12.3Vbat-8.4Vf)/47R=0.0829~83mA
which leads to expected power loses in this 47R resistor:
0.083^2*47=0.3237~0.32W
while LEDs power ~0.7W
But why are you insisting on such a low operating Vf for the LEDs? 8.4V Vf has to be 3 LEDs in series (since 2 in series would be 4.2V per LED, which is far too high for any visible-light LED, and 4 in series would be 2.1V per LED, which is not enough for a white LED to light). So 3 in series means 2.8V per LED, which is very much on the low side. They’re normally designed to be operated at around 3.2V, leaving less voltage to drop in the resistor.
 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #32 on: October 13, 2022, 11:57:57 pm »
A regulator can be a circuit, doesn’t have to be an IC.)
Yep, but sometimes it could be difficult to make a circuit with thermal protections capabilities similar to LM317 in current limit mode in such small package it offers.  8)
Now, only just thinking, that maybe we could add additional inductor, capacitor and fast shotky diode and treat those LEDs as load, where at the bottom LM317L could work as current limit/analog switch and make something like analog step down current limit  from voltages lets say 24V (6x Li-on charged to 3.9Vmax ~24Vin) since I've such battery made of 6 spot welded Li-on's 18650 in series :-/O
Idea behind it is that, LM317 response will be very fast in current limit mode, so maybe such kind of analog switching power supply with constant current could work  :popcorn:
« Last Edit: October 14, 2022, 12:03:57 am by szan »
---|--||||||----|||---|||-----
 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #33 on: October 15, 2022, 08:47:30 pm »
A running car will work at a pretty much constant voltage, about 13.7-14.4V depending on the car, so a resistor will do a similar job being way more cheaper.
Since I'd like to power those LEDs not only in a car, but also use them as daylight front lights in a bike (3x 18650 Li-on cells charged max to 3.9Vmax  and minimum 3Vmin each 9Vmin-11.7Vmax ), so it looks like that such simple current limit circuit based on 2x NPN transistors and 2 resistors should do the job, since not too much room for LM317L load regulation (Vin-Vout) when those LEDs will be powered by 9Vmin battery  :popcorn:
« Last Edit: October 15, 2022, 08:49:51 pm by szan »
---|--||||||----|||---|||-----
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6117
  • Country: de
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #34 on: October 15, 2022, 10:20:24 pm »
That works fine, done that often myself. You do need a third resistor, though, and there's no need for such a high base current.

You can place more LEDs in series as long as you keep the driver stage voltage drop higher than 3 V.
I attach the schematic I normally use plus the SPICE simulation.
 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #35 on: October 15, 2022, 11:02:37 pm »
You do need a third resistor, though, and there's no need for such a high base current.
Yep, I know that such a high base current not needed since BC547 NPN transistor has hFE minimum 100 and maximum Ib current around 5mA  8)
However, how do you estimate current limit in the case when third resistor is used in bottom transtor in my case and why do we need it ?  :-//
---|--||||||----|||---|||-----
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6117
  • Country: de
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #36 on: October 15, 2022, 11:21:20 pm »
However, how do you estimate current limit in the case when third resistor is used in bottom transtor in my case and why do we need it ?  :-//
The third resistor does not influence the current through the LED at all. It's there for a completely different reason.
Emitter-followers (which this is) are not as harmless and friendly as most think. They will oscillate at several MHz or 10s of MHz in some cases. There are several reasons for this, search for "emitter follower oscillation" yourself.
The safe way of killing this behaviour is the base resistor.
I've not experienced it with BC847/857 yet, but the high-gain BC849/859 types are prone to it, and if you use a Darlington as the driver it will certainly happen. Try it out yourself in a simulator.
« Last Edit: October 15, 2022, 11:28:42 pm by Benta »
 
The following users thanked this post: szan

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #37 on: October 16, 2022, 11:57:16 am »
Emitter-followers (which this is) are not as harmless and friendly as most think. They will oscillate at several MHz or 10s of MHz in some cases. There are several reasons for this, search for "emitter follower oscillation" yourself.
The safe way of killing this behaviour is the base resistor.
I haven't got BC547 for the moment, but I have BC517 NPN darlington which has hFE~30000  :o , so I've decided to use it as standalone driver in slightly different current limit circuit  with two diodes in series and in quick simply simulations it looks very good, but I didn't used more sophisticated circuit simulators, so it will be easier solder real circuit and see how it works at different battery voltages starting from 9Vmin to around 14Vmax :-/O
« Last Edit: October 16, 2022, 12:03:57 pm by szan »
---|--||||||----|||---|||-----
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6157
  • Country: es
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #38 on: October 16, 2022, 02:59:28 pm »
Why don't use the buck comverters? Will be much more efficient.
You can mod these cheap converters from Aliexpress, the circuit is designed for constant voltage but I think they can be easily modded for constant current.
As the voltage reference is low, the power drop in the resistor is pretty decent below 500mA.

https://www.aliexpress.com/item/1005001579319655.html

Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6117
  • Country: de
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #39 on: October 16, 2022, 04:43:12 pm »
with two diodes in series and in quick simply simulations it looks very good, but I didn't used more sophisticated circuit simulators
I find that hard to believe. For a basic Darlington stage you'll need three (0.7 V) diodes. Also, at the very low currents you're operating at, diode forward voltage will be around 0.4 V, no more.
It won't work, sorry.
 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #40 on: October 16, 2022, 08:33:15 pm »
Why don't use the buck converters? Will be much more efficient.
Maybe step up converter will be used to keep battery input voltage at given constant level to minimalize power loses in LEDs driver, so I'd like to keep it simple and have analog linear output without any capacitors in LEDs driver final stages.
 
For a basic Darlington stage you'll need three (0.7 V) diodes. Also, at the very low currents you're operating at, diode forward voltage will be around 0.4 V, no more.
We'll see  ::)
I'm going to use 2x 1N4148 .
Nice thing about using diodes is that when temperature rises than its forward voltage goes down, so it will work as automatic additional current limit when more heat will be dissipated in a such thermally coupled circuit, because of idea is keep it very small without any capacitors which could fail at higher temperatures  :-BROKE
I will use 2x 22R resistors in parallel -> 11R, since in final design, I'd like to add a switch to have adjustable (two states low/high) current limit  just by pressing on/off a buttons connected to this driver, so in this case one of 22R resistors will be disconnected, so default current limit will be around ~25mA, but when additional 22R resistor will be connected by push button in parallel, then we'll have 1/22R+1/22R=1/11R  -> 11R resistance  and probably around ~50mA at nominal 11.7Vbat  (3x 18650 Li-on charged to 3.9V each) 8)
« Last Edit: October 16, 2022, 08:36:08 pm by szan »
---|--||||||----|||---|||-----
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19787
  • Country: gb
  • 0999
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #41 on: October 16, 2022, 09:45:33 pm »
For a basic Darlington stage you'll need three (0.7 V) diodes. Also, at the very low currents you're operating at, diode forward voltage will be around 0.4 V, no more.
We'll see  ::)
I'm going to use 2x 1N4148 .
Nice thing about using diodes is that when temperature rises than its forward voltage goes down, so it will work as automatic additional current limit when more heat will be dissipated in a such thermally coupled circuit, because of idea is keep it very small without any capacitors which could fail at higher temperatures  :-BROKE
I will use 2x 22R resistors in parallel -> 11R, since in final design, I'd like to add a switch to have adjustable (two states low/high) current limit  just by pressing on/off a buttons connected to this driver, so in this case one of 22R resistors will be disconnected, so default current limit will be around ~25mA, but when additional 22R resistor will be connected by push button in parallel, then we'll have 1/22R+1/22R=1/11R  -> 11R resistance  and probably around ~50mA at nominal 11.7Vbat  (3x 18650 Li-on charged to 3.9V each) 8)
He's right. The current regulation will be crappy. The total forward voltage drop of the diodes is too close to the base-emitter voltage of the transistor. Try sweeping the voltage and note how widely the current varies. It's not much better than a resistor.

None of these circuits are temperature compensated. The current will drop slightly at higher temperatures, because the diode junctions have a negative temperature coefficient.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6117
  • Country: de
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #42 on: October 16, 2022, 09:54:32 pm »
The current regulation will be crappy.
Which current regulation? The BC517 won't even in the teeniest way be influenced by the 1N4148s. It'll just do... something. Or more likely: nothing.

 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #43 on: October 17, 2022, 12:05:28 am »
The current will drop slightly at higher temperatures, because the diode junctions have a negative temperature coefficient.
I didn't say that this circuit it is temperature compensated, but only mentioned those diode junctions effects at higher temperatures.
However, I have quite bulky copper heatsink to hide inside those LEDs  >:D
Final count down before tests  :-DMM



NOTE: BC517 darlington can be easy changed to another NPN transitor, so no problem what so ever   :popcorn:
« Last Edit: October 17, 2022, 12:07:33 am by szan »
---|--||||||----|||---|||-----
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19787
  • Country: gb
  • 0999
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #44 on: October 17, 2022, 05:16:22 pm »
The current regulation will be crappy.
Which current regulation? The BC517 won't even in the teeniest way be influenced by the 1N4148s. It'll just do... something. Or more likely: nothing.
It ought to pass some current. A small Darlington pair, such as the BC517 will have a total base-emitter voltage roughly equal to two 1N4148 diode drops. It will act like a crude current mirror, with the transistor passing roughly the same current as the diodes.
 
The following users thanked this post: szan

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6117
  • Country: de
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #45 on: October 17, 2022, 06:55:07 pm »
It ought to pass some current. A small Darlington pair, such as the BC517 will have a total base-emitter voltage roughly equal to two 1N4148 diode drops. It will act like a crude current mirror, with the transistor passing roughly the same current as the diodes.
I doubt it. 1N4148 has a VF of around 0.4...0.45 V at these currents. The BC517 base is practically shorted to ground.
But let's see what impressive results the OP returns with.
 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #46 on: October 17, 2022, 09:33:37 pm »
A small Darlington pair, such as the BC517 will have a total base-emitter voltage roughly equal to two 1N4148 diode drops.
Yep, I forgot about this and BC517 datasheet shows ~1.4VBE  :-+

1N4148 has a VF of around 0.4...0.45 V at these currents.
Nope, in my simple simulation we have in NPN transistor BE currents 773uA, so it is ~1mA range and in this case 1N4148 datasheet by Vishay says 0.6Vf which is fine when we use two such diodes in series with 11R current sensing resistoir we get by using regular NPN transistor which has ~0.7Vbe:
770.0*uA~0.77mA~1mA
(0.6Vf*2-0.7Vf)~0.5Vf / 11R ~45mA  current limited by 11R sensing resistor  :-DMM



Anyway, by adding third 1N4148 diode in series it looks like this circuit should limit current to around ~40mA with NPN darlington ~1.4Vfd instead of ~0.7Vf in the case of regular NPN transitsor.

So, I'm going to add additional 1N4148 diode (3rd) in the case of PC817 darlington, while when we use  BC547 it should be fine to have only two 1N4148 diodes in series  :-/O
---|--||||||----|||---|||-----
 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #47 on: October 19, 2022, 10:30:00 pm »
But let's see what impressive results the OP returns with.
Brand new VARTA 610A 12V9 ready for testing  :-BROKE
We have also BC547C NPN transistors, so no need to play with BC517 NPN darlington VBE 1.4Vf  :phew:
However, it looks like that idea of using LM317L in current limiting mode with 2x47R in parallel, should give nice ~53mAmax currents, while we'll still be able to output ~27mAmin, when we disconnect one of 47R resistors:
LM317 1.25Vref/47R ~27mA  :-DMM


---|--||||||----|||---|||-----
 

Offline szanTopic starter

  • Regular Contributor
  • *
  • Posts: 84
  • Country: bs
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #48 on: October 22, 2022, 12:34:15 am »
Why don't use the buck conerters? Will be much more efficient.
As simply as this circuit below  :popcorn:



Custom PCB allows me easy add switch to increase two times LEDs current from 25mA to around 50mA when button connects to ground second 22R  8)

I've successfully tested those LEDs by using current limiter based on 2x BC547C NPN transistors (hFE>400) and 10k main base resistor with 2x 22R current sensing resistors, where on test PCB I have connector to switch, so without second 22R resistor we have 7.94Vf@23mA, while when switch connects second R22 to ground there is around 8.21Vf@51mA  when  powered from 12.3Vbat :clap:


---|--||||||----|||---|||-----
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19787
  • Country: gb
  • 0999
Re: Hacking cars LEDs 12V 47R internal resistor to 100mA max current limit ...
« Reply #49 on: October 22, 2022, 09:11:47 am »
Why don't use the buck conerters? Will be much more efficient.
As simply as this circuit below  :popcorn:
Use an IC. I's much simpler. The PAM2861 is a switched mode LED regulator IC. It only requires four additional components, other than the LEDs and is over 90% efficient.
« Last Edit: October 22, 2022, 12:27:07 pm by Zero999 »
 
The following users thanked this post: szan


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf