Maker Pro
Maker Pro

Driving this MOSFET with PIC

Status
Not open for further replies.

TheMaster

Jul 20, 2016
47
Joined
Jul 20, 2016
Messages
47
Could I switch this MOSFET 2N7002P, with a 100hz square output directly from this PIC PIC10F200?
Drain Source Voltage = 12, 100ma.
Square wave peak = 2V.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
It will not be a reliable circuit. Vgsth for the 2N7002P is max. 2.4V. @ 25 °C (datasheet, figure 12). Depending on ambient temperature and the specific characterisics of the individual component the transistor may or may not turn on at 2 V.
Operate the PIC at 3.3 V to get a 3.3V output and you are on the safe side.
Or use a level shifter top shift the PIC's output from 2 V to a higher voltage to drive the MOSFET.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I searched for the voltage the pic was running out and missed the specification of the square wave peak voltage. Yeah operate it from at least 3.3V.
 

TheMaster

Jul 20, 2016
47
Joined
Jul 20, 2016
Messages
47
It will not be a reliable circuit. Vgsth for the 2N7002P is max. 2.4V. @ 25 °C (datasheet, figure 12). Depending on ambient temperature and the specific characterisics of the individual component the transistor may or may not turn on at 2 V.
Operate the PIC at 3.3 V to get a 3.3V output and you are on the safe side.
Or use a level shifter top shift the PIC's output from 2 V to a higher voltage to drive the MOSFET.
Just so I understand, where do you get the 3.3V from? If 2.4V is max, I thought it should be below 2.4V. Clearly I'm looking at it incorrectly.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
If 2.4V is max, I thought it should be below 2.4V.
Vgsth is the threshold voltage. Vgs needs to be above Vgsth to turn on the mOSFET.

where do you get the 3.3V from?
This voltage neds to be in your system.
You can use a simple level shifter like this:
upload_2016-9-30_9-3-25.png
M1 is your MOSFET. V1 is the 12 V source (I take it you have that in your system?). Note that this circuit is inverting!

Alternatively use a bipolar transistor only, as shown (remove R3 and M1). R2 then is the load you want to drive.

Without knowing what your load is and what you want to achiev, further advice is difficult.
 

TheMaster

Jul 20, 2016
47
Joined
Jul 20, 2016
Messages
47
Vgsth is the threshold voltage. Vgs needs to be above Vgsth to turn on the mOSFET.


This voltage neds to be in your system.
You can use a simple level shifter like this:
View attachment 29422
M1 is your MOSFET. V1 is the 12 V source (I take it you have that in your system?). Note that this circuit is inverting!

Alternatively use a bipolar transistor only, as shown (remove R3 and M1). R2 then is the load you want to drive.

Without knowing what your load is and what you want to achiev, further advice is difficult.
Thanks, but I didn't literally mean where it would arise from, just wondering why 3.3 in particular.
This is for a primitive flyback converter:
While I'm at it, so I won't start a new thread. Do you think this mosfet could withstand a momentary 3kv drain source voltage, for about 1-2μs.? (when off)
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
just wondering why 3.3 in particular.
Today 3.3 V have widely replaced the formerly common 5 V as a common voltage for digital systems. Inexpensive and easy to use regulators are available.

Do you think this mosfet could withstand a momentary 3kv drain source voltage, for about 1-2μs.? (when off)
No way. Vdsmax = 60 V.
If you expect such transients, you'll have to limit them using e.g. snubber circuits and/or zener diodes.
 

TheMaster

Jul 20, 2016
47
Joined
Jul 20, 2016
Messages
47
Today 3.3 V have widely replaced the formerly common 5 V as a common voltage for digital systems. Inexpensive and easy to use regulators are available.


No way. Vdsmax = 60 V.
If you expect such transients, you'll have to limit them using e.g. snubber circuits and/or zener diodes.
I can just put an appropriate TVS diode across the drain-source right? (that's where the spike would be)
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
I can just put an appropriate TVS diode across the drain-source right? (that's where the spike would be)
Can do. However, this may not be the best solution. While it protects the MOSFET, it will also create large current spikes. Snubber circuits using RCD components work "softer", thereby mitigating possible EMC problems.
 

TheMaster

Jul 20, 2016
47
Joined
Jul 20, 2016
Messages
47
Can do. However, this may not be the best solution. While it protects the MOSFET, it will also create large current spikes. Snubber circuits using RCD components work "softer", thereby mitigating possible EMC problems.
Okay, and last but not least: What would be the best way to regulate the voltage powering the PIC? Can I just use a zener diode or a voltage regulator. I need something as cheap as possible with as few components as possible, this is for a production circuit. A link to a specific component would really help.
Thanks
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
A zener diode alone is useless. You'll need at least a series resistor, better yet a transistor.
An off the shelf regulator is imho much easier to use (search for 3.3V low power voltage regulator), e.g. the LP2950 using only one additional capacitor (which you should provide to the PIC's power supply pins anyway).
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
That pic will run from 2V to 5.5V. If you are putting it from the 12V rail then I would go for a 5V regulator. It will allow you to switch the mosfet faster and turn it on harder.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I'm also curious about these 2kV transients.

What are you switching? And how did you arrive at 2kV?
 

TheMaster

Jul 20, 2016
47
Joined
Jul 20, 2016
Messages
47
That pic will run from 2V to 5.5V. If you are putting it from the 12V rail then I would go for a 5V regulator. It will allow you to switch the mosfet faster and turn it on harder.
So I guess my question ultimately is how should I wire this. Again, this is for a basic flyback converter, I want to charge the primary of the transformer to the maximum amount. There would then be zero voltage on the line from the battery to the transformer, so then the PIC would shut off. How can this be wired so that I have maximum charge on the primary, while still supplying sufficient voltage to the PIC. Also, if I use a higher voltage through the PIC to switch the MOSFET, would more power be wasted? (This is for a low frequency I don't necessarily need fast switching).

This is for a highly resistive load that requires high voltage transients in a commercial product, I arrive at 2kv when I divide the output spike by the number of windings.
 
Last edited:

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Highly resistive sounds like skin to me. Are you trying to build a taser?

Bob
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Well, if you require 2kV, those mosfets are simply not going to work.

Unless you can tell us the nature of the load then we're really not going to be able to help you any further.

And since you say it is similar in operation to a Taser, you're going to have to be very specific about what you're doing or I will close (and perhaps delete) this thread.
 

TheMaster

Jul 20, 2016
47
Joined
Jul 20, 2016
Messages
47
Well, if you require 2kV, those mosfets are simply not going to work.

Unless you can tell us the nature of the load then we're really not going to be able to help you any further.

And since you say it is similar in operation to a Taser, you're going to have to be very specific about what you're doing or I will close (and perhaps delete) this thread.
The load involves a proprietary commercial product which I am not in the position to disclose in full. This circuit is only similar to a shocking device in the sense that they both involve high voltage. If it is forbidden on this forum to discuss any circuit which involves high voltage then that should be mentioned in the rules. If I wanted to hurt somebody the internet isn't lacking in creative ideas. But what more can I give besides my word, if you choose not to provide any further advice then please close/delete, I nonetheless appreciate the advice given thus-far.
 
Status
Not open for further replies.
Top