"Perfect" LED current limiting challenge

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Gadgets
Posts: 5
Joined: Sat Feb 04, 2006 1:01 am
Location: Ontario, Canada
Contact:

Re: "Perfect" LED current limiting challenge

Post by Gadgets »

Originally posted by Chris Smith:


And we still love canucks, they are soo funny!
I'm so glad, cause you know, as Canadians... we LOVE EVERYBODY cause that's just the way we are damn it!! ....eh? :D
rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: "Perfect" LED current limiting challenge

Post by rshayes »

Ian:

If you look at the application note that MrAl referred to (http://ww1.microchip.com/downloads/en/a ... 00874b.pdf) you will see that even Microchip (who manufactures the PIC) does not use the digital PWM arrangement to control the LED current. The control loop for the LED current uses an analog comparator which just happens to be part of the PIC.

As far as the LED is concerned, the PIC can be replaced by an analog comparator and a potentiometer to vary the set point of the current control circuit.

The PWM operates by counting 16 MHz clock pulses. At 62.5 KHz, there are 256 pulses per cycle. The resolution of the PWM would be 23 millivolts with a 6 volt supply. The series resistance in the diode circuit will probably dominate the exponential diode characteristic. I would expect this resistance to be unpredictable, but probably between 10 and 30 ohms. A 10 ohm resistance would result in a change of 2.3 milliamps for each step of the counter. This does not even consider the complication caused by the time delay in the digital processing.

The PIC in this application filtered the PWM output to derive an analog signal which serves as the set point for an analog LED controller. There may be a lesson here.
User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: "Perfect" LED current limiting challenge

Post by Chris Smith »

Gadgets

Wasnt Cheech or Chong Canadian?

They are soo funny I named my two border collie pups after them.

I laugh ever day of the week watching these two and their antics.

I havent figured out if Ian is brighter Cheech, or Just the slower Chong?
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: "Perfect" LED current limiting challenge

Post by MrAl »

Hello again,


For this project I assumed the following:

1. Use a PIC to control LED brightness as cell V drops
2. Get efficiency as high as possible
3. LED is a small 3.5v, 20ma type

I also assumed that this was a general lighting
project and NOT a photometric type application
because Ian never mentioned just how perfect
the light output from the LED had to be. I would
think that if it was that important it would
have been mentioned very early on.

Do we really need to know anything else in
order to come up with some circuits/ideas?

Thanks for the comical replies too that help to
lighten up the mood here :-)


Take care,
Al
LEDs vs Bulbs, LEDs are winning.
Gorgon
Posts: 325
Joined: Wed May 04, 2005 1:01 am
Location: Norway
Contact:

Re: "Perfect" LED current limiting challenge

Post by Gorgon »

Hi Al,
I think this might be an issue:

4. How to protect the PIC from brownout when cell V drops? I suppose the PIC is powered from the same cell?

TOK ;)
Gorgon the Caretaker - Character in a childrens TV-show from 1968. ;)
ian
Posts: 251
Joined: Mon Feb 25, 2002 1:01 am
Location: toronto
Contact:

Re: "Perfect" LED current limiting challenge

Post by ian »

stephen....... yes, but as I was saying, the complication became more than was warranted for the savings. More LEDs, using red Leds, 9V battery, almost any change in parameters would make the complication worthwhile. Unfortunately, I have since narrowed my project to 4 dry cells and a white Led. However, I'm glad to have worked this out, it could be useful for other applications.

MrAL, your comments have been, and are pertinent to my application and thoughts on the project.

To others........ I clearly stated my application. It was to efficiently drive a lED from a battery. If you can't figure that out, or need to know 'where' the Led would be, or 'what' it would shine on, or whatever else your confused mind would need to know before suggesting a design let me tell you this. I think if you "need" that info then I think you must still be confused about what I wanted and probably can't help me due to your confusion.
L. Daniel Rosa
Posts: 400
Joined: Tue Dec 25, 2001 1:01 am
Location: Bellingham, WA
Contact:

Re: "Perfect" LED current limiting challenge

Post by L. Daniel Rosa »

As for protecting the LED from burnout due to "runaway code", have you considered capacitively coupling the PWM signal to the transistor?
User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: "Perfect" LED current limiting challenge

Post by Chris Smith »

Ian, you Still haven’t beat my 99.9% so who is still confused?

And mine is 100% reliable when it fails. It turns off.

Reinventing the wheel only comes up with loss after loss, and components that aren’t even needed.

That, or until your next revision explains that away at least?

But you wont?

So fitting into your lack of paramaters, you still have to top 99.9%, while 100% is also possible. Just match the vLed to the battery.
Gadgets
Posts: 5
Joined: Sat Feb 04, 2006 1:01 am
Location: Ontario, Canada
Contact:

Re: "Perfect" LED current limiting challenge

Post by Gadgets »

Originally posted by Chris Smith:
Gadgets

Wasnt Cheech or Chong Canadian?
Yup, Tommy Chong was from Alberta.
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: "Perfect" LED current limiting challenge

Post by MrAl »

Hi again,

Gorgon:

Brownout? I assumed that was what the PIC
microcontroller was suppose to be doing (?)
The PIC is supposed to read some external param
(like LED voltage for example) and force a longer
pulse width to the LED to compensate for a drop
in voltage. Of course as with any kind of controller
once the battery voltage gets down to some limit
point (maybe 3.5v) the circuit will no longer
function properly, but this is to be expected...
if that's not acceptable then of course another
circuit has to be considered.

I hope this is what you were talking about :)


Take care,
Al
LEDs vs Bulbs, LEDs are winning.
Gorgon
Posts: 325
Joined: Wed May 04, 2005 1:01 am
Location: Norway
Contact:

Re: "Perfect" LED current limiting challenge

Post by Gorgon »

Hi Al,
Yes, this was my concern. I know the PIC's are protected against brownout, but when it happens the functionality of the circuit must be designed for this, both regarding the battery load/ overload and the return to a safe state for the driver electronics, when this happens.
I think one of the main points stated by Ian was to drain the batteries to a much lower level than normal, to increase the total efficiency of the circuit.


TOK ;)
Gorgon the Caretaker - Character in a childrens TV-show from 1968. ;)
ian
Posts: 251
Joined: Mon Feb 25, 2002 1:01 am
Location: toronto
Contact:

Re: "Perfect" LED current limiting challenge

Post by ian »

Right, this goes way back to my first post. I origionally wanted to control the maximum current through the LED by using the hfe of the transistor. If I used a rather large resistor into the base of the drive transistor, the maximum current through the LED would be the resistor current X hfe. If the max current through the transistor were carefully controlled to limit the current to 30 or 40 mA, then the circuit would work normally at 20mA. But if a brownout ocurred and the transistor was turned on all the time the max I would be 40mA.

I believe stephen also suggested a circuit which would limit the current without interfering with inductive pulsing. But that circuit required a .5V drop into the base of another transistor to crowbar the drive transistor.
User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: "Perfect" LED current limiting challenge

Post by Chris Smith »

Gadgets
Yup, I read about that yesterday on the web, while Cheech was "Born in East LA"!

My pup chong is slower than cheech, but much cuter and cuddly! Cheech is my wiley coyote. Way too smart.
User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: "Perfect" LED current limiting challenge

Post by Chris Smith »

My conclusion is That Ian’s design of using a Pic for a Led controller is 100% efficient at wasting power, human resources, and human intellect for no valid reason.

At best it only lowers the over all current efficiency by a minimum of 16 % [ a loss] over the standard configuration of a battery directly driving a Led using the proper voltage with no active or passive components.

And, leaving out all the passive and active parts saves money, time, and construction costs.

Ian’s design repeatedly has shown it to be a waste of purchasing parts unneeded and unrequired, as well as it is a crime against all “Pics” to be used for anything less than their complete potential, and it is a waste of intellect to solve anything NOT elusive such as 100% efficiency from a led, especially with such fervor for failure and pretense.

Ian has shown us that “reinventing the wheel” is a total waste of time, parts, money, and hyper space ink.

Can we move on now to serious Electronics? Or perhaps dog grooming, or cat fish diseases?
rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: "Perfect" LED current limiting challenge

Post by rshayes »

Ian:

Using the hfe of a transistor won't work very well as a method of limiting current. There are two reasons for this.

First, the hfe of the transistor is not predictable. A typical range for a given transistor type is typical 3 to 1. For example, hfe specified as being between 100 and 300. Many types specify a minimum hfe, with no specified upper limit. If the base drive is chosen to give a 20 milliamp current for a device with an hfe of 100, a device with an hfe of 300 would allow 60 milliamps of current to flow.

Second, the hfe of the transistor is not stable. It is a fairly strong function of junction temperature, usually increasing as the temperature increases. Even if the circuit was adjusted to limit the current to 20 milliamps at one temperature, a higher temperature would probably result in a higher current limit.

Hobby circuits of the 1950s sometimes used a fixed current bias. These circuits usually had a note telling you to adjust a certain resistor to set the transistor operating point for the transistor that was actually in the circuit. This type of circuit was not used even in hobby circuits past about 1960.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 61 guests