Controlling stepper motors with Isadora's Arduino Firmata support
-
Hi,
The Arduino Firmata Alpha module is a capable prototyping tool for working with all sorts of small motors. The built in support for servo motors is great, but what about stepper motors?
With a bit of tinkering I was able to patch an accessible controller for stepper motors based on sequencing digital Arduino Firmata ports with a simple Data Array module setup. I am posting this thread to assist anyone else exploring the use of step motors with Isadora and Arduino Firmata. The step motor I have used is the cheap and cheerful DC 5v 28BYJ-48 Stepper Motor with ULN2003 Driver.
Project files and patch linked here: 28BYJ-48 STEP MOTOR.zip
Best Wishes
Russell
-
hello, thank you for this starting point.
can we also programm a defined count of steps in x direction with y speed in your patch?
and in this way also timed sequences in differe t directions with different count of steps, maybe in different speed?
so all these sequence stuff is clear for us but is it possible by firmataactor?
thx.
r.h.
-
Hi,
The stepper motor is very precise. Adding additional Counter actor and Gate actor you will be able to make very accurate rotation to a specific angle/rotation point. By counting the number of triggers delivered to the motor via the ‘Pulse Generator” actor. This particular stepper motor and half-step sequence takes 4096 triggers to complete a full rotation. With the Pulse Generator set to 300hz a full rotation takes approx 13 seconds. However, precision with the motor speed appears to be less predictable within 0.5 sec tolerance this is because the Pulse Generator is effected by the cycle rate available to the patch at any given time.
If you want to describe what you would like to do I may be able to provide assistance with modifying the patch.
Best wishes
Russell
-
@bonemap said:
Project files and patch linked here: 28BYJ-48 STEP MOTOR.zip
Would love it if you could put this on the Add-Ons Page (if you haven't already) :)
-
Hi Lucas,
Thanks for the prompt to add this to the Add Ons page. Although it doesn’t really make sense if the Arduino Firmata actor is not already available through the Add Ons page. If the base actor ever makes it there, it will feel more appropriate to add the stepper motor solution.
Best wishes
Russell