Sunday, February 23, 2014

software Firmware Initial set-up

Initial set-up

First download all the programs for controlling and setting up the printer ;
  • Arduino IDE - To configure the firmware
  • Pronterface - Controls the printer and is used for testing
  • KISSlicer – My personal favorite slicer. Download my settings Here
  • Firmware – The adapted version of the Marlin firmware which is already modified for the Kossel with the RAMPS electronics.
My firmware is based on Johann’s Deltabot fork and the only modifications are to fit it to the Kossel so some size differences, steps settings and lcd/motherboard settings.

If you use different electronics or use a different LCD (or none) change these values as well. Look through the file, it is pretty self-explanatory. When the basics are set proceed with uploading the firmware.

Upload the firmware

Open the file Marlin.ino with the Arduino software. It will open a lot of files which are displayed in tabs.

A whole list of files, but fortunately we only really need these four :
  1. Configuration.h – Lists the main settings for the printer. Click the link for more information on the most common settings.
  2. Configuration_adv.h – Contains some more technical settings. Normally we wouldn’t need them.
  3. Marlin_main.cpp – Contains the location settings for the auto level function.
  4. Pins.h – Contains all pin definitions that connects the software to the physical pins on the electronics board.
Always save a working configuration! You can’t extract the firmware from the Arduino, only upload a new one.

Go to the Configuration.h tab. Locate the section “Delta Settings” and the line #define DELTA_DIAGONAL_ROD. Measure the distance of your diagonal rods. It should measure 214 mm between the center of the 2 holes on each end. If it’s not 214 mm then change this value to your measurement. If you’ve build them accurately, which you should have, then they would all be the same length.

Gently move the spider to the very top until it hits the endstops on all 3 legs. Measure the distance between the tip of your hotend and the surface of the bed. Now find the variable #define MANUAL_Z_HOME_POS in configuration.h and change the value to the height of your machine (in mm).

Hook up a standard USB cable to the electronics.
RAMPS electronics only: Select the Arduino MEGA board in Tools => Boards.
Then upload the custom firmware by clicking Upload. The software will check your code for errors, and then upload it to the board. Every time you make a change you need to re-upload the firmware this way. Remember that it’s not real-time so the printer must not be printing when you upload new firmware.

Some led’s will start blinking during the upload if all goes well. When they stop and the software says that the upload is done you’re ready to get it to do something.

Checking basic functionality

PronterfaceScreen1

Connect the printer to your computer and start Pronterface. The screen should look similar this picture.

There are 3 main areas/buttons.
  1. This is where you can do almost everything. It’s basicly a direct communication to and from your printer.
  2. This is the home button. It’s a quick shortcut to get your printer to it’s start position.
  3. This is the height control of your printer, known as Z-height or Z-axis.
As I said, number 1 is the place to be. You printer is controlled using Gcode. It’s a semi-universal language for CNC machines and now altered for 3D printers. Gcode is just text and consists of simple 3-4 digit codes to make it do something.

For a list of available Gcodes look here.

A typical piece of GCode as sent to a 3D printer might look like this:
G28
G92
G1 X10 Y50 Z0 F3000
Let’s just begin using them and it will become clear what they mean.
Check that the connection speed (top row) is similar the the setting in your configuration.h, normally 250000 and that you have selected the USB port where the printer is attached. Hit Connect and you should see the spiral thing lite up and see some text scroll in the righthand window. You are now connected to your printer. Getting anxious yet?

Go to the console area (at number 1 in the picture). Type M119 and hit enter (all commands are followed by enter). This command returns the status of the endstops. If you printer is not touching any of the endstops then the result should be ‘open’ on all endstops. Now hold down one of the endstops and do a M119 again. One of the results should be ‘TRIGGERED”. Repeat for the other 2 endstops and the Z-probe. The Z-probe switch should behave exactly the opposite.

If the endstops do not respond at all check your wiring and check with a multimeter if the switch is working. Check that it’s plugged in the board correctly. If they do respond but report “open” when triggered and “TRIGGERED” when the’re not, switch the wiring on the switch.

If the endstops work OK enter G28 in the console. This is the command to home the printer and is the same as hitting button no. 2 in the picture. The spider (the moving part of the printer) should now go up, hit the endstops twice and stay there. If it doesn’t stop, kill the power as fast as possible and check your endstops again! If a motor is going down instead of up, check the wiring of that motor and match it to the others.

Wow, that’s the sweat-in-your-hands part. If this works you’re halfway there.
Now, type G1 X0 Y0 Z100 in the console. The spider should now move straight down till about 10 cm from the bed.

Here’s the explanation about this Gcode command. G1 means doing a controlled movement. X0 & Y0 are coordinates on the X and Y plane (in this case dead center) and Z100 is the height from the surface of the bed (Z0 is almost touching the bed).

Now make it move 10 mm down by increasing the Z height (G1 Xo  Y0 Z110). If the difference is indeed 10 mm then you’re doing great. If not, increase or decrease

the DEFAULT_AXIS_STEPS_PER_UNIT value and repeat these steps until you get it right. Always start with a G28!

You can play around a bit by giving it some coordinates like G1 X70 Y-50 or G1 X0 Y80.

Now the last thing to set-up is the extruder. Disconnect the bowden tube from the extruder if you already had it on there. Run some filament through it until it comes out the end where the bowden normally is.

Now give the command G92 (sets the extruder to 0) followed by G1 E10 F1000. This tells the extruder to put out 10mm of plastic (the F1000 is to set a specific speed, otherwise it is way to slow).

Now measure the amount that has actually come out. If it is too short then increase the last value in the line #define DEFAULT_AXIS_STEPS_PER_UNIT   {100, 100, 100, 450} in Configuration.h. If you have to much plastic decrease the number. Be very precise here!

If this all works then proceed with the actual calibration.