PWM to control multiple DC motors and fan

Thread Starter

Teamtoken

Joined Apr 16, 2021
5
Hi folks

So full disclosure, I'm a mech engineer who now wishes I'd spent more time delving into electrical as I'm trying to design a circuit but not knowing where to start

I've got an application where I need to drive three 12V DC motors and a 12V fan. The three motors are to be controlled independently with a switch and a pot for each from 0-6RPM, and the fan will just be always fully on.

There's loads of resources for controlling a single or two motors with a 555 timer but not much on any more than that that doesn't involve arduino or the like.

Just wondering what a circuit that does this looks like, or at least where I should be looking.

Many thanks!
 

Thread Starter

Teamtoken

Joined Apr 16, 2021
5
This sounds like a very good app to start with an Arduino.
Here is just one of many posts...
https://www.circuitstoday.com/pwm-generation-and-control-using-arduino
One Arduino can do the lot.
I should have added, this will be going into something I'm going to be making a few of, possible selling if it works out, so I'm looking for something like a 555 solution. I mean, I could just get the motor with its own little PWM board for each one and wiring it all up but I'm thinking thats the bloated and inefficient way of doing it and I should just do it all off one board? And the design of that board is what I'm stuck on.
 

dendad

Joined Feb 20, 2016
3,810
An Arduino Nano from Ebay will cost about $6US, and then a pot for each channel and a logic level FET and diode for each motor.
These parts will be needed even with a 555 for each motor.
The Arduino way will work out cheaper than going the 555 direction I reckon.
No resistors and caps for each 555 needed.
I would encourage you to have a look at the Arduino.
It will allow you to add extra features too, like timed running for example.
 

Thread Starter

Teamtoken

Joined Apr 16, 2021
5
Thanks for your response. I'm really kicking myself that I didn't get into Arduino earlier, it didn't occur to me I can go from Arduino prototype to production PCB

I'm thinking I should just get a full arduino starter kit and go from there to a proper PCB. It will take a little longer as my electrical knowledge goes as far as Kirchoffs laws and thats about it, but I'll learn a lot more about electronics and thats no bad thing!

One problem with Arduino though, it's output is 5V and my motors and fan are 12V. I can get 6V for those but it's difficult. Is there a workaround here with 12V?
 

Wolframore

Joined Jan 21, 2019
2,249
The Arduino output would switch a transistor for controlling a higher voltage load. The Arduino output should not be used to directly switch a motor or any load over 10-20 mA.
 

dendad

Joined Feb 20, 2016
3,810
Yes, as @Wolframore says above, the Arduino will not drive the motors directly. The same goes for the 555.
A power transistor or FET is needed.
Have a look at the circuit in the example I posted earlier..
1618573864369.png
This is for a small motor, but the same sort of thing is used, with suitable components, for larger motors.

And you can have a number of these speed controls in the one Arduino.
Also, if you need motor reversal, something like this is used..
(this is just an explanation diagram)
1618574051484.png
The H bridge can be discrete parts or an integrated device.
Look here for more...
https://www.engineersgarage.com/arduino/bidirectional-motor-with-arduino/
 

Alec_t

Joined Sep 17, 2013
11,997
0-6rpm is extremely slow. Are these geared motors? If not, something more elaborate than a conventional PWM circuit will be required. You would almost certainly need feedback on the motor shaft angle. Are the motors brushed, brushless or stepper type?
 

Ian0

Joined Aug 7, 2020
1,842
A microprocessor is overkill for this. A couple of dual comparators will do the job costing 50p each. One to generate a triangle wave and the other three to turn it into PWM.
Screenshot at 2021-04-16 14-30-32.pngDesigned for the TLC3702 comparator because it has push-pull outputs, even though the circuit diagram says "op-amp".


The Allegro A4952 is a neat full-bridge driver for a DC motor which takes a PWM input and has current limiting.
 

MaxHeadRoom

Joined Jul 18, 2013
22,814
0-6rpm is extremely slow. Are these geared motors? If not, something more elaborate than a conventional PWM circuit will be required. You would almost certainly need feedback on the motor shaft angle.
+1 on that.
You can get small geared motors, otherwise that is going to be very tricky to control that low, even with feedback!
Edit:
Roman Black has an old post on his web site https://www.romanblack.com/onesec/DCmotor_xtal.htm
 
Last edited:

wayneh

Joined Sep 9, 2010
17,133
A microprocessor is overkill for this.
I tend to agree and I like the simplicity of this solution. But I'd recommend it with one caveat: that there's no chance of needing additional functions in the future. If you ever need to add motors, add indicator lights, add delays to reversing motor direction, add remote control, etc etc, you'll be glad you went with a µC.

@Teamtoken, don't dread the Arduino learning curve. I recently played with my first Arduino (Uno R3) and was up and running very quickly. I then swapped in a Metro Mini – an Arduino compatible mini device from Adafruit – and that was virtually painless. The smaller devices are cheaper and more suitable for embedding in a project. The regular Uno has multiple power ports and other features to simplify development, but not things you'd need in an embedded solution. You can get Arduino clones very cheaply.
 

crutschow

Joined Mar 14, 2008
26,961
Below is the LTspice simulation of a circuit similar to Ian0's:
The U1 signal is shared by all, and you duplicate U2 and its associated circuitry for each motor.
Potentiometer U4 controls the duty cycle, shown for 5%, 50% and 95% settings of the pot.

1618583996767.png
 

MaxHeadRoom

Joined Jul 18, 2013
22,814
I've got an application where I need to drive three 12V DC motors and a 12V fan. The three motors are to be controlled independently with a switch and a pot for each from 0-6RPM, and the fan will just be always fully on.
So what is the application? Torque required? varying load?
How precise do you need to 6rpm?
 

Ian0

Joined Aug 7, 2020
1,842
I was just contemplating how linear the relationship is between pot position and PWM output, given the exponential waveform on C1. Obviously, 50% travel = 50% PWM, but how accurate is it at other positions? and would it be worth making it with current sources/sinks instead of the resistor.
 

Thread Starter

Teamtoken

Joined Apr 16, 2021
5
0-6rpm is extremely slow. Are these geared motors? If not, something more elaborate than a conventional PWM circuit will be required. You would almost certainly need feedback on the motor shaft angle. Are the motors brushed, brushless or stepper type?
I've had a play around with what I've got on hand, breadboard, 9V battery and a little PWM board with 100K pot and switch that I got from Aliexpress. Lowest I could get it is about 1 RPM before it stops, which is perfectly fine for my application. Load is low, no more than 500 grams max, and that would be rare, average is around 200G.

Also, if I want finer control through the range, is that a case of getting a higher resistance pot?

Motor specs here
Motorspec2.pngMotor&Module.JPG


Below is the LTspice simulation of a circuit similar to Ian0's:
The U1 signal is shared by all, and you duplicate U2 and its associated circuitry for each motor.
Potentiometer U4 controls the duty cycle, shown for 5%, 50% and 95% settings of the pot.
This is interesting. I think I'd like to try both circuits and see what works best. More functions is a possibility in the future which leans to the microcontroller but I'm also very open to a simpler solution if it works well.
 

MisterBill2

Joined Jan 23, 2018
8,399
The circuit proposed by Ian is a very good start, except use a single quad comparator for a slightly lower cost. An LM339 or similar, with a big advantage of not being single sourced, and in addition, not needing a closely regulated supply voltage. Then you can use the power FETs like in post #12 and it will be what you need. And all of the parts can be multiply sourced so that you do not get into a bind if some source has a problem. You will need to use linear taper pots and not audio tapered ones. And I did not see any mention of how much power the motors need.
 

Reloadron

Joined Jan 15, 2015
5,910
The three motors are to be controlled independently with a switch and a pot for each from 0-6RPM, and the fan will just be always fully on.
OK and now we know the motors use a 1000:1 gear ratio and the normal load current is about 0.5 Amp. There are a few ways to get PWM as are well covered. Using a uC (Micro-Controller) like an Arduino is one way to go or since you have 3 motors and want independent control I would likely go with an off the shelf turn key solution. You can buy motor speed controllers for motors like you have for a few dollars each (USD). Something like these or any of a dozen others like them. If I were to roll my own using a uC I would just get 3 of the ATtiny chips as an Arduino is sort of overkill. However, you can run with whatever you see as viable. Off the shelp turn key solutions have their merits and having a few spares is easily done.

Ron
 

dendad

Joined Feb 20, 2016
3,810
While the circuit like in post #12 will work very well, all it can do is drive the motor at the set speed.
If you use a micro like an Arduino, extra features can be added as the requirements change.
For example, speed ramping up and down over a time.
Or various motors turning on and off at set times or conditions.
Communicating the state of the motors on a display or to a remote point.
And most anything else you may want to do.
The Arduinos are by far the cheapest way to learn micro controllers as that is exactly what the Arduino system was originally designed for.
As many will say, there are better micros available, and lots of them can use the Arduino development system, but the massive amount of on line help and availability of cheap boards is very hard to beat.
In my industrial designs, I've used quit a number of controllers but I always point new users to the Arduinos as they are ideal to start with.
 

MisterBill2

Joined Jan 23, 2018
8,399
It depend on how many of the sytems you want to produce, and if it will be a long production run, or if it is a one-off project. And if you want it to keep growing and the control interface become so complex that whatever is hard to use, then pick the arduino. If you want a physically rugged system then use the comparators system and know that it will not be subject to glitches and power supply noise.
 
Top