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?
How to generate a square wave chirp?
- OlivierLenoir
- Posts: 126
- Joined: Fri Dec 13, 2019 7:10 pm
- Location: Picardie, FR
Re: How to generate a square wave chirp?
You can have a look at this project https://gitlab.com/olivierlenoir/micropython-multiaxis and also the following forum posts viewtopic.php?f=15&t=7497.
The GPIO version should work on a PyBoard.
The GPIO version should work on a PyBoard.
Last edited by OlivierLenoir on Tue Jul 13, 2021 2:43 pm, edited 1 time in total.
Olivier Lenoir
https://gitlab.com/olivierlenoir
https://gitlab.com/olivierlenoir
Re: How to generate a square wave chirp?
Thank you, Oliver. I thought there must be relevant information on the forum, but I could not find it.
Re: How to generate a square wave chirp?
I looked through your multiaxis.py code for GPIO. It looks like you are using constant acceleration, so there is still jerk. I will try it out and see if I am happy with the result.
- OlivierLenoir
- Posts: 126
- Joined: Fri Dec 13, 2019 7:10 pm
- Location: Picardie, FR
Re: How to generate a square wave chirp?
So far, manage acceleration is in the roadmap, but I didn't had time to work on it.
You can access the period of the fastest axis by changing MultiAxis.period if you use MultiAxis.g01().
I may have to work on acceleration earlier because MicroPython-DobotArmV1 project will soon require this feature.
You can access the period of the fastest axis by changing MultiAxis.period if you use MultiAxis.g01().
I may have to work on acceleration earlier because MicroPython-DobotArmV1 project will soon require this feature.
Olivier Lenoir
https://gitlab.com/olivierlenoir
https://gitlab.com/olivierlenoir