# Thread: MOSFET Gate Voltage and Stepper Circuit

1. ## MOSFET Gate Voltage and Stepper Circuit

ok well I plan on making a stepper motor circuit that will be hooked onto either my parrallel port on the PC or the serial port (most likely parrallel, but serial has higher voltage) to drive 3 powermax stepper motors, but I have a bunch of questions.

The mosfet concept still somewhat boggles me but for the most part I understand it.

Lets say that I have 12 logic pins coming from my computer just for simplicity sake.

my MOSFETS are the regular 3 prong with a metal heatsink back type that can support up to 9 amps of continuous current and have a gate voltage of plus/minus 10 volts and a threshold of 2.3 volts

I am going to write a small program that controls the logic that comes out of the computer

I am going to use an old computer's 12 volt power supply that can support the amount of amps I need for each motor.

Now as far as the circuit goes...... can I hook the +12 volts to the + side of the mosfet, and the ground to the ground side of the mosfet (so there will be 12 volts on it) and then also hook the 12 volts up to the gate and then hook the logic +5 volts up to the gate with a diode on it. Since the MOSFET has to have a gate voltage of HIGHER than the terminal voltage, this should technically drive the mosfet or am I wrong??? even if the mosfet is not COMPLETELY OPEN. I have looked at so many circuits many of which are complex and I am having a hard time understanding, I will upload a simple circuit diagram if I need to. any help would be great.

Also, the mosfet has an internal diode that can help prevent inductance.

I DUNNO, the last time I did this I used simple transistors that was made by texas instrument and called an Auxiliary driver, but it was on a low draw motor, if I was to use transistors would it be a lot simpler?? and could I do this with the

2. Hi-ho,

You can drive mosfets directly from a parallel port, but your circuit is a little off.

Assuming you have 'logic level' mosfets it's trivial to produce a very simple stepper circuit, as long as you have the right signals from your PC..

(The serial port is not suitable for this).

I'll draw a quick diagram, please hold..

3. OK...

As per the diagram...

You could use a logic level mosfet hanging directly off the parallel port like this, and I'm sure I've seen a diagram like this on the web for controlling low power steppers for something.

A 'logic level' mosfet only needs a voltage of around 3V to 'turn on'. Many mosfets (not logic level ones) require around 8-10V to turn on.

If you're doing this for steppers, you may need a current limitter of some kind if the stepper voltage rating is not the same or lower than the powersupply you're using. ie: if you're using the 12V rail on the Power supply, this will only work for 12V steppers. Many steppers that are usefull for CNC applications are more like 2-3V, so you'll quickly fry either the motor, or the mosfet doing this.

Yes, most mosfets have a diode built in to handle back EMF, and if you're not using a chopper circuit it's normally suffitiant for low speed stepping. You should use a mosfet with twice the voltage rating of the powersupply voltage you're using if you want to rely on the internal diode. If not, get an external one. Most designers put an external diode on anyway, belts and braces.

If I were to go down this path I would at least buffer the signal out of the Parallel port. One possible failiure mode for mosfets is to short the gate to channel, which in laymans terms means it will dump the external power supply voltage into your parallel port. One very good way to ensure you can't use the parallel port for much.

The other thing is, this will only work if you write the software yourself, which is a bit nutty when there is such a good selection of free/cheap software that already does g-codes etc. There are some cheap & simple step/direction designs around that would let you use existing software to get more functoinality quickly.

Are you going this way due to a tight budget, or because you'd like to experiment with letting the smoke out of your PC? If you're looking at running anything more than 1 amp or so like this I would seriously consider a translator circuit (Step/Dir) and using that to drive the mosfets. If your steppers are high powered (high current low voltage) you need to do some reading on L/R controllers or choppers.

Cheers, Chris H.

4. ok, so let me make this clear

from what I read if you have say..... 40 volts on the drain to source and the MOSFET has to have a 10v gate voltage, then technically you need to have 50 volts going to the gate.... or is this done internally and you just need the 10 volts???

also, howcome the drain would be on the ground of the parrallel pin and the ground of the power supply?

5. Originally Posted by atomgonuclear
ok, so let me make this clear

from what I read if you have say..... 40 volts on the drain to source and the MOSFET has to have a 10v gate voltage, then technically you need to have 50 volts going to the gate.... or is this done internally and you just need the 10 volts???

also, howcome the drain would be on the ground of the parrallel pin and the ground of the power supply?
All of the voltages are measured relative to ground / negative wire, so you don't add the power supply and gate voltages at all.

So. To get an N-Channel mosfet to turn on you need 10V (or 3V for a logiv level mosfet) between the gate and source. (Exact voltages depend on the mosfet you have).

This means that to get your mosfet to turn on, you need the ground of the PC connected to the source, and the gate connected to above 10V (or the output of the parallel port directly if it's a logic level mosfet).

Once you have the voltage between the gate and source, the mosfet is on, and current can pass between the drain and source...

The gate voltage only needs to be 10V (or 3V) irrespective of the supply voltage for your motor, but both voltages are relative to the source, so the PC ground has to be connected to the external power supply negative for this to work reliably.

Are you considering using a 40V power supply on a stepper set up like this? If you do, take photos of the before and after !!!

There is a lot of good info on the web on mosfet circuits, google 'Mosfet basics' is a good start, although most of those assume a reasonable level of electronics knowledge, and obviously don't know where you're at...

Cheers, Chris H.

6. ## thanks

That you a lot for the help KiwiChris

I think I get it now..... the way I had driven my other project before just used the gate voltage of +5 volts right from the computer's port. I understand how it works but what I have been reading was just confusing me.

I know this is a pretty basic circuit and hopefully I dont fry my ports eh??? haha

we'll see how they hold up against the inductance

oh and as far as the gate ampage.... it should only be a couple of nanoamps correct??? maybe in the 250 range

Thank you very much

7. Originally Posted by atomgonuclear
oh and as far as the gate ampage.... it should only be a couple of nanoamps correct??? maybe in the 250 range

Thank you very much
The 'Static' current drawn by a mosfet gate is very low, but at switching time they do have measurable current as the gate 'charges'.

The gate effectively looks like a capacitor to the driving circuit (in your case the parallel port) so it takes some current to 'change' the voltage on the gate, but almost nothing to keep it on, or off.

Typically it might be in the order of 1nf. Driving a 1nf cap with your average printer port at simple stepping frequencies should produce no ill effects.

This pretty quickly becomes a very complex topic... Mosfets are really simple to use for driving simple loads at low frequencies, but the water gets muddy quickly when you get into higher currents/voltages/frequencies.

Good luck...

Cheers, Me.

8. It is always best to look at the spec sheet for the particular mosfet you are using. Any I have ever used include a Drain-to-Source Current (your motor's current draw) available vs. Drain-Source Voltage (the voltage you will be using on your motor). This graph will have several lines on it, which will be labelled, and represent different gate-source (assuming n-channel fet) voltages.

In other words, a simple logic level fet will turn on okay with 3V gate voltage, but will only be able to handle a certain amount of current. Applying more gate voltage (up to a certain point) will increase the amount of current that it can handle.

From my experience most logic level Fets (like IRLZ34 and IRLZ44) can handle up to 16Vgs (volts at the gate, with respect to the ground). Supplying them 5V directly from the parallel port will definately turn them on, but you will be limiting the amount of current they can take. Also, parallel ports always seem to be rather varying in their outputs.

Also worth noting, you should have some tie down resistors to take the gates to ground when not turned on... the gates should never be left floating. Mosfets sometimes make an entertaining "pop" and chunks can actually fly out of them across the room, it's quite amusing, but costly

Sorry for being so long winded, I guess what I'm saying is look at the graphs on the datasheet, they are priceless. Good luck.

g4ry

9. Now you're trying to confuse the poor man... .

Atom: The critical figures to look for with your appliaction is 'saturation voltage' sometimes refered to as Vgs-sat and Maximum gate voltage, Vgs-max. Anywhere between Vgs-sat and Vgs-max you can consider a logic level mosfet to be a switch.

(Again, assuming you're not actually trying to switch 40V, and that you're not running a 2V stepper from 12V with just a mosfet!)

10. I"l make this simple:

IRLZ44 = these will run off of a 5v parallel port and saturate fairly well.

HOWEVER, you'll find that these exact same fets will turn on faster and harder (less heat too) if you take the parallel port and drive a totem pole that switches an externally sourced 10vdc to the exact same IRLZ44.

WE ran our R/C car battery chargers this way and switched 30-40 amps with two in parallel and they ran just fine.

IRFZ44's - these are traditional enhancement fets with a Vgs rating of about 20 vdc MAX. We hit these with 18volts in our R/C car speed controllers at 3600 hz. 6 in parallel would switch upwards of 100 amps peak at 3600hz with 18Vgs or only about 10-20 amps when hit with 12vdc gate Vgs

We used an oscillator circuit to multiply the 18 Vgs voltage - you could do this with some 555's and some diodes and a 12 volt wall bug and 18vdc zener or even a TL494 switching regulator configured to make exactly 18vdc.

The same totem pole driven by the parallel port mentioned above will work but you'll need to add a resistor of 100 ohms in series with the gate and totem pole and an 18v zener at the resistor to fet gate junction.

11. ## well

well sweet....... hopefully I make the driver circuit for my CNC machine up and running now, I just gotta make a bus circuit to drive all the different addresses to control each motor, which i am capable of doing. I will probably post my progress one of these days, I am still a little bit apprehensive about starting this project, but YOU HAVE TO START SOMEWHERE and I need a new motherboard with pciexpress 16 anyways so if it frys, I'll fry it good for u guys.....

thanks for the help

12. Originally Posted by atomgonuclear
well sweet....... hopefully I make the driver circuit for my CNC machine up and running now, I just gotta make a bus circuit to drive all the different addresses to control each motor, which i am capable of doing. I will probably post my progress one of these days, I am still a little bit apprehensive about starting this project, but YOU HAVE TO START SOMEWHERE and I need a new motherboard with pciexpress 16 anyways so if it frys, I'll fry it good for u guys.....

thanks for the help
... That's the way, if you're gonna toast something, make sure there are flames.

Page 1 of 2 12 Last