What is maximum PWM frequency ($p1frq)?

Home Forums TinyG TinyG Support What is maximum PWM frequency ($p1frq)?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #11083
    RichL
    Member

    I would like to use the PWM output from a tinyG to control the speed of a stepper motor (as the STEP frequency). What is the maximum frequency that can be specified for $p1frq=? I haven’t been able to find this on the wiki pages…

    RichL

    #11084
    Zootalaws
    Member

    I know you can go up to 50khz, but not whether that’s a limit.

    Maybe there’s no limit, other than 8bits, but a point at which there is no effective effect?

    It’s unusual to control a stepper using pwm… what’s your use case (speed, application, etc8?

    Conventional wisdom says using pwm with a stepper removes the key feature of a stepper – stepping – and just makes it into a bipolar dc motor.

    #11092
    cmcgrath5035
    Moderator

    Perhaps I am reading this differently, Zootalaws.


    @richl
    , are you wanting to connect the TinyG Spindle PWM output to the input of a Stepper Driver device as the step input?
    The stepper driver device converts a step pulse (probably the rising edge) into properly phased drives for the two windings so that proper rotation is achieved and manages the max current in the windings.

    The number of pulses per full rotation is a function of the winding design of the motor.
    The driver takes inputs to decide if microstepping is to be implemented, which changes the winding phases.

    You don’t really need tinyG for that…….

    #11099
    RichL
    Member

    Thanks Zootalaws for the response, that is very helpful.

    cmcgrath5035: The only reason I’m considering using the PWM to drive the step input of a stepper driver is that I have one axis on our instrument that I want to control at a precise speed, and the A, B or C axes don’t really allow that. I already have motors connected to X, Y and Z. I could switch to a DC motor and use PWM to control it, but the speed would not be as accurate.

    Thanks for your answers,
    RichL

    #11101
    cmcgrath5035
    Moderator

    Hmmm, OK, understand
    I suppose you could try it, either with an external stepper driver or by connecting the SpnPWM lead to the unused onboard motor driver. A typical stepper would rotate once every 200 pulses (with zero microstepping).
    You’ll have to do some math to see if the speed you need is achievable.

    I am just curious – tinyG, being CNC oriented (jerk calcs, etc) does not seem to be the right fit for you application. Did you consider a more generic approach, such as a RasPi? There are stepper shields for those too.
    Just wondering.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.