# P-channel MOSFET as high-side switch gets hot

So I'm trying to control my front lights of my car using an Arduino Nano. In total there are 14 lights (including foglights and blinkers etc.). I'm using two 75HC595 shift registers to control these lights. In my car I also have 14 LEDs so I can see which lights are on. To switch the lights I wanted to use MOSFETs, but because all the lights have a common ground I must use them as a high side switch -> P-channel. I'm using the IRF4905. The lights I'm switching are 55W. At 12V the current thats flowing is around 5A, which should not be a problem, right? The problem is that the MOSFET gets really hot after a short amount of time.

This is the circuit I used to switch one light (all lights would be a huge picture). Transistor is BC547C. Relay is the standard one in my car. Couldn't find lightbulb in Fritzing so I used a Resistor (R6 is lightbulb). The value of R6 is not correct

When the light is on there is about 11.52V across the (+) terminal of the battery and negative side of the light, but there is 10.85V across the light itself. So am I correct if I say there is 0.67V across the MOSFET? I measured the current and it was about 2.58A.

$0.67V \cdot 2.58A = 1.7W$ at the MOSFET

${{0.67V}\over{2.58A}} = 0.26\Omega$ while $R_{dson} = 0.02\Omega$

If I'm doing something wrong in my calculations please tell me. Is there something wrong with my circuit or do I have a faulty batch of MOSFETs (tried 3 different)?

Edit: I've already tried to remove the 74HC595 in the circuit but it's still running hot.

• That's an N-Channel MOSFET you've got in your diagram. – brhans Mar 24 '16 at 21:08
• @brhans good call, changed it – fieldhof Mar 24 '16 at 21:16
• And 0.67 / 2.58 does not equal 0.02 ohms, it's more like 0.3. this suggests that you need to measure the gate voltage of the FET. It should be less than 2 volts. – WhatRoughBeast Mar 24 '16 at 21:20
• Also, by the way, are you aware a cold H1 55W lamp can drain, from memory upwards of 60A for the first few ms? Do you PWM? do you switch often? During switch-on you're punishing the mosfet close to its limits, if you do that too often in limited time, it could possibly have damaged the channel. (PS, at 1.7W I'm not very surprised it gets hot. Rth(J-A) = 62 K/W and Rth(J-C) = 0.75 K/W, I'd say the case in free air could well be north of 100 degrees C - AKA boiling point of water (ish) ) – Asmyldof Mar 24 '16 at 22:43
• R7 is 220ohm. The LED is just a regular red LED from China: 2.8V 20mA. R6 is the lightbulb, it is a 12V 55W H1 light – fieldhof Mar 25 '16 at 10:39

### The problem

The /OE (output enable) pin of the 74CH595 toggles the output drivers between two states: driving the outputs (high or low) and high impedance (letting the output lines float). It is active low, so driving /OE low causes the 74CH595 to drive the outputs high or low depending on the data you have shifted in, while driving /OE high causes the outputs to float undriven.

You have tied the /OE pin to the 5 V supply trough the 10 kΩ resistor R29, so the output drivers are always in the high impedance state.

Ideally no current would flow in this state, and consequently the unnamed NPN bjt would never conduct any current, but in practice there is always some leakage current present:

There is no such thing as a "BC447C", so I assume that the transistor is either a BC447, a BC547C or some other similar part. If say +1 μA was to leak from the 74CH595 output to the collector of the BJT, the transistors DC current gain (likely somewhere between 100 and 600) would cause it to conduct from 100 μA to 600 μA of current from the collector to the emitter. For example a collector current of 300 μA would lead to a voltage drop of 3 V over the 10 kΩ resistor R7, leading to a Vgs (gate to source voltage) of -3 V.

This hypothesis is consistent with what you saw (Ids of 2.58 A and Vds of 0.67V), the gate voltage must be very close to the threshold voltage (Vgsth):

### The fix

• Add a pull-down resistor between the base of the BJT and ground to stop stray currents from turning it on.

• Remove the unnecessary 10 kΩ resistor R29, and connect the /OE pin directly to ground.

• The LED would light up extremely dimly in its current configuration. Put it in parallel with the transistor base, with a separate current limiting resistor.

• Add a bypass capacitor for the 74HC595, as close as possible to the 74HC595.

• If this is going to be installed in a car, I would add transient protection for the MOSFET gate in order to protect it from any voltage spikes (the gate oxide is easily destroyed by overvoltage). A 15 V TVS diode would be ideal, but a zener will work as well.

The components you have chosen are just fine for what you are doing.

simulate this circuit – Schematic created using CircuitLab

• Excellent answer, maybe mention that the decoupling cap C1 must be physically as close as possible to the shift register to have the intended effect. – marco-a Mar 25 '16 at 6:28
• Nice explanation, but as i've mentioned in the comments, i've already tried removing the 74HC595 in the circuit and it still runs hot. I've changed the name of the Transistor, typo. I had a mistake in the drawing of the circuit. There should also be a wire from /OE pin to Arduino D7. This way I can control when the lights should be working. When I connect /OE directly to GND all the lights turn on when the Arduino is started, and that is something I don't want. – fieldhof Mar 25 '16 at 10:33
• @fieldhof You still want that 10k resistor from the base of the NPN BJT to ground, even without the shift register. When the arduino starts up, the ATmega328/ATmega168 IO pins are set as inputs, and the input leakage current can be as high as 1 μA. Could you please measure the MOSFET gate to source voltage with a voltmeter, I still suspect that the gate is not being driven low enough, as the MOSFET should only dissipate 133 mW at 2.56 A. – jms Mar 25 '16 at 11:03
• Gate to source light off = 0V, Gate to source light on = -11.2V, Battery is reading 11.6V when on – fieldhof Mar 25 '16 at 12:05
• Well that would refute my hypothesis quite conclusively. Have you tried replacing the MOSFET in case it has been damaged? Are you certain that it is indeed a IRF4905? – jms Mar 25 '16 at 12:15

We can now say that the p chan has low enough on resistance and the gate source drive volts are adequate .There is no protection for your gate so you could be damaging your fets from power supply spikes .Place a say 18V zener between gate source and try again.Another possibility is parasitic oscillations which a scope would prove or disprove .I think you should place a gate resistor in series with the gate of say 1K ohm to eliminate the possibility of parasitics. Your 12V rail should have some decoupling caps also.

• Can a car battery provide spikes when it's not connected to anything except this circuit? It's not being charged or anything, only this circuit is hooked up to the battery. The gate resistor can be placed between Collector and Gate if I understand correctly? – fieldhof Mar 24 '16 at 23:19
• If you put the proposed 1K gate resistor in the collecter the gate drive is halved which will make it hotter.If you must put it in the collector then make R7 10K ohm. – Autistic Mar 24 '16 at 23:26
• So what do you mean with putting a gate resistor in series with the gate? I already swapped R7 for a 10K ohm resistor – fieldhof Mar 24 '16 at 23:37
• Good .do the zener and bypass the rails because you want this to survive in a car.How are things on the scope? – Autistic Mar 24 '16 at 23:47

I think, that the correct answer would be that the MOSFET is getting hot because it should be.

Let's make some calculations: According to datasheet of IRF4905, it has junction to ambient thermal resistance $R_{ja}$=62°C. Let's assume ambient temperature $T_a$ of 25°C and dissipated power of 1,7W. Now, according to this site: http://www.rohm.com/web/eu/tr_what7 to calculate junction temeprature you have following equation: $$T_j = T_a + R_{ja}*P$$ When you do the calculations for your case, you get junction temeprature 130°C - pretty hot, but still not hot enough to cause any damage to transistor. Still if you want to put it in some compartment, I would suggest adding a heatsink. Following circuit design advice given by jms is also a good idea.

• While your math is sound, the premise is not. At a junction temperature of 130 °C, Rdson would become (according to the datasheet fig 4) 1.55 times the advertised 20 mΩ (which assumes a junction temperature of 20 °C), 31 mΩ. In order to get the assumed 1.7 W of dissipation over 31 mΩ, a current of 54.8 A would be required. I think it is safe to say that the 55W lamp isn't drawing 670 W of power. Either the MOSFET is damaged, or the gate voltage is inadeguate. – jms Mar 25 '16 at 11:53
• @jms You are right, and I think I am (at least partially) too :) At the voltage drop and current given by fieldhof, there would be 1,7W dissipated on the transistor and my temperature caluculations are correct. But I agree, that there should not be such a voltege drop there - probably it's not fully opened. – mactro Mar 25 '16 at 12:07

My idea is that the ground point of MOSFET source pin is inductive as much as kicking the source voltage up and drop the gate voltage under theresold after the rising edge, causing a new inductive kick after rise of Vgs, preparing the conditions nearly same with the first kick, enough to make a stable oscillation. So, the recipe is to reduce the rising speed of turn-on voltage OR improving the ground connections.

If you first turn on the lights by the relay, then turn on the MOSFET and then turn off the relay, and if MOSFET is doing good, then this makes a nice hint supporting my idea.