Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Sourcing at 30 ma — Parallax Forums

Propeller Sourcing at 30 ma

jgonzojgonzo Posts: 5
edited 2008-06-11 19:04 in Propeller 1
I am trying to get 10 ma out of my propeller chip proto board 32212.· I can only sink 3.5 mils at 1000 ohms.· I do I get the 10 that I need?

Thanks for your help
«1

Comments

  • Ken PetersonKen Peterson Posts: 806
    edited 2008-06-04 20:46
    According to the data sheet, the Propeller is supposed to be able to sink or source 40mA on each I/O pin. Although I imagine that's not necessarily all at once. I have had a Prop driving the anodes on a 7-segment LED arrays without buffering (I was using an NPN transistor to pull down the common cathode). Each segment was getting 40mA for 1/4 duty cycle.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • LawsonLawson Posts: 870
    edited 2008-06-04 21:48
    jgonzo said...
    I can only sink 3.5 mils at 1000 ohms. I do I get the 10 that I need?

    Remember Ohm's law? (V = I * R) Since a propeller I.O. pin isn't going to be able to put out more voltage than the chip is supplied with, V = 3.3v max. You've stated that R = 1000ohm. So what's the maximum 'I' that can flow? My calculator says 3.3 milliamp. If you need more current just lower the resistance.

    Marty

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lunch cures all problems! have you had lunch?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-06-04 23:43
    While the Propeller datasheet states that the Propeller is capable of sourcing 40mA, this is the short circuit current and should not be used. While the graph for voltage vs current for an I/O pin was not included in the datasheet (because we did not want to encourage users to stress the chip), I can tell you at 30mA drain (to ground) the pin will have a voltage of 2.3V, so Ohm's law does not get you where you want because of the PMOS's Shichman–Hodges effect·(sometimes incorrectly called the Early effect which is for bipolar transistors). In general a Propeller pin should not be used to drive loads more than that taken by an ordinary LED (~10mA). Anything more than that you are stressing the chip and run the risk of causing a (long term) premature death of the pin and/or Propeller. Use a buffer such as a darlington transistor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 6/4/2008 11:56:19 PM GMT
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-06-05 01:14
    Hi Paul, I knew when I simplified the explanation of the I/O pin's Ron parameter that some might think it applies in all circumstances but we are mostly concerning with safe operating conditions anyway. This "effect" and others come into play at higher relative currents or more correctly higher drain voltages which is what happens when we load it up more (short-circuit = max voltage). Is there a simplified schematic or model of the Propeller I/O pin available?

    Here's a model of a MOSFET where we can increase the Vd to 10V to see how channel-length modulation increases the drain current (effectively the Ron).
    www-g.eng.cam.ac.uk/mmg/teaching/linearcircuits/mosfet.html

    *Peter*
  • hippyhippy Posts: 1,981
    edited 2008-06-05 01:15
    Paul Baker (Parallax) said...
    In general a Propeller pin should not be used to drive loads more than that taken by an ordinary LED (~10mA). Anything more than that you are stressing the chip and run the risk of causing a (long term) premature death of the pin and/or Propeller.

    Something which I think should be clearly stated in the manual and datasheet. This is the first time a limitation like this has been mentioned.

    The manual clearly states (twice), "can source/sink 30 mA each at 3.3 VDC", the datasheet indicates the absolute maximum is 40mA. I'd be very surprised if anyone had second-guessed that drawing 30mA was potentially damaging their Propeller, especially as everything else seems to have been conservatively rated in the manual and this is an opposite case.

    The SpinStamp manual says, "General-purpose I/O pins: each can source and sink 40 mA".

    In both cases, when "can" is used I would expect most people to read that as "can without risk of damage", ie "is allowed" rather than "is possible".

    You might also want to update your online Store documentation which proudly boasts "Current Source/Sink per I/O = 50 mA" in a number of places. I don't know how it works in the USA but in the UK one could run into all sorts of false advertising, misrepresentation of goods and product liability legal issues.
  • jgonzojgonzo Posts: 5
    edited 2008-06-05 07:01
    Thank you all for your help, I appreciate the quick responses. I just wanted to make sure that I did not damage anything. Also, when a pin switches low, how low is low? Once again thanks for your help in advance.
  • mikestefoymikestefoy Posts: 84
    edited 2008-06-05 08:16
    Paul,

    I do think that parallax have been less than honest in their specs if the propeller will only source/sink a few milliamps.

    any PIC datasheet gives V/I curves showing what the pins can deliver. They give 25mA, and I have never had a problem with Microchip.

    To talk of not wanting to "stress" your chip is not good enough !!!

    give the specs, and then its up to the user.



    Mike
  • PraxisPraxis Posts: 333
    edited 2008-06-05 14:59
    Some figures (from the Propeller data sheet):

    Table 18: Absolute Maximum Ratings

    Total power dissipation 1 W
    Max. current out of Vss pins 300 mA
    Max. current into Vdd pins 300 mA
    Max. DC current into an input pin with internal protection diode forward biased ±500 µA
    Max. allowable current per I/O pin 40 mA

    And the data sheet does have the following caveat:

    8.1. Absolute Maximum Ratings
    Stresses in excess of the absolute maximum ratings can cause permanent damage to the device. These are absolute stress ratings only. Functional operation of the device is not implied at these or any other conditions in excess of those given in the remainder of Section 7.0. Exposure to absolute maximum ratings for extended periods can adversely affect device reliability.

    The data sheet is somewhat lacking and should provide more information than just the maximum "stress" values such as already mentioned V/I graphs, typical values etc.

    The information at http://www.parallax.com/Default.aspx?tabid=407 is ambiguous:

    I/O Pins 32
    Current Source/Sink per I/O 40 mA

    This can be read to mean the chip can sink source 40mA from 32 pins.

    Personally I would never drive more than a LED from a MCU pin.

    Cheers
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-06-05 15:29
    +1 Praxis.

    I believe those limits exist to simplify interfacing -- as with the PIC chips, it's awfully nice not to have to add driver chips for EVERY single application.

    Having said that, very few people expect you to use an I/O pin to power a relay coil, light a light-bulb, or power a motor. Those applications almost always require some external Darlington driver chip or some other PN transistor or MOSFET transistor device, along with protection diodes or even an H-Bridge for motors.

    What the current DOES allow you to do is generate Composite Video with only the addition of a few resistors. In many simple applications, 30 mA on a few pins really IS all you need -- again, as the PIC chips have proven. But it's a processor, not a power-supply.
  • PraxisPraxis Posts: 333
    edited 2008-06-05 15:40
    "But it's a processor, not a power-supply."

    Still laughing!!
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-06-05 17:02
    Let me be crystal clear: The Propeller is perfectly capable of driving these higher current. The reason I have made the conservative pronouncement is quite simple: long term analysis of high current drain on an I/O pin has not been fully characterized. BUT this long term stability isn't provided by any microcontroller manufacturer. There are things such as metal migration which can occur over time which can lead to device failure. But lets take a step back, in order to achieve a 40mA drain you must short the I/O pin. Please show me any reference where it tells you to short a digital I/O pin. IOW, just because you can do it doesn't mean you should.

    We placed the data on the datasheet to indicate that the chip is perfectly capable of handling these events, but it doesn't mean you should you should deliberately design it to do this all the time.

    Praxis I am not talking about imminent failure like most other microcontroller speak of (try shorting your PIC I/O pin and see what happens), I am talking about long term reliability which is something no microchip manufacturer is going to provide you, its very very time consuming and very expensive to test for. What is your PIC's MTBF for a I/O pin @25 mA at 100% and 50% duty cycle? These are the types of statistics I'm speaking of.

    Look at any design reference from a reputable engineer and you will never see them attempting to·supply high currents from digital logic, because its bad design practice. You may be laughing but allenlane is completely right: its a microcontroller not a power-supply.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 6/5/2008 5:15:18 PM GMT
  • hippyhippy Posts: 1,981
    edited 2008-06-05 17:04
    Deleted : Paul's post covers what I wrote at the same time.
  • mikestefoymikestefoy Posts: 84
    edited 2008-06-05 17:44
    Paul,

    I do think that parallax are wrong and untruthful to give indications of 30 or 40mA of source/sink capability on this device.

    I get the smell of marketing speak similar to music systems or speakers when some spec their products as "rms power", whilst the less scrupulous use "peak music power"


    I/O drive capability of IC's was always specd at TTL output levels, of 2.4volts for VoH, and Vol of 0.4volts


    Obviously, we are now using Vcc of 3.3volts, down from 5 volts, so it not strictly TTL


    My definition of drive capability is dropping about 0.8 to 1.0 volts either sinking or sourcing.

    If we take the case of our short circuit condition of say 30mA current, then the output mosfet (per pin) must dissipate 30mA x 3.3volts ie 90mWatts.

    the more realistic value of losing 1 volt across the mosfet, then would give only 30mWatts per pin.

    Microchip curves show a source capability of 10mA (typical) and sink 25mA (typical) at 25deg centigrade, but that 25mA drops to 17mA @85C, and 15mA at 125C

    I do think you need to spec the output capability of your chips better.


    Mike
    674 x 629 - 47K
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-06-05 18:10
    Mike:

    Regarding your linked "TTL Ratings" -- Did you note that the "source" for a TTL Output pin is 1.6 mA max? This number was used in "fan-out" calculations.

    Did you note that the "sink" for a TTL I/O pin was 40 mA, 50 mA, or 100 mA? These were "maximum" ratings (engineer speak for "don't exceed these or you'll burn out the driver").

    Did you also note that the "Max current" for a TTL chip was 50 mA?

    I'm sorry that you think "parallax is wrong or untruthful". Perhaps at some point in your maturity development you'll be much more reluctant to tell people they're wrong, or that they're untruthful. Most people who develop with PIC, AVR, TTL, or CMOS chips know that 1 to 2 mA on an output pin can do a lot in terms of "signal". 20 mA and above are usually only needed for long-distance (10 feet and above) driver chips, or for a convenience of driving an LED and resistor without further driver chips.

    And your specification of "driving a current with only 0.8 or 1 volt of drop" IS a "Power-supply specification" -- in using TTL or CMOS logic, you want as much noise immunity as you can get, which means ANY drop over 0.1 volt is an indication of a problem -- too many recievers on a party line, too much impedance in a long wire, resistance too small in a termination network.

    That you are mis-applying power-supply requirements onto a microprocessor chip is NOT Parallax's problem.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-06-05 18:15
    Here is the data, gleen whatever you want out of it. But what you're talking about (fan out) is not what the original poster was trying to do, he was trying to essentially switch a high load without the use of buffering, which is something you don't do regardless of what chip you use if you care at all about long term stability.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • mikestefoymikestefoy Posts: 84
    edited 2008-06-05 19:04
    Allanlane5,

    I am 59 years old.

    I got my B.SC in 1972, my M.Sc in 1973.

    I built my own apple II. I was with Microchip ( then GI ) in Glenrothes in Scotland in 1974 when the first Sinclair calculator chips were being designed for them by GI.

    I was involved in the design on the GI Peripheral Interface Controller chip in 1975 when intel was in 4004, 8008 land.

    recognise P.... I... C...

    I have been in electronics for 38 years. I know a little bit about RTL/DTL/TTL/ECL/GTL MOS and beyond

    dont get personal about "maturity development". It is beneath you

    I like parallax a lot, I like Microchip a lot

    if parallax dont publish the proper specs and graphs then they lay themselves open to criticism.


    I have looked at paul's attached graphs, and they do indicate a good driving capability. not sure what "absolute current" means though.

    Parallax gives the impression that their output mosfet drivers are as hefty as Microchips, and so can drive LED's at 10 mA's or so. It would seem so.

    maybe I should retire

    Mike
  • PraxisPraxis Posts: 333
    edited 2008-06-05 19:07
    Paul,

    I really think you should reread my post as I never mentioned PIC chips at all and I also mentioned in that post and I quote "Personally I would never drive more than a LED from a MCU pin".

    And as you reread you will notice that my only point of contention was lack of information in the data sheet and the ambiguous information which appears to marketing hype on the product web page.

    Allenlane's comment was funny, it's a MCU not a power supply which also happens to support what you are saying.

    Cheers
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-06-05 19:23
    Sorry, I had no idea from your writing that you were 59, or had near that experience.

    Accusing Parallax of being "less than honest", "wrong", or "untruthful" based on an IC specification indicated to me somebody who's lacking a bit of restraint and politeness -- perhaps I over-reacted. Sorry about that. We get a lot of "newbies" who try things which really are disasterous, and then complain that it's all Parallax's fault when they simply didn't listen, or didn't have the experience (yet) to apply what they'd been told. I was trying to nip that in the bud, and apparently got it wrong.

    Note I don't work for Parallax, I've been using their products since 2002 or so.
  • mikestefoymikestefoy Posts: 84
    edited 2008-06-05 19:24
    jgonzo,

    to get 10mA out or into a pin 3.3v-0.4=2.9v/10ma=290R.


    if youre driving an LED, then of course the 2.9Vdrops to 2.9V-Vf of the LED

    maybe we should have all read his original question

    Mike
  • mikestefoymikestefoy Posts: 84
    edited 2008-06-05 19:38
    Allanlane5,


    I am happy to "chat" with a fellow experienced engineer

    the thread went off on a tangent from the first post.

    now, here in Spain its 10pm at night, so definitely "time to retire"

    Mike
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-06-05 19:48
    Mike, absolute current is there because sink and source are negative in thier direction with respect to each other, so rather than have 2 separate graphs or one which looks like a parabola, the sign of the sinking current was negated, or when taking both curves into account, the absolute current.

    If you have suggestions on how to improve the datasheet, then please share, but please don't ascribe a motive to why it already isn't that way. Thats highly unfair and inaccurate.

    I admit I glossed over some of the posts in this thread, so if I missed any mitigating statements of yours, I appologize.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 6/5/2008 7:54:53 PM GMT
  • mikestefoymikestefoy Posts: 84
    edited 2008-06-05 20:36
    Paul,

    do you have any curves of current/voltage vs temperature


    see attached, hope they are appropriate

    Paul, there is no malice or ulterior motive to any of this.

    I just want clarity

    Mike
    824 x 618 - 38K
    857 x 637 - 43K
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-06-05 21:27
    No there isn't an I/O pin current vs temperature graph, we do have an environmental chamber so I can perform the tests. It will be a few months before I can fit time in the schedule for it, but I can certainly do it.

    Also by choosing discrete temperatures it will go alot faster. Sweeping temperature is a pain because you have to observe soaking times to be sure the junction temperature is as close to ambient as possible.

    Which leads me to another question, at higher current draws there will be some self heating going on. Are you looking to have this compensated for (ie Tj is the measured parameter), or treat this as a real world excercise and acknowledge self heating will occur in high current situations (ie Ta is the measured parameter). The second is straight forward, the first is quite complicated because you have to forward bias an ESD diode with a constant current and measure the forward voltage drop (we're talking about a forward bias of 1uA to prevent self heating of the ESD diode). And for those that really want to get into it you do this twice, 1 ESD bias measurement on an adjacent pin, then another on the next pin, then calculate the gradient to extrapolate the Tj at the point of interest.

    Even simple tests like this can get very complicated if you try to nail down everything which is going on.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 6/5/2008 9:40:54 PM GMT
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-06-05 22:28
    So what I want to know is: Can the prop drive a white LED? How about a blue one? Can a prop drive 32 of them? And what about a four lead common cathode RGB LED?

    Or should I stock up on some intermediate chips? Like what for instance?

    And whatever am I to do with my schemes for 100's of Beau and Charlieplexed LEDs, to be driven with pwm signals and no resistors? Besides bringing new meaning to smoketesting?

    Everyone ought to know said...
    sniff, sniff
    ·Potter, no magic outside of school!

    Seriously, we need another Ed Kit module on PYPFF (Protecting Your Prop From Frying) real soon now. Because the first couple modules have us learning to Just Slap It On·& Make It Work.

    Post Edited (Fred Hawkins) : 6/5/2008 10:44:03 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-06-05 22:43
    It depends on your LEDs, your garden variety there should be no problem so long as max power for the device is observed (if I remember correctly it's about 300mA max, the Propeller consumes ~100mA at full power so that would leave 200mA to drive external devices).

    Another thing to consider is the high Vf of many of the newer LEDs, driving a 4.0V Vf LED is obviously not going to work. Check the graph I published in the previous post. If your Vf-current point lies outside the line, then it clearly wont work (ie say you have a LED with a forward voltage of 3.0V, and you need to drive it at 20mA, the graph shows that the maximum voltage that can be produced by the I/O pin when drawing 20mA is ~2.7V. This is not enough to drive the LED)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 6/5/2008 10:51:48 PM GMT
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-06-05 22:50
    Jack Nicholson in As Good as it Gets said...


    "I am glad we had this little chat."
    Whew! That was close. The LEDs arrive in a week or two and I won't be writing nasty emails to their supplier because they just sit there on my breadboard. Or worse, tossing them because I got-burned-by-Ebay-yet-again.
  • jgonzojgonzo Posts: 5
    edited 2008-06-06 05:35
    Thank you for the information.
  • hippyhippy Posts: 1,981
    edited 2008-06-06 12:02
    Paul Baker (Parallax) said...
    Here is the data, gleen whatever you want out of it.

    What's an application which can open the .EMF file ? Do you have the data in PNG, GIF of JPG format ?
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-06-06 16:23
    .emf is an Enhanced Meta File, a format which scales well inside Word (wmf is the windows version of the format) so we cast images in the format before inserting into a document. Here it is in jpg:

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
    800 x 552 - 129K
  • AleAle Posts: 2,363
    edited 2008-06-06 16:28
    Fred: It will depend on the led. For those 4.2 V leds... no uC at 3.3V will be able without help. If the forward voltage is lower than 2.9 or so and you may lit it with 10 mA you can, if you need more... get a pretty buffer. For 32 that are on all the time... get buffers, for a moving dot you may if you observe the offer vs req of pro and led.

    edit: I did not see that there were two pages :-/
Sign In or Register to comment.