Mosfet turning on with high voltage - Page 1
Forum section: electronics / beginners

author: luna
author_rank: Newbie
timestamp: January 08, 2024, 03:20:52 pm
content: Im making a motor driver and the mosfet is turning on when the 12V pin with anything above 12v, the circuit is attached ps: there is a reversed diode on the motor, just isnt in the schematic

author: Whales
author_rank: Super Contributor
timestamp: January 08, 2024, 03:27:53 pm
content: Hello luna.Q1. Have you built your circuit with those exact parts, including an IRF4905, or are you using different parts?Q2. Are you powering this circuit with a variable power supply, or are you switching to a different power supply?Q3. (If you are using a variable power supply) At exactly what voltage does the mosfet turn on? 20V?A photo of what you have built might also help, showing everything including how you have attached your power supplies.

author: luna
author_rank: Newbie
timestamp: January 08, 2024, 03:38:43 pm
content: Quote from: Whales on January 08, 2024, 03:27:53 pmQ1. im using the same components as in the schematicQ2. im using a variable power supplyQ3. it start to turn itself around 12.1V, and it isnt a clean turn on, around that the led start turn on, at around i think 12.5v it turn itself fully onunfortnally the board isnt with me, im i a weird spot where im designing the board and a person in another city is testing it, in the photo the bottom red square is the motor driver and the top red square is another driver identical that also have the same problem

author: Whales
author_rank: Super Contributor
timestamp: January 08, 2024, 03:43:12 pm
content: Thankyou for the photo12.1V? Wow.It's 2:30AM where I am, so excuse me if this is a weird thought, but could Q2 have been soldered in backwards? If you use an NPN transistor in reverse then it somewhat works, but suddenly breaks down (shorts) at a certain voltage. By memory some of them break down around 9 to 13V and it depends on the batch/make/model.I would recommend removing Q2 and seeing if the mosfet then stays off across all voltages. That will determine if the problem is caused by Q2 or not.

author: luna
author_rank: Newbie
timestamp: January 08, 2024, 03:53:06 pm
content: Quote from: Whales on January 08, 2024, 03:43:12 pmfrom the photo is installed correctly, but im suspecting that the seller sold ksp2222 instead of 2n2222, going to ask the person to read the code on the transistor

author: Whales
author_rank: Super Contributor
timestamp: January 08, 2024, 03:57:47 pm
content: The label isn't 100% reliable if it's a greymarket part. I have two makes of "P2N2222" that have opposite pinouts. One of the cheap transistor testers ($10 LCR project) has been invaluable.

author: luna
author_rank: Newbie
timestamp: January 08, 2024, 04:01:14 pm
content: Quote from: Whales on January 08, 2024, 03:57:47 pmi bought from a big electronic component store in my city, never had any problems except once they gave me ksp2222 instead of 2n2222

author: luna
author_rank: Newbie
timestamp: January 08, 2024, 06:15:52 pm
content: the Q2 is a 2n2222a and he checked is a NPN transistor, going to see how do i check what is emitter and what is collector

author: Whales
author_rank: Super Contributor
timestamp: January 08, 2024, 10:11:20 pm
content: It would be easier just to cut the part off the board and test if the problem goes away. This is a "divide and conquer" strategy, where you test half of your design at a time and see which half causes the problem.I would also suggest just measuring signal levels with a multimeter. Gate of the mosfet and base of the NPN.

author: magic
author_rank: Super Contributor
timestamp: January 08, 2024, 10:35:46 pm
content: I second the recommendation to try with Q2 disconnected.If removing Q2 fixes the problem then you only have to figure out what was wrong with it (bad part? rotated?).If there is only R1+R2 shorting the gate to the source and current still flows through the FET, then you know the FET is dodgy.editAt the very least, pull out a DMM and measure gate-source voltage when the LED lights up.Is it zero? FET's fault.Is it -5V? NPN's fault, probably.

author: Andy Chee
author_rank: Super Contributor
timestamp: January 08, 2024, 10:38:12 pm
content: Quote from: luna on January 08, 2024, 03:20:52 pmIf input MON is HIGH, then motor is OFF. If input MON is LOW, then motor is ON.I think your microcontroller I/O is either still configured as an input, or it is outputting a low.

author: Jwillis
author_rank: Super Contributor
timestamp: January 09, 2024, 12:44:21 am
content: Quote from: Whales on January 08, 2024, 03:43:12 pmThe 2n2222 and the ksp2222 have a typical a Vebo of 6V. If the the 2n2222 was put in reverse or a ksp2222 was used, 12v would damage the transistor. This would short out the all the junctions . Easy enough to know it the transistor is toast is to do a resistance check between each junction.

author: mawyatt
author_rank: Super Contributor
timestamp: January 09, 2024, 02:05:15 am
content: Silicon bipolar transistors such as the 2N2222 type can be operated "upside down" or reversed/inverted, where the Collector and Emitter are interchanged. This was used way back in the 60s and 70s because when "inverted" the collector (actual emitter) to emitter (actual collector) saturation voltage is much lower than in "normal" saturated operation. The breakdown voltage is obviously lower as the "inverted" collector to base junction is actually the normal base to emitter junction and thus breaks down at much lower voltages than a normal collector to base junction.In the OP circuit, if the collector and emitter were swapped by installing upside down (reversed), then the circuit behavior would be as described with the PMOS turning on without any input signal when the supply voltage Vcc increases. No damage to the 2N2222 should occur as the 12V current thru the 2N2222 is limited by the 10K resistor.What's happening is the reversed base to emitter junction begins to breakdown ~6V, clamping the PMOS gate to ~6V and the PMOS gate then "sees" an increasing magnitude gate to source voltage as the source increases with increasing supply voltage. As this increases further the PMOS begins to conduct and with the supply at 12V then the gate to source is ~6V magnitude, enough to turn the PMOS fully On.The fix of course is install the 2N2222 as shown in th OP schematic, then the circuit should behave as expected.Best

author: luna
author_rank: Newbie
timestamp: January 09, 2024, 04:38:09 am
content: thx everyone for the suggestions, today i will visit the place that the board is and im going to test everything, i was diagnosing the board via whatsapp call.

author: Jwillis
author_rank: Super Contributor
timestamp: January 09, 2024, 10:53:31 am
content: Quote from: mawyatt on January 09, 2024, 02:05:15 amEmitter−Base Breakdown Voltage is 6V at 10uAdc, collector at 0Vhttps://www.onsemi.com/pdf/datasheet/p2n2222a-d.pdf. With no signal to base and with the 10k resistor before the emitter and the 10K resistor before the base to ground is would give a current of 600uA across the emitter base junction.

author: CaptDon
author_rank: Super Contributor
timestamp: January 09, 2024, 01:32:03 pm
content: Remember he used a PMOS device so when the driver base is LOW the FET should be OFF, however leakage in the driver transistor is what is holding the FET in the conducting state.

author: Andy Chee
author_rank: Super Contributor
timestamp: January 09, 2024, 01:54:40 pm
content: Quote from: CaptDon on January 09, 2024, 01:32:03 pmDerp! Yep I completely missed that it was a P-channel.

author: mawyatt
author_rank: Super Contributor
timestamp: January 09, 2024, 03:47:01 pm
content: Quote from: Jwillis on January 09, 2024, 10:53:31 amWith Q2 emitter and collector reversed, the emitter base junction will enter breakdown. Once the 12V has increased to beyond this breakdown Q2 will begin to conduct current and act as a Zener with breakdown emitter base current now flowing thru the base collector junction to ground and clamping the emitter voltage.The PMOS source to gate voltage becomes more positive since the gate is somewhat "fixed" by Q2's emitter base breakdown as the supply voltage increases and will begin to Turn On as this supply voltage increases beyond Q2's breakdown.We ran NPN bipolar transistors inverted all the time way back, this was intended operation for analog signal gating. Certain pulse type transistors produced the lowest saturation voltage because the base emitter junction was more heavily doped than small signal devices like the 2N2222 or 2N3904.Here's 2N3904 operating in normal mode with a scale of Horizontal 1V/div, Vertical 0.5ma/div @ 2ua/base step, and inverted with same scale but with 50ua/base steps. Note much lower gain inverted and the impinging breakdown.Anyway, as you can see the bipolar transistors work inverted but have much lower gain and breakdown, however not a common use today with CMOS available.Best,

author: mawyatt
author_rank: Super Contributor
timestamp: January 09, 2024, 03:51:11 pm
content: Quote from: CaptDon on January 09, 2024, 01:32:03 pmSee just above, it's actually Q2's emitter base breakdown that's causing the PMOS to Turn On, likely because Q2 has the collector and emitter swapped by accident. So in the OP schematic the shown Q2 collector is actually it's emitter, and shown emitter to ground is actually it's collector, so the device is inverted.Edit: Here we've added a 2N3904 with collector and emitter swapped and the base connected to the collector with 1K, horizontal is 1V/div, vertical is 5ma/div. Note the pronounced breakdown (trace going vertical) around 7.5 volts.Upon careful examination note the snapback voltage around 8.5 volts, this is the area when the inverted device exhibits negative resistance behavior (similar to an old school Tunnel Diode), and one can create a 2 terminal negative resistance relaxation oscillator with just a resistor and capacitor!! Fun story behind this with the late brilliant Jim Williams if folks are interested.Bipolar devices are indeed amazing and have many features few folks have experienced in General Purpose use, during our long career we've benefited from many of these unique characteristics.Best,

author: luna
author_rank: Newbie
timestamp: January 11, 2024, 05:09:16 pm
content: i only stayed at the place two days and had to solve other stuff, build the circuit with bc548 on the breadboard and it didnt turned it self on, i didnt had any 2n2222a on hand to test beside the one in the board and i didnt had time to remove it to test it, also the led was turning on without the 12V, when the board was feed only the 5v from the usb, by the way attached is the bodge my boss did to use the board because he didnt want to use the programming connector i put.

author: Zero999
author_rank: Super Contributor
timestamp: January 11, 2024, 07:12:46 pm
content: Quote from: luna on January 08, 2024, 06:15:52 pmThere are two ways I know of, which won't harm the transistor.Diode TestAn NPN BJT has two diode junctions, with the anodes connected to the base and one cathode to the emitter and the other to the collector. The base-collector diode will have the larger area. The emitter and collector can be found using a multimeter set to diode test mode. Measure the base (anode) to collector (cathode) and emitter (cathode). The collector will have a slightly lower forward voltage than the emitter, because it has a larger area.Here's a graphic, showing the approximate voltages when testing a BJT with a diode tester.Gain checkAnother way is to bias the transistor on with a resistor and measure the current. The hFE will be higher, when connected correctly, which will result in more current being drawn. If you don't have a current meter, connect a red LED in series with the emitter. It will brighter when the BJT is connected correctly. Note must be below 5V, otherwise it can damage the transistor.

author: luna
author_rank: Newbie
timestamp: January 24, 2024, 07:19:54 pm
content: unfortunately i couldnt test more the circuit, i told them to change the 2n2222a to bc548(i think was 548) and everything worked fine

author: magic
author_rank: Super Contributor
timestamp: January 24, 2024, 07:21:49 pm
content: That's a good sign that the transistor was backwards. Any small general purpose transistor type should be good enough for this.