Go Down

Topic: Transistor for 12V motor drive? (Read 8923 times) previous topic - next topic

kivig

Hi,
In short - are there any transistors or ssr capable of driving 12V, 1A or less motor directly from Arduino data pin known to anyone?
Thanks.

I'm making sort of cnc router and I need to drive 12V DC (definitely below 1A, but I'd prefer 1A for safety) motors from arduino. At moment I have suitable mechanic relays. They're not planted yet, but as there will be literally thousands of on/off switches for every contour I'm afraid the relay is a bad choice as it should wear out quickly. So, I'm looking if there's a chance to find reasonably priced alternative.

I want to drive motors directly without intermediate components and PCBs to keep things simple and so in case of failure I know exactly what is wrong and can replace that part quickly, without tester. But my knowledge about transistors is quite limited and purely theoretical.

Grumpy_Mike

There are just so many to choose from.
I use the BD679 darlington driver but there are lots more.
However a FET will dissipate less heat on heavy loads so look at a IRLB8748 or other similar logic level FET.

Normally people use stepping motors for a CNC.

dc42

As Mike says, a logic-level MOSFET would be better, it will run cooler and have less voltage drop. Also if you get an avalanche-rated one it is reasonably tolerant of back emf when switching inductive loads like motors. I use type STP40NF10L. At 100V 40A it's overkill for your application but will work just fine.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

kivig


There are just so many to choose from.
I use the BD679 darlington driver but there are lots more.
However a FET will dissipate less heat on heavy loads so look at a IRLB8748 or other similar logic level FET.

Normally people use stepping motors for a CNC.

Hi,
thanks for suggestions. What resistor do you use?
Also looking at IRLB8748 specification I don't really get how to calculate what resistance is needed.

Yeah, and there are surely reasons for using steppers :) But as there are ready kits I thought I'll try to make thread/motor drive with encoder first.


As Mike says, a logic-level MOSFET would be better, it will run cooler and have less voltage drop. Also if you get an avalanche-rated one it is reasonably tolerant of back emf when switching inductive loads like motors. I use type STP40NF10L. At 100V 40A it's overkill for your application but will work just fine.

Hi,
STP40NF10L - unfortunately couldn't find it in local stores. Where do you get them?

BetterSense

For a 12V 1A motor, wouldn't a simple TIP120 be fine? Are they not fast enough for PWM or something?

Grumpy_Mike

#5
Aug 12, 2011, 05:49 pm Last Edit: Aug 12, 2011, 10:25 pm by Grumpy_Mike Reason: 1
For a FET there is no need for a resistor as such because the gate is high impedance so you can do without. However if it is being switched very fast with PWM then you are best with a series 100R to limit the current out of the arduino to safe levels. This is because a gate looks like a discharged capacitor and that initially is a short circuit.

CrossRoads

If its N-channel, I'd add 10K pulldown resister to ground on the gate as well so the MOSFET won't be on as the arduino starts up and the pins are inputs before the sketch starts and drives the pin low.
Or a pullup if you want it on to start.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

kivig

#7
Aug 13, 2011, 04:05 am Last Edit: Aug 13, 2011, 04:07 am by kivig Reason: 1

For a 12V 1A motor, wouldn't a simple TIP120 be fine? Are they not fast enough for PWM or something?

Hi,
actually I don't need pwm everywhere, so this should be viable too.


For a FET there is no need for a resistor as such because the gate is high impedance so you can do without. However if it is being switched very fast with PWM then you are best with a series 100R to limit the current out of the arduino to safe levels. This is because a gate looks like a discharged capacitor and that initially is a short circuit.

Good to know :) Thanks.


If its N-channel, I'd add 10K pulldown resister to ground on the gate as well so the MOSFET won't be on as the arduino starts up and the pins are inputs before the sketch starts and drives the pin low.
Or a pullup if you want it on to start.

Hi,
actually I'm curious about what happens when Arduino starts. So when the pins are initially inputs they can have a charge? Is it possible that they go output HI at some point of initialization so they'll be ON even with 10K?

CrossRoads

They are inputs when powered up or Reset.  State will be unknown.
10K will pull them low.
Use 5K, 1K, anything down to  ~220 ohms.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

dc42

I am in the UK so I got my STP40NF10L mosfets from www.rapidonline.com, however you can also get them from Farnell/Newark and Digikey.

I also recommend a pulldown resistor with mosfets (I use 100K), and the 100 ohm series resistor suggested by Mike if you are doing PWM.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

kivig


They are inputs when powered up or Reset.  State will be unknown.
10K will pull them low.
Use 5K, 1K, anything down to  ~220 ohms.

Thanks!


I am in the UK so I got my STP40NF10L mosfets from www.rapidonline.com, however you can also get them from Farnell/Newark and Digikey.
I also recommend a pulldown resistor with mosfets (I use 100K), and the 100 ohm series resistor suggested by Mike if you are doing PWM.

Thanks for links, most are new to me. Rapidonline seems to have good prices.


I'm currently a bit short on finance (nuts and bolts cost next to nothing, but there's a lot of them) so I ordered BD679A and a piece of IRLB 8748PBF to see the difference. I'll change them all later if they'll heat.
Thanks for all the advices!

MarkT

I am doubtful of the assertion that the 12V motor will take less than 1A...  Unless its a unipolar stepper motor I suspect the winding resistance is low enough to pull many amps stall current.  The current a motor takes at no load when up to speed is a tiny fraction of the stall current.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

kivig

I've finally finished the hardware part and try to drive the motors.

Something didn't work, so I tried to connect just a single transistor (in attachment). The motor is turning on and off, but it spins at only about half of it's speed. When shorting between transistor legs it goes full speed.
I have tried both BD679A and IRLB8748PbF. Result is the same, except if I disconnect the gate of IRLB8748PbF from arduino, while motor running, touching the gate is enough to put motor to max RPM. I guess it's because it is a FET, but I have no idea if this is normal as didn't had any experience with transistors. (yeah I know - braking the circuit while it's working usually isn't a bright idea :) )


I am doubtful of the assertion that the 12V motor will take less than 1A...  Unless its a unipolar stepper motor I suspect the winding resistance is low enough to pull many amps stall current.  The current a motor takes at no load when up to speed is a tiny fraction of the stall current.

Probably you are right. Motors are Chinese and all I managed to get from seller was 1A, so...
But transistors seem to stay barely above room temperature, and IRLB8748PbF should be an overkill if I understand it right.

CrossRoads

Move the NPN/N-channel transistor so it goes between the motor and Ground.
NPN/N-channel are better as a current "sink" than as a current "source".

With the NPN also put a 150 ohm resistor between the arduino pin and the base so you don't overcurrent the output pin.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

kivig

#14
Oct 02, 2011, 08:31 pm Last Edit: Oct 02, 2011, 08:37 pm by kivig Reason: 1

Move the NPN/N-channel transistor so it goes between the motor and Ground.
NPN/N-channel are better as a current "sink" than as a current "source".

With the NPN also put a 150 ohm resistor between the arduino pin and the base so you don't overcurrent the output pin.


I was quite surprised, but changing the order returned 100% (with IRLB8748PbF, with BD679A it reaches only about 90%) to motor speed! How's that possible?

I double checked - the order is the cause indeed, which leads to another problem - with relays I was going to have two on each motor lead to turn it in both directions. Is it impossible to do the same with transistors?

Edit: As these transistors have built in diode, it appears definitely impossible this way.

Go Up