Arduino code for mini plotter with two DVD stepper and Adafruit shield

I built a mini plotter with two DVD stepper motors.
I’d like to run it with an Arduino UNO R3 and a Adafruit Motor Shield v2.3 (capable of driving two independent stepper motors).
I plan to use Inkscape Function Plotter to generate the code for drawings to be plotted
Attached are two pictures of the plotter with the two steppers connected (Black, Red, Green, Yellow) to the appropriate M1-2-3-4 posts on the Adafruit shield.
Cannot find the appropriate code and libraries.
Adafruit’s site is silent on this
Can someone help me, please?
I will be happy with any solution even with different shields.
(P.S. I use a solenoid to lift the pen, but a servo would work as well).
Thanks
Roberto Pensotti
:grin:

Post a link to the datasheet for the motor shield you are using.

It is generally much easier to control stepper motors with specialized stepper drivers. Perhaps the Easydriver would be suitable if your motors require less than 750mA.

I don’t know anything about the Inkscape program.
Is that a PC program?
What sort of output does it produce?
How will you get the output to the Arduino?

…R
Stepper Motor Basics
Simple Stepper Code

Normally something like that uses Gcode, Inkscape can produce Gcode. It is similar to a CNC machine or a 3D printer. Look at the Rep Rap site for lots of variations of software that move to Gcode instructions.

It will not be much different in software than my project here
http://www.thebox.myzen.co.uk/Hardware/CNC_Conversion.html

Inkscape is an open source version of Illustrator. It runs on a PC (maybe other platforms as well).

There is an Inkscape add in that will generate G Code from Inkscape. You could use that along with GRBL or any of the other G Code sketches for the Arduino with the proper driver card.

The main page for the motor shield is here.

Thank you Grumpy Mike, nathancamp and Robin2.

Mike's CNC miller is a beauty and much more sophisticated than my mini plotter.
Your Arduino Stepper Control sketch can provide me with useful coding guidance, but I need something compatible with Adafruit Stepper libraries.
Nathan, I am familiar with Adafruit's web page on the Motor Shield. Unfortunately it only shows applications for one single Stepper Motor.
Adafruit assures that this version is capable of running two independent steppers which is what I need.
There are a few mini plotters very similar to mine on YouTube, but none shows the entire Arduino Code.
I'm still hoping someone has some suggestions.
Regards

You can look at the Accelstepper library. It allows you to control two steppers at the same time.

http://www.airspayce.com/mikem/arduino/AccelStepper/

nathancamp:
You can look at the Accelstepper library. It allows you to control two steppers at the same time.

It is not intended for the sort of co-ordinated movements that are required for a plotter - for example where one motor must make 113 steps in the same time that the other one makes 507.

...R

Robin2:
It is not intended for the sort of co-ordinated movements that are required for a plotter - for example where one motor must make 113 steps in the same time that the other one makes 507.

...R

The Multistepper part of the library does exactly that. Here is what the MultiStepper page says.

Operate multiple AccelSteppers in a co-ordinated fashion.

This class can manage multiple AccelSteppers (up to MULTISTEPPER_MAX_STEPPERS = 10), and cause them all to move to selected positions at such a (constant) speed that they all arrive at their target position at the same time. This can be used to support devices with multiple steppers on say multiple axes to cause linear diagonal motion. Suitable for use with X-Y plotters, flatbeds, 3D printers etc to get linear straight line movement between arbitrary 2d (or 3d or ...) positions.

nathancamp:
The Multistepper part of the library does exactly that.

You had linked to the AccelStepper page - how would the OP know?

…R

Robin2:
You had linked to the AccelStepper page - how would the OP know?

...R

I linked to the main page for the AccelStepper. If you look at the class tab on this page, your will see two classes AccelStepper and MultiStepper. It is all a part of the AccelStepper download.

My assumption was that the OP would read the documentation on that page.

nathancamp:
My assumption was that the OP would read the documentation on that page.

Without meaning any disrespect to the OP of this Thread experience on the Forum suggests that is NOT a safe assumption.

...R

Hi ,

Credits to the real code makers i am just forwarding it , i had the similar problems after flashing the new firmware (Grbl 9j) baud 115200 by default, and Motor shield libraries AFmotor, Accel motor to adrino IDE , find a gctrl from web and that will run a java script through “Programming” select port and load gcode , and you are ready to go. (in java script change the baud as 115200 if you are using that firmware) otherwise it will be by default 9600.

check the attachment for the adrino code.

 is for dvd stepper based mini cnc plotter.

adafruit motor shield mini cnc sketch.txt (10.6 KB)