Welcome! Log In Create A New Profile

Advanced

Stepper Motor Test not working

Posted by san_singh 
Stepper Motor Test not working
April 03, 2015 09:20PM
Hi There,

I have recently purchased the Mega 2560 board with RAMP 1.4.
I have connected the 5V + 12 V ATX power supplies.
I am struggling to get the Stepper motor to move in my tests before I hook it up in the CNC machine I am building.

Please help !!!

I have written a test sketch and uploaded to the board:

#define X_STEP_PIN 54
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38
#define X_MIN_PIN 3
#define X_MAX_PIN 2

#define LED_PIN 13


void setup() {
pinMode(LED_PIN , OUTPUT);

pinMode(X_STEP_PIN , OUTPUT);
pinMode(X_DIR_PIN , OUTPUT);
pinMode(X_ENABLE_PIN , OUTPUT);
//PULL ENABLE PIN ON A4988 TO LOW
digitalWrite(X_ENABLE_PIN , LOW);
//SET DIRECTION TO BE IN ONE WAY
digitalWrite(X_DIR_PIN , HIGH);
}

void loop () {

digitalWrite(X_STEP_PIN , LOW);
digitalWrite(LED_PIN, HIGH);
delay (1000);
digitalWrite(X_STEP_PIN , HIGH);
digitalWrite(LED_PIN, LOW);
delay (1000);
}

I have checked the voltage at the A4988 pins and all of them are correct - including the step high and low.
Questions:
1. On RAMP do I need to short A4988 REST & SLEEP pins - I read in other places that people had to short them to make the motor move?
2. Is there a way to check the voltage at the 1A 1B 2A 2B pins to verify that A4988 is doing its job
3. Can a motor run with USB power only?
Re: Stepper Motor Test not working
April 03, 2015 11:45PM
there is no 5v connection on this...

there are two power connectors on the ramps 12v 5amp rail and 12v 11amp rail

I suspect you have plugged 5v into the 12v 5amp rail... this will run the digital side but is not enought to move the steppers.

Nothing should be plugged into the mega power plug, unless you have removed d1 from the ramps. If this is the case then you need a supply to the mega, but is also normaly 12v

Your specific spesific questions.

1) Ive never had to
2) its a complicated signal on those pins, you would need a scope. (but I suspect you have 5v on the 12v line), did you check vmot (voltage to motor, 12v)
3) no. Steppers are actuly powered from the 12v 5amp rail

Edited 3 time(s). Last edit at 04/03/2015 11:57PM by Dust.
Re: Stepper Motor Test not working
April 04, 2015 05:29AM
Thanks Dust

I changed the power connection to 12V and it is moving like a charm.

Regards
Sorry, only registered users may post in this forum.

Click here to login