How to generate a square wave chirp?
Posted: Fri Nov 13, 2020 8:13 pm
I am using a pyboard to control a linear stage (aka positioning table). The stage has a step motor with an integrated driver, so the interface is via TTL inputs for clock, direction, on/off, and stepsize. The 5V tolerance of the pyboard made it the best, albeit pricey choice for the controller.
For now, I create the clock with an always-on PWM timer and control the motion via on/off and direction.
However, turning on the motion creates quite a jerk which I would like to soften. Unfortunately, there seems to be no gentle way to change the PWM frequency as it requires reinitializing the timer.
Any ideas? Maybe PWM is not the best approach? After all, I am not modulating the pulse width.
So, how to generate a frequency chirp?
For now, I create the clock with an always-on PWM timer and control the motion via on/off and direction.
However, turning on the motion creates quite a jerk which I would like to soften. Unfortunately, there seems to be no gentle way to change the PWM frequency as it requires reinitializing the timer.
Any ideas? Maybe PWM is not the best approach? After all, I am not modulating the pulse width.
So, how to generate a frequency chirp?