Maker Pro
Maker Pro

Controlling large motor with MOSFETS

a sandwhich

Sep 27, 2012
4
Joined
Sep 27, 2012
Messages
4
Hello, I am working on a project that involves controlling a relatively large motor, and I am trying to build a circuit to control it as opposed to buying a motor controller. My idea is to wire the motor to the battery, place some configuration of N-FETs between ground and the motor, a current sensing ic such as this one between the motor and the battery to keep current from going above 60A, and a microcontroller to send a pwm signal to the transistors to control the speed of the motor. I am thinking about putting two of these in parallel to accomplish this, but I am unsure of whether or not this will work. Some specs on the already determined parts: The battery is a 12V sealed lead acid battery. The motor will operate at 12V and has a current range of 2.7A (At no load) to 120A (At a stall). It is rated at 337 Watts at 2655 rpm, 172 oz-in, and 68 amps and should have a constant load, but shouldn't stall frequently. I don't care very much about bidirectional control, which is why I was thinking it would possible to use mosfets like this. Would the setup I described be possible with the parts I listed? Would it be practical? Any advice is appreciated.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,610
Joined
Nov 17, 2011
Messages
12,610
Your component selection looks practical.
I'd like to add the following points:
1) Add a freewheeling diode across the motor. Otherwise the energy stored in the motor's coil will generate large negative spikes when the MOSFETs are turned off, thus damaging the circuit.
2) Add a fast overcurrent protection, possibly analog, to the circuit. A typical microcontroller may not be fast enought to turn off the MOSFETs in case of a stall of the motor. You could add an analog comparator to the sense output of the current sense amplifier which directly turns off the MOSFETs if an overcurrent is detected (may need some filtering to ignore short spikes). The comparator's output can be routed to an input of the microcontroller to inform the SW of the stall situation.
Also the MOSFETs should be kept off until deliberately turned on again by the SW. You could use a flipflop which is set by the comparator and reset by the microcontroller. Thus you avoid oscillations of the overcurrent circuit (in case the SW is slow in turning of the PWM).
 

a sandwhich

Sep 27, 2012
4
Joined
Sep 27, 2012
Messages
4
Alright, thanks. Would you be able to suggest a diode I could use? And shouldn't the mosfets be on unless it is in a stall?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,610
Joined
Nov 17, 2011
Messages
12,610
At nominal 337W the current at 12 V is 28 A. Therefore any 30 A (>=12 V) rated diode should be suitable, e.g. DSi 30-12A. Remember to connect the cathode to plus and the anode to minus of the motor terminals. This is the way a freewheeling diode operates. Otherwise you'd fry the diode.

When using PWM the MOSFETs will be alternatingly on and off. Otherwise, you wouldn't need PWM. Correct me if I misunderstood that part of your original post.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,610
Joined
Nov 17, 2011
Messages
12,610
That diode should work, too.
For a comparator you could use an LM239 for example.
 

a sandwhich

Sep 27, 2012
4
Joined
Sep 27, 2012
Messages
4
Once again, thank you. I looked at the specifications of the lm293, and the ratings were different from what I was thinking. That is probably due to my lack of knowledge. Would you be able to explain a basic setup on how these would switch such large currents?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Some microcontrollers have a fault input that shuts down the PWM immediately without any program intervention. This would be a good way to shut down on over-current. Some also have built in comparators, so you might save a lot of circuitry by using those two features.

Bob
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
12,610
Joined
Nov 17, 2011
Messages
12,610
The LM239 is not meant to switch the motor's current. Here is a rough sketch of what I mean (please excuse the low quality):
attachment.php

I forgot to draw the connection from the flipflop's output to an input of the µC to recognize the fault condition.
 

Attachments

  • test.gif
    test.gif
    26.4 KB · Views: 239
Top