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:
- How bright can I make a given LED? (max port pin current)
- How many LEDs can be fired at once without losing brightness? (max MSP430 chip current)
- 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>
- 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