What is the right transistor to control a 3 V load with 12 V PWM signal

The schematic on the left is for an RGB light kit that I want to install in a car to replace the stock LED. As shown the RGB LEDs have common anode that is connected to 3.0 V, and there is a micro-controller that controls three N-channel MOSFET transistors (BL2300) to set the color and brightness. (Correction to the schematic, the red and green leds each has a 15 ohm resistor in series not 150 ohm, while the blue LED has a 10 ohm resistor)

The car runs the stock LED module through 12 V PWM signal to control the brightness and to softly turn on and off the light. My goal is to integrate the car's brightness control with the replacement light to maintain the same effect.

So I am thinking the best way to do that is by adding a transistor to control the 3 V input voltage with the PWM signal from the 12 V line. (Schematic on the right)

1. Can I use BJT transistor? I have a lot of NPN and PNP waiting to be used, or a MOSFET is needed/better? (The LED is small and don't use much current)

2. What size and how many resistors do I need? And will the 12 V at the base/gate have an effect on the voltage/current going to the LEDs? Do I need a voltage divider?

3. Will this added transistor cause voltage drop that will impact the brightness? If yes, by how much?

Update: (I also corrected the schematic since the 4.7k ohm is a pull down resistor and not the gate resistor)

Based on the information given below and my understanding I am going to use a logic level N-Channel transistor with 100 ohm resistor at the gate. My signal is at 12 V and Vds is 3 V which means Vgs will be about 9 V.

The transistor is going to be either AO3400 or RJK0451DPB (since I have them both)

AO3400:

• Has a maximum Vgs rating of 12V (at the limits!)
• Gate Threshold Voltage (maximum) 1.45V
• Ron a bit high (maximum 33 mOhm at Vgs=4.5V)
• Very fast (td(on)=3ns, td(off)=25ns, tr=2.5ns, tf=4ns)

RJK0451DPB:

• Has a maximum Vgs rating of 20V which is good.
• Gate Cutoff Voltage (maximum) 2.5V (This is cutoff not threshold)
• Ron is low (maximum 9.6 mOhm at Vgs=4.5V)
• Fast (but slower than AO3400) (td(on)=13ns, td(off)=48ns, tr=4.8ns, tf=6ns)

Notes:

• Syncing the two PWM is too hard so I will try without.
• Using P-Channel will required inverting the signal, which means more components. N-Channels seems good for my case.

Datasheets for the transistors:

• Are you sure that your car is controlling the high side and not the low side of the light? I've seen both. And in my car, it actually uses both on a few of the lights at the same time. Oct 29, 2021 at 17:09
• Yes, it is the high side. The other wire is ground. Also confirmed it from the car's wiring schematic. Oct 29, 2021 at 17:18

Top BJT is emitter follower due to its location and how transistors work. Won't Typically work as a switch.

But your case is unusual in that your base voltage (12V) is so high compared to your supply voltage (3.3V) which is unusual. That lets you use a NPN BJT on the high-side, and almost a standard NMOS without a floating base/gate drive. 12V-3.3V gives a headroom of just under 10V while standard NMOS requires a Vgs of 10V, ideally 12-15V to switch. Logic level NMOS need 5V difference or less between gate and source so those would still work.

Normally the ground referenced base/gate voltage is not so tremendously higher than the supply voltage and would need floating drive. Or use a PMOS or PNP instead.

You should look up why that is (source/emitter followers vs switches) and roughly understand it before proceeding.

The voltage loss across the top transistor when operating as a switch (not as a follower) is the saturation Vce. For a MOSFET it is the RDson for the Vgs you are running it at. Ballpark, negligible voltage drop due to RDson for NMOS, and 0.2V for NPN.

• I tested the design using the RJK0451DPB transistor with a steady 12 V (not PWM) and it works great with no voltage/current drop on the LED. Will test it in the weekend using the car's PWM signal Nov 2, 2021 at 7:43

I would strongly suggest you should NOT use the schematic you show with the NPN BJT.

I assume that the PWM from your external controller and the PWM from the small MCU are not related or synchronized in any way. If that is the case then the effect of your external PWM signal may pose several problems:

1. If the PWM signal from the small MCU is OFF and the 12V PWM signal is ON, there will be approximately 8mA flowing from your 12V signal into the small MCU 3V supply via the NPN BC junction. The effect of this is unknown since you don't have complete information, but it could potentially damage the MCU.

2. Since the PWM times are unrelated and not in sync you may see color/brightness corruption (the LEDs may 'twinkle' other colors or brightness variation) since only some of the R, G or B signals are modulated by your external PWM. When the External PWM is OFF, the small MCU PWM is ignored.

In addition, as already pointed out in another answer, the NPN based solution will result is a voltage drop of around 200mV (VCE(sat)), this may well result in a change to the maximum brightness, since you have almost no headroom in the small MCU circuit for the Blue LED.

The first problem to solve is that you need the PWM signals synchronized. The best way to do that would be to sense the PWM frame rate from the small MCU, and use that for your external PWM circuit. Secondly use a P-FET (invert your PWM signal) high side switch (on the 3V supply) to apply your external PWM signal. You may still have some color artifacts to solve, but it should be a minimal problem. You'll need a very low VGS(th) P-FET, look for devices with about 1.5V threshold.

• Oh, it is more complicated that I thought! Unfortunately I have no control over both PWM, I will give it a try with a PFET and see the results. Oct 29, 2021 at 17:10