Hello,
I am seeking help because I can not get the programs to work.
I am using an arduino uno with 2 easy driver boards, 2 nema 17 steppers and a sg90 servo with a 1.5A 12V power supply. The firmware zip I am using is Polargraph.2017-05-10.
After copying over the library files, I first made changes on the arduino server tab to uncomment the motorshield and instead use the stepper drivers.
// 3. Specify what kind of motor driver you are using
// ==================================================
// Only ONE set of lines below should be uncommented.
// i. Adafruit Motorshield v1. The original, and still the best.
// -------------------------------------------------------------
//#define ADAFRUIT_MOTORSHIELD_V1
//#include <AFMotor.h>
// ii. Adafruit Motorshield v2. It's all squealy.
// ----------------------------------------------
//#define ADAFRUIT_MOTORSHIELD_V2
//#include <Wire.h>
//#include <Adafruit_MotorShield.h>
//#include "utility/Adafruit_PWMServoDriver.h"
// iii. Using discrete stepper drivers? (eg EasyDriver, stepstick, Pololu gear)
// ----------------------------------------------------------------------------
// Don't forget to define your pins in 'configuration.ino'.
#define SERIAL_STEPPER_DRIVERS
// iv. Using a signal amplifier like a UNL2003?
// --------------------------------------------
// Don't forget to define your pins in 'configuration.ino'.
// #define UNL2003_DRIVER
I then went to the navigation tab to assign the Step, Direction and Enable pins to match my wiring (see image)
/* Motor setup if you are using serial stepper drivers
(EasyDrivers, stepsticks, Pololu etc).
If you are wiring up yourself, just put the pin numbers in here.
Note that the pen lift servo usually lives on pin 9, so avoid
that if you can. If you can't, then you know how to change it.
*/
#ifdef SERIAL_STEPPER_DRIVERS
#define MOTOR_A_ENABLE_PIN 8
#define MOTOR_A_STEP_PIN 2
#define MOTOR_A_DIR_PIN 5
#define MOTOR_B_ENABLE_PIN 8
#define MOTOR_B_STEP_PIN 3
#define MOTOR_B_DIR_PIN 7
AccelStepper motorA(1,MOTOR_A_STEP_PIN, MOTOR_A_DIR_PIN);
AccelStepper motorB(1,MOTOR_B_STEP_PIN, MOTOR_B_DIR_PIN);
#endif
My wiring is set up from a GRBL CNC project. Green wires step, Yellow set direction, and the Blue enables leaving the Black wire to control the servo(see image)
I have only gotten the servo to move. It will not respond to the "test pen lift range" button in the controller, but it will start shifting If I send the drawing gcode.
In addition to the stepper and servo issue, the Controller will give me an error within the first 3 minutes of sending the code that the line is not on the page (see image).
I am open to any and all suggestions. I have also tried using the v2 motorshield on a second arduino after flashing the hex file, but have only had the same results.
|