Getting your motors moving on a MakerGear Mendel Prusa

Here’s a quick and dirty guide to getting your motors working on a MakerGear Mendel Prusa 3D printer kit.

I assume you:

  • installed your arduino software
  • installed the Pronterface printer control software
  • installed your copy of MakerGear|Rick’s version of Sprinter, and
  • have flashed your Sprinter firmware to the RAMPS board.

If not, you may need to follow the steps in the “Getting Started Guide” (and followup comments) on the MakerGear Google Group.

1. Set driver pots for safety

With the ATX power supply switched off, and the USB cable unplugged, use a small screwdriver to gently turn all the stepper driver pots on the RAMPS board all the way counter-clockwise. Then turn them a quarter turn clockwise. (Do schools still teach kids to read analog clock faces?)

This will ensure you don’t fry your stepper driver ICs while setting things up. You may find later that you haven’t got enough drive to move the motors reliably, but that’s easy to tweak, whereas letting the magic blue smoke out of the ICs is expensive.

2. Check motor wiring (again). Yes, really.

Check that all your motors are wired with exactly the same colour sequence all the way from the motors to the RAMPS board. Red-Green-Yellow-Blue from left to right on the RAMPS board (with the USB port to the left). If your motors have different coloured wires, tell me and I’ll see if I can help.

3. Configure Sprinter (mostly) correctly

Look at “My Sprinter configuration.h file” on my blog. This file has the settings that make Sprinter work for me, though you still may have to change things like stepper direction and endstop details later if you find your printer is wired up differently to mine. And you’ll have to change the axis_steps_per_unit to get the extruder calibrated (also later).

The simplest approach is for you to rename your original copy of Sprinter’s configuration.h as configuration_original.h, and make a completely new configuration.h by copying and pasting the code in mine.

I got most of these settings from the version of Sprinter that MakerGear|Rick stickied to the MakerGear Google Groups forum. The default configuration.h file from github may have motor settings that don’t work for our specific MakerGear machines, due to things like the geared extruder being non-standard (better, but non-standard). I’m still tweaking my axis_steps_per_unit for my extruder, trying to get a perfect match for my very soft natural PLA.

Note that my file tells Sprinter that I’ll be talking to it at 250,000 bps. So you need the same setting in pronterface. Just make sure they match or you won’t be able to get pronterface to connect.

4. Connect with Pronterface

Plug the USB cable back into the RAMPS. Don’t turn the ATX power supply on yet.

Compile and upload Sprinter again if you changed anything in configuration.h, or created a new one from the contents of mine.

Run Pronterface.

Check that you’ve got the right port selected next to the ‘Port’ button (check the port number in the device manager if you are using windows, sorry I can’t help with other platforms).

[Update: Oasis Vali kindly added the following:

…linux users can easily find their arduino port by first looking at the /dev/ directory, connecting the arduino and then checking the /dev/ directory again (command: ls /dev/). The newly added item after the connection is the arduino port (for me its something like ttyACM0)

]

Check that you’ve got the right speed set in the window next to the Port. This should be the same speed that you set in your configuration.h file (250000 if you are using mine).

Click ‘Connect’, and wait a minute or two for the connection response message.

If you don’t get a connection response, you’ll have to troubleshoot your connection. If you succeeded in flashing your Sprinter firmware to the arduino, the only likely problems are the wrong port, or the wrong speed.

Click on ‘Monitor Printer’ and you should start getting a constant stream of temperature readings. The figures should roughly match your room temperature (in degrees Celsius, of course, we’re all scientists here…)

5. Turn off all the motors

Turn on the ATX power supply. You may hear noise from the motors.

Click the ‘Motors off’ button in Pronterface, to turn off all the stepper motors. That’ll reduce the noise and anxiety and you can concentrate on one motor at a time.

6. Centre the build platform

After clicking the ‘motors off’ button, you should be able to easily move the x-carriage left and right by hand, and the y-carriage forwards and back likewise. If they don’t want to move, you’ve got a physical construction problem, before you even worry about electronics.

Move the y-platform and the x-carriage by hand so the nozzle is roughly in the centre of the y-platform.

7. You can’t go home (yet)

Avoid the home buttons like disease-infested bunny rabbits at this stage. Their cuteness will make you want to touch them, but it’s not healthy. Your end-stops are quite possibly set up wrong either on the machine or in the configuration file, and you will want to fix some stuff (like homing speed) before testing the endstops.

The default homing speed is FAST! Having your printer head charging full speed off the end of the build platform, banging into things in horrible grinding shudderiness is no fun at all.

If you insist on pressing a home button (don’t!) just because you hate being told what to do (never take up skydiving!) you’ll have to quickly switch the ATX power supply off to stop the noise and avoid damaging stuff.

Or you can press the reset switch on the side of the RAMPS board if you can get at it without losing a finger. You Have Been Warned.

8. Gentle baby steps

Clicking on any + or – x, y, or z button will turn on only that motor, and it will try to move by the amount on the button. Try the +1 and -1 buttons first, as they move enough for the direction to be noticable but not enough to damage things.

Test one axis at a time (x, y or z), and press ‘Motors off’ before starting on the next axis. That way you can hear the noises the motor makes, and get a sense of what is happening.

You shouldn’t need to send M-codes to check the motors; – the x, y and z buttons in pronterface will show you everything you need to know.

Make a list of which direction each motor moves the nozzle relative to the printbed, so you can tell if any of the motors need their direction inverted in the Sprinter configuration.h file. For example, if you tell the x motor to move +1 and it moves the nozzle in the minus direction, you need to change INVERT_X_DIR in configuration.h.

9. Troubleshooting

If you’ve followed all the above steps and fixed anything that didn’t do what I said it should, the motors should move.

If one of the motors won’t move (it just sits and hums or sings) and you really have fixed EVERYTHING I’ve talked about above, maybe you need a little bit more drive from the stepper drive chip. You probably don’t. The MakerGear kit is composed of good parts, and if put together carefully it should not need much drive to make the motors move.

So, run through all the previous 8 steps again. Pay really close attention. Think about whether what you are seeing really matches what I’ve described. Don’t take shortcuts. Don’t think you know more than me (you do, I’m sure, but right now pretend I’m right).

99.9x9beta (don’t do this until all else is perfect)

If you really must have more power for a motor:

  1. Turn off the ATX power supply (to de-power the stepper motors)
  2. Click ‘Disconnect’ in pronterface    (because you’re about to unplug the arduino)
  3. Unplug the USB cable (so there’s no power on the arduino, in case you drop the screwdriver or short some pins out.)
  4. Turn the relevant driver pot up a tiny amount. Less than an eighth of a turn. Gently. Remember the pots are x,y,z from left to right at the bottom of the board, and E on its own on the top row.

It is normal for the heatsinks on the driver chips to get quite warm, but not too hot to touch. The motors may get warm if you print for a long time. Motors have a lot of thermal mass, and it takes a while to heat them up, so the driver heatsinks are a better warning of using too much driver current.

Advertisements
This entry was posted in 3d printing, Assembly, Software and tagged , , , , , , . Bookmark the permalink.

18 Responses to Getting your motors moving on a MakerGear Mendel Prusa

  1. Mark C says:

    You have no idea how much you just made my day.

    When I blindly flashed the unmodified Sprinter the other day and plugged everything in only to have all the motors buzzing like crazy and not obeying commands, I thought for sure I screwed something up and probably fried everything. I started over tonight following this post though, and it worked beautifully. I can at least sleep soundly knowing that my mechanical and electrical build was successful!!!

    I know that the point of the Prusa is an experimental work in progress, however with so many other obligations, I literally don’t have the time to read through every Prusa resource and post on the internet. I’m really glad I can follow the concise yet clear information you post so I can still tinker with my machine in the few hours I have every week. Keep up the great work!!!

  2. BrazenArtifice says:

    Thank you for for your kind words. I’m certainly in need of them at the moment. I haven’t had a single print I’m happy with since before Xmas.

    After an Xmas noticably lacking in toys, I decided to print a set of double-sized minifigs from a single plate stl file on thingiverse. Grand Dreams of a lego minifig army wreaking my revenge on those who think I’m too old for toys.

    Sadly, that’s led me into a world of confusion trying to get retraction working well enough to print more than 20 pieces with almost no gaps between them. The balance between having no strings between parts and excessive blobbing at the start of segments has me baffled.

    I’ve tried two different versions of Marlin, and even went back to Sprinter. I just keep getting layer offsets from too much plastic being extruded, and the nozzle catching.

    There are just too many numbers to play with 😦

    So thanks again for cheering me up as I abort yet another lego minifig print.

  3. Oasis Vali says:

    BrazenArtifice, I salute you sir!

    Just wanted to add linux users can easily find their arduino port by first looking at the /dev/ directory, connecting the arduino and then checking the /dev/ directory again (command: ls /dev/). The newly added item after the connection is the arduino port (for me its something like ttyACM0)
    Cheers

    • BrazenArtifice says:

      Thanks for that, Oasis. I’m always hopeful that folks will chime in with their own knowledge, especially on things I have no way of testing. I haven’t used linux in years. I’ve taken the liberty of adding your comment into the main text of the post, for anyone who doesn’t take the time to read the comments. Thanks again!

  4. David B says:

    I’m expecting a MakerGear Prusa kit to arrive tomorrow, so I’m reading up on your site and excited about getting started. I wanted to add an anecdote about young folks’ ability to read analog clocks. My cousin, a fairly recent valedictorian of a large high school, can not read an analog clock. How is this possible?

    • BrazenArtifice says:

      Hi David!

      Building my Prusa kit was great fun, if headscratching at times. The information is out there, just not all in one place. My posts on how I built and operated my machine just add to the information that isn’t all in one place 🙂

      I don’t post so often now that I’ve solved most of my own problems. I’m always happy to try to answer questions from other people on the same path.

      I remember from distant childhood that my sister (2 years younger than me) couldn’t tell the time until we got a clock with conventional arabic numerals instead of the fancy roman numerals on our household cock! I think we both learned to tell the time before going to school, but I could be wrong. That was a long time ago…

  5. Tom Simpson says:

    You have made some wonderful instructions! I have been wallowing in the configuration.h mire for a week. Moving back and forth between Marlin and Sprinter, changing versions of Arduino, and reversing plug connections. Your instructions and the clearly commented Sprinter file solved almost all of the problems. Hopefully I can try to print after 8 weeks of work(nights). Thank you very much.
    Tom

    • BrazenArtifice says:

      Best of luck there Tom! There is a lot of satisfaction in finally getting things running. The only other major things I think I’ve changed since the versions on this blog are the feed rate and retraction acceleration in Marlin. If the values are too high then the extruder motor starts to skip and weird things happen, like blobbing at the start or end of lines. I’m now using the following figures, but you need to test for yourself:-

      float max_feedrate[] = {60000, 60000, 240, 500000};
      float homing_feedrate[] = {1500,1500,120,0};

      float acceleration = 2000; // Normal acceleration mm/s^2
      float retract_acceleration = 2000; // Retraction acceleration mm/s^2

  6. diegudio says:

    Hi BrazenArtifice!
    Thanks so much for this information. It’s really helpful.
    I would like to ask you something: I’ve been through your procedure but I’m not able to make the motors go in the opposite direction using Pronterface… I mean, instead of the extruder (that clicking in the buttons it goes in one direction or the other) when I manually click in the “negative” (-) of X, Y or Z axis in pronterface, nothing happens, meanwhile when I click on “positive” direction, all motors move smoothly.
    Do you know what can be happening? It’s a problem of software (pronterface) or hardware?
    Naturally, I’ve inverted the motors connection to figure out if it was a problem of the motors, but they are working fine in one direction or the other (inverting the cable). However, when I click on the negative advance in pronterface, they don’t move… It looks like a pronterface problem to me, but I don’t know how to solve it…
    Thanks in advance, I will appreciate your help!

    Diego

    • BrazenArtifice says:

      Hi Diego!
      It’s been a while since I had to troubleshoot any Prusa electronics problems, but it sounds to me at first glance that you may have a problem with your end-stop settings in your firmware, rather than anything being wrong with pronterface.

      The first simple check is to try jogging the motors with pronterface while holding the end-stop microswitch closed. If you can move the motor in both directions when you do that, you need to change the ENDSTOPS_INVERTING value in configuration.h

      There are a number of other options to do with axis direction and endstop function in configuration.h. You can see the settings I use for Sprinter and Marlin. Experiment with changing those and flashing the modified firmware to your arduino.
      Good luck!

      • diegudio says:

        Hi! I’ll check the end-stops, it makes sense what you say and I haven’t check them yet…
        Regarding the configuration.h, I haven’t had time yet to get through it… Too many things to check/do and too less time =(
        Thanks for the answer !!

  7. Ben says:

    Hi BrazenArtifice,
    Just got pointed to your site a couple of days ago. I had requested help in getting a 95% reprap (the same as yours) over the line. Someone pointed me to your site. Great job! I got the thing working with the help of you detailed instructions.

    One question, on the “getting your motors moving” page, 4. connect with Ponterface, you state that if we put in a new configuration.h file, to compile and upload Sprinter again. How to do this or where to go to find out how to do this?

    Anyway great site. Once the Pronterface is happening, what is the next step to getting something actually printing?

    Thanks,
    Ben.

    • Hi Ben,
      Thanks for the kind words.
      As for your main question, about installing sprinter, that was one of the 4 “assumptions” I listed at the start of this post. I haven’t messed with my configuration for more than a year, so there may be better software options available now.

      Basically, if you are using an Arduino-based microcontroller on your printer, you need to install the arduino software to modify or “tune” how the printer works. I don’t think I ever wrote a tutorial on this, because there are lots of other tutorials on setting up arduino out there.

      The main steps are
      1: Download and install the arduino software onto your main PC. Sprinter used to require a version earlier than 1.0 of the arduino IDE. I don’t know if that’s still true.

      2: Download the code for the Sprinter software (or other printer control software of your choice – I use an old beta version of Marlin, since I could never get the more recent versions to work on my setup. Surely that’s been fixed by now…)

      3: Locate the configuration.h file, and edit it to match up with what you think your printer needs. That’s where my sample config files on my blog can help you to see what to change.

      4: Use the Arduino IDE to compile Sprinter / Marlin / whatever so it incorporates the changes you made in step 3.

      5: When the compile works without errors, plug your 3D printer’s USB cable into your main PC and use the Arduino ‘upload’ button to send the compiled code to the printer.

      Learning how to edit, compile and upload software to your printer’s arduino is an important part of getting the RepRap-style printers working. There are lots of tweakable tuning options in the printer’s firmware to adjust for the different sorts of printing hardware out there. That’s all a bit of a black art to me, I’m afraid.

      That’s about the best I can do for guidance off the top of my head. I hope it won’t lead you too far astray…

      Best of luck,
      Andrew

  8. Chris McKnight says:

    I am building my first 3D printer, and I have ran into some troubles. I have built the printer, and have it wired to a RAMPS 1.4 with and arduino Mega 2560. I successfully flashed the marlin firmware onto the board. I then used repetier to control the printer. I went and tried to manually jog the axis to see how they worked, and that is where the problem lies. When I jog them 1mm, they turn a little bit, then start turning the opposite way, even though I am still jogging the same direction. When I try to jog them 10 or 100mm, the stepper motors make noise like they should turn, but they don’t turn at all. Any ideas what could be going on?

  9. Hi Chris,
    I’m not sure how closely you’ve been following the steps in this post, so I’ll only be able to guess at possible causes of problems from your description.

    Assuming you’ve :
    *checked all the obvious physical stuff (like, do the motors turn easily by hand when you don’t have power applied, or are they jamming or binding? Do all the motors including Z and extruder behave the same way? Remember you can disconnect the belts so that the motors are running without load, which can show whether the problem is mechanical or not),
    *checked all the electrical stuff (mostly the sequence of the coloured leads to the motors, and the activation of the endstops),
    then I’d guess you’ve got problems with your Marlin configuration file.

    If you’ve got the endstop activation backwards, the motors will think they’ve already gone too far and they’ll try to reverse away from what they think you’ve run them into.

    If your velocity, acceleration and jerk values are too high, the motors just won’t be able to move. I had this problem with retraction for the longest time before I worked it out. As a test, you could try reducing all values (velocity, acceleration and jerk) to one tenth of your current values, and see if that helps. If it does, you can speed them up again by intervals to work out what the limits are on your particular hardware. If you are using a MakerGear Mendel Prusa (do they still sell them, I wonder?) then the figures in my Marlin config file might make a good starting point.

    Just f.y.i., jerk is the rate of change of acceleration, and is part of the reason Marlin is smoother around curves than Sprinter. Though I found Sprinter so much easier to get running that I still recommend starting with Sprinter, and only installing Marlin once you know the machine is working properly.

  10. Chris McKnight says:

    Thanks for the reply. I was able to get them working properly. I forgot to attach the jumpers to the pins under the stepper drivers. I have a new problem though. I am using a servo motor and z probe with an endstop attached to it for a bed leveling system. When I hit print, the servo automatically starts jerking the whole time, kind of like twitching but not actually moving anywhere. It does this for the entire duration of the print. Any ideas what this could be?

    Thanks,
    Chris

  11. Pingback: DIY 3D Printer for Complete Beginners | Benjamin Bolte

Please 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