Help with Mosfet

dorkygrin

New Member
This question is very elementary. I'm trying to switch on a simple linear regulator circuit using a mosfet instead of a relay. So, not knowing much about mosfets, I picked one up at Radio Shack today (IRF510, similar to the much talked about IRF530). Wired it up as shown below and it does not work.




Any ideas what I'm doing wrong? In the way I'm showing on my drawing, it does not conduct and I can't turn it on by applying the output from a picaxe (3.6 volts). If I reverse the drain and source, it conducts all the time.

Open to ideas.

Thanks
 
Last edited:

212

Senior Member
We need to get you a picture re-sizer, you can even use "Paint" to do that.

I think that is an N channel mosfet, and it switches the negative on, not the positive.
 

dorkygrin

New Member
Sorry about the big pic! Edited it and made it smaller.

Anyway, if I change picaxe output to low rather than high, then that mosfet should switch?

Is it normal to conduct drain-->source but not source-->drain?


We need to get you a picture re-sizer, you can even use "Paint" to do that.

I think that is an N channel mosfet, and it switches the negative on, not the positive.
 
Last edited:

212

Senior Member
Thanks for the re-size :) Since nobody smart is around to answer you, I'll take my best shot. You need to run the 6 volt battery negative to the mosfet source, and to the Picaxe ground, they need to share that ground for the mosfet to work. Mosfet drain to the regulator negative, this will make connection, and turn it on, only when you put positive to the gate. The Picaxe needs to put positive to the mosfet gate, but I'd put at least a 470 ohm resistor between them. You will also want to put a 1 meg or so resistor between the gate and source.

Here is a picture of how I use another mosfet like that to run a light. Sorry, it's late and this is the only one I can find on this thing. Don't name all your pictures the same name like me...
 

Attachments

gengis

New Member
N channel mosfets want to see a positive voltage on the gate with respect to the source before they turn on. Look at the data sheet for the mosfet for more information.

http://www.qsl.net/n4xy/PDFs/Semiconductor_Data_Sheets/irf-510.pdf

It shows the threshold being 4 volts - that's how much you need to turn it on fully. There's other charts to show various conditions that may effect the voltage necessary to fully saturate the device (turn it on all the way).

The N channel is good for pulling a load to ground just like an NPN transistor. Like the example 212 shows . . .

To use it in the positive supply leg (called a "high side switch") you need to either find a source high enough to turn the gate on with the source sitting at some positive voltage or an isolated voltage referenced to the mosfet's source.

There are various tricks for using an N channel in a high side switch - but they are usually a lot more complicated than just getting a P channel device and pulling the gate to ground.
 

dorkygrin

New Member
Thanks for that 212 and flooby - I didn't think it through enough and didn't notice that the mosfet was pulling to ground in many of the schematics I looked at. These late night hobbies are going to kill me!

Is there such a thing as a P-channel mosfet would have worked in the way I have it wired?

I'll give it a shot and I'm sure all will be well with the world for a few more minutes.

:)


N channel mosfets want to see a positive voltage on the gate with respect to the source before they turn on. Look at the data sheet for the mosfet for more information.

http://www.qsl.net/n4xy/PDFs/Semiconductor_Data_Sheets/irf-510.pdf

It shows the threshold being 4 volts - that's how much you need to turn it on fully. There's other charts to show various conditions that may effect the voltage necessary to fully saturate the device (turn it on all the way).

The N channel is good for pulling a load to ground just like an NPN transistor. Like the example 212 shows . . .

To use it in the positive supply leg (called a "high side switch") you need to either find a source high enough to turn the gate on with the source sitting at some positive voltage or an isolated voltage referenced to the mosfet's source.

There are various tricks for using an N channel in a high side switch - but they are usually a lot more complicated than just getting a P channel device and pulling the gate to ground.
 

gengis

New Member
P channel "enhancement mode" mosfet biasing:

http://www.physics.udel.edu/~watson/scen103/mos5.html

Unless specified, when speaking about mosfets, you assume enhancement mode is given. There's two or three different flavors.

What goes on inside different transistors:
http://www.mtmi.vu.lt/pfk/funkc_dariniai/transistor/mosfet.htm

How P-Channel MOSFETs Can Simplify Your Circuit:
http://www.irf.com/technical-info/appnotes/an-940.pdf

Another item that 212 put in there was a gate discharge resistor. In a mosfet - when the gate is allowed to float (not connected to anything) or driven with a signal that doesn't supply a ground in the absence of a signal - the mosfet will turn on and stay on for a time. This is because the gate is a capacitor - charge it up and it stays charged until the charge bleeds off. The picaxe outputs are "totem pole" they "sink or source" (provide a solid drive to positive voltage or actively pull the output low). No need for a discharge resistor in that situation. Not all logic devices have totem pole outputs.

N channel devices are cheaper, more plentiful, and there's lots more part numbers, but P channel devices do exist and can save time and effort.

Another option you have would be to let the voltage regulator just sit there supplying 3 volts all the time and switch your load to ground using an N channel mosfet to turn it on and off. The idle (called "quiescent") current on most voltage regulators is very low and might not significantly discharge your lead acid battery. That stuff is in the data sheet for the regulator.
 

Marcwolf

Senior Member
P or N Channel

Sadly it seems that the most simplest way is to use a N channel MOSFET when working with PICAXE's.

N-Channel you can connect diectly to the output of a PICAXE, P-Channel seem to require a transitor to act as a simple electronic switch./

Dave
 

dorkygrin

New Member
Thanks for all the links and assistance

Good idea on switching the load rather then the supply. I'll try that. Should have days worth of juice with the lead acid battery.



P channel "enhancement mode" mosfet biasing:

http://www.physics.udel.edu/~watson/scen103/mos5.html

Unless specified, when speaking about mosfets, you assume enhancement mode is given. There's two or three different flavors.

What goes on inside different transistors:
http://www.mtmi.vu.lt/pfk/funkc_dariniai/transistor/mosfet.htm

How P-Channel MOSFETs Can Simplify Your Circuit:
http://www.irf.com/technical-info/appnotes/an-940.pdf

Another item that 212 put in there was a gate discharge resistor. In a mosfet - when the gate is allowed to float (not connected to anything) or driven with a signal that doesn't supply a ground in the absence of a signal - the mosfet will turn on and stay on for a time. This is because the gate is a capacitor - charge it up and it stays charged until the charge bleeds off. The picaxe outputs are "totem pole" they "sink or source" (provide a solid drive to positive voltage or actively pull the output low). No need for a discharge resistor in that situation. Not all logic devices have totem pole outputs.

N channel devices are cheaper, more plentiful, and there's lots more part numbers, but P channel devices do exist and can save time and effort.

Another option you have would be to let the voltage regulator just sit there supplying 3 volts all the time and switch your load to ground using an N channel mosfet to turn it on and off. The idle (called "quiescent") current on most voltage regulators is very low and might not significantly discharge your lead acid battery. That stuff is in the data sheet for the regulator.
 

dorkygrin

New Member
Back to the Mosfet

OK, I'm back to looking at using this Mosfet again. I need to switch it with a darlington output (or I could use the picaxe output directly) but with only 3.6 volts. In my earlier tests, I couldn't get it to switch fully due to the low voltage.

Is there a way to switch a Mosfet using only 3.6 volts?
 

boriz

Senior Member
You could try buying a low threshold MOSFET. I have some nice beefy (55A) MOSFETs with a threshold of about 2v. Other than that, the simple answer is no. Unless you can boost the voltage somehow. Maybe using switching / charge pump techniques. Prolly easier to use a higher voltage for your PICAXE. Then you can drive the gate directly with upto 5.5V.
 

premelec

Senior Member
Yes - there are MOSFETs which turn on with <2 volts on the gate - look for 'logic level' MOSFETs which turn fully on with 5 volts or less.

Another way is a level shifter sort of circuit which either uses inverted logic with a resistor from + to gate and a transistor [NPN] from gate to V- [collector and emitter] and then use the base to switch from PICAXE. With gate capacitance bleeder resistor to V- also.

You can also use a PNP transistor with its emitter to V+ and collector to GATE - connect the base of the PNP to controlled pin through a resistor [10K or so] and a gate resistor to V- to discharge gate capacitance...

so many configurations so little time :)
 

gengis

New Member
My own solution was to bump up the voltage with a small switching boost circuit, using the axe for a signal source.

http://www.picaxeforum.co.uk/showthread.php?t=8992&highlight=flooby

The circuit should always have some load on it because the open circuit voltage can rise to 80 volts or so and wipe out the switching transistor or mosfet - That's the reason for the shunt regulator clamping it to 10 volts.

The 3.3 Vz diode is not critical but should be higher than any anticipated supply voltage to the axe or the mosfet may get tickled into its linear conduction region.

The 220K is to discharge the gate capacitance.

No part values are all that critical to the operation.
 

InvaderZim

Senior Member
Just to recap: the problem is that with a 3V supply, the picaxe won't drive the FET fully enough to allow your load to turn on nicely?

How would you feel about putting another IC in? A couple NOT gates would allow a drive voltage that's much closer to the 3V power supply. You can get low power versions that draw very little power themselves, for example MC14584B (at Mouser). With the slightly higher voltage, would the turn-on be adequate?
 

dorkygrin

New Member
Well, my situation is that I'm trying to use a 6v supply because I have a few 6v lead acid batteries. In my circuit, I've gone to all 5v relays as I have a few of them and they've always worked for me. I want to use the 6V supply to run the picaxe so I've tried two series diodes to get closer to 5v. But for some reason, that makes the program (or the relays) go flaky. I'm probably just going to drive the picaxe with 3 alkaline batteries (4.5v) which is high enough to activate the relays.

Additionally, I've got a 3Volt linear regulator circuit (turn off and on by a relay) to power the camera. That camera really sucks the juice on startup.
I was reading older posts by Flooby that has a similar camera issue with startup voltage and current. My Kodak camera seems to check voltage and current availability or it will not start. The regulator seems to work OK provided my battery is fully charged.

It's work in progress and I'm always open to suggestions.

So, that's my story. And I'm sticking to it.

Here's a pic of my circuit.







Just to recap: the problem is that with a 3V supply, the picaxe won't drive the FET fully enough to allow your load to turn on nicely?

How would you feel about putting another IC in? A couple NOT gates would allow a drive voltage that's much closer to the 3V power supply. You can get low power versions that draw very little power themselves, for example MC14584B (at Mouser). With the slightly higher voltage, would the turn-on be adequate?
 

212

Senior Member
Wait a half second or more, after connecting the power, to hit the camera power-on button.
 
Top