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.

Re: MSP430 interface to Bargraph led

Other Parts Discussed in Thread: MSP430G2333, 74AC16245, SN74HC244

Hi,

I want to interface 10 segment bargraph LED to MSP430G2333, in the segment LED datasheet it is mentioned forward current for each LED is 20mA and in the datasheet of MSP430 it is mentioned the overall current should not exceed 48mA included all pins, so my question is suppose if I want to switch on all the 10 LED's in the bargraph what happens to the MCU does it resets/damages/works fine ??

Is it necessary to use transcievers/buffers in between to protect MCU?? 

Best Regards

Santosh

  • Santosh PG said:
    forward current for each LED is 20mA

    This is max current. LED will glow when you put 5mA on it too.

    Santosh PG said:
    if I want to switch on all the 10 LED's in the bargraph what happens to the MCU does it resets/damages/works fine ??

    In case when you exceed max current on all pins - you can damage MCU.

    Santosh PG said:
    Is it necessary to use transcievers/buffers in between to protect MCU?? 

    If you don't want dim bargraph with "MCU-safe" 2..3mA LED drive current, then yes.

  • Following & generalizing upon llmars' advice - unwise to employ an MCU as, "beast of burden!"  Few Leds usually fine (operated correctly - both Led & MCU) but forcing the MCU to provide such current (many Leds) raises its internal temperature - rarely good...

    You may consider an 8 bit latch to achieve higher Led brightness - less current-demand burden upon the MCU - and the potential ability to "regain" use of those GPIO presently devoted/dedicated to the LEDs.  (assumes that you drive no critical outputs via this now "multi-use Port" which only accesses the Led array as needed. (i.e. when LED change required)  You clock the latch via single pin - likely harvested from the port servicing 2 Leds.

  • Hi Ilmars/cb1,

    Thanks for your help.

    I have choosen 74AC16245 transceiver so does it going to solve my problem ?? please suggest low cost device with min 10 I/O transceivers.

    Best Regards,

    Santosh

  • Santosh PG said:
    I have choosen 74AC16245 transceiver so does it going to solve my problem ?? please suggest low cost device with min 10 I/O transceivers.

    You don't need bidirectional buffer! Also I doubt that single chip requirement is so important. Two SN74HC244 buffers will be more than two times cheaper solution, two ULN2003 arrays will be even cheaper, not to mention bunch of NPN transistors and resistors which is ~10 times less expensive than buffer you mention.

  • Hi Ilmars,

    Thanks for the suggestion I will consider SN74HC244 as the supply voltage for the device can be 3.3V.

    Our application is basically controlling the bulb dimming, we are using Mosfet for dimming control.

    There are 2 loads(bulbs) available and either of the one will be connected and should be switched on at a time using a relay but how to detect which load is connected?

    Best Regards,

    Santosh

     

  • Santosh PG said:
    Thanks for the suggestion I will consider SN74HC244 as the supply voltage for the device can be 3.3V.

    Darlington array as well as NPN transistor supply also can be 3.3V ;)

    Santosh PG said:
    There are 2 loads(bulbs) available and either of the one will be connected and should be switched on at a time using a relay but how to detect which load is connected?

    Relay together with mosfet? Are you serious?  Why don't you simply use two mosfets? Please specify bulbs and their supply voltage.

  • Hi Ilmars,

    Really thanks for your quick responses.

    As it was required to swtich between loads thought to use relay.

    Load will be 24V or 150W. how to sense whether load is connected or not??

    Best Regards,

    SANTOSH.

  • Santosh PG said:
    As it was required to swtich between loads thought to use relay.

    Relay is requirement? Why? Is it controlled by same uC which is driving mosfets? I am still puzzled..

    Santosh PG said:
    Load will be 24V or 150W. how to sense whether load is connected or not??

    By measuring voltage on load terminals. If load is not conducting then it's not there = no voltage.

  • Hi Ilmars,

    Yes the relay and Mosfet is controlled by single MCU, transistor is used in between MCU and relay.

    Out of 2 loads one is main load and second acts as alternate so when main is not available need to switch for alternate.

    Best Regards,

    Santosh.

  • Santosh PG said:

    Yes the relay and Mosfet is controlled by single MCU, transistor is used in between MCU and relay.

    Out of 2 loads one is main load and second acts as alternate so when main is not available need to switch for alternate.

    No offense, but to be honest - it's ridiculous design decision. I would use just two mosfets with load sensing. Relay consumes current, it is huge compared to mosfet, it is tech of previous century which shall be used only for very specific applications like low internal resistance switch for some high-end measurement equipment or something like that.

  • Ilmars said:
    In case when you exceed max current on all pins - you can damage MCU.

    Possible but unlikely. the CMOS output FETs are self-regulating current limiters (inherent to CMOS technology). The higher the current, the igher the voltage drop and the lower the oputput voltage. Which in turn lowers the current.
    Of course an overcurrent on many port pins will raise internal power dissipation beyond limits. But this doesn't happen easily. Especially not if there are LEDs as load, and (hopefully) a few series resistors.
    In 'normal' current ranges, driving multiple LEDs directly will not damage the MSP even though a total current of >48 mA per port pin will cause the voltage drop on the pins to exceed specification. (with no negative effects for driving an LED).

    However, I prefer sinking the LEDs. (VCC->resistor->led->MSP pin). This way the supply current for the LEDs doesn't go into the MSP. It even allows (if the MSp runs on 3.6V) to source the LEDs from 5V rather than the downregulated 3.6V in our systems. But this is a special case. :)

    Ilmars said:
    Is it necessary to use transcievers/buffers in between to protect MCU?? 

    If you don't want dim bargraph with "MCU-safe" 2..3mA LED drive current, then yes.[/quote]Well, depends on the numbe rof segments :)
    However, using a CMOS inverter chip as buffer has the additional advantage of no resistor being needed. The CD40xx (don'T remember th epart no) with 6 inverters is almost cheaper and takes less space than 6 resistors :)

  • Hi Ilmars,

    The no load volatge should be always the max (or i.e. Voc), but how it will be zero.

    Best Regards,

    Santosh

  • Hi Ilmars,

    The no load voltage( or the Voc) should be more than full load V so how the load V will be zero??

    Best Regards,

    Santosh.

  • Santosh PG said:
    The no load voltage( or the Voc) should be more than full load V so how the load V will be zero??

    To be honest, I don't get what you are asking. Please describe in details or by example or both.

**Attention** This is a public forum