RAMPS

The Reprap Arduino Mega Pololu Shield (RAMPS) board wired up and secured.

To control our Mendrel, we use the RepRap Arduino Mega Pololu Shield (RAMPS) 1.4 and Arduino Mega. The RAMPS serves as a controller for the Mendrel, outputting the necessary X, Y and Z axis commands through Pololu Stepper Drivers. This post describes the steps involved to wire, test and configure RAMPS.

References

Building / Wiring RAMPS

Follow this document to build and wire RAMPS. It is relatively well written and kept up-to-date: http://reprap.org/wiki/RAMPS1.4#Wiring. Note: The Reprap Mendel only has one Z-axis motor, but RAMPS is built for accepting two. The Z-axis stepper driver can be plugged in either one without issue. The mechanical switches need be to wired in the following manner:

(online circuit demonstration)

Test RAMPS Code

Download test from http://reprap.org/wiki/File:RAMPS1.4_TestCode.pde. Using Arduino 0023, navigate to where you saved the test code and open up the RAMPS1.4_TestCode.pde. Under the Tools menubar item select Board->Arduino Mega 2560 and Serial->/dev/ttyACM0. Make the sure the USB is connected and then click the upload button. If everything worked, Arduino should claim Upload Done. After a moment, all the Mendrel’s axes should start to move back and forth.

Marlin Firmware

To run RAMPS, we decided to use the open source g-code interpreter firmware Marlin.

Download Marlin. Using Arduino 0023, open the Marlin project folder. Open marlin.pde. You are going to need to change some parameters in the configuration file. These changes are discussed below. After configuration is done, upload the new firmware.

Configuration

The changes made:

  • //#define BAUDRATE 250000
    #define BAUDRATE 115200
  • #define MOTHERBOARD 33
  • #define TEMP_SENSOR_0 0
  • const bool X_ENDSTOPS_INVERTING = true;
    const bool Y_ENDSTOPS_INVERTING = true;
    const bool Z_ENDSTOPS_INVERTING = true;
  • #define INVERT_X_DIR true
    #define INVERT_Y_DIR true
    #define INVERT_Z_DIR false
  • #define HOMING_FEEDRATE {20*60, 20*60, 1*60, 0}  // set the homing speeds (mm/min)
  • #define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,2400*8/3,760*1.1}  // default steps per unit for ultimaker
  • #define DEFAULT_MAX_FEEDRATE          {10, 10, 1, 45}    // (mm/sec)   
  • #define DEFAULT_MAX_ACCELERATION      {20, 20,3,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
  • #define DEFAULT_ACCELERATION          100    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
  • #define DEFAULT_RETRACT_ACCELERATION  100   // X, Y, Z and E max acceleration in mm/s^2 for r retracts

I changed the baud rate for Python serial convenience. If you do not use my Python serial to send commands, use 250000 if you like. Motherboard 33 encompasses all the settings for RAMPS 1.4. Setting TEMP_SENSOR_0 0 is absolutely necessary – it disables the temperature sensor which must be done. Inverting the endstops and directions are just a matter of how the Mendrel is built. The feed rates and acceleration were just a result of fine tuning. The steps per unit for X and Y were fine by default, but Z took a lot of tweaking. Tweaking was accomplished by lowering feed rate, performing movements in each axes, measuring their accuracy and then fiddling with steps per unit.

Test Marlin Firmware

With the Mendrel plugged in and switched on, open Arduino. Make sure Serial -> /dev/ttyACM0. Click the Serial Monitor button (rightmost button). This feature has some issues on Ubuntu. If the serial is definitely connected and it is not saying it is there. Just wait a few moments and keep trying. Eventually, the serial monitor window will show up. Change No Line Ending to Both NL and CR. This will add “\r\n” after you send text.

We are going to move the Mendrel about, so keep your hand near the power switch. In the text input box (beside the send button), type “G28” without the quotes and press enter. G28 is the g-code command that homes Mendrel, which returns each axis to its zero position. If the Mendrel homes, then test some more movement commands. Examples:

  • G1 X100
  • G0 Y100
  • G1 Z18
  • G1 X50 Y50

That’s it. Use this mechanism of typing commands to move your machine out of problem states. Note that when you reset RAMPS, it assumes the starting position is (0, 0, 0) and works in absolute positioning. For available commands see http://reprap.org/wiki/G-code#Buffered_G_Commands and for more on g-code read the G-Code post.


  1. Mendel Background
  2. Hardware
  3. Electronics
  4. RAMPS
  5. PyCAM
  6. G-Code
  7. Cutting
Advertisements

One thought on “RAMPS

  1. Pingback: The metal shaper man’s blog » Trying to get Repartier-host Sprinter Ramps 1.4 to do something.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s