Deeper understanding of PWM

From the original Synthetos forum (2011–2025)

Started by kdorsel on in TinyG Support. 2 replies, last activity Feb 18, 2015.

#

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,

Staff #

You might benefit to read thru this thread:

https://github.com/synthetos/TinyG/issues/121

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.

#

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.

This topic is from the original forum (February 2015). Your reply starts a new discussion linked to it.

Reply

Different problem? Ask a new question

Back to TinyG Support or latest activity.