Alternative to L293D for single DC motor speed control (12V, ~500mA)

TL/DR:

Any alternatives to L293D which:

  • can supply up to 12V/500mA continuously to drive a DC motor,
  • either don't need a heatsink or are easy/cheap to apply a heatsink to,
  • are through-hole for use on veroboard,
  • are not massively more expensive than L293D

?

Gory details:

I need to control motor speed for a project. The motor in question is a 12V DC motor which draws up to 500mA according to the datasheet (measured on the bench I see up to about 300mA at the speeds required). The motor will run pretty much continuously.

Currently I am using an L293D for driving the motor, controlling the motor speed using PWM from an ATMega328. This all seems to be working fairly well -- at least on a breadboard!

My issue is that when prototyped on veroboard the L293D gets much hotter than it did on the breadboard, to the extent that the voltage supply to the motor drifts. I'm not sure whether the breadboard has more metal in it than the veroboard does; but irregardless I know L29X devices do get hot, and so I'll need to heatsink the IC. I can source DIP16 heatsinks from e.g. eBay but they're quite expensive!

Can anyone suggest an alternative for my use? I am currently considering using an LM317 since while I know that will get hot, at least heatsinks are readily available for them. Alternatively a MOSFET-based driver IC, but they all seem to be SMD from what I can see, and I need something through-hole for mounting on veroboard.

Any ideas?

Pololu has a selection of DC motor drivers.

Choose a driver that will handle the stall (starting) current of the motor. The stall current should be listed in the motor data sheet.

Are you driving this motor in both directions? If not, you can use a simple logic level transistor to achieve your PWM for the 12V supply. A motor driver is mostly handy for forward/reverse operation.

Are you driving this motor in both directions? If not, you can use a simple logic level transistor to achieve your PWM for the 12V supply

Hmm, no, it's just one direction. If using a transistor, would I just drive the gate with the PWM signal?

Pololu has a selection of DC motor drivers.

Thanks for that! They look very interesting, albeit a little on the pricey side. That said, the breakout board approach does open up the SMD world which is fantastic.

Here is a MOSFET motor driver for one direction control. Use a PWM output pin to control speed.

Choose a MOSFET that can handle the stall current.

Here is a MOSFET motor driver for one direction control. Use a PWM output pin to control speed.

Thanks for this, much appreciated!

I don't have a MOSFET to hand right now but I do have a Darlington transistor (TIP121) so I had a bit of a play about with that. Now that I've looked there are plenty of tutorials on the internet using an NPN transistor for this kind of purpose.

Interestingly, in initial testing using the TIP121 as a driver seems to need a higher PWM value to get the motor to turn at all than the L293D does. I'll keep looking into it.

in initial testing using the TIP121

With what circuit? From your observation, I suspect that the base resistor is too large.

Also, post a link to the motor. The start/stall current is typically 5 to 10 times higher than the free running current.

With what circuit? From your observation, I suspect that the base resistor is too large.

I don't have access to software to draw a schematic :frowning: so I will describe as best I can. My TIP121, motor, and 12V power supply are hooked up to a breadboard. I'm supplying a PWM signal using an Arduino board. The connections are as follows:

  • 12v supply connected to breadboard ground and 12v rails
  • Arduino ground connected to breadboard ground rail
  • TIP121 base pin driven by Arduino PWM pin through a 330R resistor
  • TIP121 emitter connected to breadboard ground rail
  • TIP121 collector connected to motor -ve
  • motor +ve connected to breadboard 12v rail

Very much along these lines: https://i2.wp.com/www.circuitstoday.com/wp-content/uploads/2014/04/pwm-motor-speed-control-using-arduino.png

Also, post a link to the motor. The start/stall current is typically 5 to 10 times higher than the free running current.

Understood.

The motor is the 12V/4000RPM flavour of this: https://www.amazon.co.uk/Motors-Permanent-Magnet-3500-8000RPM-Generator/dp/B07KPDZ55L

A bit more detail on my observations. I have my sketch set up to allow me to interactively add or remove 16 to the PWM value, which lets me play about with different configurations.

With L293D:

  • To get the motor to spin I must write 48 to the PWM pin, gives a voltage of 2.15V across the motor. Anything less than that and it won't move.
  • Once spinning, I can step back down to 32 and the motor will keep going (1.24V across the motor). Anything less than that and it stops.

With TIP121:

  • To get the motor to spin I must write 64 to the PWM pin, which gives a voltage of 4.20V across the motor. Anything less than that and it won't move.
  • Once spinning, I can step back down to 48 and it will keep going (2.04V across the motor). Anything less than that and it stops.

I don't have access to software to draw a schematic

Pencil and paper works very well. Draw it out, take a snapshot with your phone and post that.

If you have the 12 V motor, the start/stall current is 6.5 Amperes. Can your power supply deliver that much current?

Breadboards are for logic circuitry and cannot handle anywhere near such currents. The tracks will burn. The L293D can't handle anywhere near that current, either.

You need to solder all connections. Also, reduce the base resistor from 330 to 100 Ohms. Or, buy an appropriate motor driver, like this one and hook up the motor and motor power supply leads with secure screw terminals or soldered connections.

Pencil and paper works very well. Draw it out, take a snapshot with your phone and post that.

Ha, yes, silly me :slight_smile:

I have drawn the schematic and photo’d it, but figuring out how to upload it eludes me for the moment. If I figure it out I’ll come back and edit my post, but for the meantime the schematic I linked to is representative, albeit I’m using 12V rather than 6V and not an Arduino Uno.

If you have the 12 V motor, the start/stall current is 6.5 Amperes. Can your power supply deliver that much current?

There are a number of 12V motors in the listing: we’re using the 4000 RPM one with a stall current of 2.3A. I think you may be looking at the 8000 RPM model.

This said, I appreciate what you’re saying about the breadboard not handling such currents. I’m just prototyping currently and haven’t burned anything yet.

In terms of the eventual build, connections will be soldered of course. The relatively high stall current of the motor does concern me somewhat. I’m relying on a couple of aspects of the application:

  1. The motor won’t be started at 12V – I’ll actually be amazed if it ever sees 12V full stop. So for the measured windings resistance I don’t anticipate a starting current greater than 1A, typical running current < 300mA.
  2. The motor won’t be able to hit a stall condition when running. Appreciate “won’t” is a bit of a weasel word and you’re better in general to design for the worst case!

These two factors lead to the initial testing with L293D.

Also, reduce the base resistor from 330 to 100 Ohms.

I will give that a go, thank you.

Or, buy an appropriate motor driver, like this one

Thank you – a previous poster also recommended Pololu. Depending on how the transistor-based approach goes I might end up with a breakout board instead.