Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Stepper motor

Hello,

I m using Stepper motor in my verilog code to control full,half and microstepping modes.

I have achieved full and half steps successfully but i don't know how to write code for the microstepping.I googled this and know the basic theory for this microstepping but how to implement it through verilog code.

For example,for full and half step,it is some specified sequence but what about microstepping.How to achieve through coding or what are the sequence for microstepping?

Thanks.

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Microstepping involves the ability to send variable phase currents to the motor. This is achieved by analog or current controlled PWM output stages. Do you have it and what's their hardware interface to the FPGA?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Microstepping involves the ability to send variable phase currents to the motor. This is achieved by analog or current controlled PWM output stages. Do you have it and what's their hardware interface to the FPGA?

    --- Quote End ---

    I have attached one block for my stepper motor interfacing in which (stpr_motor_cntrl1 to stpr_motor_cntrl4)..this signals,i m writing my sequence (like 0011,1001 etc).And output from the driver ckt is connected to the four windings of the motor.So how to do for microstepping?

    As u suggested,how to to using PWM,if you have any sample code for any circuit for microstepping and some reference document for the programming or any website.Kindly tell me.

    thanks
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    As you'll know, micro stepping is using continuously variable phase currents instead of simple on-off switching. The phase currents are mostly applied according to a sine and cosine function. The micro stepper interfaces I know, e.g. from allegromicro.com, have specific analog hardware for the current control. You can try, if your interface can work with PWM control. But without a current control loop, the current and respective position programming won't be very exact. In addition, it should be mentioned, that not all stepper motor types are equally suited for micro stepping. Motors with a large step size can be expected to show considerable angle non-linearity.

    I'm not aware of existing micro stepping designs for FPGA.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    OK,No problem.Thanks a lot for the replies :).I will look more for that.