Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

P-channel Mosfet Design for switching of LED display as source

  1. Jul 5, 2010 #1
    Can any one kindly help me in using the P channel mosfet as source for switching of LED display?
    As I've connected it like 16 Mosfets with common source giving 5V from diode b/w power supply, drain is for the16 rows of 32 LEDs. Gate is connected to the shift register.

    The problem is the intensity of Light. It is not glowing to its extent.
    I'm using dm134b as the sink.

    Kindly suggest if we can alter the connections of MOSFET or any thing else.

    Plz help!!!!!
  2. jcsd
  3. Jul 7, 2010 #2
    I'm not sure from your description how you are connecting things. Am I correct in assuming you are using 2x DM134B chips to act as drain to each of the 32 LED's in a string -- and a single mostfet to act as the active pull up for each set of 32LED's? or are you attempting to use the DM134B as a switching element for turning on the gate of the P-channel mosfets as well?

    The first question that comes to mind is that since a mosfet is voltage driven, what are you using to cause the P-channel mosfets to turn off? Do you have a pull-up resistor, or transistor? The DM134B is a current based device and is only able to draw a wire to ground (turn on a P-channel mosfet's gate by grounding it -- but not turning it not off). If all your mosfets are on, the LED's would be naturally dim to the eye because only 1/16th the power would be reaching any given LED rather than 16x for 1/16th the time -- which is a strobing effect. Also, most mosfets today are three terminal devices with a reverse body diode between the drain and the source such that reversing the connection between these two pins will cause the transistor to always be "ON". In your configuration, it would be important to make sure it really is the source pin hooked to the +5V power supply. (a diode/ohm-meter check with the drain disconnected, and the gate and source hooked together -- with the positive ohm-meter lead hooked to source-gate and the negative/common/ground lead of the voltmeter hooked to the floating drain should register infinite resistance or at least Megaohms....)

    If that isn't it, and I have understood your connections properly --

    1st. What part number are you using for the P channel mosfet?
    2nd What is the nominal on-voltage / or part number of the LED at full brightness & what is the current required.
    3nd. What resistor value are you using to set the drain currents of the DM134B (eg: pin 23 to GND on all except the QFN package which has pin 32 instead.)
    4th. How long is an LED chain left on before strobing to a new p-channel mosfet / are you perhaps digitally turning the LED's off or disabling the DM134B in software of some kind?
  4. Jul 8, 2010 #3
    Hey andrewr,
    Thankx for your reply.
    Actually we are using 2 DM134B as sink only. It is not being used for controlling the mosfet. The gate of Mosfet is connected to 220E pullup resistor with the 'st 74hc595' shift register being used as latch.

    And I think yes u've understood the design correctly. The source is connected to 5V after diode.
    We are using FDN340P as the Mosfet,
    2. The LED is amber (2.1V and 20mA current) required.
    3. Earlier we were using 1K but i am using 220E now.
    4. As I measured on CRO, the on time is 18.64 us.(I measured it on both legs one by one by taking common ground.).
    we are latching DM134B with the nand gate latch HTC573D.

    Kindly tell me what should we do to increase the intensity?
  5. Jul 9, 2010 #4
    You appear to be hitting problems which are subtle in nature and not really that much a fault of your design... but of salesmanship of an idea with some problems by the SiTI company....

    Long drawn out thought....

    Ok. Lets do some calculations and datasheet probing here...
    I Like ST brand HC chips, really robust!
    A 74HCchip will go rail to rail pretty much unless overloaded on current. 10mA is a rule of thumb value/output pin (10 loads, 5V @ 4.7K for ttl designs.). If that is a 22 ohm pullup resistor 22 followed by 0 zeroes, you would be at 5v/22=227ma which isn't good, chances are the CMOS chip is incapable of pulling that down to less than 2V and you won't get a FET turned all the way on. If it is 220Ohm, which I assume it is -- then you are at 23ma which is probably OK but you're running your logic chip quite hard, as they really aren't meant for more than 20mA/terminal. A 470ohm resistor would be more conventional. The capacitance of a FET is multiplied by the slew rate of the output. The typical datasheet charge says 7.2nC -- so double that for safety: 14nc and compute current requred for turn on at 10% of "on" time: = 14Nc / 1.864us = 7.5mA. So the 74HC load is around 30mA conservative worst case; that's too high, so I would lighten the pull up resistor (higher value such as 470Ohm) or best solution -- remove it altogether. The 74HC chip you are using will pull up the gate to +5V as a turn off value on its own so long as the 74HC595 pin 1 is permanently grounded which makes a pull up resistor un-necessary. Quick thought: the latch is not inverting, so a logical zero on the input equals turn "ON" -- that is an easy software mistake; on time of led = off time of latch; so check that your software doesn't output "1" as meaning 'on' by mistake....

    You are expecting 16 LED loads in parallel/chip. The DM134B with 220 Ohms resistance is 75mAx16=1.2A and that makes for around 0.9V output pin to ground minimum for it to function at all. 28mA*5V=140mW supply power besides output LED driver power. So, your are going to be walking the touchy power dissipation line with the DM134B...

    OK! your LED is a 2.1V @ 20mA version; likely an InGaAlP type....
    that puts your dynamic resistance at around 100Ohms above 20mA from other diodes which show 2.5V at 25ma, 2.1/0.02=~105ohm. So just estimate as if it was 100ohm always....
    safe dissipation avg wattage = 20mA * 2.1V =~ 50mW.
    75ma/20mA= 3.6; 3.6**2=12.96x the power at 70mA; so to keep the same average wattage you may only turn them on 1/12 of the time....

    Your off time needs to be around ~250uS to prevent the LED from being over heated which will cause it to loose efficiency and become substantially dimmer.... Since you are running 16 strings of LEDS you should be forced have an off time of 280us which is just about optimal....but you can't afford to waste time between runs -- you must always be refreshing as quickly as possible or the LED's will dim quite a bit more....

    The LED's output is proportional to current (photon/carrier) with some extra loss as the device gets hot/current crowded.

    Since you are 75mA/20mA = ~3.75 times as bright as normal, and your pulse operation time is 1/16th the normal time = composite effect is that roughly 1/4 the photons are output / LED as compared to normal. Part of your problem could be alleviated if you did not discharge the capacitance of the LED when turning off the FET -- but the gate-drain cap is quite large easily on the order of 10LED's worth. Secondly, for the charge storage on the LED's to be effective you need the RC constant / total cycle time to be on the same order of magnitude; and yours is waaay to slow for that. Faster refresh rate is one way to achieve this... but:

    One other thing you are fighting is that power dissipation goes as I**2, so that doubling current quadruples power dissipation (and lowers LED efficiency) but only doubles the number of photons emitted. The eye detects brightness logarithmically so for low intensities, doubling the light will appear far more than 2x as bright to the eye -- but at higher intensities a doubling of brightness will have much less effect. Where you are heuristically, I can't know. You have to empirically find that out.

    At least one, and likely both of these things are working against you in your current design; Time multiplexing saves wires but it majorly costs you in terms of power efficiency and sometimes apparent total light.

    The most obvious fix is to get a much more efficient/brigher LED (4x as bright as your present one.) but there are other work-arounds you might consider -- placing capacitors across each of your LED's will cause the instant current going to the LED to drop, but extended in time by the RC constant.
    Reverse current flow is a problem, and your FET has an intrinsic body diode which will potentially ruin this effect unless a blocking diode is added... but assuming that were fixed:

    For example a 1uF capacitor on your present system assuming it is in parallel with a100ohms dynamic resistance LED is going to have a 63% voltage change every 100us when discharging; so a 10uF capacitor would have about a 6% change every 100us; and a 20uF capacitor would be in the ballpark to make the LED look as if it were not time multiplexed at all. There are low voltage electrolytic capacitors which are probably quite inexpensive as size drops rapidly with voltage. The capacitance swamps the bad capacitance of the FET gate to drain -- and the ability to have charge flow backward from one LED to another in the same set can have multiple solutions... it may even average out in a few cycles -- and as a bonus, holding the drain voltage much nearer to constant reduces the miller effect and load on your 75HC chip at the same time. So that seems like one reasonable possibility for increasing the brightness -- but at a small cost -- just add an electrolytic cap in parallel with each LED. (Also watch out for dynamic power dissipation of the cap...some of them are horrible). If you have a through hole board -- the capacitors can be mounted on the back side. You will then be free to raise the current level anywhere up to 300mA/LED (your chip can't....). Even if you leave the current level alone at 75ma you will still see a gain in brightness due to the increase in efficiency of the LED and the lengthening of the emission period; though the brightness v. capacitance is probably best found empirically in that case.

    Since you are in the milli-ohm region with the mosfet; we can assume around a 2.25V drop across the LED and FET. And that means approximately 2.75V will have to appear at each pin of the DM134B. At 75mA only 0.9V is required, so you will be dissipating around 3.3Watts/chip once the capacitors are installed. That is likely going to destroy/overheat them. The supply voltage needs to be reduced to 2.25V+1.2V=3.45Volts for each LED string -- and that reduction can be by a voltage for the reverse blocking diode to protect the charged capacitors from discharge, although you are free to leave the 75HC and DM134B on the 5V rail. If the added power diode has a voltage drop of around 1.5V at 1.2A to 1.5A (75-90mA/LED) you will be quite happy with the result. It only needs around 200milliwatt average power dissipation capability.

    1.2A*1.0V + 140mW =~ 1.34Watt of power in each DM134B avg w/ (all LED's ON).
    The only chip I would be concerned about is the SSOP version. Also as ambient temperature goes up -- power dissipation is going to get worse.

    You're in a bit of a complicated problem with several drawbacks, and are near the edge of the performance of the chips you are using. From the SMD part numbers, I would expect your prototyping to be difficult to change without re-making boards; are you open to discussing the nature of the problems and possible design alternatives which might prove effective?
    eg: what are your constraints & is a redesign worth it if it provides benefits in cost/quality/uniformity? or is this a one shot where buying more expensive LEDs is probably the best route?

  6. Jul 10, 2010 #5
    Thanks Andrew.

    Yeah I can work on new design if it has good possibilities. Along with that I want to refine this design if possible. I will also try using higher brightness LEDs.
    Tell me one thing will using the capacitors along with LEDs work.
    I mean will it affect the ON-OFF time of LEDs or not???
    I will try using the capacitors accordingly....

  7. Jul 10, 2010 #6
    Well, considering the resistance value of the LED is an estimate -- the precise amount that they will affect the on/off time is not known. But my estimate is for a typical amber LED equivalent to the one you are presently using -- and not an improved LED. (Best guess).

    The capacitor, being in parallel to the LED acts to maintain the voltage even after the main FET is turned off, so YES they keep the turned ON time extended whenever they are charged. Essentially since charge is conserved -- the current applied for the "on" pulse time flows mostly into the capacitor and not the LED; but during the normally off time the capacitor returns that charge to the LED. So in your present design, without modifications other than a blocking diode -- adding a capacitor ought to significantly brighten the LEDs presuming your circuit doesn't have any other programming/wiring mistakes.

    Just adding a capacitor to your present design, without adding reverse blocking diodes won't help.
    Adding a single diode/FET isn't the ideal -- but as a prototype check; that doesn't require much work on your part; and a single diode for each group of 16 allow you to see the average brightness change; if you did it for only 2 banks -- that would allow you to test the idea with all its problems.
    There is one extra problem with having a single diode, and that is charge stored in one capacitor can discharge into another capacitor that is turned on in the same DM134A row (but different FETs) via a complicated path involving perhaps 4 or more capacitors....
    For quickly changing patterns of "ON" LEDs this will add an additional delay or sluggishness in getting to full brightness of certain LED's (pattern drawn dependent) -- who's significance as problem/non-problem is up to you to determine.

    The ideal situation would use one blocking diode / LED, rather than 1 blocking diode for each FET; 200mA capable diodes can be gotten for around $0.03 each or less if you hunt; eg: 1N4148, and seeing the price of your FET, I presume you are pretty good at that....
    Alternatively, A PNP transistor or dual PNP transistor can be purchased with a built in base resistor. If you choose 4.7K base series resistance, (gain 80 to 100 transistor) your ST HC latch can run 8 of them in parallel without a problem/output line; (it can run 20, but it would be better to have each chip only run 10, and just double the chips. The total cost change is going to be quite small.).

    The individual cost of these transistors is higher than your FET, but the higher number will also cause a price break increase and has the advantage that they don't needing the reverse blocking diode so that final cost/board space may turn out better than discreet diodes and FET; eg 1Fet+32 diodes, vs 32 PNP's or 16 dual PNP's. Especially if the cost of the brighter LED for the alternate fix is worse than the capacitor style fix with cheaper LED. The kind of PNP part I am thinking of is the DDTA122TU / DDTA142TU, but there are clearly many competitors who may have a better price.

    As far as re-design goes -- once you know how the capacitor/diode fix works;
    some further design questions revolve around how important similarity of brightness is from diode to diode:
    eg -- are you paying a price for matched/binned diodes that is a significant cost; how much does the cost of the sink chip (the DM1...) affect your design; would something like a programmable MCU with another HC chip in place of the DM chip and discreet transistors be a possibility? The possible advantages there are associated with the ability to program/measure using a built in A/D the individual LED output current and to program a correcting algorithm to allow the use of mismatched LED's (often lower cost, how much this affects the design I don't know). The design would also allow intensity modulation of the LED's allowing more than binary on/off images -- the cost is a single calibration step where the intensity correction of the LED's is programmed into the MCU. (Which can be done on an assembly line in the power up QC test -- eg: a video camera and a little software can calibrate the entire board all at once in a fraction of a second from it becoming operable.) The second advantage of this type of approach is that the power restriction of the DM1... series chip is no longer the bleeding edge reason of what limits the overall brightness of your board. The design you have now has very little variation headroom for increasing the brightness of LED's in an efficient manner.

    Whether the alternate design I am thinking of has any merit depends on your desires for the project, and actual costs which can't be estimated very well without actually designing the project out -- but there is quite a bit of room for trade-offs and the chances are good a cost improvement/quality improvement may be possible if you are interested in either of these.

    I suppose the first step is to just optimize what you have, and see whether that satisfies you or not first.
    If you wish to proceed with a bit more "blue sky" thinking about alternatives, let me know.

    You're welcome.
    Last edited: Jul 10, 2010
  8. Jul 12, 2010 #7
    Hi Andrew,

    Thanks for the suggestion. I think its not working as I tried several things to increase the intensity. I also tried to add capacitor in parallel but instead of increasing intensity the LED was off. I am not getting to the final touch. What shd I do now????

    thanks n Regards
  9. Jul 14, 2010 #8
    Test a very simple circuit, use your scope and see if you can detect what is different between my analysis and reality. There is clearly something I didn't realize/take into account; or there is something you interpreted differently. The LED ought not be off. (Check to see if it is glowing perhaps dimly with room light off... don't trip in the dark though!....) I have done this project before using slightly different parts maybe 15 years ago -- so, I know I am not insane even though I regularly mess up calculations as of late.

    Consider what I used to debug my circuit some years ago:

    VCC+5 to 6V ---|ssdiode>|---*Junct1*---Rser---|amberDiode>|---*Junct2*----QE1 *B1* C1---GND


    *QB1*--- IOProcessorPin.

    QE1,B1,C1 is a 140mA+ bipolar PNP transistor buffer, 2N3906, or PN3906 .... etc.
    The anode of ssdiode (a 100mA+ diode eg. ,1N4148, 1N4448, 1N914) is to the +V, and the cathode goes to Rser, and a parallel circuit Junct1.
    The parallel circuit is just the electrolytic capacitor, notice the polarity! a backward electrolytic will make the LED go out and likely ruin the capacitor.
    The serial resistor limits current flow during "on" time and simulates worse quality diodes;

    For you, Solve:
    5Vsupply - 0.7Vssdiode - VRser-1.2VLED - 0.7VQ1=0
    Set the resistance "Rser" for about 20mA at very first. Smaller values will be dangerous,since your software, if it has a bug and turns the circuit on too long, will damage the LED and cause it to permanently loose brightness.

    Program the IOpin to normally be at logic hi, 5V. Have it do a 0V output for 1ms, outputting pulses every 4ms. eg:4+1=5ms, That's what I did, and it fits on a scope screen very nicely and makes time-constant calculations easy to do and to view.

    Measure the voltage at the transistor emitter to get things going... you can replace the entire circuit except the transistor and cpu with a 4k resistor to debug your software.

    The observed low emitter voltage should be ~0.7V above ground and the high voltage near, but less than, the power supply / 5 to 6V.
    Waveform on scope -- at the transistor emitter should look like:

    If this circuit does not work, it is either a calculation mistake or a bad part or bad wiring.
    Once you have it working, you can vary the size of the resistor and capacitor to learn their effects.

    That pretty much exhausts all I know about the circuit; I would recommend you find someone close to you who might be able to take the notes I have given you and help you debug it. I am likely to confuse things from an english text description considering how my health is going right now, and might have to try several times to get it right which I think will be frustrating for both of us.

    Best wishes.
    Last edited: Jul 14, 2010
  10. Jul 14, 2010 #9
    By the way, what is the nominal on-voltage / or part number of the LED at full brightness & what is the current required?
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: P-channel Mosfet Design for switching of LED display as source