Connecting dsPIC PWM output to LEDs

Discussion in 'Embedded Systems and Microcontrollers' started by satcom, Apr 13, 2015.

  1. satcom

    Thread Starter New Member

    Apr 1, 2015
    24
    0
    I want connect dsPIC30F 4 channels PWM ouput to LEDs, via MOSFET or TrenchFET transistors.
    The details is as follows:

    PWM frequency 244Hz
    LED Voltage: 12V, working current 350mA (4 banks, 1W LEDs)
    Total operating current: 10A (2.5A per channel)
    Overcurrent protection on output of each channel.

    What is suitable FET and how to connect it to PWM pins? Connection example will be helpful.
     
  2. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,310
    885
    I should think just about any "logic level" MOSFET with adequate current rating would work; I've used IRLZ34 MOSFETs and they work well:

    http://www.irf.com/product-info/datasheets/data/irlz34.pdf

    At such a low frequency, you should be able to drive the MOSFET gate directly from the dsPIC output pin, through a resistor of a couple of hundred ohms.
     
    satcom likes this.
  3. satcom

    Thread Starter New Member

    Apr 1, 2015
    24
    0
    IRLZ34 have Gate Treshold Voltage Vgs(th) 1 to 2V, and dsPIC output is 3.3V, what should be matched resistors, more precisely?
    Have the TrenchFET Gen IV any advantages over MOSFETs?
     
  4. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,310
    885
    The resistor value is unimportant; I normally use a resistor to limit I/O pin current during on/off switching, but many people probably wouldn't even include it.

    I have no idea. I only cited the IRLZ34 because I'm familiar with it and because it is reasonably inexpensive.
     
  5. satcom

    Thread Starter New Member

    Apr 1, 2015
    24
    0
    How to protect output channels from overcurrent?
     
  6. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,310
    885
    There is not much you can do for that beyond 1) supplying your loads from a regulated, current-limited supply and 2) ensuring that the loads themselves cannot draw too much current. For LEDs, that means including a suitable resistor in series with each LED string to control the operating current.
     
  7. satcom

    Thread Starter New Member

    Apr 1, 2015
    24
    0
    Thanks a lot, that's helpful info. For IRLZ34 it comes in TO-220 package, rather big in height, so it can be an issue.
     
  8. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,310
    885
  9. satcom

    Thread Starter New Member

    Apr 1, 2015
    24
    0
  10. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,310
    885
    That's true, and that difference would be important in a different application. Here, however, each MOSFET is passing only 2.5 amps, and the PWM frequency is low enough that dynamic switching losses aren't a consideration; so the maximum power dissipated by each MOSFET is equal to 2.5 amps squared times the MOSFET's Rds(on), which is 0.05 ohms max at 5V of gate drive. 2.5A^2 * 0.05 ohms = 6.25 * 0.05 = 310 milliwatts.

    You should be running nice and cool, no matter what package option you choose.
     
  11. satcom

    Thread Starter New Member

    Apr 1, 2015
    24
    0
    What is dsPIC current on PWM output pins?
     
  12. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,310
    885
    That depends on the particular dsPIC you are using, and on the supply voltage the chip is operating with.

    In any case, the information you seek-- and much, much more-- is to be found on the datasheet for the PIC you are using. It is typically found in the "Electrical Characteristics" section of the datasheet, under "I/O Pin Output Specifications."

    Learn to consult component data sheets; there's lots of important information in them, that's why component manufacturers publish them.
     
Loading...