Deeper understanding of PWM

Home Forums TinyG TinyG Support Deeper understanding of PWM

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7350
    kdorsel
    Member

    I’m looking at using the PWM from the TinyG to control a laser. I have read the different configuration options from the wiki.

    From what I understand you set the min/max phase and min/max rpm values. Can I correctly assume that the RPM range (max-min) is linearly mapped to the phase range (max-min) ? I would assume using something like so:
    phase = (phase_max – phase_min)*(rmp – rpm_min) / (rpm_max – rpm_min) + phase_min

    This will essentially give me my duty cycle. I can then set the switching frequency in the configs. I’m assuming the the switching based on the duty cycle will run at that frequency ?

    What is the maximum supported frequency ? Are there any other non typical behavior ?

    Thanks,

    #7352
    cmcgrath5035
    Moderator

    You might benefit to read thru this thread:

    Max value for $p1frq is a good question. I ran it up to 20000Hz (20kHz), but don’t see upper end undocumented. Need higher than that?

    Other perhaps unexpected behavior?
    Changes to $p1frq require a reset to take effect.
    Changes to other parameters are best made when in M05 state (spindle off)
    This does not seem to be a heavily used interface, so limited feedback so far.

    #7396
    kdorsel
    Member

    Thanks for the answer. 20 kHz is what I will be running at, so that should be fine.

    I’ll try and get my hands on an oscilloscope to do some testing.

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