Stepper motor

Hi All.

to whom it may concern i have two stepper motors we are trying to make a heat elements bend with. (using wire)
Stepper motor one feeds and stepper motor 2 bends 180 degrees. my question is how or what language are you supposed to use to tell it to feed 546 pulses then bend (pulse 1000) to the right and then bend (direction) 1000 to the left? any advice would be helpful..thanks

An interesting question - you could invent your own, or perhaps use G-code with say X for the feed and axis A for the bending? Or use X and Y, since GRBL can handle that out of the box (it only supports X,Y,Z but will run
on an Arduino).

I presume you either want to send instructions remotely, or pull them off an SDcard?

Whatever notation you choose, do it in terms of distance and angle, not motor steps, that is
too low-level. Only your motor driving code setup has to know details of the motors.

You need to tell us more about your project.

There are probably two levels of answer to your question. At the low level Arduno code can generate step pulses as illustrated in this Simple Stepper Code

However that is probably a very inflexible approach as it would mean re-programming the Arduino if your shapes were to change.

With a more complex program on the Arduino you can send it high level commands from a PC which can be easily changed. The GRBL program works like that and it expects to receive its instruction using the GCode "language"

Of course there is nothing to stop you writing your own Arduino program rather than use GRBL and then you can formulate your own system for sending commands to the Arduino - I would suggest you adopt a system that minimizes the work that needs to be done by the Arduino.

You can get PC programs that can convert technical drawings into GCode but I don't know if that has any relevance for your application.

Stepper Motor Basics

Maybe you should start with basics about Stepper Motors. Try THIS

my question is how or what language

If I am not mistaken, we are in an Arduino forum, so the language is "Arduinish" and/or C, C++.

But I guess your question was aimed in another direction.
If your application is so that you have to deal all the time (mass production of one product) with the above mentioned values - then it would be easy to set up an Arduino / stepper motor environment for being mounted in your assembly construction.

If your application is so that your products change from time to time or from piece to piece, then it gets a bit more complicated and you need either

  • to set up a menu driven pure Arduino configuration, e.g. with a display and a setup button/rotary encoder or keypad (to modify/set the required parameters) in addition to stepper driver and motors, or
  • use the GRBL approach which means you need a set up of Arduino/stepper driver/motors controlled by a PC/laptop