gnupic: Re: [gnupic] sanity check, pic12f675 first project


Previous by date: 22 Jul 2009 19:27:59 -0000 Re: [gnupic] LED constant current vs PWM, Peter Stuge
Next by date: 22 Jul 2009 19:27:59 -0000 Re: [gnupic] sanity check, pic12f675 first project, Jason
Previous in thread: 22 Jul 2009 19:27:59 -0000 Re: [gnupic] sanity check, pic12f675 first project, Mark Rages
Next in thread: 22 Jul 2009 19:27:59 -0000 Re: [gnupic] sanity check, pic12f675 first project, Jason

Subject: Re: [gnupic] sanity check, pic12f675 first project
From: Jason ####@####.####
Date: 22 Jul 2009 19:27:59 -0000
Message-Id: <4A6767EA.7040701@lakedaemon.net>

Mark,

Mark Rages wrote:
> On Wed, Jul 22, 2009 at 10:13 AM, ####@####.#### wrote:
[snip]
>> I may still use the transistor if the recommended current can't be
>> sourced/sinked by the 12F675...  I'll just adjust the R values to get a
>> steady current at the recommended amperage for the LED.
> 
> Well, that circuit expects currents of 1A, but averages of 40mA (?).
> So the duty cycle will be 4%.
> 
> So the part needs to be rated at a pulsed current of 1A.   Then
> dissipation can be checked separately.
> 
> So, looking on digi-key, how about a Diodes Inc DMN2004?   Looks like
> 0.45 ohm "on" resistance when driven from 5V.  0.45ohm * 1amp * 1amp =
> 0.45 watts.  0.45 watts * 4% is 18 mW average dissipation.   On a PCB,
> thermal resistance is 625C/W.  So the temperature will rise to 11C
> over ambient.  No problem, unless you're using it in an oven or
> something.
> 

And there's a practical gem you won't find in a textbook.  :-)  Thanks
for suggestion.

> Of course, when you're writing the software to control it, you need to
> limit the current with bigger LED resistors, or your first software
> bug is going to leave it turned on and let the smoke out...
> 

I've been told it's really hard to put that back in...

>>>> Better match the supply voltage to the forward voltage of your LEDs,
>>>> then there's no extra voltage that needs to be dropped by other
>>>> components.
>>> The resistor is doing more than dropping voltage.  It is acting as a
>>> crude current source, to maintain the LED current as the forward
>>> voltage shifts over temperature, age, manufacturing tolerances etc.
>>> So no matter how carefully you select the supply voltage, you can't
>>> remove the resistor without some other means of regulating current.
>>
>> Ok, my EE degree is getting old, maybe I'm missing something.  If I have
>> a LED (say, 2V fwd voltage) and a resistor in series with a 3V battery,
>> the voltage drop across the resistor is going to be 1V, which would give
>> it a value of 50ohm for 20mA.
>>
>> Assuming that's all correct, if the forward voltage falters over time,
>> say to 1.5V, the drop across the resistor changes also, to 1.5V.  This
>> would change the current to 30mA...
>>
>> Also, as temperature changes, I don't think the resistor would
>> compensate in any way for changes in the forward voltage across the LED.
>>
>> If memory serves, an LED drops voltage, but has no (or little) internal
>> resistance.  So when hooked directly to a battery, the current surges
>> until the LED blows or the battery is drained.  I think it would be more
>> accurate to say the resistors are "current limiting resistors", but they
>> don't help with temperature fluctuations, or aging (except premature
>> aging ;-) ).
>>
> 
> OK, consider an LED (2V forward voltage) in series with a 30V battery.
>  The voltage drop across a resistor is 28V, which would give the
> resistor a value of 1400 ohms.  So if the LED's forward voltage
> changes because of temperature or age to 1.5V, the new current is
> 28.5/1400 or 20.3 mA.
> 

Ahh... good point, unfortunately in my case, the end project is going to
run off of a 3V coin battery.

> Remember, a good current source has a high impedance.  So a 50 ohm
> resistor makes a pretty crude current source, but the principle is the
> same.  (You can have both low dissipation and accurate current setting
> with an active current source.)
> 
>> So, if a PIC can sink 20mA on it's own, then an LED and a resistor
>> should be all I need.  The transistor is only needed if I'm sinking
>> multiple LEDs controlled by one pin.  Neat.
> 
> Yes, the PIC can supply plenty for an LED.   But read my post here:
> http://tinyurl.com/lgzb4j
> 

Interesting.  For the first cut, I'll probably just tie the LED/resistor
to a pin, but after that, I'll look at the mosfet you mentioned above.

thx,

Jason.

Previous by date: 22 Jul 2009 19:27:59 -0000 Re: [gnupic] LED constant current vs PWM, Peter Stuge
Next by date: 22 Jul 2009 19:27:59 -0000 Re: [gnupic] sanity check, pic12f675 first project, Jason
Previous in thread: 22 Jul 2009 19:27:59 -0000 Re: [gnupic] sanity check, pic12f675 first project, Mark Rages
Next in thread: 22 Jul 2009 19:27:59 -0000 Re: [gnupic] sanity check, pic12f675 first project, Jason


Powered by ezmlm-browse 0.20.