On Tue, 29 Apr 2008 23:52:38 -0700 (PDT), zigbee@libero.it wrote:
>Hi,
>
>I'm designing a board where the microcontroller is supposed to drive
>10 red leds and 4 optocouplers.
>
>I would like to drive the leds and the opto's without a series
>resistor using the PWM technique. I made some experiments and all
>seems to work fine in the lab.
>
>1. The supply voltage is 3.3 Volt
>2. The microcontroller is an ARM7 by NXP (LPC2387)
>3. In DC, the microcontroller's GPIO ports are able to source or sink
>20 mA ( I measured that)
>4. The leds are driven with a duty cycle of 1/5. The average current
>that the leds sink is 5 mA.
>5. The light emitted by the leds in these condition (1/5 PWM) is more
>than acceptable.
>
>Based on your experience and knowledge, what do you think about this
>solution?
It sucks
>Should I sink (the N-MOS will work) or source (I P-MOS will work) the
>current?
>
>Thanks in advance for any suggestion,
>Enrico
google metal migration failure
Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
Reply by Mike Silva●April 30, 20082008-04-30
On Apr 30, 2:52=A0am, zig...@libero.it wrote:
> Hi,
>
> I'm designing a board where the microcontroller is supposed to drive
> 10 red leds and 4 optocouplers.
>
> I would like to drive the leds and the opto's without a series
> resistor using the PWM technique. I made some experiments and all
> seems to work fine in the lab.
>
> 1. The supply voltage is 3.3 Volt
> 2. The microcontroller is an ARM7 by NXP (LPC2387)
> 3. In DC, the microcontroller's GPIO ports are able to source or sink
> 20 mA ( I measured that)
> 4. The leds are driven with a duty cycle of 1/5. The average current
> that the leds sink is 5 mA.
> 5. The light emitted by the leds in these condition (1/5 PWM) is more
> than acceptable.
>
> Based on your experience and knowledge, what do you think about this
> solution?
>
> Should I sink (the N-MOS will work) or source (I P-MOS will work) the
> current?
>
> Thanks in advance for any suggestion,
> Enrico
You are forcing your ARM output pins to act as current limiting
devices, and they're not designed for that. They're spec'ed at 4mA
and you're drawing 20! Just because the chip runs cold doesn't mean
you aren't stressing the output drivers. IMO you are guaranteeing
yourself hardware failures down the road. Add the resistors.
Reply by Stephen Pelc●April 30, 20082008-04-30
On Tue, 29 Apr 2008 23:52:38 -0700 (PDT), zigbee@libero.it wrote:
>I'm designing a board where the microcontroller is supposed to drive
>10 red leds and 4 optocouplers.
>
>I would like to drive the leds and the opto's without a series
>resistor using the PWM technique. I made some experiments and all
>seems to work fine in the lab.
There are two related issues here:
1) Total GPIO output current
2) current limiting and heat dissipation
Most CPUs have a maximum current per pin, and a maximum
total current per port and chip. Driving 14 LEDs total
is likely to exceed this.
Regardless of whether you are using PWM or not, driving
the LEDs without a resistor will cause the GPIO pin to
current limit, the voltage will then not be Vcc or Vss
and there will be increased heat dissipation in the CPU.
The limiting current is not well defined.
Resistors and simple transistors are cheap, and will
improve reliability.
Stephen
--
Stephen Pelc, stephenXXX@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads
Reply by ●April 30, 20082008-04-30
On 30 Apr, 09:20, "MK" <nos...@please.com> wrote:
> <zig...@libero.it> wrote in message
>
> news:9fec5662-5499-46e6-a5ee-d36bf6079e86@k37g2000hsf.googlegroups.com...
>
>
>
> > Hi,
>
> > I'm designing a board where the microcontroller is supposed to drive
> > 10 red leds and 4 optocouplers.
>
> > I would like to drive the leds and the opto's without a series
> > resistor using the PWM technique. I made some experiments and all
> > seems to work fine in the lab.
>
> > 1. The supply voltage is 3.3 Volt
> > 2. The microcontroller is an ARM7 by NXP (LPC2387)
> > 3. In DC, the microcontroller's GPIO ports are able to source or sink
> > 20 mA ( I measured that)
> > 4. The leds are driven with a duty cycle of 1/5. The average current
> > that the leds sink is 5 mA.
> > 5. The light emitted by the leds in these condition (1/5 PWM) is more
> > than acceptable.
>
> > Based on your experience and knowledge, what do you think about this
> > solution?
>
> > Should I sink (the N-MOS will work) or source (I P-MOS will work) the
> > current?
>
> > Thanks in advance for any suggestion,
> > Enrico
>
> This is bad !
>
> My reading of the LPC2387 data sheet says that the short circuit current on
> the standard output pins is between 4 and 50mA. The output pins are not
> current sources so the actual current in your leds will vary between 4mA and
> rather less than 50mA depending on chip batch, temperature etc. If you need
> 20mA the LPC2387 can't do it reliably - use a proper LED driver (eg Texas
> TLC5923).
>
> Michael Kellett
>
> www.mkesc.co.uk
Hi Michael,
thanks for your answer.
I actually need an average current of 4 mA to turn on the leds (their
package is 0603). Duty cycle is 1/5.
All seems to work fine (in the lab) and the micro is cold.
If the peak current depends on the chip batch I might have problem in
turning on the leds. In this case I might have to enlarge the duty
cycle (let's say 2/5). I'll add a tactile push-button in order for the
user adjust the led's brightness.
Some people designs a small pcb inductor that works in conjunction
with the led parasitic capacitance to limit the peak current.
Enrico
Reply by Paul Carpenter●April 30, 20082008-04-30
"MK" <nospam@please.com> wrote in message
news:2O-dndXe2MQugIXVnZ2dnUVZ8s-qnZ2d@bt.com...
> <zigbee@libero.it> wrote in message
> news:9fec5662-5499-46e6-a5ee-d36bf6079e86@k37g2000hsf.googlegroups.com...
> > Hi,
> >
> > I'm designing a board where the microcontroller is supposed to drive
> > 10 red leds and 4 optocouplers.
> >
> > I would like to drive the leds and the opto's without a series
> > resistor using the PWM technique. I made some experiments and all
> > seems to work fine in the lab.
Under perfect conditions...
> > 1. The supply voltage is 3.3 Volt
> > 2. The microcontroller is an ARM7 by NXP (LPC2387)
> > 3. In DC, the microcontroller's GPIO ports are able to source or sink
> > 20 mA ( I measured that)
> > 4. The leds are driven with a duty cycle of 1/5. The average current
> > that the leds sink is 5 mA.
> > 5. The light emitted by the leds in these condition (1/5 PWM) is more
> > than acceptable.
> >
> > Based on your experience and knowledge, what do you think about this
> > solution?
> >
> > Should I sink (the N-MOS will work) or source (I P-MOS will work) the
> > current?
> >
> > Thanks in advance for any suggestion,
> > Enrico
> >
>
> This is bad !
>
> My reading of the LPC2387 data sheet says that the short circuit current
on
> the standard output pins is between 4 and 50mA. The output pins are not
> current sources so the actual current in your leds will vary between 4mA
and
> rather less than 50mA depending on chip batch, temperature etc. If you
need
> 20mA the LPC2387 can't do it reliably - use a proper LED driver (eg Texas
> TLC5923).
Then we have the conditions that happen in real life
System startup
Debugging software/system (bug in code or some systems single step)
Fault conditions
Under any of these conditions you could end up with one or more of these
LEDs in the ON condition permanently, with 3.3V and full current.
I wonder how long before the LEDs 'derate' permanently.
Just to save on some resistors and/or drivers, which actually means that
unless
you are doing multiplexing of display, you have added extra complexity to
the
software.
Consider the production size of the design, a few pennies on cheap
components may well save days of development in total (especially
when 'special conditions' are found to be coded round).
--
Paul Carpenter | paul@pcserviceselectronics.co.uk
<http://www.pcserviceselectronics.co.uk/> PC Services
<http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font
<http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny
<http://www.badweb.org.uk/> For those web sites you hate
Reply by MK●April 30, 20082008-04-30
<zigbee@libero.it> wrote in message
news:9fec5662-5499-46e6-a5ee-d36bf6079e86@k37g2000hsf.googlegroups.com...
> Hi,
>
> I'm designing a board where the microcontroller is supposed to drive
> 10 red leds and 4 optocouplers.
>
> I would like to drive the leds and the opto's without a series
> resistor using the PWM technique. I made some experiments and all
> seems to work fine in the lab.
>
> 1. The supply voltage is 3.3 Volt
> 2. The microcontroller is an ARM7 by NXP (LPC2387)
> 3. In DC, the microcontroller's GPIO ports are able to source or sink
> 20 mA ( I measured that)
> 4. The leds are driven with a duty cycle of 1/5. The average current
> that the leds sink is 5 mA.
> 5. The light emitted by the leds in these condition (1/5 PWM) is more
> than acceptable.
>
> Based on your experience and knowledge, what do you think about this
> solution?
>
> Should I sink (the N-MOS will work) or source (I P-MOS will work) the
> current?
>
> Thanks in advance for any suggestion,
> Enrico
>
This is bad !
My reading of the LPC2387 data sheet says that the short circuit current on
the standard output pins is between 4 and 50mA. The output pins are not
current sources so the actual current in your leds will vary between 4mA and
rather less than 50mA depending on chip batch, temperature etc. If you need
20mA the LPC2387 can't do it reliably - use a proper LED driver (eg Texas
TLC5923).
Michael Kellett
www.mkesc.co.uk
Reply by ●April 30, 20082008-04-30
Hi,
I'm designing a board where the microcontroller is supposed to drive
10 red leds and 4 optocouplers.
I would like to drive the leds and the opto's without a series
resistor using the PWM technique. I made some experiments and all
seems to work fine in the lab.
1. The supply voltage is 3.3 Volt
2. The microcontroller is an ARM7 by NXP (LPC2387)
3. In DC, the microcontroller's GPIO ports are able to source or sink
20 mA ( I measured that)
4. The leds are driven with a duty cycle of 1/5. The average current
that the leds sink is 5 mA.
5. The light emitted by the leds in these condition (1/5 PWM) is more
than acceptable.
Based on your experience and knowledge, what do you think about this
solution?
Should I sink (the N-MOS will work) or source (I P-MOS will work) the
current?
Thanks in advance for any suggestion,
Enrico