Use Ardiuno so send Commands To Trinimic StepRocker

Hey Guys,
The plan is to use and arduino platform to send commands to a stepper motor driver board, made by Trinamic, to drive a stepper motor.

Trinamic has it's on controlling language, but can receive commands in binary, ASCII.

How can I use and arduino to do this? the driver board has it's own motion controller, but I need all the other I/O and the arduino.

Suggestions?

Thanks,

Use Software Serial so you can connect to the hardware serial for programming and connect to the other controller via Software Serial and send the ASCII commands.

Software Serial Example Code:

/*
  Software serial multple serial test

 Receives from the hardware serial, sends to software serial.
 Receives from software serial, sends to hardware serial.

 The circuit:
 * RX is digital pin 10 (connect to TX of other device)
 * TX is digital pin 11 (connect to RX of other device)

 Note:
 Not all pins on the Mega and Mega 2560 support change interrupts,
 so only the following can be used for RX:
 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69

 Not all pins on the Leonardo support change interrupts,
 so only the following can be used for RX:
 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

 created back in the mists of time
 modified 25 May 2012
 by Tom Igoe
 based on Mikal Hart's example

 This example code is in the public domain.

 */
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(57600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(4800);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}

Did you already buy the Trinamic driver board? They also have "SPI" and/or "Step / Dir" driven drivers.
So if there is no special need for another communication protocol and you didn't buy the driver already, I would go with a "step/dir" driver.

For those you will find dozens of example sketches in this forum with or without libraries.

Thanks guys,
This board is pretty versatile, and, I'm about as green as you can get to programming... So I picked one and went with it. This board also can control the motion better (I think), and has inputs for limit switches and expansible to 3 axis....

Anyway,
I need to learn more about this language to control the ardiuno, but I gotta ask,
I need to send a command to the TMCL driver board
"ROR 1 5000"

what would that look like in my command line structure?

I think I've figured out where the wires go, and how to start up the driver in ASCII mode, but how will
arduino interpret this device's command?

'prece'

I looked at your driver's datasheet(s); my findings:

  1. it could be driven by simple step/dir pulses from Arduino (by bypassing the TMCL internal controlling unit - thus also bypassing your investment for that specific Trinamic controlling functions) which would have been much easier than sending string messages to the TMCL controller and much cheaper having used another "stupid" stepper driver as long as you don't need the specific functions of the Trinamic controller

  2. I have no idea if the Arduino needs to interpret the TMCL's feedback messages; maybe only checking if your instructions, being sent via the Arduino have successfully got through

  3. Thus: The main issue you are confronted with: send the right message strings to the driver, such as "ROR 15000" - that can be done with the software serial communication library

  4. You have to dig into the communciation protocol to see when and what kind of strings have to be sent and/or received by the TMCL and then the Arduino code has to produce those strings or listen to what is coming back and then act - if action is required