• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » MSP430™ Microcontrollers » MSP430 Ultra-Low Power 16-bit Microcontroller Forum » Driving LEDs from an MSP430 (chip/port pin current limits)
Share
MSP430™ Microcontrollers
  • Forum
  • Announcements
  • E2E Wiki
Options
  • Subscribe via RSS
MSP430 Resources
  • MSP430 Product Folder
  • MSP-EXP430G2 - MSP430 LaunchPad Value Line Development kit
  • MSP430 Getting Started Guide
  • MSP430 Microcontroller Projects
  • More Resources >
  • Driving LEDs from an MSP430 (chip/port pin current limits)

    Driving LEDs from an MSP430 (chip/port pin current limits)

    This question is not answered
    Frank McKenney
    Posted by Frank McKenney
    on Mar 03 2012 14:17 PM
    Intellectual310 points

    I'm using a LaunchPad v1.4 with a 'G2231 to prototype a battery-powered application which will involve turning various combinations of LEDs on and off.  There appear to be four overlapping design concerns:

    1. How bright can I make a given LED? (max port pin current)
    2. How many LEDs can be fired at once without losing brightness? (max MSP430 chip current)
    3. During debugging, it's inevitable that on some occasions I will halt the MSP430 with one or more LEDs lit.  How can I keep them from "smoking" when this occurs? <grin>
    4. How can I minimize my power drain? I hope to use solar power at some point.

    Here are links to previous discussions of port pin and chip current in the E2E MSP430 forum:

        How much current can an MSP430 I/O port pin source or sink ?
        http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/94929.aspx#330731

        Output max current
        http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/111157.aspx#393701

        Current sourcing with multiple pins
       http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/t/119244.aspx#424405

    And here are some LED specs:

      Kingbright APTL3216CGCK (green, 3x2mm. Don't sneeze near them!):

    • Vf = 2.1V (typical) / 2.5V (max)
    • If.max = 30mA
    • If.peak = 150mA (@ 10% duty, 0.1sec max pulse width)

    Some additional points:

    • If I "pulse" the LEDs with Timer_A or the WDT, it will help with items (1), (2), and (4).
    • Omitting the usual LED current-limiting resistors will help with (1), will affect (2), and makes (3) a serious concern.
    • Adding "outboard" transistors would help me avoid many of my concerns, but would also increase the parts count.  At least initially, I'd like to avoid this.

    Assuming its running at 3.0V/25degC, Figure 9 from the 'G2231 datasheet shows what happens as a load sucks more and more current from a (sourced) port pin: the drive voltage drops. (It helps if you mentally flip this graph right-to-left).

    In other words, in a worst-case scenario, for a single pin (using Vf=2.5V), the port pin HIGH voltage will drop too low to light the LED when current drain exceeds about 15mA. This leads me to ask:

    Q1: Can I expect "better" results from a single pin (more current at the same voltage) if I'm sending short pulses through it? And, of course, how short does "short" have to be in order to get what kind of results?

    Q2: When pulsing a port pin or pins, how much port pin current can I provide (source) from multiple pins before the overall chip limit of 48mA comes in to play? For example, three port pins each providing 15mA to an LED leaves... 3mA(!) for the processor.  This sounds like a tight margin, perhaps indicating that I should never have more than two LEDs lit at the same time. Are my calculations (roughly) correct?

    Q3: If, in an effort to improve light levels at the cost of power, I connect my LEDs directly to the port pins -- that is, sans resistors -- and my debugger stops with (say) only P1.1 HIGH and an LED connected, what happens? Does the LED with (say) Vf=2.1V go out as its current drain pulls the HIGH voltage down? Does it oscillate (probably at a high rate of speed)? Or what?

    Q4: Given my goals, is there anything else I'm overlooking? <grin!>

    My thanks for any advice you can offer.

    Frank McKenney

    --
      A complex system that works is invariably found to have evolved
      from a simple system that worked ...A complex system designed from
      scratch never works and cannot be patched up to make it work.  You
      have to start over, beginning with a working simple system.
                                 -- Grady Booch

    MSP430 MSP430 microcontroller low power mode Timer_A Launch Pad MSP430™
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Roberto Romano
      Posted by Roberto Romano
      on Mar 03 2012 16:54 PM
      Mastermind6840 points

       Complex post with no clean stated what you need you wish to do or need...

       How many led?

       Amount of real average current

       Duty cycle

       Multiplex level.

       Regards

       

       Regards

       Roberto


       Please login & click    Verify Answer    if this post answered your question.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jens-Michael Gross
      Posted by Jens-Michael Gross
      on Mar 03 2012 21:55 PM
      Guru140435 points

      You can do some triangulation. grab your geometry tools :)

      The MSP output port has a roughly linear relation between output voltage and output current.
      On a current of 0mA, the port has VCC as output voltage. And the datasheet tells you the output drop (voltage reduction) on certain currents. This Draw a line through these two points and you roughly know the output voltage on any current.

      Now try the same with the LED. On voltage x, it draws current y. Where the two lines cross is the 'working point' when you connect the LED directly to the MSP output. If this point is outsid ethe LEDs or MSPs spec, you can use a resistor to alter the port output voltage (by the additional voltage drop cause by the resistor at a given current) and 'recalculate' the crossing point.

      In other words: if you directly connect the LED to the port pin, the resulting stable (non-oscillating) point is when current caused by the voltage on the LED is the same that causes exactly this output voltage on the port pin. There are no regulation loops or other things that could cause oscillation. Just a field effect transistor and a diode.

      Of course it is possible that the resulting current is so low that the LED doesn't shine brightly enough. Then there's nothing you can do except using an external amplifier (transistor). Or the current is too high for either the LED ot the MSP. Then you'll need the said resistor. In most cases neither is necessary.

      _____________________________________
      Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.
      If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Roberto Romano
      Posted by Roberto Romano
      on Mar 04 2012 12:08 PM
      Mastermind6840 points

      Jens-Michael Gross
      On a current of 0mA, the port has VCC as output voltage. And the datasheet tells you the output drop (voltage reduction) on certain currents. This Draw a line through these two points and you roughly know the output voltage on any current.

       Hi Jens, this can be true on zero thermal resistance, on real mosfet they appear to burn when excessive power is generated at junction...

       At middle voltage @40mA MSP mos has to dissipate (1.8*40)mW so every pin driver generate about 72mW of heat, two or 3 pin and MSP can burn out.

        Output desaturate near 40mA, @ that current VDS voltage approach 1V and RDSon can be 25 Ohm, for more than 1V of VDS the output mosfet drive load @constant current (30-40mA), MSP become hot in a short time.

       25 Ohm RdsOn are too much to drive just a single LED so a better Mos is needed. An sot23 with rdson under 40mOhm cost few cent driving a lot of led @ higher current and also from higher voltage than VCC of MSP.

       To overcome debug trouble a resistor can be paralleled to source gate then gate driven with a capacitive coupling. When drive is PWMed then capacitor has no voltage or small one, when PWM stop capacitor charge to VCC leaving the gate without drive after few RC constants. When PWM restart, capacitor discharge again and drive reappear after few cycles but twice the time to remove drive.

       Regards

       Regards

       Roberto


       Please login & click    Verify Answer    if this post answered your question.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Frank McKenney
      Posted by Frank McKenney
      on Mar 04 2012 14:29 PM
      Intellectual310 points

      Jens-Michael Gross

      You can do some triangulation. grab your geometry tools :) ...

      Jens-Michael,

      Thank you for the reply.

      I'll look over the datasheets and post a mode detailed response.


      Frank
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Frank McKenney
      Posted by Frank McKenney
      on Mar 04 2012 15:04 PM
      Intellectual310 points

      Roberto,

      Thank you for your responses.

      Roberto Romano
      At middle voltage @40mA MSP mos has to dissipate (1.8*40)mW so every pin driver generate about 72mW of heat, two or 3 pin and MSP can burn out.

      ( I assume you mean that if 2 or 3 MSP430 pins are "loaded" to the point that they fall to Vcc/2... )

      I definitely think I'd like to avoid that. <grin!>

      Roberto Romano
      Output desaturate near 40mA, @ that current VDS voltage approach 1V and RDSon can be 25 Ohm, for more than 1V of VDS the output mosfet drive load @constant current (30-40mA), MSP become hot in a short time.
      25 Ohm RdsOn are too much to drive just a single LED so a better Mos is needed. An sot23 with rdson under 40mOhm cost few cent driving a lot of led @ higher current and also from higher voltage than VCC of MSP.

      Hm. I need to think this part over a bit to make sure I inderstand. The constraints, I mean, not the "hot" part. <grin!>

      Roberto Romano
      To overcome debug trouble a resistor can be paralleled to source gate then gate driven with a capacitive coupling. When drive is PWMed then capacitor has no voltage or small one, when PWM stop capacitor charge to VCC leaving the gate without drive after few RC constants. When PWM restart, capacitor discharge again and drive reappear after few cycles but twice the time to remove drive.

      This sounds good, but I'm having trouble picturing how the components connect from your description. The best I could come up with wat something like this:

        P1.x: o--+--| |------>|---+
                 |   C      LED   |
                 \                |
               R /                |
                 \                |
                 /                |
                 |                |
        Gnd:  o--+----------------+

      Is that what you had in mind?

      Frank

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jens-Michael Gross
      Posted by Jens-Michael Gross
      on Mar 04 2012 21:25 PM
      Guru140435 points

      Roberto Romano
      on real mosfet they appear to burn when excessive power is generated at junction...

      That's what I was addressign with my last sentences. However, the 'curve' you get with two known points shows you where you are. You can gray-out the area where the power on the MSP is too much (P = Iout*(Vcc-Vout)< Pmax)

      _____________________________________
      Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.
      If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Roberto Romano
      Posted by Roberto Romano
      on Mar 05 2012 08:25 AM
      Mastermind6840 points

      Frank McKenney

      Roberto Romano
      Output desaturate near 40mA, @ that current VDS voltage approach 1V and RDSon can be 25 Ohm, for more than 1V of VDS the output mosfet drive load @constant current (30-40mA), MSP become hot in a short time.
      25 Ohm RdsOn are too much to drive just a single LED so a better Mos is needed. An sot23 with rdson under 40mOhm cost few cent driving a lot of led @ higher current and also from higher voltage than VCC of MSP.

      Hm. I need to think this part over a bit to make sure I inderstand. The constraints, I mean, not the "hot" part. <grin!>

       Hi Frank, from zero current and zero Vds to 40 mA and the Vds voltage approaching 1V MSP mosfet are in the resistive area, so Vds=RdsOn*Ids.

       Over that threshold resistive area leave place to saturation zone where channel cannot grow over, current is near constant from 30 to 40mA and voltage vary from external load. Tis area has higher internal resistance, infinite if pure current generator. In this area current is the max pin current and voltage imposed by external load so a red LED with 1.8V direct biasing fix this voltage and current too. @ this quiescient workpoint power dissipation is half on led and half on MSP, msp cannot be loaded from more than 2 or 43 pin load at these worst condition.

       SO if you apply two led MSP case become very hot.

       About led I was thinking a dynamic drive of mosfet that it remove itself when pin stuck at 1. You can also do Capacitive isolation, but C2 require to be in the range of tens or hundred of uF.

       Regards

       Regards

       Roberto


       Please login & click    Verify Answer    if this post answered your question.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • aBUGSworstnightmare
      Posted by aBUGSworstnightmare
      on Mar 05 2012 10:01 AM
      Guru17240 points

      Hi,

      TI has a nice Low-Voltage 7-Bit I2C and SMBus LED Driver With Intensity Control and Shutdown - the TCA6507 (http://www.ti.com/product/tca6507). The device is ideal for 'fun light' applications.

      The device gives you seven LED Driver Outputs (On, Off, Blinking, Fading at Programmable Rates). Its Open-Drain outputs directly drive LEDs up to 40 mA max (per output at up to 6.5V max.).
      So it's propably more easy to use in intergarted device than building a discrete driver stage for each LED.

      aBUGSworstnightmare

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use