Pages: [1] 2   Go Down
Author Topic: Me vs. P-Channel MOSFET & LED | Led never turns off completely  (Read 3953 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!
I'm struggeling with a simple p-Channel Mosfet - controlling an LED.
It's basically this circuit:
http://ruggedcircuits.com/html/circuit__28.html
The MOSFET im using is this:
http://www.fairchildsemi.com/ds/FQ/FQP27P06.pdf

!!!The MOSFET in the given circuit is N-Channel - i changed mine accordingly (put the LED on the source-side of the MOSFET).

The Arduino is powered by USB - but has a common ground with the circuit.
The circuits V+ is 3.3V.

The code to drive the MOSFET is the Blink-Demo from the Arduino examples.

And here is the Problem:
When the Arduino triggers the MOSFET the Led changes their intensity (alternating to the debug Led on the Arduino -> p-channel has switched logic) correctly, but it never turns off completely!
As i can see the circuit does the job - but the Led still lights a tiny bit when in should be turned off. If i change the voltage, the brightness in the Led-off-State changes, too.
I found this problem in one other related Post - but no solution was given...can you help me to turn off my evil Led?

Thanks!!!
OptimusPrime


Logged

Montreal
Online Online
Faraday Member
**
Karma: 27
Posts: 2566
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need one more n-channel mosfet or BJT transistor to drive p-channel mosfet:
http://ruggedcircuits.com/html/circuit__11.html
How much current your led's consume? Probably it would be easier to use just BJT or ULN2003 driver.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need one more n-channel mosfet or BJT transistor to drive p-channel mosfet:
http://ruggedcircuits.com/html/circuit__11.html
How much current your led's consume? Probably it would be easier to use just BJT or ULN2003 driver.

Additional N-channel mosfet is not needed!  Just pulling the P-chan mosfets gate to the ground (ie the avr can send a digital low) should be sufficint to switch it on.
http://ruggedcircuits.com/html/circuit__16.html

« Last Edit: August 09, 2011, 09:25:41 am by kalum » Logged

Montreal
Online Online
Faraday Member
**
Karma: 27
Posts: 2566
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are right, it's sufficient to turn it on. But the problem is to turn it off...
When arduino send "high" - 5V, there would be still voltage between source-gate equal :
Vsg = Vleds - Vhigh
Circuit #16 is o'k till Vpower = 5V. If it goes up (12V or higher for a few leds) the would be an issue
« Last Edit: August 09, 2011, 09:31:50 am by Magician » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are right, it's sufficient to turn it on. But the problem is to turn it off...
When arduino send "high" - 5V, there would be still voltage between source-gate equal :
Vsg = Vleds - Vhigh
Circuit #16 is o'k till Vpower = 5V. If it goes up (12V or higher for a few leds) the would be an issue

How about connecting the r3 resistor from the gate to the ground, instead of the current configuration in which it is connected to the positive.  That way the p-chan is always on, but when the arduino send a digital high, it wil the gate will be pulled high and it will be switched off.
Logged

Montreal
Online Online
Faraday Member
**
Karma: 27
Posts: 2566
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Source of the p-mosfet connected to +Vleds, and what making mosfet to conduct is difference between Vgate and Vsource.
Quote
Vsg = Vleds - Vhigh
Vhigh (max 5V, real 4.4V) , mosfet will be conductive if Vgs > 2 - 3 V(depends on type of mosfet), or if we turn it around when Vleds > 4.4 + 2 ... 3 V     ~=   6.4 ... 7.4V
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi again!
Thanks for your ideas!
I tried Circuit16 (the first one) but the result is the same - in fact it doesn't matter weather i pull the gate low or high  smiley-confuse

Quote
...and what making mosfet to conduct is difference between Vgate and Vsource.
Is it possible that my Led power consumption is to low to get the MOSFET triggering off again? Could you explain this difference-thing again? I read Wikipedia twice and watched some nice Video-Tuts - but i didn't get the point yet, i guess.

Quote
How much current your led's consume?
The Led needs about 3.3V and 20mA. The further plan is to set up an Led matrix, controlled by MOSFETS on each row and column to get each Led adressable.

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33362
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Basically you are not using the correct circuit for a p-channel FET

Quote
I tried Circuit16 (the first one) but the result is the same
That will only work with a logic level FET, which you haven't got, and a 5V supply, which you haven't got.

You need this:-
http://ruggedcircuits.com/html/circuit__11.html
If you haven't got a FET for Q2 you can replace this with a normal transistor and remove R2.

Note the source is connected to the 12V supply and the drain to your load. The gate is connected to the +12V supply so normally it is off. When the gate is connected to ground the FET turns on. That is the job of the transistor. You can't connect the gate directly to the arduino pin because it will only supply 5V which is not enough to turn the FET off.

Quote
Is it possible that my Led power consumption is to low to get the MOSFET triggering off again
No that will make no difference.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I build it (with a transistor - as you described) as given in Circuit11 but it's still the same - the led just dims a little bit when it should be turned off. Im quite new to all this as you probably see smiley-wink - perhaps i'm just doing the same mistake over and over...  smiley-cry
The alternating connection between GND/V++ and the Gate can be measured by a circuitanalyser - but the MOSFET does "anything??"...
I also understand why there is an transistor for triggering the MOSFET but i don't get it why the Led isn't turned off completely...

Thank you all for helping me!
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33362
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK forget the arduino and the transistor, just have the resistor between gate and 12V, with the source to 12V and led & resistor between drain and ground.
If the LED is still not off then you have blown up the FET and need to get another one.
Then dab a wire from the gate to ground. The LED should light up fully. If not again you have blown up the FET.

Alternatives to having blown up the FET are that you have miss identified the FET connectors or wired it up wrong.
Logged

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1643
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

...and to think... some folks insist FET's are simpler than BJT's.

I guess not based on the questions asked in this forum...

It's almost the point where every FET question needs to wait for GrumpMike's obligatory "that's not a logic level FET" comment.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok - i feel cheated by a little piece of silicon  smiley-eek
I tried grumpy_mikes "direct way" and NOTHING HAPPENS?! I tried it with 5 different MOSFETs of the same type....so blown up is nearly impossible. I checked the datasheet twice - it's quite hard to misunderstand the Gate-Drain-Source diagram...
http://www.fairchildsemi.com/ds/FQ/FQP27P06.pdf - perhaps sby can lift the secret of my weird MOSFET.

And the strangest thing at last - it DID some kind of triggering with the arduino! But none when it's connected directly?! I'm so confused...gnah - why it's always depressing when it starts to be interesting....

thanks for your effort!!!
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33362
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
"direct way" and NOTHING HAPPENS?
What sort of nothing?
No LED lit connected up? - that is right.
No LED lit when you dab the gate to ground? - not right.

However, often the problem is not actually where you are looking.
So sorry if you have already checked these but go over them again.
 
Data sheet and FET are the same thing?
Try measuring some voltages with your meter across the load.
LED the right way round?
Grounds connected?

Quote
why it's always depressing when it starts to be interesting
You have to show those little pieces of silicon who is the boss.  smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sry grumpy_mike for my highly unprecise answer!
I took 2 pictures of my circuit to make things easier! - Take a look at the attachment...
These show the wireing of the FET and the Led. The pictures were taken at 12V.

Interesting about this: It doesn't matter if the Gate (leftmost pin i suppose -> datasheet) is positive or gnd!

Datasheet and FET are the same! I checked this again...

I hope the pictures will help! I suppose it's exactly as you say...
Quote
often the problem is not actually where you are looking



* IMG_5630.JPG (419.56 KB, 1936x1288 - viewed 63 times.)

* IMG_5629.JPG (393.72 KB, 1936x1288 - viewed 56 times.)
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33362
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The drain is the one that should be connected to the LED and the source connected to +12V, these seem to be swapped over in the photograph.
Logged

Pages: [1] 2   Go Up
Jump to: