Shop OBEX P1 Docs P2 Docs Learn Events
LEd matrix without resistors — Parallax Forums

LEd matrix without resistors

tpw_mantpw_man Posts: 276
edited 2008-12-10 17:38 in Propeller 1
Is it okay to use an LED matrix without resistors on the Propeller? It makes the LEDs much brighter and doesn't seem to kill them. It does seem to kill propellers though... I was trying it out on one of my boards, and after shorting over the resistors for a couple minutes, and now the propeller reboots after about 5 seconds of drawing current to power the LED matrix on those pins. Did I draw too much current from the pins? Is there a better resistor value to use? I am using 470 ohm resistors, since it was originally designed for a BS2, and 5 volts.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I am 1011, so be surprised!


Advertisement sponsored by dfletch:
Come and join us on the Propeller IRC channel for fast and easy help!
Channel: #propeller
Server: irc.freenode.net or freenode.net
If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-12-10 00:29
    Yes, you must use series resistors to limit the LED current. Omitting them will shorten the lives of both the LEDs and the Propeller — as you've apparently already discovered.

    To determine the correct resistor value, look at the LED's datasheet. In it there will be a graph of forward voltage versus forward current. Select the current value that you want to use — 10mA is usually a good starting point — and find the corresponding forward voltage from the graph. Your choice of resistor is then determined from the following equation:

    ····R = (3.3 - VF) / IF

    where VF and IF are the forward voltage and forward current, respectively.

    If you're lighting a large matrix, you must also be sure to limit the total current to within the Propeller's specs.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Just a few PropSTICK Kit bare PCBs left!

    Post Edited (Phil Pilgrim (PhiPi)) : 12/10/2008 12:34:22 AM GMT
  • RaymanRayman Posts: 14,364
    edited 2008-12-10 00:47
    A while ago Clemens posted a nice array without resistors... I said it was brave to leave them out, but DeSilva said there was no cause for concern... I'm still not exactly clear on why he said that...
  • RaymanRayman Posts: 14,364
    edited 2008-12-10 00:53
    PS:· I was contemplating a massive array for XMas, but my wife shot it down...

    Anyway, a maybe safer way to extend an array to an (almost) unlimited number of LED is using a serial LED driver like this one:

    http://www.allegromicro.com/en/Products/Part_Numbers/6278/6278.pdf

    <$2 from digikey and drives 8 LEDs with just one resistor...· They can be daisy chained ad nauseum...
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-12-10 03:03
    According to your findings, it doesn't sound like it's safe... Besides, if you think about it, the propeller is at 3.3V, the LED drops probably 1.7V, that means that you have 1.6V applied with the only resistance of what is in the LED... Ohm's law says no no.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-10 03:18
    The Propeller's I/O pin circuitry is rated for 40ma with other limits for overall current demand for the Vss and Vdd supply lines. There has been some testing and it seems that the I/O pins will withstand a direct short (to Vss or Vdd) for some period of time without apparent damage. There's no guarantee that goes with this testing and the "official" 40mA limit still applies, but this testing on shorts gives some assurance that the I/O pin circuitry design is robust and tolerant of some abuse.
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-12-10 03:22
    Hmmmm, I'm sure you're right, Mike, but I read somewhere that the limit was 30mA? I believe this was changed later somewhere...
  • Scott LewisScott Lewis Posts: 18
    edited 2008-12-10 05:39
    if you have like a 1 ohm wire connecting like 100 LEDs all in parallell, it is the same for each LED as having a 100 ohm resistor to each LED. but all the current still has to come from somewhere... there has to be like 3 amps. You can have a darlington power BJT or just a power MOSFET and have the propeller connected to the base/gate
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-12-10 07:43
    hello tpw_man,

    the propeller can take 100mA on 8 IOs the whole chip 300mA

    I recommend for everything that takes more current than 10 mA per IO-Pin use transistors or MOSFETs to switch it on/off

    for medium-currents you can use a transistor-array like the ULN2803

    Currentcalculation

    ONE standard LED (current 20mA)

    at 5V supply (5V - 1,7V) / 0,02 A = 165 ohm
    at 3,3V supply (3,3V - 1,7V) / 0,02 A = 80 ohm

    there are low-current LEDs with 2mA
    then it is
    (3,3V - 1,7V) / 0,002 A = 800 ohm !!

    in general: resistor = (Supply-Voltage - LED-voltage) / LED-current

    you use a LED-ARRAY
    if the LEDs are connected parallel the current multiplies with the number of LEDs
    if the LEDs are connected serial the voltage multiplies with the number of LEDs

    best regards

    Stefan
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-10 17:38
    High instantaneous current will also damage the I/O pins even if the average current is within spec. The conductors on a chip are small and quite thin and the metal will actually migrate over time and cause breaks in the on-chip wiring if the peak current is high enough.
Sign In or Register to comment.