DC motor controller, controlled by digital voltage signal

Thread Starter

Niner

Joined Oct 16, 2023
9
I have a 12V 12A brushed DC motor that I want to control the speed of with a digital signal.
For this I have to make a controller for the DC motor.

So, I have 3 inputs to the controller:
1) 12v power
2) ground
3) digital signal (0v for off, 8v for maximum speed)
and 2 outputs going to the motor:
1) power
2) ground

I found a few potential solutions:
1) digital potentiometer(digital rheostat) - this is connected in series with the motor, and the digital signal controls the potentiometer thus increasing/decreasing the motor speed. But I haven't found a power digital potentiometer.
2) PWM controller where the PWM ratio is controlled by the digital signal. This PWM signal is then fed to a power MOSFET and drives the motor. This is also not ideal because it is not easy to create a PWM signal where the ratio is controlled by a digital signal. I found http://pcbheaven.com/circuitpages/Voltage_Controlled_PWM_Generator/ and seems to use a pretty complex solution.

Is there a simple solution that I am missing? Something like an OP AMP for the signal voltage (I mean if the digital signal is 4V, then feed 4V to the motor, but with current from the power source)?
 
Last edited:

MisterBill2

Joined Jan 23, 2018
17,814
A digital potentiometer is not suitable for power applications at all. So that will not be considered.
Generating a variable duty cycle signal is not difficult at all, there are many options that will work. The bad news is that the control signal described, zero volts for zero RPM, and 8 volts for maximum RPM, does not seem to be a digital control scheme.
What will you be using to send the digital speed command with?? What format will the command have? Amazingly enough, this IS an application where an arduino board could receive a command and supply a reasonable PWM signal.
 

Thread Starter

Niner

Joined Oct 16, 2023
9
>The bad news is that the control signal described, zero volts for zero RPM, and 8 volts for maximum RPM, does not seem to be a digital control scheme.
Zero volts would be PWM with 0 ratio, 8 volts would be PWM with full ratio.

>What will you be using to send the digital speed command with?? What format will the command have? Amazingly enough, this IS an application where an arduino board could receive a command and supply a reasonable PWM signal.
The digital signal is sent by a car's ECU. Arduino would work, I could use a voltage divider to make the 8V proportional to 5V, which Arduino could read, and then supply the required PWM, but I am wondering if there is a better solution with fewer components.
 

dendad

Joined Feb 20, 2016
4,426
I have a 12V 12A brushed DC motor that I want to control the speed of with a digital signal.
What do you mean by a digital signal? Generally, a digital signal is either on or off.
It sounds like your controller uses an analog control, not digital.
An idea would be to show us the controller and maybe explain your application better.
If you want to drive the motor from an Arduino, then one way would be to use a PWM output, filtered to a DC value, then an OpAmp to amplify it to scale to 0V to 8V for the controller.
 

Thread Starter

Niner

Joined Oct 16, 2023
9
>What do you mean by a digital signal? Generally, a digital signal is either on or off.
> It sounds like your controller uses an analog control, not digital.
Sorry, it is just a signal varying from 0 to 8 volts, which should proportionally control the speed of the motor, ex. 0V is 0 speed, 2V is 25% speed, 4V is 50% speed, etc.

> An idea would be to show us the controller and maybe explain your application better.
I don't have the controller, I want to make it.

I basically have 3 inputs, 12V power (from a car battery), ground and the speed signal which is 0 - 8V. And I have to drive the motor. If I connect power and ground directly to the motor, it will run at 100%, but I want to vary the speed based on the signal, and for this I want to make this controller.

> If you want to drive the motor from an Arduino, then one way would be to use a PWM output, filtered to a DC value, then an OpAmp to amplify it to scale to 0V to 8V for the controller.
I don't want to use an arduino for this, currently the solution that seems doable is a Voltage controlled PWM generator (http://pcbheaven.com/circuitpages/Voltage_Controlled_PWM_Generator/), which drives a power MOSFET. But I am wondering if there might be a simple solution that I miss.
 

dendad

Joined Feb 20, 2016
4,426
About the simplest would be an LM555 PWM driver, something like this...
1697856882075.png
But you will need bigger FET and back EMF diode for your motor. I expect quite a bit of smoke during testing ;)
EDIT: As the motor is rated at 12A, the controller will need to be quite a bit more than that to allow for starting and stall currents. I'd go at least double.
 

MaxHeadRoom

Joined Jul 18, 2013
28,513
2) PWM controller where the PWM ratio is controlled by the digital signal. This PWM signal is then fed to a power MOSFET and drives the motor. This is also not ideal because it is not easy to create a PWM signal where the ratio is controlled by a digital signal.
Not quite true, done it a few times with a Picmicro timer. Can be made to ramp up smoothly!
 

k1ng 1337

Joined Sep 11, 2020
911
If you only need to select between preset values (0V, 2V, 4V, 6V, 8V, etc.), you can use a voltage divider with a rotary switch. The switch works by making and breaking the contacts at your preset analog values at each point on the divider.
 

crutschow

Joined Mar 14, 2008
34,047
Below is the LTspice simulation of a discrete circuit using an LM339 (quad package) or LM393 (dual package) comparator that generates a PWM output from your 0V to 8V analog (not digital) input:

The left comparator generates a (exponential) triangle signal, and the right comparator compares the triangle with the signal voltage to generate the PWM signal.

For 0V signal input (green trace) the motor current is zero (red trace) and then the PWM duty-cycle increases with the signal increase until the motor is fully on at 8V input.

1697860000432.png
 
Last edited:

k1ng 1337

Joined Sep 11, 2020
911
Here is a simulation of a simple voltage divider providing analog outputs from a 12V battery. You can add as many speed outputs as you want with more resistors and a rotary switch.

Untitled.png
 

Thread Starter

Niner

Joined Oct 16, 2023
9
If you only need to select between preset values (0V, 2V, 4V, 6V, 8V, etc.), you can use a voltage divider with a rotary switch. The switch works by making and breaking the contacts at your preset analog values at each point on the divider.
is there a way to make this rotary switch "digital", so that the voltage automatically selects the right path, without manual input?
 

Thread Starter

Niner

Joined Oct 16, 2023
9
Below is the LTspice simulation of a discrete circuit using an LM339 (quad package) or LM393 (dual package) comparator that generates a PWM output from your 0V to 8V analog (not digital) input:

The left comparator generates a (exponential) triangle signal, and the right comparator compares the triangle with the signal voltage to generate the PWM signal.

For 0V signal input (green trace) the motor current is zero (red trace) and then the PWM duty-cycle increases with the signal increase until the motor is fully on at 8V input.
This seems like a viable solution. I was thinking about it if I don't find anything simpler.

I found a fewer components solution that is supposed to work:
untitled.png
KT896 is a soviet PNP, KT815 is a soviet NPN

However I don't understand what is the principle of work. I think it might be related to some properties of the transistors, like it not being fully open based on the base voltage. Does it make any sense?
 
Last edited:

MisterBill2

Joined Jan 23, 2018
17,814
The circuit in post #13 is not one bit digital!! It is using transistors in the linear mode, meaning that they act like variable resistors, NOT LIKE SWITCHES! This means that the transistors will need to dissipate a LOT OF HEAT!
That circuit would be OK for a small motor, like in a tape player, but not for a higher power motor.

If the control circuit is from an "car's ECU" and it varies from zero to 8 volts, then there is nothing digital about it!! That is an analog voltage control scheme. The PWM circuit in post #9 would be a very good start at a control scheme.

So before we go any farther offering solutions that are" too complicated", we need to understand the actual application!


This sounds a bit like an electronic fuel metering system, which I was involved with the development project many long years ago, at a company that I do not name.
It was in competition with fuel injection, and it was not cost effective, so the project was cancelled. Not every idea from a manager is a good one, as "The Duke of Mud" ultimately discovered. (Those folks involved will know who I mean.) The guy is gone now, but the legacy remains.

AND WHY IS IT NOT POSSIBLE TO SEE THE "INFORMATION' OF THIS THREAD STARTER??????
 

BobTPH

Joined Jun 5, 2013
8,664
FYI: PWM does not accomplish speed control. You need a feedback loop to do that. I.E. a circuit that measures the speed and adjusts the PWM until the desired speed is reached.

And 10% PWM will not give you 10% of the max speed. In fact, the motor might not run at all with 10% PWM power.
 

Thread Starter

Niner

Joined Oct 16, 2023
9
It is using transistors in the linear mode, meaning that they act like variable resistors, NOT LIKE SWITCHES! This means that the transistors will need to dissipate a LOT OF HEAT!
With proper heat sink it might be doable

If the control circuit is from an "car's ECU" and it varies from zero to 8 volts, then there is nothing digital about it!! That is an analog voltage control scheme. The PWM circuit in post #9 would be a very good start at a control scheme.
I am sorry, it is analog, I used the wrong terminology.


So before we go any farther offering solutions that are" too complicated", we need to understand the actual application!
Below is an image that shows the 3 controller inputs, the controller and the 2 controller outputs. I have a controller that worked, but something broke, and the components used in the existing one that broke are unmarked, so I am trying to make a new one from scratch.

Screenshot_20231021_155951.png

AND WHY IS IT NOT POSSIBLE TO SEE THE "INFORMATION' OF THIS THREAD STARTER??????
I have not completed the information in my profile. I am a software developer from eastern europe, and I am interested in electronics, but I have only basic knowledge. I am trying to do all kinds of tasks related to electronics to improve my knowledge.
 

Thread Starter

Niner

Joined Oct 16, 2023
9
FYI: PWM does not accomplish speed control. You need a feedback loop to do that. I.E. a circuit that measures the speed and adjusts the PWM until the desired speed is reached.

And 10% PWM will not give you 10% of the max speed. In fact, the motor might not run at all with 10% PWM power.
I tried to control the motor speed with an arduino generating the PWM and a MOSFET(with protection) , and while it might be not ideal, the motor speed changed based on the PWM ratio. This controller is for a car ventilation blower, so accuracy is not really important. However I don't want to use a complicated circuit involving an arduino or a lot of components, because it needs to be rugged, as it will be mounted under a car hood.

I will look into what MisterBill2 mentioned, about transistors used in linear mode behaving as variable resistors. I did not know transistors could do that, so I have to investigate.
 

crutschow

Joined Mar 14, 2008
34,047
By simple linear control you mean using transistors as variable resistors?
Yes.
Makes no difference how you control the motor linearly, be it transistors, variable resistors, or other means.
The amount of dissipated power in the controlling device will be the same.
 
Top