Вы находитесь на странице: 1из 6

technology

workshop

craft

home

food

play

outside

costumes

Motion Configuration on Ramps 1.4 with Marlin firmware @section machine


by dintid on November 23, 2015

Table of Contents
Motion Configuration on Ramps 1.4 with Marlin firmware @section machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Intro: Motion Configuration on Ramps 1.4 with Marlin firmware @section machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

What we cover in this Instructables: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 1: Stepper Directions @section Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Check Endstop Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Pronterface - Check Stepper Directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Firmware - Stepper Direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Firmware - Homing direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Verify our changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Homing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 2: Software Endstops - @section Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

G28 - Start by homing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Software endstop - Travel limits after homing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Axes MAX positions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Update your firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 3: Final tweaks and famous last words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Some final tweaks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Quick Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Babystepping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

All set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

http://www.instructables.com/id/Motion-Configuration-on-Ramps-14-with-Marlin-firmw/

Intro: Motion Configuration on Ramps 1.4 with Marlin firmware @section machine
As promised in my last Instructables Configuring Endstops on Ramps 1.4 with Marlin firmware - @section homing the time has now come to make a follow up. This time
about Motion Configuration.
This is going to be a, hopefully, complete tutorial on configuring endstops on 3D printers build on Ramps 1.4 using Marlin firmware.
I am going to use Pronterface/Printrun host program to connect to my printer and issue terminal commands (G-codes). That sounded very hairy, but it is just a simple
program with a graphical interface.
Even though I'm going to use Ramps 1.4 and Marlin firmware 1.0.2, this tutoral will most likely be usefull for most setups. We are going to use the newest Arduino IDE to
edit the Marlin firmware.

What we cover in this Instructables:


1. Stepper Direction
1. Homing Direction
2. Software Endstops
3. Some final tweaks
1. Quick Home
2. Babystepping
3. All set
Small change since last:
My last instructable was made using Release Candidate 2 of the Marlin firwmware. Due to some incompatibilities I had to change to the latest stable firwmare, so the
layout is a bit changed from the images in the previous Instructables.
Requirments
1. It is required/necessary that you have setup your endstops before beginning on this Instructable.
2. You need to have defined you steps for your steppers. You can find calculators here:
1. http://prusaprinters.org/calculator/
2. http://reprap.org/wiki/Triffid_Hunter's_Calibration_Guide
3. http://lmgtfy.com/?q=reprap+calculate+steps+per+mm
Please note: The cover-image is temporay untill I get better lightning conditions

http://www.instructables.com/id/Motion-Configuration-on-Ramps-14-with-Marlin-firmw/

Step 1: Stepper Directions @section Machine


Place your Carriage (hotend assembly) in the middle of your X and Y axes, and connect to your printer using Pronterface/Printrun.

Check Endstop Status


Start by sending M119 to the printer to check endstop status. They should all show Open before continuing.

Pronterface - Check Stepper Directions


Now use the directional arrows in Pronterface to gently move the axes, using 1mm and 10mm. You might only be able to move an axis using the + for that axes. The
main thing here is to write down wheter an axis is moving the right direction or not.
You might want to keep you finger near the on/off switch on your printer.

Firmware - Stepper Direction


Find INVERT_X_DIR in your Marlin firmware in the Configuration.h tab. If you use a Release Candidate of the firmware, it will be located in the @section Machine.
#define INVERT_X_DIR true

// for Mendel set to false, for Orca set to true<br>#define INVERT_Y_DIR false

// for Mendel set to true, for Orca set to fal

For any axis which moves the wrong way, you change the true to false or vice versa.

Firmware - Homing direction


Next we setup homing direction. For most printers we want to home it to our front left corner, which we define as our X and Y minimum endstops. We also want our
hotend to be close to our bed, which is Z min as well.
These are all 0 on the X, Y and Z axes.
Find X_HOME_DIR and set HOME_DIR for X, Y and Z to -1. This tells our axes to home to the minimum endstops.
// ENDSTOP SETTINGS:<br>// Sets direction of endstops when homing; 1=MAX, -1=MIN<br>#define X_HOME_DIR -1<br>#define Y_HOME_DIR -1<br>#define Z_HOME_DIR -1

Some printers use different topologies, so you might need to change this

Verify our changes


Disconnect Pronterface, Upload firwmare and check if the axes move in the right directions. Make changes if neccessary.

Homing
When everything moves as it should , you test the homing function. You can test using the icons with a "house (home)" on it for each axis, or use the G28 command
followed by the axis you want to home.
If you just type G28 you home all axes. You can also type G28 X orG28 XY or some other combination.

Step 2: Software Endstops - @section Machine


Before starting on this section we need to make a change in the Configuration_adv.h sketch.
Locate and uncomment ENDSTOPS_ONLY_FOR_HOMING, like so:
#define ENDSTOPS_ONLY_FOR_HOMING

We need to make this step in order to get readings from any max-endstops we might. If you do not have any max-endstops, you can ignore thisstep.

G28 - Start by homing


1. Home all axes using G28 (1)
2. Use M114 (2) to verify that your printer is actually considering itself at 0 n all axes.
3. Pro-tip: The M84 (3) I send (shown in image) is to turn off motors, as they buzz while I type.

Software endstop - Travel limits after homing

http://www.instructables.com/id/Motion-Configuration-on-Ramps-14-with-Marlin-firmw/

In Configuration.h find min/max software endstops, and make sure they are set to true
Below is the default settings for software endstops.
For our purpose it is usefull if you change them to something more than your actuall axes lengths in order to move our axes as far as we need to find the max area for the
printer.
Pro-tip: If you have your homing endstop at a MAX_POS, you will need to use negative values to indicate how far back it can go in order to reach the MIN_POS
// Travel limits after homing
#define X_MAX_POS 205
#define X_MIN_POS 0
#define Y_MAX_POS 205
#define Y_MIN_POS 0
#define Z_MAX_POS 200
#define Z_MIN_POS 0

Axes MAX positions


Below points are shown in the image numbered blue 1-4
1. If you havn't done so allready, you start by homing all axes, using G28 (1)
2. Issue M114 command to make sure all axes are at 0.
3. Now move all AXES as far towards MAX as you can. Either untill you hit a MAX endstop, if you have any such, or just as far as you can move it and stay within
you bed - you do not have to Count!
1. If you have Max endstops you can read the position in the terminal window.
4. Issue M114 to get a read out on posistions. You can see it rounded up.

Update your firmware


Now go update your firmware according to your system. Notice how I substracted some 11mm due to a clip on my heated bed. You might have similar considerations.
Also note how I place // after the mm input and then write notes. This is a good way to keep tabs on what you did for what reason.
// Travel limits after homing
#define X_MAX_POS 227 // 227.81 MAX
#define X_MIN_POS 0
#define Y_MAX_POS 180 // 190.96 MAX - 11 for clip
#define Y_MIN_POS 0
#define Z_MAX_POS 190
#define Z_MIN_POS 0

http://www.instructables.com/id/Motion-Configuration-on-Ramps-14-with-Marlin-firmw/

Step 3: Final tweaks and famous last words


Some final tweaks
We might want to undo the setting we made to ENDSTOPS_ONLY_FOR_HOMING. Meaning we enable it again, in the Configuration_adv.h file.
I'm enabling it again as I want to be able to use Z-offset to tweak nozzle distance from the bed, which would be impossible with this setting enabled - I'll see if I can't
make a simpler guide than the one I linked to. If you have no such plans, then keep it disabled as it is an extra safety measure. I've used it up untill now and liked it.
Notice I made a comment above the line. It's to make it easier for me to find it.
// MDN Endstops only for homing
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing

Quick Home
I do not like waiting for the X and Y axes hming seperately. Luckily we can make them home at the same time by ennabling (uncommenting) QUICK_HOME in the
Configuration_adv.h
// MDN Quick home
#define QUICK_HOME

//if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.

Babystepping
You can also enable BABYSTEPPING, which I do below here - it Means you can use your LCD knob to move the axes in tiny increments to tweak the printer after it has
started printing. Very usefull to tweak Z-axis if it is a bit off. There is also a setting to define feedrates when using an ULTIPANEL (lcd).
Pro-tip: If you aren't aware of it, you can bring up the search box by using CTRL+F og from Edit -> Find...
Pay attention to the warning about this functions ignores Z-min, so you can "crash" the bed against the nozzle.
In reality you have to turn the knob a lot to make the bed move.. like an entire turn to even notice the bed moving, so you have to have very quick fingers to do any harm.
I know I've played a lot with it and took a while to even figure out that it wasindeed moving.
The Babystepping is only gong to show up in the display after you have startet printing.
// Babystepping enables the user to control the axis in tiny amounts, independently from the normal printing process
// it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops!
// MDN Babystepping
#define BABYSTEPPING

All set
Now your all set with all the basic movement settings configured :)
I'll recommend you read through the Configuration.h and Configuration_adv.h files and see if you find anything interesting. Like X_HOME_RETRACT_MM which tells the
printer how much to retract after hittingendstop, then slowlinggoing back.
Have fun and maybe even follow me here on Instructables.com :)

Related Instructables

Configuring
Endstops on
Ramps 1.4 with
Marlin firmware
- @section
homing by
dintid

Enable Auto
Leveling for
your 3D Printer
with an
inductive
sensor (Marlin
Firmware) by
marshallpeck

Configuring and
using Reprap
Ramps1.4 RRD
Fan Extender by
dintid

DIY | 3D Printer
by
dev.alessiobigini

Building a
Prusa i3 3D
Printer by
SteveRoy

Poor Man's 3D
Printer by
Gelstronic

http://www.instructables.com/id/Motion-Configuration-on-Ramps-14-with-Marlin-firmw/

Advertisements

Comments

http://www.instructables.com/id/Motion-Configuration-on-Ramps-14-with-Marlin-firmw/

Вам также может понравиться