P channel MOSFET or 2N3906 PNP project

Thread Starter

Tonyr1084

Joined Sep 24, 2015
9,744
You can't change the direction of a MOSFET body diode.
View attachment 309983

As you can see, this diode is now forward-biased. And it will conduct current regardless of the voltage on the gate.

The proper way is this way

View attachment 309985

The body diode is reversed-biased and the gate voltage will control the MOSFET state.
Not to belabor this point, but did you see post #17?
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
9,744
Continuing the thought process; the controller provides ground to each element. So when any or all outputs are held low all LED's will be on. In other words, to keep an LED off there should be 12V+ present at both the Cathode and Anode ends of the LED. Since the common anode (not the ones I have) is 12V powered at all times and only each segment is pulled low to light it - the BJT configuration should work.

Agreed?

Been spending too much time in the wood shop.
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
9,744
My only comment is you should probably use 1 dropping resistor on each of the anodes instead of the one connected to the cathodes.
Understood. And sort of agree with. However, at 10mA (red) and 9mA (green & blue) the single resistor should be plenty. 28mA at 12V is only 336mW. A half watt resistor should be plenty. [edit or two 2K 1/4W parallel resistors]

However, I'm open to other trains of thought. I'm not unwilling to learn a new trick or two.
 

dl324

Joined Mar 30, 2015
18,446
Continuing the thought process; the controller provides ground to each element. So when any or all outputs are held low all LED's will be on. In other words, to keep an LED off there should be 12V+ present at both the Cathode and Anode ends of the LED. Since the common anode (not the ones I have) is 12V powered at all times and only each segment is pulled low to light it - the BJT configuration should work.

Agreed?

Been spending too much time in the wood shop.
Yes.

If the PWM output is close enough to 12V when a particular LED is off, you only have leakage current in the transistors to contend with. Unless the leakage current is very high (which I doubt), or the LEDs are very bright at *extremely* low currents (which I doubt), pull-up resistors on the base won't be required.

I have used NPN transistors on LED cathodes without pull-down resistors on the base and haven't had problems with LEDs turning on from any leakage current if the bases were floating.

A Fairchild datasheet specifies a maximum Icex of 50nA. OnSemi gives the same number for 2N3904.

From TI:
1702578638590.png
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
9,744
The base-emitter resistor can be 100k, but that only works if you open the drive connection to the base to turn it off.
What signal levels are you intending to use to control the BJT?
I'm assuming the PWM is either 12V high or 0V low. Wouldn't that force the base to drive high or low without the need for pull-up's or pull-down's?
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
9,744
I have used NPN transistors on LED cathodes without pull-down resistors on the base and haven't had problems with LEDs turning on from any leakage current if the bases were floating.
But this would need to be PNP since the Cathode is common. If the Anode was common then the controller could sink the current on each Cathode. If that were the case this project would have been done and never brought to the forum.
 

dl324

Joined Mar 30, 2015
18,446
But this would need to be PNP since the Cathode is common. If the Anode was common then the controller could sink the current on each Cathode. If that were the case this project would have been done and never brought to the forum.
Understand. It's just that I don't have relevant experience with driving individual LEDs high side so I gave my experience with driving low side without pull-down resistors on the base. 2N3904 and 2N3906 are complements, so you'd expect their characteristics to be similar.
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
9,744
I bought some tri-color LED ribbons that have a 12V source, 12V controller with IR remote and IR sensor. Four lines:
+12V
PWM ground (for lack of a more appropriate word) for each color.
The tri-color LED's I have are common Cathode, which won't work without additional circuitry. I just want to be sure I take the right approach.
 

ElectricSpidey

Joined Dec 2, 2017
3,350
Understood. And sort of agree with. However, at 10mA (red) and 9mA (green & blue) the single resistor should be plenty. 28mA at 12V is only 336mW. A half watt resistor should be plenty. [edit or two 2K 1/4W parallel resistors]

However, I'm open to other trains of thought. I'm not unwilling to learn a new trick or two.
Chooo Choooo...
Do you expect all of the LEDs to be the same brightness at 9/10 mA?
Do you expect 28 mA thru a 1kΩ resistor with 10 or 9 volts across it?
Do you expect the blue or green LED to light if the red one is on?
Do you understand current hogging?

Perhaps if the controller offsets its PWM signals the blue or green LED can light with the red.
 

eetech00

Joined Jun 8, 2013
4,723
I would use a pmos because there is less current draw from the PWM source.
In addition, I would use a nmos to control a pmos, that way the drive voltage can be different than the load voltage (more flexible).
 

k1ng 1337

Joined Sep 11, 2020
1,038
Hi Tony, many MCU can handle 20+mA on their GPIO. Any reason not to drive the LEDs directly? Your schematic is dropping voltage with the resistor(s) so I don't see the need to have switching elements when the GPIO output current may be sufficient.
 

Thread Starter

Tonyr1084

Joined Sep 24, 2015
9,744
Do you understand current hogging?
Yes, I do. I'll have to test to see if my approach will work. I've driven multiple parallel LED's through a single resistor before. They all had very similar Vf's. I just kind of disregarded the possibility of them working or not with the different Vf's.

Will test Friday morning to see how they behave when powered all in parallel. My cat wants to say something. I think she wants to sleep on the keyboard now that I'm using it.
 
Top