Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Running steppers with PWM

Status
Not open for further replies.

mvoltin

New Member
Hi. two question for the group:

Is the notion of controlling steppers (not the current but the motion) with PWM valid? I think it is and looking for confirmation to plan a project (with limited time) but there are many senior members that categorically insist otherwise (that steppers can only be driven by individual steps and PWM can only be used to control the current) that it is hard to argue. Maybe I am completely missing something? Here is some supporting info:

  • While there are many drivers that control current with PWM (PWM controlled current drivers such as DRV8825) PWM can also be used to provide pulses to the leads (oversimplifying the language) and this simply seems to make sense.

  • The Sanyo STK672-110 chip has it in the name (Two-Phase Stepping Motor Driver (Square Wave Drive) and describes the input "clock" as "The input frequency range for the clock signal used for motor speed control is 0 to 25 kHz". this seems very explicit that the PWM is provided to control speed and not the current. There is simply no other pin that could provide a step. Unless I am completely missing something, how does one use this chip with step/dir? Here is the link again: **broken link removed**.

  • Also, page 14 for the IB462H manual there is a description how waves are used to energize phases to drive the motor (not the amount of current). Again, this seems fairly explicit unless I am completely overlooking something. There is no other pin to provide input for step https://motion.schneider-electric.com/downloads/manuals/discontinued_prod/ib462h.pdf

  • Many videos online of people controlling speed of steppers with PWM. This could not be the case if the PWM only controlled the current and there were steps pulses sent to the motor on the side.

If the first assumption is correct and some stepper drivers/controllers use PWM as input to control the motor, is it possible to still send a step (one at a time) to move a stepper. i.e. send 10 distinct steps that would create a ten step movement. So, basically, these would be also PWM signal but at a very very low Hz. The driver/controller inputs seem to support 0 to x Khz input and low end should be OK.

 
Last edited:
The Sanyo STK672-110 chip has it in the name (Two-Phase Stepping Motor Driver (Square Wave Drive) and describes the input "clock" as "The input frequency range for the clock signal used for motor speed control is 0 to 25 kHz". this seems very explicit that the PWM is provided to control speed and not the current.
:confused:I see nothing there that says the clock signal is width modulated (i.e. is PWM)?
 
As MCUs get more and more sophisticated, so do their PWM modules. Many PWM modules are capable of producing nearly arbitrary digital signal, changing both frequency and duty cycle. Such signal can definitely replace (almost) any manual bit-banging. Whether it's correct to call this PWM, I don't know.
 
:confused:I see nothing there that says the clock signal is width modulated (i.e. is PWM)?
Correct. It does not explicitly says here but the title from the datasheet catalog says PWM http://www.datasheetcatalog.com/datasheets_pdf/S/T/K/6/STK672-110.shtml.
Also, the datasheet heading describes it as "Square Wave Drive" - this does not mean it is 100% PWM but within the overall context and along with the datasheet catalog description, I think it would be reasonable that they are talking about PWM. Is this fair?

My question whether I can still send individual steps in luau of PWM to have more control about exact number of steps the motor takes. thank you.
 
You seem to be confusing PWM, where the frequency is constant but duty-cycle is varied, with the pulses to control the stepper which vary in frequency but not duty-cycle.

Your "senior members" are correct, PWM is normally used to vary current, not to control stepper speed.

You can however, use PWM to reduce to the current to a high speed stepper motor when it is stopped or stepping slowly. Typically a high voltage is applied to the windings to rapidly change the current but then the current (voltage) is reduced to minimize power dissipation. A high-efficiency way to do that is to change the pulse from a step to a PWM signal after the motor has time to compete the step, to reduce its current.
 
Hi "NorthGuy",
Your response is like a music to my ears - this is great! I assume I may have to keep this pin HIGH and pull it LOW for each step in order to simulate PWM (as opposed to keeping it LOW/neutral and sending HIGH for each step). Is this right assumption in general?

P.S. the reason for this question is because I have bunch of PWM controllers and would love to reuse them for my projects.
 
You seem to be confusing PWM, where the frequency is constant but duty-cycle is varied, with the pulses to control the stepper which vary in frequency but not duty-cycle.

Your "senior members" are correct, PWM is normally used to vary current, not to control stepper speed.

You can however, use PWM to reduce to the current to a high speed stepper motor when it is stopped or stepping slowly. Typically a high voltage is applied to the windings to rapidly change the current but then the current (voltage) is reduced to minimize power dissipation. A high-efficiency way to do that is to change the pulse from a step to a PWM signal after the motor has time to compete the step, to reduce its current.

Hi Crutschow,
thank you. Please help me understand the following by specifically addressing them - otherwise, I understand what you described.
  1. the Sanyo is a PWM based driver according to the datasheets. http://www.datasheetcatalog.com/datasheets_pdf/S/T/K/6/STK672-110.shtml
  2. According to the datasheet, the current is controlled by a voltage to a pin. Thus, the WPM is definitely not used to control the current. "The motor current can be set by changing the Vref pin voltage. Since a 0.22- Ω current detection resistor is built in, a current of 1 A is set for each 0.22 V of applied voltage"
  3. The datasheet also states that "The input frequency range for the clock signal used for motor speed control is 0 to 25 kHz." and not other input signal has "kHz" thus, this must but PWM.
  4. Here is a video of controlling the speed with PWM using this driver: **broken link removed**
What I am misreading here - I am new and may be overlooking something?
 
P.S. the reason for this question is because I have bunch of PWM controllers and would love to reuse them for my projects.

You need to figure out exactly what signal do you need, then read datasheet for your controller and figure out if you can output the signal or not. If you can, it doesn't really matter what was the original purpose of the controller. If you cannot, you then look at something else.
 
According to the datasheet, the current is controlled by a voltage to a pin. Thus, the PWM is definitely not used to control the current.
PWM does control the current.
"The motor current can be set by changing the Vref pin voltage. Since a 0.22- Ω current detection resistor is built in, a current of 1 A is set for each 0.22 V of applied voltage"
The Vref is compared to the voltage developed across a current-sense resistor and the comparison result is used to set the pulse width, hence the average current.
 
Hi Alec,
OK. I guess it is semantics and my lack of using proper terminology - these motors are pulse-driven but not necessarily PWM (that has many more characteristics to it as Crutschow pointed out).
thank you to both of you. It is little more clear. I also assume that with the right input, I can control these through individual steps rather then longer pulse outputs (again, please ignore the accuracy of the semantics - you probably know what I mean).

Related question: EasyDriver manages the current through "chopping" and Sanyo accomplishes this through PWM. So, I assume the PWM must be much better/superior if they get out of the way to advertise this in the title? Just curious but makes no substantial difference for what I am trying to do.
 
.....................................
Related question: EasyDriver manages the current through "chopping" and Sanyo accomplishes this through PWM. So, I assume the PWM must be much better/superior if they get out of the way to advertise this in the title? Just curious but makes no substantial difference for what I am trying to do.
"Chopping" is a general term for switching the voltage rapidly from ON to OFF. PWM is a specific type of chopping where the pulse frequency is usually constant but the pulse-width (duty-cycle) is varied.
 
Thanks for the input - to all of you. Most of this goes over my head and thanks for being patient. So, while I think I understood the response to the initial question posted, I realize that this does not help with a particular problem I am facing. Instead of continuing here, I posted a new thread with a clear "ask" and please see if you can help me make that one last leap into solving this. Thanks again. https://www.electro-tech-online.com...ep-vs-clock-pulses-for-stepper-motors.141510/
 
Status
Not open for further replies.
Back
Top