Is this the right MOSFET? 12V DC motor PWM control by AVR

Go To Last Post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I want to do simple PWM control of a 12V DC motor with a N-channel MOSFET as a low side driver. Using Digikey search I found Fairchild FDD8586. I expect to connect the output from my AVR to the gate via a 100R resistor so Vgs needs to be low, this one is 2.5V. 35A continuous current is overkill. D-PAK, although surface mount, isn't even too hard to solder. In single unit quantities they cost $US0.78, and stock looks good.

Any suggestions for better choices?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How much current to you expect to switch? Do you expect to heatsink the mosfet? What is the pwm frequency? What means are you using to protect the mosfet from switching transients and overcurrent?

with a Vdss of only 20V, you'd better be adding some real good transient protection. Personally I'd be looking at 60+V for motor control.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The MOSFET you have chosen is no logical-level MOSFET,
so 5Volts gate voltgage may not be enough to fully
turn on the device. Better look for a "logic-level"
type.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm a bit confused - I thought I had found a suitably logic-level device by the Vgs curves on this one. The on resistance curve shows less than 9 milliohms when Vg=5V. What else other than 5V=fully on makes a MOSFET logic-level? Is it capacitance?

I experimented with IRFZ46 today which is not suitable because of Vgs - it works but of course gets very hot as it is not switched all the way on with 5V. Capacitance figures are similar and I observed a good square wave at the gate with rise/fall times around 300nS.

Some more details - I expect no more than 3A switched and typically around 500mA. Heatsink will be by as much copper as I can leave around the D-Pak on the PCB but not otherwise. PWM frequency is up in the air but I had figured on 25kHz. As protection I have in mind everything I have found on avrfreaks so far - 100R gate resistor and a 10k gate-source pull-down. "Art of Electronics" isn't showing me much more. Suggestions welcome...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

aeberbach,

I've done a lot of switching with MOSFETs on 12V devices. I've never had one not work as long as the Vgs is correct per the data sheet. You can use whatever package you like. I do a lot of prototyping, so I like the TO-220 variety. IRF520N or similar should be fine for a few amps (with heat sink).

Depending on the device, you might also consider using a high side P-MOSFET to drive and an N-MOSFET in parallel with the device for dynamic braking. You may not care with a motor, but some devices (like proportional valves) work better with the half bridge.

I can provide you with a schematic if this isn't clear or you just want to see how someone else does it. Hope this helps.

Regards,
Paul

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Paul - IRF520N are a possibility I guess. I don't need braking so it will be nice and simple.

Looking at the Vgs curve for this device it seems to show the device passing 3A with Vgs of 5V. I'm no EE so corrections on my interpretation are welcome. How hot is it going to get? I feel I may be better off with the FDD8586 but the IRF520N can be had for 1/3 the price in quantities of 800, good deal.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Because the motor has inductance, you will get high voltage spikes when then mosfet is de-energised - therefore you need some snubbing be it a fast diode across the motor or some R & C. Without this, the mosfet will probably not last too long.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Looking at the Vgs curve for this device it seems to show the device passing 3A with Vgs of 5V.
This is for VDS=50V and a 20us pulse. The IRF520 is NOT a logic level MOSFET. I think Paul assumed you were going to put 12V on the gate to turn it on -- he said "as long as the Vgs is correct per the data sheet". The device is spec'd for 10V gate-source and you are going to use your AVR IO to drive it. If you use a FET driver that has logic inputs then you could use the cheaper FETs.

Look at the irf7842 it is 8-SOIC and should work for 3A.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Be prepared for stalled current. That is the current when the motor is first powered up. You find that from the simple winding DC resistance because there is no back emf becaise the motor is not rotating.

That current could persist for some time if the motor is locked and cannot turn.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Because the motor has inductance, you will get high voltage spikes when then mosfet is de-energised

I believe the IRF520 already has this. But extra certainly won't hurt.

Quote:
The IRF520 is NOT a logic level MOSFET. I think Paul assumed you were going to put 12V on the gate to turn it on

The IRF520 will turn on with 5V at the gate to switch 12V. I do it all the time. If there is any doubt, stick it in a breadboard and try it. I'll attach a couple of shots from my schematic. One shows a whole bank of MOSFET switches (note the zero ohm resistors) and the other shows a couple of PWM drivers with dynamic braking.

Again, if in doubt, breadboard it to convince yourself! Hope this helps.

Regards,
Paul

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, I'm hopping on this thread because I'm working on a similar circuit and has a thread about diodes on the forum at the moment.
Kartman, you mentioned that for motor driving, you'd choose a MOSFET capable of resisting 60V. Can you specify a little? I ask, because I have very little experience with driving motors, and I don't know which reverse voltages to expect from my motor. Are there formulae or thumb rules to figure that out?
Thanks and sorry for hi-jacking the thread a bit.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry for jumping on this thread as well, but I'm following it with interest.
Can someone explain the functional differences between a P-channel MOSFET and an N-channel MOSFET?

pkafig wrote:
Depending on the device, you might also consider using a high side P-MOSFET to drive and an N-MOSFET in parallel with the device for dynamic braking. You may not care with a motor, but some devices (like proportional valves) work better with the half bridge.

Why are P-channel MOSFETs used on the high-side of H-bridges, and N-channel MOSFETs used on the low side? What would happen if you swapped them around, or only used N-channel MOSFETs?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

The IRF520 will turn on with 5V at the gate to switch 12V.
I do not doubt that it will turn on at Vgs of 5V but it will not be in saturation. Maybe I should clarify. With a Vgs of 5V the Rds_on will be in the "Ohms" range (3.3 Ohms approx). At Vgs of 10V per the datasheet the on resistance will be 0.20 Ohms -- 15X better. If you are passing small amounts of current then this device would work fine. But you said the average current was going to be 500mA. You would need to heatsink it since it would dissapate close to a Watt of power (Rds_on = 3.3 Ohms). Ideally for a switch you want the switch's "on" resistance to be as low as possible. If you use a circuit like Paul's second then you can use the IRF520N. Here he is using a BJT to switch in the gate voltage (from the battery) on the MOSFET. This might be cheaper than getting a logic-level FET.

Quote:

Why are P-channel MOSFETs used on the high-side of H-bridges, and N-channel MOSFETs used on the low side? What would happen if you swapped them around, or only used N-channel MOSFETs?

To turn on a PCH you pull the gate voltage lower than the source while for an NCH you pull the gate higher than the source. There are many designs that use all NCH devices. There is usually another device that generates a boosted voltage to turn on the high side NCH in that case.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nanovate wrote:
I do not doubt that it will turn on at Vgs of 5V but it will not be in saturation. Maybe I should clarify. With a Vgs of 5V the Rds_on will be in the "Ohms" range (3.3 Ohms approx).

While I don't have hard numbers to back it up, my guesstimation would be different from that. I have a good number of similar FETs, I get them off of motherboards by the dozen (sometimes TWO dozen, on a really good board). They're nearly all from Fairchild, same setup - "x.x mOhm @10V, y.y mOhm @4.5V" types.

I've used them, gate driven right from an I/O pin, to drive a stepper motor with 2.5 amps/device. While that isn't a huge amount of current, it's enough that it wouldn't take much Rds at all to warm up the non-heat-sinked devices, yet they remain completely cool to the touch.

Maybe soon I'll test the Rds on them with a constant load.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

my guesstimation would be different from that. I have a good number of similar FETs,
IRF520N? See figure 1 of the IRF datasheet. I might be mis-interpreting it.

Quote:

y.y mOhm @4.5V
This one can be used for 5V and you can expect the Rds to be "y.y mOhm"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nanovate wrote:

TThere are many designs that use all NCH devices. There is usually another device that generates a boosted voltage to turn on the high side NCH in that case.

Could you elaborate on that?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

N channel fets -> npn transistors: ground the emitter, turn it on by making the base hi. P channel fet -> pnp transistor... turn it upside down, put the emitter to the 12V, turn it on by pulling the base down. One goes on and one goes off... drive both with the same signal. If you use all N channel, you need to turn on the bottom by pulling the gate hi and the top one is off, then you need to turn on the top one by pulling its gate hi all the way to 12V or higher with a bootstrap cap. They make gate driver ICs that do this.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nanovate wrote:
Quote:

my guesstimation would be different from that. I have a good number of similar FETs,
IRF520N? See figure 1 of the IRF datasheet. I might be mis-interpreting it.

Quote:

y.y mOhm @4.5V
This one can be used for 5V and you can expect the Rds to be "y.y mOhm"

Ah. I was refering to the datasheet of the fairchild part that he originally mentioned (which would work @ 5V), not the IRF. My bad.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I was refering to the datasheet of the fairchild part that he originally mentioned
If that one is used (FDS8586) then yes it would not get hot with 3A flowing through it. The threshold voltage is much lower and so it is specifed to be fully on at 4.5V. As was mentioned earlier the low max drain to source voltage might be an issue (FDS8586 Vds(max)=20V) when driving an inductive load like a motor.

It would be interesting to see how the FDS8586 Rds_on measures when it has been removed and re-used. The datsheet uses an 80 usec pulse when measuring it though.