Steppers Hopefully Producing Circular Motion
Duane Degn
Posts: 10,588
The video below rivals unboxing videos in how boring it is, but the program took a lot of work I'm inflicting the universe with this video as revenge (I'm still figuring out what I'm avenging with this video but hey what to the Avengers avenge?).
The code used to generate this motion can be found in my GitHub account.
https://github.com/ddegn/CncController
TestMotorsPasmCircles.spin is the top object.
As the name suggests the motion is generated in PASM.
The program uses integer math for all the calculations. Fortunately the Propeller Manual includes a section on how to do square roots in PASM.
Edit: I previously recorded a video of my steppers producing linear motion but two motors spinning was even more boring than this video. I never uploaded the linear motion video. With the linear motion I was able to both accelerate and decelerate but with circular motion, I just programming it to accelerate.
The code used to generate this motion can be found in my GitHub account.
https://github.com/ddegn/CncController
TestMotorsPasmCircles.spin is the top object.
As the name suggests the motion is generated in PASM.
The program uses integer math for all the calculations. Fortunately the Propeller Manual includes a section on how to do square roots in PASM.
Edit: I previously recorded a video of my steppers producing linear motion but two motors spinning was even more boring than this video. I never uploaded the linear motion video. With the linear motion I was able to both accelerate and decelerate but with circular motion, I just programming it to accelerate.
Comments
Nice singing steppers, Pal!
Thank you for that wonderful suggestion. I will be picking one of them up later today.
Have you done this before? I am wondering how difficult or easy it will be to adapt stepper motors to the knobs.
Michael Park did it a while ago.:
http://forums.parallax.com/showthread.php/119660-PropEtcher%E2%80%94Propeller-controlled-Etch-a-sketch?highlight=etch-a-sketch
And thank you for the link, that was pretty darn cool. An etch-a-sketch is just exactly what I need for testing.
You're welcome. Yes, I did this about 20 years ago when my kids were small. I replaced the knobs on the etch-a-sketch with larger ones that had wide straight sides so I could use thick rubber bands to connect to the stepper motor shafts. They also provided a pretty good torque increase because of the difference in diameters.