Shop OBEX P1 Docs P2 Docs Learn Events
Is is safe to light 16 SMT 0805 LEDs from 16 pins on an SX-28 Through 300 Ohm r — Parallax Forums

Is is safe to light 16 SMT 0805 LEDs from 16 pins on an SX-28 Through 300 Ohm r

SailerManSailerMan Posts: 337
edited 2007-12-25 22:00 in General Discussion
The Subject line is the Question. [noparse]:)[/noparse]

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-13 20:29
    You've got to do the math. It has nothing to do with the physical size of the LEDs. How much does each LED draw through the 300 ohm resistor? Multiply by 16. What does the SX-28 datasheet say about the total current drain allowed for each I/O pin, each I/O port, and the total current drawn by the whole SX-28? Does the total current drawn by the LEDs exceed what the datasheet says?

    Note that the current through the LED depends partly on the type of LED (red / green / blue / white / high-intensity) because each one has a different forward voltage and that goes into the formula.

    Voltage drop across resistor = Total supply voltage - voltage drop at I/O pin - forward voltage of LED

    The (supply voltage - voltage drop at I/O pin) is usually given as Voh and is sometimes current dependent.

    The forward voltage of the LED is given on the LED datasheet and is also a bit current dependent.

    Post Edited (Mike Green) : 12/13/2007 8:35:48 PM GMT
  • SailerManSailerMan Posts: 337
    edited 2007-12-14 12:59
    So if the forward voltage of the LED is 2.6v through a 300 Ohm Resistor = 8.6mA and the SX pins can sink and source 47mA I should be in good shape. Is it as simple as that?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-14 15:45
    It's not quite that simple. As I mentioned before, the individual SX pins have their current limit, but there's also an overall current limit for groups of about 12 I/O pins (between Vdd pins) and an overall limit for the whole device (total Vdd current). Your calculation was correct for one LED. If you're going to use all 16 at the same time, that's about 140 mA total which is just OK. The total current for I/O pins between sets of Vdd pins is about 45 mA and you can easily exceed that unless you limit the number of LEDs to 5 for each group between Vdd pins.
    Look at the pinout diagram on the datasheet for which I/O pins go where.
  • pjvpjv Posts: 1,903
    edited 2007-12-14 17:55
    Hello Sailer;

    Actually, your calculation was incorrect. You arrived at 8.6 mA by dividing the LED forward voltage drop by the 300 ohm resistance, when in fact you should have calculated according to Mike's instructions.... 5Volts minus the LED forward drop to get the voltage accross the resistor, and divide that by the 300 ohms to get the current through the resistor. Hence, (5 - 2.6) / 300 = 8 mA.

    The resulting value happens to be close to your value in this instance, but your approach was wrong.

    That said, while any I/O pin can easily handle the 8 mA LED load, the SX power pin (if you were sourcing the power) or the SX ground pin (if you were sinking the power) will be sweating a bit with a current of 16 times 8 mA = 128 mA on top of the current consumed by the processor's silicon itself.

    At low oscillator speeds, you can probably get away with it, although I would not reccommend it for a real application. Why not just give it a try, after all, an SX running at 75 MHz will consume about 100 ma, so we know the chip's power lines are able to deal with those levels of current. A prototype board is not that costly, hence your risk is very low. My bet is that it will work with no adverse effects. Turn it on, and keep a finger on the chip to monitor the temperature.

    For sure it will work if you reduce the current somewhat by using 470 ohm resistors, yielding LED currents of (5 - 2.6) / 470 = 5 mA

    Cheers,

    Peter (pjv)
  • ChrisPChrisP Posts: 136
    edited 2007-12-25 22:00
    Of course, you could build the circuit so 8 are sourcing and 8 are sinking thereby splitting the load across the two sides of the power buss equally which shouldnt give you a problem at a reasonable 20 mhz anyway, then you also have the option of running the SX at lower voltage.... 3.3 volts to decrease the current draw....
Sign In or Register to comment.