Shop OBEX P1 Docs P2 Docs Learn Events
Is 100 mA limit on 8 Prop pins for real? — Parallax Forums

Is 100 mA limit on 8 Prop pins for real?

RaymanRayman Posts: 15,375
edited 2009-11-07 23:40 in Propeller 1
Just looking at the datasheet and manual to see how many LEDs I can drive and the same time, and was a little dissappointed...

Datasheet says 300 mA total.· That's not so bad, except that I want to overdrive ~8 LEDs at a time to 60 to 100 mA...

What's worse is the manual says 100 mA total per group of 8 pins.· That means you can't even drive 8 LEDs at full 20 mA current, without worring about what group their in...

But, I'm pretty sure I've seen people drive 8 LEDs...

Are these·limits for real?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
«1

Comments

  • doggiedocdoggiedoc Posts: 2,246
    edited 2009-11-01 18:07
    I bumped into this limit this past week working with some full color LEDs. I was trying to cycle 7 of them through the range of colors so that the group made a color wave. It didn't occur to me that I'd hit the current limit, but I did. 1k resistors help but at the cost of brightness.

    I suppose I could drive them with a transistor but with the RGB LEDs that means 3 transistors per LED - so the component count makes it harder to breadboard.

    You mentioned per group of 8 pins. I need to pull out the datasheet and rearrange the pins I'm using to see if that will help.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are only 10 types of people in the world, those that understand binary and those that don't.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-11-01 18:07
    Without knowing the rules (having missed that in the datasheet; ignorance is sometimes wonderful),
    I've had no issues driving multiple LED segments along with LEDs on the Propeller Protoboard.

    Haven't murdered a Propeller yet..

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • hover1hover1 Posts: 1,929
    edited 2009-11-01 18:11
    Maybe Charliplexing? Have not tried it yet.

    ·http://forums.parallax.com/showthread.php?p=667572

    Jim
  • doggiedocdoggiedoc Posts: 2,246
    edited 2009-11-01 19:06
    Well spreading the LEDs out over 4 groups of 8 pins didn't help. Perhaps I am mistaken.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are only 10 types of people in the world, those that understand binary and those that don't.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-11-01 19:34
    Those specs I think are for continuously on.· If you're PWMing, given a reasonably quick rep_rate,·then I'd figure there's some leeway.
  • hover1hover1 Posts: 1,929
    edited 2009-11-01 20:16
    This was the Charlieplexing post I was looking for before:

    ·http://forums.parallax.com/showthread.php?p=696682

    Jim
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-11-01 20:28
    Hover1,

    Thanks! I was just last week trying to remember where I saw the code for Charlieplexing...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-11-01 20:32
    Take pity on the poor beast, and use external drivers. I have always found it so tricky to rewire the fused internals, and now the eyesights gone.

    I had the same question, but the other way around, if it is ok to stress the input diodes to 0.5mA or so then is it permissable to stress them all to the limit together. But then I am somebody that run them overclocked and up at 4.2 Volts sometimes. Parallax has given us a very resilient toy.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • hover1hover1 Posts: 1,929
    edited 2009-11-01 22:04
    As PJ says, there is something to be said for PWM.

    I did a project a few weeks ago that I had to a "wave" of 5 rows of LED's. I had 28 LED's on 5 Pins of the Prop through 220 ohm resistor packs. On two of the pins I have 9 LED's connected. I used the pwm_x8.spin object. I used these supebright LED's:

    http://www.superbrightleds.com/specs/y3230_specs.htm

    I had to get it ready in 1 day, so I couldn't get any external drivers for the opening night. I fully expected to have to go back and replace the Prop and circuitry, but after 6 weeks it's still running fine.
  • yarisboyyarisboy Posts: 245
    edited 2009-11-01 23:45
    On the BS2 I broke my LED current budget. Instead of transistors I used quad pack op amps to drive high intensity LEDs. Be sure to bump up the trace size feeding the op amps. If you don't, you may run out of power on long branched traces. See tachometer under finished projects/industrial.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    MOORE'S LAW: The capabilities of electronics shall double every 18 months.
    cloyd's corollary: Hardware is easy, software is hard.
  • dMajodMajo Posts: 860
    edited 2009-11-02 08:56
    @Rayman

    the only limits I am aware of are the 300mA total (chip) max current drain on vdd/vss and the 40 mA (sink/source) per IO pin. From where the 100 mA?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
  • RaymanRayman Posts: 15,375
    edited 2009-11-02 10:46
    Manual P.15:

    Pin Descriptions
    Table 1-1: Pin Descriptions
    Pin Name Direction Description
    P0 – P31 I/O
    General purpose I/O Port A. Can source/sink 30 mA each at 3.3 VDC. Do
    not exceed 100 mA source/sink total across any group of I/O pins at once.
    Logic threshold is ≈ ½ VDD; 1.65 VDC @ 3.3 VDC.
    The pins shown below have a special purpose upon power-up/reset but are
    general purpose I/O afterwards.
    P28 - I2C SCL connection to optional, external EEPROM.
    P29 - I2C SDA connection to optional, external EEPROM.
    P30 - Serial Tx to host.
    P31 - Serial Rx from host.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-02 14:05
    The Propeller Manual was written first, then the Datasheet was written as the definitive documentation for the chip and the Datasheet only mentions the overall current limit and the per I/O limit. The statement in the Manual may be a leftover from the SX documentation, particularly since the Propeller's I/O pins are not divided up into groups the way the I/O ports on the SX (and PICs) are. Still, high output currents can cause voltage shifts across the chip due to resistance in the on-chip conductors and, the higher the current, the more careful you'd have to be with bypass capacitors and low impedance power wiring to the chip's power pins let along tighter power supply regulation.
  • BigFootBigFoot Posts: 259
    edited 2009-11-02 16:59
    Surface mount transistors are small & cheep, what are you guys waiting for ? We pay about $0.0429
    for the 2N3904's from Digi-Key in 100's.

    It is not a good idea to drive allot of current out of any processor. I guess it is ok for a hobby project
    but if you are planning on selling thousands of propeller processor boards. forget it.

    Russ
  • dMajodMajo Posts: 860
    edited 2009-11-02 20:28
    Rayman said...
    Manual P.15:

    Pin Descriptions
    Table 1-1: Pin Descriptions
    Pin Name Direction Description
    P0 – P31 I/O
    General purpose I/O Port A. Can source/sink 30 mA each at 3.3 VDC. Do
    not exceed 100 mA source/sink total across any group of I/O pins at once.
    Logic threshold is ≈ ½ VDD; 1.65 VDC @ 3.3 VDC.
    The pins shown below have a special purpose upon power-up/reset but are
    general purpose I/O afterwards.
    P28 - I2C SCL connection to optional, external EEPROM.
    P29 - I2C SDA connection to optional, external EEPROM.
    P30 - Serial Tx to host.
    P31 - Serial Rx from host.

    @Rayman: it's time to upgrade your manual. You are using the first release. Both the datasheet (V1.2) and the manual (V1.1) states 40mA as max io current and 300mA as max supply current. None of them has written nothing about the 100mA max group current (this was only in the old manual v1.01).

    Perhaps the first revision was more conservative because Parallax was missing some tests/characterizations

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
  • RaymanRayman Posts: 15,375
    edited 2009-11-02 20:58
    You're right... They did remove that limitation in the new manual...

    I'm going to try and sink 100 mA on 8 pins for 800 mA total and see what happens...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • dMajodMajo Posts: 860
    edited 2009-11-03 13:40
    Rayman said...
    You're right... They did remove that limitation in the new manual...
    I'm going to try and sink 100 mA on 8 pins for 800 mA total and see what happens...
    STOP IMMEDIATELY: you have still the 300mA max current limit on the power supply lines. You can sink up to max 40 mA per IO but the total current consumption (including the prop own) should not exceed the 300mA limit.



    Some considerations can apply here:
    [img]http://forums.parallax.com/attachment.php?attachmentid=73935[/img]
    
    
    • From current consumption graph (datasheet V1.2 Ch.9.1) we now that @80MHz 8 cogs running spin (so accessing hub - most of the hardware powered) consume 80mA. Still 220 mA are available to both the Vss and Vdd
    • Now the only current flowing into vdd and out from vss at the same time is the prop internal current consumption. When the output sink current it is flowing into the output and out from Vss, when output source current it is flowing into Vdd and out from the output
    • Does it means that·we can have at the same time 11 outputs sinking 20mA and 11 outputs sourcing 20mA ??? So 20mA on 22 outputs?

    Answer: YES. You must pay attention on how you distribute the current arround the IOs and understand the difference between sink (eg. P1 led wired to vcc - ON on 0) and source (eg. P2 led wired to gnd - ON on 1)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
    681 x 160 - 4K
  • RaymanRayman Posts: 15,375
    edited 2009-11-03 20:05
    Sorry, can't stop! [noparse]:)[/noparse]

    It's worth $7 to see if I can simplify the design...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Clock LoopClock Loop Posts: 2,069
    edited 2009-11-03 20:46
    Rayman said...
    Sorry, can't stop! [noparse]:)[/noparse]

    It's worth $7 to see if I can simplify the design...

    At least put a heat sink on it, and try to alternate the turn on so that only 4 I/O are on at a time.
  • dbpagedbpage Posts: 217
    edited 2009-11-03 21:19
    For higher power applications, I like to use the ULN2803A Darlington Array

    (http://www.parallax.com/Store/Components/IntegratedCircuits/InterfacingChips/tabid/613/CategoryID/78/List/0/SortField/0/Level/a/ProductID/211/Default.aspx)

    and a separate power supply.· For lots of outputs, I use the DC-16 Output Expander from ESX-TEK (http://efx-tek.com/topics/dc-16.html).





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dennis B. Page
  • RaymanRayman Posts: 15,375
    edited 2009-11-03 21:46
    Yep, the ULN2803A is my current fall-back plan...

    This thing has a lot of LEDs...· 64 each of RGB...· Ideally, I'd like to drive each at their continuous limit of 20 mA.· But, is about 4 A total, so probably won't do that...·

    Instead, want to drive each at their pulsed limit of ~100 mA at 1/8 duty cycle.· That's only 12 mA, but not too bad.· But, even I don't think it's a good idea to drive 24 pins at 100 mA.· So, I'll do it in groups of 3 for 1/24 duty cycle.· This sacrafices brightness a lot, but keeps to total current to more easily manageable levels...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    Post Edited (Rayman) : 11/3/2009 9:54:55 PM GMT
  • BigFootBigFoot Posts: 259
    edited 2009-11-04 02:12
    You might be able to find a small water cooled heat sink for the propeller chip. Then all you would need is a big
    pump and a radiator to cool the water.

    Russ
  • dMajodMajo Posts: 860
    edited 2009-11-06 17:25
    @Rayman
    If the leds are rgb they are probably common anode/cathode. Try, if you can, to have both of them: common anode and common cathode. Doing this way you can load equally the vdd and vss pins

    PEdit: corrected some spelling (PhiPi: this is your job ... did you forget?)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search

    Post Edited (dMajo) : 11/6/2009 5:51:10 PM GMT
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-11-06 19:53
    At least try to keep the input voltage to the Prop below 9 Volts. They get all "huffy" and won't talk to you again.

    Yes it did get hot, yes the EEPROM came out, in solidarity, with it. Yes Farnell had no replacements.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • fullspecengfullspeceng Posts: 76
    edited 2009-11-06 23:59
    I bought some low power leds from Digikey that use 2mA each.

    Check them out.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-11-07 04:53
    Rayman said...
    want to drive each at their pulsed limit of ~100 mA at 1/8 duty cycle.· That's only 12 mA...
    I'm sorry but, PWM doesn't effect the current this way·--·pulsing 100mA·with 0.125 PW doesn't get you, somehow,·12mA.·

    You still have that same 100mA, just not continuously.·
  • RaymanRayman Posts: 15,375
    edited 2009-11-07 12:46
    If you pulse fast enough, the observed LED brightness is the same between 100 mA at 1/8 duty and 12.3 mA continuous..
    It's the average current that matters...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-11-07 13:11
    The comparative·brightness (dimming)·from PWM is the result of an effect·along the lines of·persistence of vision,·in this case·an inability of human vision to perceive short pulses; it's·not attributable to some "average current" phenomenon.· If it's 100mA at 100% duty then·it's 100mA at 1% duty, too.
  • localrogerlocalroger Posts: 3,452
    edited 2009-11-07 14:04
    While it's true the instantaneous current is 100 mA even at 1% duty, it is also important to know why the limit exists in the first place. Semiconductors rated for 30 mA don't magically blow up the first nanosecond they see 31 mA. In the case of an output pin it's generally going to fail because the traces or switching element overheat, and that takes time. So if that's the failure mode du jour, just as you perceive limited brightness you will generate limited heat in the circuitry with PWM, and you can push the part beyond its on-paper rating.

    Pretty much the same thing applies to clock speed, since the transistors only dissipate serious power while changing state and the more often you change state the more heat they produce, and people have pushed their props as high as 120 MHz by taking other measures to limit power dissipation.
  • RaymanRayman Posts: 15,375
    edited 2009-11-07 14:17
    If you look at the datasheet for the RGB matrix there is actually a pulsed rating for 1/10 duty cycle... It's 150 mA for Red&Green and 100 mA for Blue...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Sign In or Register to comment.