SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By SamBamboo
#163185
I need to power and control 4 DC Brush motors (keyed chucks) for a cnc I am building and so I am trying to figure the best solution, btw I am new to working with motors.

First: "I do not need to run any of these at the same time, and they will only go one direction"

So instead of using 4 DC brush motor controllers for each motor I thought I could simply use one, then run the output to 4 N-channel mosfets, a mosfet for every motor. Then use 4 arduino pins to turn which motor I want on, then control the motor controller like normal. But then after reading how this motor controller works I realized that I can just simply use 4 mosfets, connect each mosfet Gate to an arduino PWM pin, and those would be my 4 independent motor controllers.

Is it that easy? or I missing something?

Thanks
By fll-freak
#163214
If I understand you, I think this is a possibility. You do have the possible problem of a bug in the code enabling more than one MOSFET and having multiple motors run at once. You will need to size the MOSFETs properly to account for the voltage and current. You may need to add heat sinks based on the power the MOSFET will sink. But what you describe is a mutiplexer (mux) and is a common way to contol devices one at a time.
By Mee_n_Mac
#163219
SamBamboo wrote:I realized that I can just simply use 4 mosfets, connect each mosfet Gate to an arduino PWM pin, and those would be my 4 independent motor controllers.

Is it that easy? or I missing something?

Thanks
Are you looking to control the speed of the motors via PWM ? I assume so from the above so it can be *that easy* but you do have to exercise some caution in turning the FETs fully on and fully off as quickly as possible. During the transition time (on -> off, off -> on) the FET will be conducting "large" currents and have a relatively "large" resistance. That means it'll be dissipating power and get hot. So you need to choose the proper FETs that can handle the voltage and current, can be switched by microcontroller voltages and handle the PWM frequency you've chosen. I recall an article I read about driving large current FETs (I assume the CNC motors will be "large") and it detailed how the output stage of the micro wasn't always good enough to turn the FET on/off quickly enough. I wish I had saved the link. So my point is you need to watch the FET temps when trying this as I don't know where an Arduino output stage falls in being good enough or not. I also recall that the series resistor btw the pin and the gate plays a part in damping out oscillation in the line but I don't recall if that's relevant at the PWM frequency you'd likely use.

Here's a typical arrangement for a FET used as a switch. Scale for your voltage and current accordingly.
MOSFET_driver_schem.png
You do not have the required permissions to view the files attached to this post.
By SamBamboo
#163298
Thank you for the detailed answers.

Here is what I got:

Plan to use Arduino Mega R3

Motors I will be using: http://www.robotshop.com/banebots-5-1-p ... r-kit.html
12V nominal, Stall Current: 15A


N-channel FET
{
https://www.sparkfun.com/products/10213
60V, 30A
Gate Threshold Voltage = 2.5v, so I am guessing Arduino's 5V logic should work?

Switching Characteristics (ns) -- (MAX)
Turn-On Delay Time---------------40
Turn-On Rise Time---------------430
Turn-Off Delay Time-------------130
Turn-Off Fall Time---------------230
------------------------------------------
Total time per cycle-------------830 nc

"Pulse Test : Pulse width ≤ 300us, Duty cycle ≤ 2%"

I don't know enough about PWM to know if this will work.
}

Heat sinks: https://www.sparkfun.com/products/121
If needed I will run a fan behind them.

12V 20Amp power supply, that will power all motors. Again only one will run at a time.

Best case if to just grab the parts and try it out, I am just surprised it can be that easy to drive these motors.

BWT the motors will hook up to 1/2" keyed chucks that will be used to drill polycarbonate.