Controlling Brushed DC Motor Speed using PWM

Jieve

Member
Join Date
Feb 2012
Location
USA
Posts
274
Hello Guys,

I have a project that I will be attempting for the first time, and need some help in implementing it. I have a 0.5HP Rotomag 110V Brushed DC Motor whose speed I would like to control using the PWM output (adjustable between 2Hz and 100kHz) of a Siemens S7-1214C PLC. Speed will be measured using a sensor measuring a high signal at a single notch in a secondary geared shaft, meaning 1 pulse per revolution. My idea is to wire the sensor into an edge triggered digital input and use an interrupt routine to calculate the time between pulses to obtain the speed. Max shaft speed is 2250RPM or 26ms/rev. PLC cycle time is around 10ms. Speed would be fed back and pulse width controlled using PID. I would like to be able to simply enter a speed value on the HMI and have the system run up to this speed. Available mains voltage is 230/400V.

Questions: 1) I’m not sure what component I need to interface the PWM signal with the motor. Are there power amplification modules for this purpose that take in a PWM signal and output an analog voltage? Or can I somehow amplify the PWM signal directly and run it into the motor? What PWM frequency would you recommend? The motor max speed will be around 800RPM and low load, this speed is obtained under no-load conditions by applying ~55V DC to the motor.

2) Is the cycle time fast enough for this operation? It seems like interrupting the cycle every 26ms with a 10ms cycle time may affect something (there is of course the PID instruction and some data logging which may be interrupted by the routine). Haven't worked much with PLC interrupts. Any pitfalls here?

3) Any input regarding other pitfalls, hardware that might make things easier or calculation methods that might make things easier? Again it’s the first time I’m attempting a project like this, seems entirely doable but need to figure out how to implement everything.

Btw, this project is for an educational environment. Any input would be greatly appreciated!! Thanks!!
 
Can you clarify the end purpose - for example is it to gain an understanding of how to switch transistors to control the voltage required to run the motor at a required speed?
 
Thanks for the reply. This is the drive setup for a machine used to demonstrate vibration phenomena in rotating machinery to be used at a technical school. The motor has already been designed into the system, need to get it controlled and running.
 
This is not a project for a beginner. You cannot power the motor directly from the PLC. Unless you have considerable experience designing power electronic circuits, purchase something already made. Most DC drives use SCR phase control for converting mains AC to DC for a motor, not PWM control. You will also need to include a current limit circuit to prevent high current from damaging the electronic switching devices.

Purchase a small DC drive such as one made by KB Electronics and control it with an analog output from the PLC. The drive will have its own speed feedback for controlling the speed but you could use the sensor for displaying the speed on a HMI. If the speed is just for display purposes, it may be better to count the pulses for a fixed time period, say 1 second, and calculate the speed from that value.
 
Vic, thanks for the reply. Couple things:

This is not a project for a beginner.

Not a beginner, just never done a project of this type before.

You cannot power the motor directly from the PLC. Unless you have considerable experience designing power electronic circuits, purchase something already made.

This I am aware of, this is why I was posting the question. I'm not sure what components are available, I was envisioning some type of converter with a power amp connected to 230VAC main, that takes a DC 0-24V PWM signal as input, and varies the power out based on the input. But I don't know if something like this exists. If I can control the drive somehow with a 0-10V analog signal that's fine too, probably even easier. I have some EE colleagues that could build something, but I'd FAR prefer something off-the-shelf, as it just makes things a lot easier.

Purchase a small DC drive such as one made by KB Electronics and control it with an analog output from the PLC.

Looks like KB has a number of drives, both PWM and analog controlled that might fit the bill. Will check them out, thanks for the tip.

If the speed is just for display purposes, it may be better to count the pulses for a fixed time period, say 1 second, and calculate the speed from that value.

The speed measurement is for feedback, to make sure the motor is running at the correct speed. Unfortunately the motor has no encoder or tacho built onto it, nor can one be easily adapted as far as I can tell (I'll research this further, maybe I can get a tacho or encoder for this), hence the single pulse method described above.

I considered the count method, however since there is only 1 pulse/rev, the speed resolution is quite low using that method. If I were to count pulses per second, at slow speeds 1 pulse/sec = 60RPM, 2 pulses/sec = 120RPM. If possible I'd like resolution higher than 60 RPM per pulse. Measuring the time between pulses also results in some error at high speed, with 26ms/rev at max speed, and a 1ms error (since PLC clock resolution is 1ms) this would result in ~28RPM error. Also not entirely ideal, but better than the other way.

Ideally I'd like to get it within a couple RPM, but maybe I'm just dreaming if I'm not using an encoder or tacho. Just would like to keep the signal stable enough prevent the PID from hunting to find the desired speed.

I am flexible on the PLC although I only have Siemens to work with, I have S7-315F's or a S7-1516 PLC available as well. I liked the compact 1200 with built-in PWM though, haven't done much research as to what built-in options are available with the 1500. Scan time would be greatly reduced though, just seemed a little overkill for this project.
 
Last edited:
Not a beginner, just never done a project of this type before.
So you are a beginner.

You can buy cheap drives that will convert an analog output to a PWM signal to the motor. This should solve the output problem.

If position control is not required then try mount a tachometer on the motor. Usually I recommend and encoder for position feed back and I want 10000 pulses or 40000 counts per revolution minimum.

If you do use a tachometer then make sure the analog input card does not have a low pass filter on the input. You must have noise free and timely velocity feedback.

This would be easy with a real motion controller.
 
This I am aware of, this is why I was posting the question. I'm not sure what components are available, I was envisioning some type of converter with a power amp connected to 230VAC main, that takes a DC 0-24V PWM signal as input, and varies the power out based on the input.

Typically PWM controllers are only used when the power supply is batteries as you need a smooth, stable source of DC to be able to pulse width modulate it. You want SCR phase control if your power source is AC as you can convert directly from AC to variable voltage DC.

A typical DC drive has a speed control loop and a current control loop. These are similar to PID loops but need to be much faster than what can be done in a PLC. Use an off-the-shelf DC drive controlled with an analog output. If the drive speed control is not good enough for your needs (typically 2% using armature voltage for speed feedback) use an external speed sensor connected to the PLC and vary the analog output accordingly. It is doubtful if you will be able to get better than 2% speed regulation if the speed sensor only gives 1 pulse per revolution.
 
Typically PWM controllers are only used when the power supply is batteries as you need a smooth, stable source of DC to be able to pulse width modulate it.
Not true, PWM is used because it is more efficient than using analog signals where there are more resistance losses.

You want SCR phase control if your power source is AC as you can convert directly from AC to variable voltage DC.
DC motors do not require phase control.

A typical DC drive has a speed control loop and a current control loop.
These is speed control loop and a position control loop.

These are similar to PID loops but need to be much faster than what can be done in a PLC.
This part is very true and why this is ONE of two reasons project will fail.

Use an off-the-shelf DC drive controlled with an analog output.
No, use a cheap drive with an analog input and PWM output to the DC motor.

If the drive speed control is not good enough for your needs (typically 2% using armature voltage for speed feedback) use an external speed sensor connected to the PLC and vary the analog output accordingly. It is doubtful if you will be able to get better than 2% speed regulation if the speed sensor only gives 1 pulse per revolution.
If he is lucky.

What is possible with a motion controller. The speed control is much better than %2. The PID can control the current directly. You can see in the graphs that the output or current is proportional to the acceleration and not the velocity. There is no need for a velocity or speed loop if you know how to control the current directly.
http://deltamotion.com/peter/Videos/AutoTuneTest2.mp4
 
Peter,

We are talking about two different things here. I am talking about a simple DC drive speed controlling a regular DC motor and you are talking about a servo drive controlling a servo motor. The KB Electronics drives I previously referred to are phase controlled with a speed and current loop. One suitable for the motor in question is available for less than $100. The drives you referred to cost many times that amount and are overkill for this project.
 
Peter,

We are talking about two different things here. I am talking about a simple DC drive speed controlling a regular DC motor and you are talking about a servo drive controlling a servo motor. The KB Electronics drives I previously referred to are phase controlled with a speed and current loop. One suitable for the motor in question is available for less than $100. The drives you referred to cost many times that amount and are overkill for this project.
No, I am talking about a small DC motor with encoder feed back. The encoder is 2000 PPR which yields 8000 counts per revolution. The output of the motion controller to the drive is -10 to +10 volts. The drive is a small amplifier that converts voltage to a PWM current output. When the motor is tuned you can see the control output is proportional to the acceleration/current for torque.

http://deltamotion.com/peter/Videos/AutoTuneTest2.mp4


Unless there is a velocity loop in Jieve's system his control will be similar to mine except he cannot hope to get the feedback resolution or close the loop as fast.
 
So you are a beginner.

Ok, I'll concede.

Not true, PWM is used because it is more efficient than using analog signals where there are more resistance losses.

This is the original reason I wanted to use PWM to control the motor as opposed to direct conversion/regulation of AC to DC.

No, use a cheap drive with an analog input and PWM output to the DC motor.

This sounds like what I am looking for. The motor only needs to rotate in one direction, and I don't need position control. Only velocity control. I will see if I can find an encoder or tacho for the motor. What I gather from this is you're saying use a cheap drive (analog-in PWM-out) with built-in feedback control to regulate the speed. From a hardware standpoint, essentially wire up the tacho/encoder and go. Are there cases or limitations in which PWM should NOT be used to control specific DC motor types, such as winding type, etc?

An additional beginner question: the Motor is rated for 115V, the mains voltage I am working with is 230V. Will I need to step this down and get a drive with a 110-120V main input to be compatible with (not burn up) the motor? Or are there drives that can take 230V in and limit the output to 115V DC?

This part is very true and why this is ONE of two reasons project will fail.

I assume what you are trying to say with this, is that speed controlling the motor using a PID loop in the PLC itself will not be nearly as fast as it needs to be for accurate control. Is this correct?

Thanks Peter and Vic so much for the input.
 
pwm needs special output cards, expensive **** (siemens is very expensive.
As the voltage is only 110 DC try to find a speedcontroller for a racing car they can handle 40 amps so way enough.
a better choice would be a arduino.
and yes you will need a power supply or transformer. But hey for a start begin with a VAriac and a bridgerectifier, that is enough as the load does not change.
db pruftechnik has good vibration equipment.
 
pwm needs special output cards, expensive **** (siemens is very expensive.
That is only if you buy a PWM card that fits in the PLC. The amplifiers we use have -10 to +10 analog inputs. The amplifier has PWM current outputs. The amplifier simplifies things and it only costs a few hundred dollars. What one doesn't get is the inner velocity or torque control loops. These inner loops must be relatively fast which is why I doubt the system can be controlled well from just a PLC.
 
Thanks again for the responses.

I've found a DC Drive thanks to Vic's recommendation at KB electronics, it takes a potentiometer 0-5V or PLC 0-5V analog in and outputs a PWM signal. The motor I have is PMDC and designed for either PWM or SCR control, and is rated for 0.5HP and 110V. The drive is designed to take either 120V main in or 230VAC main in, and output is selectable for use with 90V or 180V PMDC Motors. Max inrush, max speed, min speed are all adjustable ny potentiometers on the device. Current ratings should handle the motor fine. We will only be running the motor to half of it's max so speed should be fine.

Unfortunately as Peter has mentioned, the Drive has no closed loop speed or torque control. The motor was from a set donated to us and seems to have been a custom design from the Indian company Rotomag, I have not been able to find any way to adapt a tacho or encoder to the casing. We could adapt one to one of the other shafts and run it into the PLC, and I am considering doing this rather than the single pulse method i mentioned at the beginning of this post.

Is there a rule of thumb as to how fast the feedback loop for SPEED control only actually needs to be?
 
Post the model number of the drive so we can be sure of a couple of things.
1) The lower cost drives use a 5K pot. The voltages on the pot are at line potential. Make sure it has isolated input.
2) Selectable 115/230V still means you have to use a 90 VDC motor with 115VAC, and a 180VDC motor with 230VAC. Make sure this control does a conversion. I suspect you'll need a stepdown transformer/autoformer.
 
Last edited:

Similar Topics

I'm a Manufacturing Engineer with limited PLC experience and I am doing some research for our Controls Department. Does anyone have experience...
Replies
4
Views
160
Good Evening , I should know more about Solid State Relays . I have a system with 8) 120 vac Vibrators . These Solid State Relays have...
Replies
24
Views
1,939
Hi All, I am facing one issue with the SEW MDX61B drive. Issue- I want to run a conveyor with this drive in two directions but it runs in...
Replies
0
Views
314
More help again please... See the picture. I want to make the rectangle visible when Mr_Zr_ToggleSwitch is 1, and make it invisible when 0...
Replies
5
Views
2,426
Hello, I was wondering if anyone has some insights into a VFD controls scenario. We have a VFD controlling a pump which is currently setup so that...
Replies
25
Views
3,179
Back
Top Bottom