2MOTOR-4NANO Gravitech Problem

Does anyone know how to program this shield so that it controls a stepper motor in a 3 state system?

There is little support documentation for this shield and the nano. The examples are not working and I dont know what to try.

What do you mean buy "in a 3 state system"?

I think you would use the Stepper library (Stepper - Arduino Reference).

Stepper myStepper = Stepper(STEPS_PER_REVOLUTION, 4, 5, 6, 7);

This is an old thread but I was looking for documentation on this module and this is what I found. I felt it needed a bit of an update lest someone else stumble across it as well.

This is the gravitech "2MOTOR-4NANO" Motor Shield for the Arduino NANO.

To fully understand how this board operates one needs to realize that this board uses a NC7SZ14 single inverter to drive two lines on the L298P driver chip for each motor. For motor A the L298P pin 7 is driven directly by the Arduino’s pin D4. The NC7SZ14 inverter is used to drive the L298P pin 9 to the opposite polarity. The same scenario is used for the other motor with Arduino’s pin D7 and the L298P pins 13 and 15.

Most examples assume that the Arduino has a direct connections to pins 7, 9, 13 and 15 (usually labeled as IN1, IN2, IN3 and IN4). That is NOT the case for this board and thus those examples will not work with this board. The Stepper Library also includes a provision for "two wire" control (vs. four wire control).

#include <Stepper.h>
const int stepsPerRevolution = 200; // change as required by stepper motor
// initialize stepper library in “two wire” mode
Stepper myStepper(stepsPerRevolution, 4, 7);

void setup () {
// enable the phase coils
pinMode (5, OUTPUT);
digitalWrite (5, HIGH);
pinMode (6, OUTPUT);
digitalWrite (6, HIGH);
// set the speed
myStepper.setSpeed(180);
}

void loop() {
// step one revolution in one direction
myStepper.step(stepsPerRevolution);
delay (500);
// step one revolution in the other direction
myStepper.step(-1 * stepsPerRevolution);
delay (500);
}

There are some clone boards on the market that add a ‘braking function’ on pins D8 and D9. They may also use different pins for the other functions. The manufacturers of these these boards provide poor (if any) documentation and NO schematics. One is advised to carefully check the pin-outs and adapt accordingly.