Multiple DC Motor Control via PWM Arduino - Mosfet getting hot!!

Hi,

A while back I posted here asking for help to run multiple motors via PWM using arduino and an ultrasonic distance sensor, and I got lots of help and suggestions!

I now have a working prototype of my project and a larger scale one is in the works. My current schematic runs, but after 30+ secs of PWM running motors my mosfet IRF9530 gets extremely hot, even with a heat sink. When the motors stop running it cools down.

I'm currently running 25 parallel 6v-DC motors, but I'm not trying to make them run fast at all, quite the opposite, my PWM is set so that they turn on and off for short periods of time, just slightly turn then stop then slightly turn and so on- almost as if the motors are just vibrating... but my final project will have 61 DC motors.

Im using a 12v power supply that plugs into the arduino and then that power adapater is split so that the 12v is shared and plugged into the breadboard. (So it may be that since the arduino is sharing the 12 volts the mosfet isn't getting actually 12v, or enough power for all the motors. - my un-educated guess)

Heres a drawn schematic that I got from someone who was helping me with this project, but now they are lost too.

and here is an image of my breadboard:

(the motors are not connected to the ground and drain of the mosfet in the picture above)

I need these to be able to run for a long period time on and off.

One idea I have is to split up the motors like 5 sets of 12 motors each one to their own mosfet (total of 6 mosfets) and to 6 individual pins on the arduino but im skeptic as to how well it would run - especially if its still shares the same 12v or even 20v.

Any suggestions or comments?

Thanks again to all those who previously helped!

Soon ill post a link to a video of my working demo.

What is the current rating of the MOSFET?
What is the total current draw of the Motors?
Why are you running 6V motors with 12V?

Remember a motor draws more power when starting then when it's running.

You need to connect a reverse-connected diode in parallel with the motors, just as you would if you were driving a relay or solenoid. Motors are inductive and produce a back emf when you switch off the current to them. As your circuit stands, this back emf is dissipated as avalanche energy in the mosfet, which makes it hot.

The diode should have a current rating at least as great as the current in the motors.

[EDIT: also connect a large capacitor say 1000uF between +12v and ground, to help absorb and recycle the energy from the back emf.]

PS - I just noticed the 499 ohm resistor in series with the emitter of the transistor. This resistor limits the gate drive to the mosfet to around 7 volts, which is too low (it's specified for 10v). Remove that resistor and put a 2k2 resistor in series with the base instead. I'd also reduce the collector resistor from 1.5K to 470 ohms, to help the mosfet switch off faster.

Thanks for the tips "dc42" Ill try it out!

Here are the features of the IRF9530 mosfet:
"Features
• 12A, 100V
• r
DS(ON)
= 0.300
?
• Single Pulse Avalanche Energy Rated
• SOA is Power Dissipation Limited
• Nanosecond Switching Speeds
• Linear Transfer Characteristics
• High Input Impedance
• Related Literature

  • TB334, “Guidelines for Soldering Surface Mount
    Components to PC Boards”
    "

I dont know the total current draw of the motors...

I figured I'd use at least 12v to run the project since 7-12v is recommended for the arduino and since It would be sharing it with multiple 6v motors. (even though i'm not trying to run the motors at full speed.

Did I mention I don't know lick about mechanics and I'm sure that's the root of most of the problems here.

I've used the IRF9540 which has broadly similar specifications. The Rds(on) is a little high and that may be contributing towards the heating you observe, depending on how much current the motors take. If after you implement the 2 things I suggested, the mosfet still gets too hot, you could connect another mosfet of the same type in parallel with it. Or get a mosfet with the lower Rds(on).

Firstly using the emitter resistor limits the drive voltage to the MOSFET to 7V out of the possible 12V, so you won't necessarily be fully turning it on (use a base resistor, not an emitter resistor - ie a common-emitter circuit).

Secondly that MOSFET has an Rds(on) of 0.3ohm which is good for about a 1.2A load without a big heatsink. Choose a device with Rds(on) = 0.01ohm and you'll be able to drive 7A, choose a 3milliohm device and you can drive 13A. (All based on allowable dissipation of 0.5W)

Many people choose a MOSFET based on the current rating - this isn't the correct approach. (The current rating only means something if water cooling the MOSFET and you are prepared to lose 100W through it!!).

You have to calculate the power dissipation, choose a low enough Rds(on) - and select an appropriate heatsink/fan if more than 0.5W or so. Your heatsink probably only handles 1.5W BTW

So for example: I can manage up to 5W heatsinking and I want to switch 30A, I'll need a maximum Rds(on) of 5.5 milliohms. P = I^2 R

Thanks for all the great suggestions!

I haven't had a chance to try any of them yet.
I need to order the parts. It will probably be a while before I do. But I'll be sure to come back and let you know how it turns out!

Thanks again!!