Sunday, February 9, 2014

Repetier Firmware

I am a strong believer in KISS and if it isn't broken don't fix it. However, I also want to squeeze as much performance out of my machine (not bleeding edge speed mind you) as I can with what I've already got. Also, the Google Group Delta robot 3D printers seems to be split on Marlin and Repetier. To that end, this is my experience in changing from Marlin to Repetier firmware.

The newest Repetier firmware has you use a web wizard of sorts to generate an appropriate configuration.h file. I applaud this effort, but it has some bugs with respect to the values it sets for deltas so it still requires some manual editing. Also, the naming of the variables conflicts with what they are. A good example of this is X_MIN_POS and Y_MIN_POS. In a delta, the build is centered at 0,0. The minimum would, to my way of thinking, be -X_MAX_LENGTH/2. Nope, it's the position of the at the center of the build platform at Z=0 or 0. I'm getting a little ahead of myself, let's walk through the wizard


Repetier-Firmware configuration tool for version 0.91 Rev 4

Step one General Settings - allow you to upload a prior configuration.h file. Somewhat helpful as it pre-loads all of the generated values. However, if you have manually edited those, and unless you also edited the configuration string at the bottom too, I don't think it pulls in your changes. Let's start fresh:


  • I selected Expert for configuration, but you can leave it to "Hide internal only values". I wanted to see everything at least for the first go around. Once you start manually editing things, the variable names aren't always clear (see my example above - click the image to see a bigger version)
  • I use RAMPS 1.4
  • Delta
  • I enable EEPROM (not sure difference between Set 1,2 so I left it at 1)
  • Baud at 250000 
  • Kill is set to  reset the controller, but I prefer to just disable the heaters instead. Note: when I set mine to Disable the heaters I got a compile error so I went back to reset.
Scrolling down, you get tot he Delta configuration items

  • X and Y length should be the diameter of your build plate. You can go bigger of course, and you may want to. This is an EEPROM configurable value so don't think too hard on it :)
  • The Z length I have from my calibration using Marlin. Yours will be different. This is also in EEPROM.
  • Diagonal Rod length is the pivot to pivot distance and same as DELTA_DIAGONAL_ROD in Marlin
  • Horizonal radius is DELTA_RADIUS in marlin which is the same as DELTA_SMOOTH_ROD_OFFSET-DELTA_EFFECTOR_OFFSET-DELTA_CARRIAGE_OFFSET. For my mini this is 105.15 and this is a EEPROM configuration too. Should make calibration a much easier task.
  • If you have a mini or any of the recent Deltas, then match my angles.
  • No idea the radius error so I left 0.

Step 2 Mechanics

  • Since I chose to use Expert settings the next tab  is full of stuff I didn't touch. I did play with the subsegments (DELTA_SEGMENTS_PER_SECOND in Marlin) since I am using 1/32 microstepping I lowered 180 to 100 and 70 to 50. My prints have not shown any signs of degradation.
  • I left the XY jerk at 20
  • In a delta all 3 axis should be the same configuration. For mine I have 1/32nd microstepping, 16 tooth pulleys and GT2 belts so my Resolution is 200 steps per mm. If you are 1/16th microstepping then set to 100, and if you use 20 tooth belts then set to 80% of the 16 tooth version (160 or 80)
  • I like a brisk homing speed. 80mm/s is a good start and you can increase to your liking.
  • I set the Travel acceleration to match my Marlin. This controls how fast you get to your top speed. When printing, using a lower value is something you may want to experiment with.
  • Uncheck the mirror motor signals.
  • Make Y and Z match X
Endstops
  • Deltas usually home to the top (max) so X and Y min are not assigned and disabled. You know my opinion of probing so you know why I disabled it too.
  • Mechanical switches (and this was not obvious to me when the other type is electronic) are Switch and if you followed the wiring on the mini Kossel they are NC and will switch on GND. This sets them to inverting in configuration.h and enables the pull-ups. Click the image to see a bigger version.
  • The next array of values is verbally confusing. Go back after first hit is how far the carriage should move away from the end stop before re-homing using the Reduction factor speed. Thus if you have homing at 80mm/s, then the re-home speed would be 80/5 or 16mm/s. The Endstop distance after homing should be 0 for all three. I set it to 1 originally, and it meant that my Z max was reduced by 1 since all 3 axis though they were at 228.2 - 1 when homed. Not what you or I want.

Step 3 Temperature
  • I left the defaults for most of these. I would recommend you use what you had in Marlin as a starting point.
  • Make sure you use the same steps per mm and max feedrate as in Marlin for your extruder.
Step 4 Features
  • I left the defaults. I did not set up a  fan pin for board cooling, I leave a 80mm fan on all the time.
  • I left the SD card detect pin disabled. My Reprap Smart LCD seems to work fine without it. In fact, I'll list some likes and dislikes at the bottom but the SD operations work flawlessly.
  • I used the PID values I had in Marlin from M303. These are EEPROM configurations too.
Step 5 User Interface

  • I have the RepRapDiscount Smart LCD 
  • I left most everything default except I named my printer mini Kossel.
Step 6 Download
  • You'll want to click the Complete button
  • Unzip your Firmware (I like to create a directory under Arduino called reprap firmwares so I can keep old (working) copies

Arduino - Configuration editing

  1. Start Arduino  and open Repetier.ino. 
  2. Find the configuration.h tab and confirm the following:
#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_X_MAX_INVERTING false   // don't need to invert if you connected to NC
#define MAX_HARDWARE_ENDSTOP_X true
#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_Y_MAX_INVERTING false  // don't need to invert if you connected to NC
#define MAX_HARDWARE_ENDSTOP_Y true
#define ENDSTOP_PULLUP_Z_MAX true
#define ENDSTOP_Z_MAX_INVERTING false  // don't need to invert if you connected to NC
#define MAX_HARDWARE_ENDSTOP_Z true

#define min_software_endstop_x true
#define min_software_endstop_y true
#define min_software_endstop_z true
#define max_software_endstop_x true
#define max_software_endstop_y true
#define max_software_endstop_z true

#define X_HOME_DIR 1   // note mine had -1 which is the min direction. In Delta they all should be the same and all in the Max direction)
#define Y_HOME_DIR 1
#define Z_HOME_DIR 1

#define X_MIN_POS 0    // Note thes should all be 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0

#define MAX_JERK 20
#define MAX_ZJERK 20    /// mine had 0.3 and I could not find a place to set it in the Wizard.

Repetier Host

Since you are using Repetier FW, one can assume you will use the host. In playing with Repetier FW on my Prusa i2, I discovered an issue with trying to use 250000 baud and Autodetect for the Transfer protocol (Printer Settings -> Connection tab). The issue was that commands queued up. At first I dropped my baud to 115200, but the issue still persisted. I had to hit Ok to flush the buffer. When I changed the Transfer Protocol to Repetier Protocol things worked as they should (meaning I did not have commands queuing up).

Closing Thoughts

That should get you up and running. Here are my closing thoughts. In a nutshell I've used Marlin since it first release, I'm a convert.
  1. I love the Configuration Wizard concept, there are a few bugs and some unfamiliar nomenclature (maybe a French to English translation?) but it gets you 90% there.
  2. I love the LCD features. It far surpasses the Marlin implementation with animated menus and being able to switch to different displays rather than cram it all on one.
  3. The SD feature works flawlessly. I had all manner of issues with Marlin on the same hardware. I even had to purchase an SD card reader for my PC to write files reliably.
  4. Having the greater number of firmware settings makes needing to re-compile and upload the firmware much less likely. I had to do it 3 times since I had some confusion about some of the meanings liek I discussed before.
  5. I haven't tested pushing the speeds yet, but at the setting I use for my slicer (40mm/s perimeters 50mm/s infill) my prints look great. Travels seem a bit slow, I htink I need to bump the acceleration from 1000 to 3000 or higher.

Hope this helps, if you have any feedback or corrections please let me know.

9 comments:

  1. Excellent, Thank you very much. Cheers Cameron.

    ReplyDelete
  2. Replies
    1. This is the distance from the tip of your hotend tot he build surface when all three towers are homed at the top.

      Delete
    2. Hi I am having trouble getting the extruder carriage to stop at the correct height as it just crashes into the base no matter what I try any suggestions

      Delete
    3. Hi I am having trouble getting the extruder carriage to stop at the correct height as it just crashes into the base no matter what I try any suggestions

      Delete
    4. I have posted a couple of videos to youtube that walk through the steps. https://www.youtube.com/channel/UCwurS0FrZm9tMhEmtJzEM6g

      Delete
  3. Excelent! It helped me a lot to understand some configurations. Actually I totally agree with you when you say some variable names are not intuitive, that happens even in the english version.
    Any plans on upgrading to v0.92? There are a lot more configurations availiable and I have no clue what they are about yet haha.

    ReplyDelete
  4. I use a Azteg X5 with Smoothieware now. I still have my original mini Kossel running a RAMPS and Repetier, I just never use it :)

    Glad this helped you.

    ReplyDelete
  5. Hi so thatnk you first off for all you hard work compiling this info. I feel like I am getting closer to having a working printer.

    However, after following all your directions, I received the following:

    Please help. I am running on a Macbook pro. brand new. Repetier Host of course and have followed all your instructions to a tee.

    Cheers,

    Chad

    Arduino: 1.8.2 Hourly Build 2017/02/10 07:12 (Mac OS X), Board: "Arduino Mega ADK"

    Build options changed, rebuilding all
    sketch/ui.cpp: In function 'void slideIn(uint8_t, const char*)':
    sketch/ui.cpp:829:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
    char *empty="";
    ^
    Sketch uses 121782 bytes (47%) of program storage space. Maximum is 253952 bytes.
    Global variables use 6918 bytes (84%) of dynamic memory, leaving 1274 bytes for local variables. Maximum is 8192 bytes.
    Low memory available, stability problems may occur.
    avrdude: ser_open(): can't open device "COM1": No such file or directory
    ioctl("TIOCMGET"): Inappropriate ioctl for device
    ioctl("TIOCMGET"): Inappropriate ioctl for device
    avrdude: ser_send(): write error: Bad file descriptor
    avrdude: stk500_send(): failed to send command to serial port
    avrdude: stk500v2_ReceiveMessage(): timeout
    avrdude: ser_send(): write error: Bad file descriptor
    avrdude: stk500_send(): failed to send command to serial port
    avrdude: stk500v2_ReceiveMessage(): timeout
    avrdude: ser_send(): write error: Bad file descriptor
    avrdude: stk500_send(): failed to send command to serial port
    avrdude: stk500v2_ReceiveMessage(): timeout
    avrdude: ser_send(): write error: Bad file descriptor
    avrdude: stk500_send(): failed to send command to serial port
    avrdude: stk500v2_ReceiveMessage(): timeout
    avrdude: ser_send(): write error: Bad file descriptor
    avrdude: stk500_send(): failed to send command to serial port
    avrdude: stk500v2_ReceiveMessage(): timeout
    avrdude: ser_send(): write error: Bad file descriptor
    avrdude: stk500_send(): failed to send command to serial port
    avrdude: stk500v2_ReceiveMessage(): timeout
    avrdude: stk500v2_getsync(): timeout communicating with programmer
    the selected serial port avrdude: stk500v2_getsync(): timeout communicating with programmer
    does not exist or your board is not connected

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

    ReplyDelete