Controlling stepper motors with Mini RAMBo 1.3

I have a Mini Rambo 1.3 that normally has Marlin Firmware installed to be used for 3D printer. I'm trying to control a stepper motor using the motor output port on the board. I did not want to use the Marlin Firmware as it is very complex.

I successfully uploaded my code to the RAMBo, but the stepper motor only vibrates and does not move at all.

If anyone has experience with this board, I would be grateful if you can give me some advice on working with this board. Thank you very much.

Here is a link that contains RAMBo 1.3 information: https://reprap.org/wiki/MiniRambo

dekaranger00: I successfully uploaded my code to the RAMBo, but the stepper motor only vibrates and does not move at all.

You did not upload your code so we can see it. And you did not provide details of what I/O pins the MiniRambo uses for the stepper driver that controls the motor you are having trouble with.

Does the motor work properly when you use the Marlin software? If not, or if you have not tried that then post a link to the datasheet for your stepper motor.

This Simple Stepper Code should work for testing if you use the correct I/O pins.

...R Stepper Motor Basics

Here is my code that also includes I/O pins used by Mini RAMBo 1.3:

#include "AccelStepper.h"

#define ELECTRONICS "RAMBo13a"

#define KNOWN_BOARD
#ifndef __AVR_ATmega2560__
  #error Oops!  Make sure you have 'Arduino Mega 2560 or Rambo' selected from the 'Tools -> Boards' menu.
#endif

#define PINDA_THERMISTOR

#define SWI2C                    // enable software i2c
#define SWI2C_A8                 // 8bit address functions

#define PAT9125_SWI2C
#define PAT9125_SWI2C_SDA      20 //SDA on P3
#define PAT9125_SWI2C_SCL      21 //SCL on P3
#define PAT9125_SWI2C_CFG    0xb1 //2us clock delay, 2048 cycles timeout

//#define PAT9125_HWI2C

#define X_STEP_PIN             37
#define X_DIR_PIN              48
#define X_MIN_PIN              12
#define X_MAX_PIN              -1
#define X_ENABLE_PIN           29
#define X_MS1_PIN              40
#define X_MS2_PIN              41

#define Y_STEP_PIN             36
#define Y_DIR_PIN              49
#define Y_MIN_PIN              11
#define Y_MAX_PIN              -1
#define Y_ENABLE_PIN           28
#define Y_MS1_PIN              69
#define Y_MS2_PIN              39

#define Z_STEP_PIN             35
#define Z_DIR_PIN              47
#define Z_MIN_PIN              10
#define Z_MAX_PIN              23
#define Z_ENABLE_PIN           27
#define Z_MS1_PIN              68
#define Z_MS2_PIN              67

#define E0_STEP_PIN            34
#define E0_DIR_PIN             43
#define E0_ENABLE_PIN          26
#define E0_MS1_PIN             65
#define E0_MS2_PIN             66

AccelStepper stepper(1, E0_STEP_PIN, E0_DIR_PIN); // 1 = Driver

void setup() {
stepper.setMaxSpeed(200);
stepper.setAcceleration(100);

stepper.setEnablePin(E0_ENABLE_PIN); 
stepper.setPinsInverted(false, false, true); //invert logic of enable pin
stepper.enableOutputs();
}

void loop() { 
stepper.runToNewPosition(0);

stepper.moveTo(500);
while (stepper.currentPosition() != 300)
stepper.run();

}

I have tried to worked with Marlin firmware + PronterFace to control the stepper motor, but I keep encountering an error with auto bed leveling due to not having the heat bed connected to the board. Compared to my attempt with using the AccelStepper library, the stepper motor does not even vibrate.

dekaranger00: I have tried to worked with Marlin firmware + PronterFace to control the stepper motor, but I keep encountering an error with auto bed leveling due to not having the heat bed connected to the board. Compared to my attempt with using the AccelStepper library, the stepper motor does not even vibrate.

Slow down. Slow down. There is a huge amount of unstated information behind that paragraph.

For example, from your Original Post I had inferred that you wanted to use the MiniRambo for something other than a 3D printer. If you are actually trying to get your 3D printer to work then stick with Marlin and figure out how to configure it properly. It will do a far better job than someone with your limited knowledge can do with your own code. You will probably get better info about Marlin on a specialized Marlin or 3D printing forum such as the Reprap forum.

On the other hand, if you are trying to do something that is not 3D printing {A} tell us what you want to do and {B} try the simple code I already gave you.

...R

To answer your questions, I'm not trying to use the stepper motors for 3D printer. I just want to be able to rotate the stepper motor clockwise/counter-clockwise for specific number of steps.

I've tried the Stepper Code and modified the code's STEP and DIR pins in according to the motor STEP and DIR pins on Mini RAMBo. The result was that only the LED light blinks; the stepper motor neither moves nor vibrates.

dekaranger00: I've tried the Stepper Code and modified the code's STEP and DIR pins in according to the motor STEP and DIR pins on Mini RAMBo. The result was that only the LED light blinks; the stepper motor neither moves nor vibrates.

  • Post the code you have tried. Without that I have no means to help.
  • What LED?
  • Maybe you also need an enable signal for the stepper driver?
  • Have you correctly adjusted the current limit for the stepper driver?
  • Post an extract from the datasheet so we can verify that you are using the correct step and direction pins.
  • Post a link to the datasheet for your stepper motor (as requested in Reply #1).
  • Post a photo of your MiniRambo and identify the stepper driver you are using. See this Simple Image Guide
  • How many stepper drivers do you have? Do you get the same result with them all?

...R

Hi Robin2,

Thank you for taking your time to help me with my issue. I want to inform you that my issue has been resolved. I contacted Ultimachine tech support and the solution was to change the current setting of the motor_PWM pins. I have included my code below hoping it could be helpful to anyone who experiences the same issue as I did.

#include "AccelStepper.h"
#include "Wire.h"

#define ELECTRONICS "RAMBo13a"

#define X_STEP_PIN             37
#define X_DIR_PIN              48
#define X_MIN_PIN              12
#define X_MAX_PIN              -1
#define X_ENABLE_PIN           29
#define X_MS1_PIN              40
#define X_MS2_PIN              41

#define Y_STEP_PIN             36
#define Y_DIR_PIN              49
#define Y_MIN_PIN              11
#define Y_MAX_PIN              -1
#define Y_ENABLE_PIN           28
#define Y_MS1_PIN              69
#define Y_MS2_PIN              39

#define Z_STEP_PIN             35
#define Z_DIR_PIN              47
#define Z_MIN_PIN              10
#define Z_MAX_PIN              23
#define Z_ENABLE_PIN           27
#define Z_MS1_PIN              68
#define Z_MS2_PIN              67

#define E0_STEP_PIN            34
#define E0_DIR_PIN             43
#define E0_ENABLE_PIN          26
#define E0_MS1_PIN             65
#define E0_MS2_PIN             66

#define MOTOR_CURRENT_PWM_XY_PIN 46
#define MOTOR_CURRENT_PWM_Z_PIN  45
#define MOTOR_CURRENT_PWM_E_PIN  44
#define LED_PIN             13

AccelStepper stepper(1, Z_STEP_PIN, Z_DIR_PIN); // 1 = Driver

void setup() {
  
analogWrite(46,135);
analogWrite(45,135); 
analogWrite(44,135); 

stepper.setMaxSpeed(200);
stepper.setAcceleration(100);

stepper.setEnablePin(Z_ENABLE_PIN); 
stepper.setPinsInverted(false, false, true); //invert logic of enable pin
stepper.enableOutputs();
}

void loop() { 
stepper.runToNewPosition(0);

stepper.moveTo(500);
while (stepper.currentPosition() != 300)
stepper.run();
}