Morgan Start-up and Calibration Guide

NOTE: 

This guide is for self built Morgans based on Marlin and RAMPS electronics only.  For commercial Morgans, or machines built using Smoothieware compatible electronics, please look under the “Support” menu dropdown.

This is the Morgan calibration guide.  A large part of this calibration is only done on initial system calibration, and if the machine had to taken apart for upgrades or repairs.

UPDATE!
In order to ensure that the calibration succeed, please make sure the following is in place:

  1. Ensure motor currents are correct:  Most stepper motors are rated for lower voltages than the 12V supply, and you want that – but be sure not to overdrive the motor in order to prevent damage to it.
    • Check the motor spec for maximum current – usually also printed on the motor label.
    • Using a multimeter, set the current limit to under the specified current by adjusting the potentiometer to match the voltage:
      • A4988 : Current = Vpot * 2.5
      • DRV8825: Current = Vpot * 2
    • You will find that you  probably need less current than specified – you can experiment later after calibration is done.  Lower currents will cause less heat related problems.
  2. Homing is working, and the position is over the top platform, in an angle position not reached when moving the head over the edges of the print bed. There is a YouTube video to explain the end stop placements.
    http://www.youtube.com/watch?v=dceSD7t-4rc
  3. “Theta” (X) motor  and end-stop must be fitted to the top drive wheel (Tube mount) and “Psi” (Y) motor and end-stop fitted to to lower (Rod mount) drive wheel.
  4. MAX end-stops are used for homing.
  5. Measure the distance from the center of the printbed to the center of the driveshaft assembly – 100.  This is the Y offset. Enter this distance (with a negative sign) into the “SCARA Tower offset Y” in the configuration.h file on Marlin.  This tells the firmware where your print bed is relative to the SCARA drive shaft, and errors here can cause your machine to miss the print bed.
    Example:  Distance measured = 156mm -100 = 56.
    configuration.h, line 113:

    #define SCARA_offset_y -56 //mm
  6. Measure the position of the nozzle after homing relative to the bed zero position. Bed zero is to the top right when viewed from the front. Enter this position into the configuration.h file of Marlin (homing offset) and upload the firmware again. It does not need to be very accurate, but the closer the better. (read: easier calibration)

    #define MANUAL_X_HOME_POS -35
    #define MANUAL_Y_HOME_POS -55
    #define MANUAL_Z_HOME_POS 235 // Distance between nozzle and print surface after homing.
    • The offset in this image is approximately X-65 Y-55.  image
  7. Enter the initial X and Y steps per degree correctly for the hardware you have installed:
    • 0.9 deg motors with 32uStepping will need close to 430
    • 1.8 with 32 will be 215.
    • 1.8 with 16 is 107.
    • Compensate accordingly for other combinations:
      • The above numbers assume the use of T2,5 belt with 16 teeth (40mm circumference)  T2 belt with 16 teeth will be 32mm and will require you to multiply the above numbers with 1.25 – 430 will become 537 etc,
      • M92 X(steps) Y(steps)
  8. NB: If the arms cannot reach calibration positions, it may be because of the soft end-stop limits: 
    • Please install the latest Marlin firmware from qharley Git.  It now takes care of the soft end-stops during calibration.
Arm calibration guide
Arm calibration flowchart

Z axis calibration
Adjust the Z steps per mm.

Make sure the bed is mechanically adjusted to be 100% squared off to the copper drive pipe, in both X and Y directions. Also ensure that the maximum Z speed does not exceed the capabilities of the stepper motor / driver. The default speed assumes the use of the high speed drill bit lead screw. It has a 30mm per revolution travel, and M8 lead screw is 1.25mm standard. Adjust accordingly.

  1. Home the machine
    1. G28
  2. Move to first position
    1. G1 X100 Y100 Z150 F5000
  3. Measure the height of the bed from the edge of the top platform.
  4. Move to second position
    1.  G1 Z50 F5000
  5. Measure again, and subtract the reading from the first.
  6. Calculate: 100/(calculated distance) * (current Z step/mm).  Current steps can be seen by issuing M503 and looking at the number next to M92 for Z
  7. Enter new value:
    • M92 Z(calculated steps)
  8. Store:
    1. M500

Run the routine on the Z-cal flowchart below to do the automatic bed level correction adjustment.
Morgan Z-Cal flowchart

Slic3r Settings
Here are some initial Slic3r config files. Extract it into your Slicer config folder (~/.Slic3r)
The printer configs include one for 3mm and 1.75mm filament. The initial gcode to make it prime properly is included,

For general printing the “MQ 15” program gives good results. LQ MQ and HQ refers to layer hight – 0.4, 0.2 and 0.1 respectively.

Slic3r Morgan settings.tar

 

SCARA-Cal

The SCARA-cal phantom has been included in the Git source of Morgan. It contains an STL file to be printed after the Arms and Z calibration has been completed.
Enter the details of measuring the calibration piece with a caliper, and the current settings of your machine into the spreadsheet supplied (Updated 23 Oct 2013) and it will give you a fresh set of settings to apply.

NB: Initially only adjust the Theta (X) and Psi (Y) steps/mm settings.  X and Y scaling will not be required if the machine has been made to close tolerances, and measured correctly.
Remember to reprogram the M360 and M364 positions into M206 X and Y again after changing M92 settings.

 

PID Tuning
In order to optimize heating on your machine, perform Marlin PID autotuning.
http://reprap.org/wiki/PID_Tuning

 

More information will be added to this page, and will be amended when required.

30 thoughts on “Morgan Start-up and Calibration Guide

  1. Thanks Quentin that works great!

  2. Where are the z calibration directions?

    1. I’ll add it now.

  3. Hi Quentin,
    Just starting my calibration-finally.
    Strikes me you need a broader section on the Marlin firmware. There were about a dozen files in Zahm’s zip that were merged with your arm level.
    For example, I don’t think yours has a PDE file.

    1. Hi Steve, good to hear. Mine has an .ino file. I don’t think I follow here. Is there something missing?

      My Marlin armlevel branch is the only Morgan compatible firmware I am aware of currently.

  4. Don’t know or think so.
    Guess I am showing my colors, I was looking for the PDE based on my readings about Marlin and Arduino. When I didn’t find one in your files, I decided to merge Zahm’s with yours taking priority. Really feeling my way in the dark.
    Seemed to work in Arduino.

  5. Hi, i noticed that your SCARA robot design is somehow modified to have 4 arms instead of the conventional 2 link joint SCARA robots that could be found out there. I was wondering if the programme that you use to run your SCARA would actually still work on the 2 link type SCARA. Could you give me any tips on how to start? I am currently a college student and would like to start on a similar project to show my class the importances of Rapid Prototyping. Thanks in advance.

    1. Yes, it does work, with a single exception. I n order to make my machine light I put both the motors off arm, and the firmware compensates for this by adding Theta and Psi together for the position of the second arm. It will be slightly easier in the math to just drive the joint from the arm, with the notable disadvantage of weight on that arm.

  6. I see, where could I find the programming for the SCARA arm to be run on Arduino and could it be used with other kinds of motor like Robotis and Maxon?

  7. You can find my modified version of Marlin 3d printer firmware on my github profile. Check out the sticky post on the home page “Morgan Sources”

    You could look at the inverse kinematics and change it to drive SCARA directly. You can use any motors you like… the firmware is hardware agnostic.

  8. Thanks alot…. one side question that is not about Marlin… do you know any website that I could go for to consult about motors ( DC motors, Servo motors and Stepper motors)? All the advice and help you offered me are very much appreciated…

    1. Not any specific site. I collect data all over the internet as I need it. Your favorite search engine is you friend

  9. Hi, I’ve built a printer that’s based on the Morgan – it uses the same principles, but I’ve just modified the structure. When I load the firmware, I get some really strange results, including (after homing) jogging the x axis and it doesn’t move at all, both arms move in one direction and don’t stop, and the Z axis moving all the way down without stopping. Calibration codes behave similarly. Simple code I write that uses serial communications, all the motors, and the switches I’m using for end stops works, but the Morgan firmware doesn’t (cartesian Sprinter and Marlin code work).

    I’m led to believe that I’ve got my end stops configured wrong, and the Z axis moving is some part of the arm leveling code. I also can’t find any information on this blog about how those are set up either. Can you describe how the end stops are supposed to be connected?

    For the record, I’m using mechanical end stops, active low signal, and at the moment, they’re connected to X/Y/Z max. I have the Z one at the top of the print bed’s range of motion, and the others I’ve been pressing manually.

    1. Check out my youtube channel. There is a video I made to explain the end stop positions.
      Pressing the end-stops manually will not do the trick, since the arms ar ormally homed to one side, and they do move together initially to reach the printable area.

      Z must be a the bottom (max build hight) of the bed range for instance.

      http://www.morgan3dp.com/?topic=hall-effect-endstops-on-repstrap-morgan

      1. Hi again,
        I’ve finally got everything homing in the right direction, and the endstops in a decent spot, but doing any movement (G1, M360) after homing just makes the Z axis move up indefinitely, even if there’s no Z component in the move. It doesn’t seem to stop for anything, nothing else moves, and the printer stops responding until it resets. I have utterly no idea what could be causing this, except the firmware, but I have no clue where the problem would be.

        Also, I’m curious why the bed would home to the bottom, not the top, as it has to move all the way up to start printing. Is this changeable?

        1. I think there may be some strange Z calibration values…

          Issue the following:
          M206 Z0
          M370
          M373
          M500

          This should clear any Z related values perhaps left over in memory of the Mega from a previous project.

          I this does not work, do this
          M502
          M500

          This is a factory reset… Start by entering the initial steps again.

  10. Hi Quenton, could you please send me your email address if possible? Thank you

  11. We also had the strange behaviour during calibration.
    The M360 moved the arm in the wrong direction. Maybe because we did a lot of trials, at the end the movements were random.
    But we found the, simple, solution.
    Erase the EEprom! And start again. Everything is okay then.

  12. Hello, Quentin. I’m now ready to perform initial calibration of my Morgan. Maybe I’m particularly thick-headed, or mathematically illiterate, but I cannot get the gist of Step 7, the calculation of steps per degree.

    Given the spreadsheet, I’m sure I’ll be able to tune things in once I get the first phantom printed. Can you please express this calculation in terms of an equation? This might help other folks in the future as well. For what it’s worth, I have 1.8 degree steppers, microstepping set at 16, and 20-tooth pulleys.

  13. OK, maybe if I take off my shoes  and socks…

    PrussaPrinters.org has an online calculator for steps per mm, tells me my combination yields 80 steps per mm.

    Theta pulley is 75 mm radius, radius squared is 5625, that times Pi is 17,671.4 mm circumference. Divide that by 360, I get 49.08 steps per degree.  Back to the machine, then.

  14. The actual steps/mm is set with M361 calibration step.

    you only need to set the initial steps to make the calibration work properly.  Try 49, but I found it to be double that for your combination.  Let’s see.  Don’t overthink it though. If the M360 move does not move the machine close to the calibration position, you need to change the steps to suit.

  15. When I calibrate theta 90 deg, via the m361 cmd the SCARA step CAL theta Y is way off, I had to * by 2 to get it  calibrated correctly, any body know why that is please?

    1. Is the steps/mm now set to 860?

      1. X and Y a both 430 atm, but I had it all working and calibrated, I have reset and uploaded firmware again since then so maybe will need to calibrate again, will try a quick first test print now with cold bed till new thermistor arrives.

  16. I have 0.9 deg steppers, DRV8825 drivers and ramps1.4, init x and y steps/mm was set at 430, all jumpers for drives on ramps are set the same, setting steps/mm needed to bet set at 430 otherwise x and y would not calibrate at all.

  17. I got the X n Y axis calibrated correct after adjusting the driver pot to same voltage, can not get it to extrude now,   “No movement – Home first…” is the error that I am getting, any idea why that might be? I am thinking maybe its a bad power supply, its just LED strip PSU.

  18. Fixed, it was a dead thermistor.

  19. I’m working on doing a more complete integration of SCARA support in Marlin Firmware for the 1.1.0 release, including support for the MakerArm. I found that the kinematics for the MakerArm differ a bit from the Morgan’s, though of course it follows the same principles. So, I need to get to know the Morgan better, understand how the mechanics work, and figure out the best way to have it do bed leveling, deal with the probe offsets, etc. Is your Marlin fork pretty well up to date, and may I call upon you if I have questions?

  20. My marlin fork is very much out of date. It would be nice to get it to the state of the Smoothieware module for Morgan.

    You are welcome to contact me if you have any questions

  21. Please ,Tell Me where is +X and +Y coordinate on your printer?

Leave a Reply

Your email address will not be published. Required fields are marked *