Tuesday, April 29, 2014

How to calibrate the Extruder on your 3d Printer

How to calibrate the Extruder on your 3d Printer

Mark a 100mm segment on the filament.  This can easily be achieved with a 100mm length of drinking straw or a steady hand.  Take note whether the top or bottom of the mark signifies the correct length.

Mark the filament at the top of the extruder and measure the difference between the two marks [This may require pushing the up arrow to reverse your extruder]. If the original mark you made is lined up with the top of the extruder, 
Create a ratio from the expected extrusion length [100mm] and the actual extrusion length [105.03mm].

(expected length) x steps = (actual length) x new steps   

We know three of these numbers so we can easily solve for the new steps.  This will tell us the amount of steps the extruder must actually take in order to extrude 1mm.  We extrude 100mm for the test because the greater length amplifies the minute error. 

A simpler form of the ratio is New steps=  (100*113.68)/105.03

New Steps=107.958

Clean up the mess from the extruder.  And re-assemble your printer  
If you followed these steps correctly you should be producing much better prints. As you can see below the extra 5mm measured makes a tremendous difference. If you were to repeat these instructions from step one you should get no leftover extrusion when you extrude 100mm. 

Wednesday, March 5, 2014

Demo VDO Repetier 0.91 on ramps v1.4 with LCD+SD


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.

Delta Configuration

Configuration.h

Here a list of the most common variables that you may need to edit in configuration.h

#define BAUDRATE 250000
Sets the communication speed to the Arduino. 250000 is good but if you have troubles lower it to115200.

#define DELTA
Tells the firmware we’re dealing with a Delta and not a Cartesian model.

#define DELTA_SEGMENTS_PER_SECOND
You can’t make a true circle, all circles are actually segments of small straight lines. This sets how many of these segments can be calculted. Higher is better but an Arduino doesn’t have the processing power to calculate it all so 200 is a good balance.

#define DELTA_DIAGONAL_ROD
Indicates how long the arms are from hole to hole . In my case, 214 mm.

#define DELTA_RADIUS
Displays the curvature correction of the print head. Too large leads to cupping, too small makes the printer think that the printing surface is a mountain peak. This value is made up of

DELTA_SMOOTH_ROD_OFFSET , DELTA_EFFECTOR_OFFSET and DELTA_CARRIAGE_OFFSET.

If you want adjust the DELTA_RADIUS then alter DELTA_SMOOTH_ROD_OFFSET. The autoleveler calculates this more accurately.

#define TEMP_SENSOR_1
Sets what type of sensor is in the hot-end. Choose the one that comes with your hotend . Most thermistors will work with option 1. The rest can be set to 0 since we have only one sensor.

#define TEMP_HYSTERESIS
Sets how much the measured temperature value may deviate from the reference value. Default is 3.

#define HEATER_MAXTEMP
Sets the maximum temperature for the hot end. Be careful going over  245 degrees Celsius because
above this the Teflon liner will smoke and it emits toxic fumes.

#define EXTRUDE_MINTEMP
Sets the minimum hotend temperature before the extruder may start supplying plastic. The extruder will not work below this temperature as a safety funtion. You can disable this for testing but be careful.

#define ENDSTOPPULLUPS
Sets the internal pull-up resistor so the firmware can read the switch.

Const bool X_MIN_ENDSTOP_INVERTING
Sets the normal state of a switch. So if it should be reported as triggered if it’s pressed or when it’s not pressed.

#define X_HOME_DIR 1
Sets the location of the endstop. 1 is at the top, -1 at the bottom

#define X_MAX_POS 90
Sets the range of your buildplatform, in this case from 90 to -90 which is 180mm of movement. The printbed is off course 170 mm but this little overhead is needed to be able to print ‘over the edge’ and to reach the probe retract position if this is not a separate raised point.

#define Z_MIN_POS
This tells the printer it can go 30mm under the printbed. This is also for the retract position if this is not a separate raised point.

#define MANUAL_X_HOME_POS
Sets the total height of the printer. Just measure it from the tip of the hotend to the printbed surface. The autolevel feature will adjust this setting somewhat to make the surface flat for the firmware. Be aware, it will not move to a value higher than this so if the autolevel needs to be lower than this it will not work. Better to measure from the tip of the retracted probepoint to the surface and add an extra cm.

#define AUTOLEVEL_GRID
Sets the distance between the measuring points during autoleveling.

#define HOMING_FEEDRATE
Sets how fast the printer returns to the home position , in mm / min.

#define Z_PROBE_OFFSET
This is the setting that you will change the most. This sets how far the tip of the probe is below the tip of the hotend when in it’s extended position.

#define DEFAULT_AXIS_STEPS_PER_UNIT
Sets how many steps the stepper motor must make to move the platform 1 mm. On http://calculator.josefprusa.cz/ # MotorStuffSPMB you can calculate how much it must be for your printer . The suggested motors with 1.8 degrees per step , control with 1/16 microstepping , 16 teeth on the pulley and GT2 belt will give you 100 steps. If you have 20 teeth, then it’s 80 steps etc. You may need to adjust this value so your printer will print the correct size . The extruder is more difficult to calculate but it’s easy to test. In PrintRun give the command to extrude. For example 10mm. Then just measure how much comes out . Be very precise!

#define DEFAULT_MAX_FEEDRATE
Sets the maximum speed at which the plastic can be extruded.

#define DEFAULT_MAX_ACCELERATION
Sets how fast movements may be performed in mm/sec.

#define DEFAULT_RETRACT_ACCELERATION
Sets how fast the filament may be retracted to prevent stringing.

Calibration

Calibration

Here comes the fun part…. not. This is normally the part where most of your time is spent and frustration is build up. On my original Rostock it took me numerous evenings (and parts of the night) to get decent results. The Kossel took me about an hour or so and gave way better results. Here goes…

Open Pronterface and connect to the printer.

First home the printer using the G28 command. Now make it go down by giving the G1 X0 Y0 Z10 command. This should position the tip of the hotend about 1cm from the bed. Gently move the head further down by decreasing the Z value. So give go to Z5 (5mm from bed) to Z1 (1mm). Now be careful. Your hanging very close to the bed. Put a piece of normal paper under the tip of the hotend. Gently bring it down until in just touches the paper. You should be able to still move the paper and lightly feel some resistance from the hotend. If you can’t move the paper you’ve gone to far. Increase the number and try again.

If you’ve gone to Z0 and the tip is still to far from the paper then you need to increase the #define MANUAL_Z_HOME_POS value in configuration.h, re-upload the firmware and try again.
You can not use Pronterface and the Arduino program at the same time. So if your connected to your printer with Printerface and want to make an adjustment then first disconnect before you start an upload. After the upload is done, reconnect in Pronterface.
So now you’re barely above the surface at Z0 in the center. Great! But when you would go to another location you wil probably float way above the surface or try to bury through it. Here’s where the auto-level comes in.

First give the G28 command to home the printer. The command to do an auto-level is G29. There is one initial catch. When you issue a G29, it will first go to a position near the back leg and then moves sideways. This action is to deploy the probe (the Allen key on the platform) by gently pushing the angled part of the Allen key against the belt until it clicks into place.

You’re Allen key is probably to short to reach that so you need to lengthen it. I used a piece of heatshrink to make it longer. If you do a G29 and your probe is not correctly deployed it will keep going down and slam into the bed. So if it doesn’t click into the position and the head starts to go down, cut the power immediately. Make it so that it will click into position every time you run it.

If this process is going well then let it go down and probe the surface. It will go to various positions and each time lower the tip until it touches the surface and triggers the switch. At the end of that it will move up and go to a position in the far left corner and lower itself again. This is the point where it tries to retract the tip again. You will want to place a screw there or print something like this to make it retract automatically.

If for some reason this position is not OK for you then you can change it in the marlin_main.cpp file. Find void retract_z_probe() and just below that line there are these lines:

destination[X_AXIS] = -55;
destination[Y_AXIS] = 63;
destination[Z_AXIS] = 30;

These are the coordinates where it should go to for retracting the probe. If you need it to go lower or higher than change destination[Z_AXIS] = current_position[Z_AXIS] - 20 to a higher or lower number. After your done, re-upload the firmware and test it until you’re happy.

Now the last part. As you can see, there is a distance between the tip of the hotend and the tip of the deployed probe. This distance should be as accurate as possible.

A simple way to determine it is doing the following. First start with an actual measurement. Open Configuration.h in the Arduino program and locate the line:
#define Z_PROBE_OFFSET {0, 16, -2.45, 0}

There are 4 sets of numers in there. The first (0 in the example) is the X offset, the second is the Y offset, the third is the Z offset and the last is for the extruder and should always be 0. What does this mean. You need to tell the firmware how far the tip of the deployed probe is removed from the tip of the hotend. In most cases the X offset will be 0 meaning that the probe is directly behind the hotend.

The Y value will probably be OK but check it anyway. This should be how far behind the tip is from the hotend center. Off course it’s important but not crucial to know this to 1/10th of a mm. The third however is very important. This is the height difference (Z offset) between the probe and the hotend.

The easiest way to get this accurate is to do the following procedure:
  • G28 to home the printer
  • G29 to auto-level
  • G1 X0 Y0 Z5 to go to center and 5mm above the bed
  • Place a piece of paper under the hotend
  • Gently lower the hotend by decreasing the Z value in steps to 0 (G1 X0 Y0 Z0)
If the hotend hits the bed before it reaches 0 then increase the value in the firmware by the height you have left and try again.

If the hotend isn’t low enough at Z0 then decrease the number. Repeat this until you can just move the paper and feel a slight drag from the hotend.

When you’re done with this than the hard part is over! This may sound like a lot of work but it’s really quite easy and way less then traditional calibrating.

Now your ready to actually print something!