Hello,
I'm new to arduino projects, and am trying to build a wall plotter using two steppers and a servo. When I power this up, it runs very hot very fast, and I'm worried about blowing the board. I'm also having trouble getting the servo to run at all. I've tried a couple servo example sketches but don't get any movement from the servo, it just hums.
I have the adafruit motor shield v2.3, two nema 17 stepper motors, and a micro servo. I'm powering the arduino through USB, and the shield with a 12V - 5A adapter through the power blocks with no vin jumper. I've attached a picture of the setup right now.
Do i need to look into installing heat sinks onto this? Do I need to limit the current, or should I incorporate somehting into the program I'm running. Let me know if you think this heat problem is an issue with my current setup.
I'm eventually looking to use the Makelangelo software, but for now I am running the accel multistepper code below to test things out:
#include <AccelStepper.h>
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"
Adafruit_MotorShield AFMSbot(0x61); // Rightmost jumper closed
Adafruit_MotorShield AFMStop(0x60); // Default address, no jumpers
// Connect two steppers with 200 steps per revolution (1.8 degree)
// to the top shield
Adafruit_StepperMotor *myStepper1 = AFMStop.getStepper(200, 1);
Adafruit_StepperMotor *myStepper2 = AFMStop.getStepper(200, 2);
// you can change these to DOUBLE or INTERLEAVE or MICROSTEP!
// wrappers for the first motor!
void forwardstep1() {
myStepper1->onestep(FORWARD, SINGLE);
}
void backwardstep1() {
myStepper1->onestep(BACKWARD, SINGLE);
}
// wrappers for the second motor!
void forwardstep2() {
myStepper2->onestep(FORWARD, DOUBLE);
}
void backwardstep2() {
myStepper2->onestep(BACKWARD, DOUBLE);
}
// wrappers for the third motor!
// Now we'll wrap the 3 steppers in an AccelStepper object
AccelStepper stepper1(forwardstep1, backwardstep1);
AccelStepper stepper2(forwardstep2, backwardstep2);
void setup()
{
AFMSbot.begin(); // Start the bottom shield
AFMStop.begin(); // Start the top shield
stepper1.setMaxSpeed(100.0);
stepper1.setAcceleration(100.0);
stepper1.moveTo(24);
stepper2.setMaxSpeed(200.0);
stepper2.setAcceleration(100.0);
stepper2.moveTo(50000);
}
void loop()
{
// Change direction at the limits
if (stepper1.distanceToGo() == 0)
stepper1.moveTo(-stepper1.currentPosition());
if (stepper2.distanceToGo() == 0)
stepper2.moveTo(-stepper2.currentPosition());
stepper1.run();
stepper2.run();
}
Thanks!