This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5994: Driving LED with MSP430FR5994 at Low Clock Frequencies

Part Number: MSP430FR5994
Other Parts Discussed in Thread: ENERGYTRACE

Tool/software:

Hi Experts,

I'm working on a project using the MSP430FR5994, and I'm aiming to drive an LED with the lowest possible power consumption. Currently, I'm driving the LED by toggling a GPIO pin, and it works fine with higher clock frequencies. However, when I reduce the master clock frequency to 32 kHz (ACLK), the LED fails to light up.

My goal is to use the lowest possible clock frequency to drive the LED while minimizing power consumption. Could you please advise on the following:

  1. What is the minimum clock frequency required to effectively drive an LED using GPIO pin toggling?
  2. Are there any alternative low-power methods for driving an LED with MSP430FR5994, possibly using PWM or another approach, that would work at lower frequencies like 32 kHz?

I appreciate any suggestions or guidance you can provide.

Thank you!

Regards,

Josel

  • There is no minimum frequency. If you are pulsing the LED you might have lowered the duty cycle too much. I suggest you put a scope on it to see just what is happening.

  • What color is the LED and what is the current drive needed for the LED?

    The intensity of the LED is impacted by the PWM duty cycle so if you're duty cycle is too small then the LED won't produce enough lumens. You may be able to observe some light in a dark room and depending on the LED color (red is typically easier to view). But if you want a brighter blink you'll want to increase the duty cycle.

    Regards,
    Luke

  • Hi Luke,

    I wanna control LED1 under the this situation: use the power as low as possible, I think of using ACLK(32kHz) rather than the main clock(4MHz), is that possible?

    As the datasheet said,

    Optimized ultra-low-power modes
    Active mode: 118 µA/MHz
    Standby with VLO (LPM3): 500 nA
    Standby with real-time clock (RTC) (LPM3.5): 350 nA (the RTC is clocked by a 3.7-pF crystal)
    Shutdown (LPM4.5): 45 nA

    So I am wondering how can I use the ultra-low power mode? If you can send me a simple example about codes, I will be much appreciate!!

    I use EnergyTrace and find that with active mode(or it is called normal mode or default mode) , when I use GPIO to enlight the LED, it costs 11mW power, and I think it is too high, yet the current need 3.5mA, do we have any solution to lower this power?


    Best,

    Josel

  • Can you show us the code you are using for the LED?

    Do you want it to be continuous or to blink?

    A blink will probably use less power than a continuous duty cycle.

    You just need to adjust things to get the brightness you need at the power level you can afford. You can't get something for nothing!

    There used to be the LM3909 that would flash an LED for a long time with a battery, but it appears to have been discontinued.

  • Unless you lower voltage, if your required current is 3.5mA then you will draw 11.55mW of instantaneous power (P = I*V). You can reduce average power over time by reducing how long you're blinking and how often you're blinking.

  • Hi,

    This is the first version of the code, and I want to use LED to send simple information,

    /*
    #include <msp430.h>

    #define PREAMBLE 0xB6
    #define LEDID 0xAA

    void sendBit(unsigned int bitValue);
    void send8BitData(unsigned int data);

    void main(void) {
    WDTCTL = WDTPW | WDTHOLD;
    PM5CTL0 &= ~LOCKLPM5;
    P1DIR |= 0x02;

    for (;;) {
    send8BitData(PREAMBLE);
    send8BitData(LEDID);
    __delay_cycles(800000); // delay 0.8s
    }
    }

    void sendBit(unsigned int bitValue) {
    if (bitValue) {
    P1OUT |= 0x02;
    } else {
    P1OUT &= ~0x02;
    }
    __delay_cycles(100000); //delay 0.1s
    }

    void send8BitData(unsigned int data) {
    int k;
    for (k = 7; k >= 0; k--) {
    sendBit((data >> k) & 1); // 发送数据中的每一位
    }
    }

    However, I think the power consumption is too much, like every time I lighten a LED (red), it will cost me like 11mW;

    So I want to use some low power mode, and this is my second version


    #include <msp430.h>

    void main(void) {
    WDTCTL = WDTPW | WDTHOLD;

    PM5CTL0 &= ~LOCKLPM5;
    P1DIR |= BIT0;
    P1OUT &= ~BIT0;

    CSCTL0_H = CSKEY >> 8;
    CSCTL2 = SELA__LFXTCLK; // LFXT 32kHz
    CSCTL3 = DIVA__1;
    CSCTL4 &= ~LFXTOFF;

    do {
    CSCTL5 &= ~LFXTOFFG;
    SFRIFG1 &= ~OFIFG;
    } while (SFRIFG1 & OFIFG);

    TA0CCR0 = 32768 - 1;
    TA0CCTL0 = CCIE;
    TA0CTL = TASSEL__ACLK | MC__UP | TACLR; // ACLK, up mode

    while (1) {
    P1OUT ^= BIT0;

    //1s
    __bis_SR_register(LPM3_bits | GIE); // LPM3
    }
    }

    #pragma vector = TIMER0_A0_VECTOR
    __interrupt void Timer0_A0_ISR(void) {
    __bic_SR_register_on_exit(LPM3_bits);
    }


    But I find that with this code, I still need 11mW to lighten LED(red), how can I improve to lower the power consumption? > <


    Regards,

    Josel

  • While the LED will always draw 11mW when it is on,  if you pulse it at, for example, 10% it will still draw 11 mW when on, but the *average* will be only 1.1 mW.

    You need to find the minimum pulse that provides the brightness you require.

    With LED's you can't get something for nothing, you need a certain amount of power for a visible indication.

  • Plus of course choose the brightest LED you can find. Aka, the most light for the least current.

**Attention** This is a public forum