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


Previous by date: 22 Jul 2009 17:43:16 -0000 Re: [gnupic] sanity check, pic12f675 first project, Peter Stuge
Next by date: 22 Jul 2009 17:43:16 -0000 Re: [gnupic] sanity check, pic12f675 first project, Peter Stuge
Previous in thread: 22 Jul 2009 17:43:16 -0000 Re: [gnupic] sanity check, pic12f675 first project, Peter Stuge
Next in thread: 22 Jul 2009 17:43:16 -0000 Re: [gnupic] sanity check, pic12f675 first project, Peter Stuge

Subject: Re: [gnupic] sanity check, pic12f675 first project
From: Mark Rages ####@####.####
Date: 22 Jul 2009 17:43:16 -0000
Message-Id: <74ee72ca0907221043o59cb8756u9e41988752d49e7@mail.gmail.com>

On Wed, Jul 22, 2009 at 10:13 AM, ####@####.#### wrote:
> Mark,
>
> Mark Rages wrote:
>> On Tue, Jul 21, 2009 at 9:04 PM, Peter ####@####.#### wrote:
>>> Jason wrote:
>>>> Nice.  I found a circuit a while back [1] for increasing the LED
>>>> brightness by pulsing it.  I thought I'd replace the 555 timer with
>>>> a more flexible pic...
>>
>> I don't think you'll find a significant brightness increase with modern LEDs:
>>
>> http://members.misty.com/don/ledp.html
>>
>
> Good read.  Thanks for the pointer.
>
>>> Aha. Watch out with the voltage though - that circuit will make those
>>> R2-R3 resistors sweat a bit, and the Q1 transistor will also be a bit
>>> stressed.
>>
>> R2 and R3 have the same low duty cycle as the LEDs.
>>
>> If the LED current is really 500 mA each, that exceeds the design
>> rating of the BC547B by about 10X (Abs max Ic is 100 mA for that
>> part).  Better to use a logic-level FET for this application I think.
>>
>
> Is there a "typical" FET I could try?  Regardless, your link, above,
> spells out the pointlessness of the circuit in this case.
>
> 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.

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...



>
>>> 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.

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

>
> Now on to the programming bit. :-)
>
>
> thx,
>
> Jason.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>
>



-- 
Mark Rages, Engineer
Midwest Telecine LLC
####@####.####

Previous by date: 22 Jul 2009 17:43:16 -0000 Re: [gnupic] sanity check, pic12f675 first project, Peter Stuge
Next by date: 22 Jul 2009 17:43:16 -0000 Re: [gnupic] sanity check, pic12f675 first project, Peter Stuge
Previous in thread: 22 Jul 2009 17:43:16 -0000 Re: [gnupic] sanity check, pic12f675 first project, Peter Stuge
Next in thread: 22 Jul 2009 17:43:16 -0000 Re: [gnupic] sanity check, pic12f675 first project, Peter Stuge


Powered by ezmlm-browse 0.20.