P-channel mosfets w/ arduino

I am trying to make an arduino based system to control the brake lights of a vehicle. I have only used N-channel mosfets before. My bulb has x2 12v inputs (low & high beam) and a common ground. Since I only want to control the high beam, I believe a P-mosfet is required before the bulb

My arduino is powered by the vehicles 12v battery and regulated to 9v, and then to 5v.
The gate directly connected to an output pin
The source is 12v
The drain is leading to the high beam on the bulb

The seller of the mosfets claimed to be logic level yet the datasheet does not say anything about logic level but it still should work (i think)

Mosfet: IRLU9343PBF

The problem is, the high beam on always on. Switching the gate HIGH or LOW makes no difference and ive tested the mosfet with the multimeter and it doesnt seem to be blown

Since the difference between my gate and source is 7v, and the datasheet mentions RDSon between -4.5V & -10V, shouldnt this work?

As i understand the whole negative voltage is not compared to ground but to source?

Give this a read:

Note how Drain and Source are connected. Also note the resistor to Vcc which makes sure the MOSFET is Off when the gate floats. Just substitute your light for the motor in the link.

Ron

Circuit F1 should work.

You should be inserting your control circuit at the relay, not at the bulb. It's why vehicles have relays in the first place...to control a high current device.

This is your MOSFET:

Regardless of what you were told the data sheet does not point to it being a logic level P channel MOSFET. It is also not designed as a switch exactly, Will it work? Likely, check the data sheet.

Also if your bulb is a filament type it is likely an 1157 or 1034 lamp which are very common tail / brake lamps. Normally you want to refer to the filaments as High Filament, Low Filament so people do not confuse terms like High / Low beam as in headlights.

With an 1157 or 1034 depending on the lamp typical current on High Filament is about 2 amps (a little over) per lamp so your brake light load is a little over 4 amps. You want that when you look at the data sheet Gate-to-Source Voltage (V) curves.

Keep in mind that the brake light switch not only operates the brake lights but on most vehicles sends a signal to the ECU telling it the brakes are being applied. You don't want that signal altered.

Ron

Not needed to use a logic level P-channel fet, because gate drive voltage with circuit F1 is 12volt.

Circuit F1 is dangerous to the fet in a car.
A spike > 20volt will kill the fet.
Same for circuit H1.
Leo..

To turn a P-channel OFF you have to put source voltage (12V) on the gate, how do you do that with a 5V output pin?

JCA34F:
To turn a P-channel OFF you have to put source voltage (12V) on the gate, how do you do that with a 5V output pin?

Set the pin to INPUT, let the source/gate resistor do its thing. That same resistor will prevent the pin from burning when it's set to output.

It'll work well, albeit of course not the recommended way to do it.

wvmarle:
Set the pin to INPUT, let the source/gate resistor do its thing..

Not as simple as that.
The pin protection diode (to VCC) prevents the pin from rising more than 0.65volt above VCC.
Must use a small drive transistor (level shifter) between pin and gate.

But, as said, a common level shifter and P-channel fet shouldn't be used in a car.
A grounded gate (with the level shifter) and a source connected to a potentially dirty supply...

See diagram four on this page,
Leo..

Wawa:
Not as simple as that.
The pin protection diode (to VCC) prevents the pin from rising more than 0.65volt above VCC.

Darn... forgot about that thing. Not on my cleverest today :slight_smile: