Forum Discussion

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

motor speed variable using FPGA

Hi. How to design variable speed motor using FPGA. I want to design line follower robot in different surface application for example, on roughness(slow) or smooth floor(fast).

12 Replies

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

    --- Quote Start ---

    you will get any frequency.

    In many cases the exact pulse frequency wouldn't be as a clean clock but over a window of time it will be correct and for stepper motor it should be more than enough.

    example 50MHz * 2333456/2^32 = ?

    Anyway from 50MHz you cannot get exact frequencies except for cases like half/quarter etc unless you use variable analogue PLL

    --- Quote End ---

    you are right.

    "from 50MHz you cannot get exact frequencies except for cases like half/quarter etc."

    I have try s lot,but fail.I cannot get exact frequencies except for cases like half/quarter.

    I will try your suggestion,hope this is average frequency really enough for stepper motor.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    you are right.

    "from 50MHz you cannot get exact frequencies except for cases like half/quarter etc."

    I have try s lot,but fail.I cannot get exact frequencies except for cases like half/quarter.

    I will try your suggestion,hope this is average frequency really enough for stepper motor.

    --- Quote End ---

    No doubt you failed, despite how smart you could be. As Kaz pointed out, it is impossible to generate other than half, third, quarter... frequency, unless you accept an 'average' frequency, like in the adder solution we both presented.

    That's because frequency is the inverse of period and the pwm period must necessarily be a multiple of your system clock.

    In any case, for motor control a frequency in the 20-100kHz range is what is usually needed, so I don't see any problem in the frequency discretization you have in the MHz range