Driving a led without a series resistor (PWM technique)

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)
  1. The leds are driven with a duty cycle of 1/5. The average current that the leds sink is 5 mA.
  2. 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

Reply to
zigbee
Loading thread data ...

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

formatting link

Reply to
MK

Under perfect conditions...

on

and

need

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 | snipped-for-privacy@pcserviceselectronics.co.uk PC Services Timing Diagram Font GNU H8 - compiler & Renesas H8/H8S/H8 Tiny For those web sites you hate

Reply to
Paul Carpenter

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 to
zigbee

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
 Click to see the full signature
Reply to
Stephen Pelc

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 to
Mike Silva

It sucks

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
 Click to see the full signature
Reply to
Spehro Pefhany

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.