Airtripper's 3D Printer and Arduino Blog » 3D Printer Calibration http://airtripper.com 3D Printer usage and modifications plus Arduino powered electronic projects and 3D Printing designs. Fri, 09 May 2014 01:20:57 +0000 en-US hourly 1 http://wordpress.org/?v=3.8.3 3D Printer Filament & Slicer Profile Handling and Trackinghttp://airtripper.com/1880/3d-printer-filament-slicer-profile-handling-and-tracking/?utm_source=rss&utm_medium=rss&utm_campaign=3d-printer-filament-slicer-profile-handling-and-tracking http://airtripper.com/1880/3d-printer-filament-slicer-profile-handling-and-tracking/#comments Fri, 09 May 2014 01:11:41 +0000 http://airtripper.com/?p=1880 After owning and using a 3d printer for more than a couple of years, you might have a collection of filament of different types, colours and suppliers. You will have notice that, even if you only use one type of filament,such PLA, the same g-code file does not always transfer reliably to another similar reel of filament. So, after calibrating a new reel of filament, how do you keep track of filament with associated g-code? One method is described below.

Different Black Filament 3D Printed with Same G-code

Different black filament 3d printed with same g-code produced different results.

Unfortunately, we’re not at the point where you can receive delivery of new filament, drop it straight in to the 3d printer, and press print, without the need of any sort of calibration. You might get close to a drop in filament if you are able to repeat order the same filament, but even then, some calibration might still be needed on the occasional reel.

Before loading new filament into the 3d printer, the filament diameter is usually the first thing that needs to be checked, and then updated in the slicer software profile if necessary. After evaluating the first test print of new filament, other slicer profile changes may also be necessary to get a good 3d print.

As soon as you start editing the slicer software profile, you are creating a new profile for a new reel of filament. This new profile will need some way to be associated to the new reel of filament while also preserving the original slicer profile for existing filament.

Matching Filament To Slicer Profile & G-code Files

I print mostly from SD Card and for some time I already use some sort of system to match filament with slicer profile and g-code files. I basically name each reel of filament a unique code, and then the same code is used in computer file and folder names to associate slicer profile and g-code files with the filament.

So if I’m looking to print a 3d model directly from the 3d printer SD Card, I select the folder of the model through the 3d printer control interface, I will then be presented with a list of folders that are named with the filament reel codes. Straight away I know which filament the g-code is calibrated for. All I need to do now is select the folder that shares the same code name as the filament I want to use; the g-code used for printing the model would be found in this folder.

Identification Code On Filament Reels

I’ve refined the coding system I’ve been using for the benefit of this article and you can use it as it is or adapt it to your own needs, at the very least I hope it provides some inspiration. When considering a version of a code you want to use, keep the code length to no more than eight digits to suit SD Cards to maintain readability through the 3d printer control interface.

Basically, each reel of filament would have this code writen on the supplier’s label stuck on the side of the reel. At the minimum, when your new order of filament arrives from the supplier, you write on each reel of filament the 2 letter colour code, the 1 digit year code, and the 1 digit month code. If you get two reels of filament of the same colour within the same month, you can add an index code to the final code so that the code remains unique for each identical reel.

The table below gives a quick look at how the code is made up, and with a bit of practice, you’ll probably be able to work with the code without referring to the table too much.

Filament Reel Identification Code Table

Filament Reel Identification Code Table

Colour

This is a two letter colour abbreviation, it’s not a complete list in the table above, more examples can be found on the internet. You are likely to remember most of these codes once you start using them.

Year

I’m assuming the lifespan of filament would not normally exceed ten years, so I’m using only a single digit that is taken from the last digit of the year which will role over every ten years. So, year 2014 will be the single digit 4 on so on.

Month

Month is a single digit to save space, so months 10,11 and 12 will be A, B and C respectively. If you don’t need to use the optional codes, you code use a two digit month in the final code instead.

Index / Reel Number

I’ve marked this down as optional, which would be true for those people who don’t buy a lot of filament. For those who buy many reels of filament a year, the index field is likely to be essential. If you buy many reels of filament of the same colour in the same month, then the reels will share the same code, this is where you need to add an index to the code to make the final code unique for each reel.

This is a single digit field and you can use either numbers or letters depending on the index range you want.

Material

I’ve added a few common types of filament in the code table. Adding this field to the final code might be useful to those who stock up with different types of filament. When looking through the computer file system, I think it will be useful to be able to quickly associate slicer profile files to material types without physically checking filament reels. This is a two digit code, and it will be up to you how you abbreviate the different material types.

Type

This field can be optional and is basically used to identify filament with special attributes. You would use this field for the same reason as for material, to quickly associate the final code to a filament without physically checking reels of filament. The code for this field is single digit, and how you abbreviate the type is up to you.

Saving Filament Slicer Profile Files & G-code Files

A structured file system is needed to make the filament reel identification code to work well, and keeping it simple will make it easy to work with and to remember the structure when adding new files and folders. The functions of the files and folders are explained below in detail with reference to the following example file tree illustration below.

3D Printer 3D Models & G-code File Tree

3D Printer 3D Models & G-code File Tree

3dprint – This is the name I’ve chosen to identify the root of my 3d printer file system. It holds all of the model files, slicer profile files, STL files and G-code files. This folder marks the start of your 3d model files backup, simply drag and drop this folder onto a USB storage device.

Community, Own – Basically, I would have 3d models I’ve created myself and 3d models I’ve downloaded from sharing sites such as thingiverse. Any 3d models I’ve uploaded for sharing, I copy a snap shot from the own folder to the community folder. Community and Own folders are for storing 3d model folders.

airtripper-extruder-v3-bsp – This is the model folder level which contains a number of other files and folders. This folder can be a long descriptive name that best identifies the 3d model it contains. The model folder contains the model files and the STL files saved from the 3d modelling software, also the slicer profile files are saved here also.

BK440PL.ini, BK440PL-idler.ini – Slicer profile file names come from the filament reel code they’ve been set up against. By reading the slicer profile file name, you will know which reel of filament it belongs to. Where you have a group of model parts in one model folder, you might need a slicer profile for a particular part for it to print correctly. BK440PL-idler.ini has the model name included in the file name to show which model part needs its own profile.

In the example file tree illustration, the slicer profiles are stored with the STL and model files, you might fined it more convenient to store the slicer profile files with the g-code files instead. Keeping an ideal slicer profile template with the STL files could be an option.

air-bsp – While long file and folder names are perfectly acceptable on SD Cards, long names may not be readable through the 3d printer control interface. The folder air-bsp, and its contents, would be copied to the 3d printer SD Card. Using the old dos operating system 8.3 file name format would ensure that the file names are readable and not truncated through the 3d printer control interface. However, you might get away with idler.gcode instead of using idler.gco, which will be more convenient when saving g-code files using the Cura Slicer.

If you don’t print from SD Card at all, you don’t need the air-bsp folder level and you can have its content within the main model folder instead. The folder name air-bsp is just short for airtripper-extruder-v3-bsp and is still identifiable on the SD Card when it comes to searching for it.

G-code start section of the Cura slicer profile.

Some filament characteristics edited into the g-code start section of the Cura slicer profile

BK440PL, BL3B0PL and RD440PL – These folders hold the g-code files used for 3d printing. The folder names are taken from the identification code that the filament was assigned. The folder names tell you which reel of filament the g-code files have been compiled against. You would have a set of g-code files for each reel of filament.

On Closing

Once you start using a system like this you will start to create new kinds of data. You will begin to use slicer profile templates for similar model designs and for a particular type of filament. Some filament characteristics can be noted in the slicer profile start g-code section in the slicer software as a reminder of why a particular set-up was used, and you’ll want to keep slicer profiles even when the filament it was associated to has long since run out. You would certainly want keep the slicer profile files that helped get the most problematic filament to print correctly.

I’m sure I’m not the only one using a system similar to this, so if you have any suggestions on how to improve this one, or you have a system to top it, please share in the comment section below.

[bodyadsrich1l]

Related Articles

Marlin Firmware v1, Basic Configuration Set-up Guide

3d printer Filament & Slicer Profile Handling and Tracking.

]]>
http://airtripper.com/1880/3d-printer-filament-slicer-profile-handling-and-tracking/feed/ 0
Marlin Firmware Home Offset Guide Using G-code M206http://airtripper.com/1799/marlin-firmware-home-offset-guide-using-g-code-m206/?utm_source=rss&utm_medium=rss&utm_campaign=marlin-firmware-home-offset-guide-using-g-code-m206 http://airtripper.com/1799/marlin-firmware-home-offset-guide-using-g-code-m206/#comments Thu, 27 Mar 2014 01:43:46 +0000 http://airtripper.com/?p=1799 This is a guide to using g-code command M206 to set the Z axis home offset in the Marlin Firmware, a guide to a method of adjusting the gap distance between the hot end nozzle and the build platform. To set the Z axis home offset on the 3d printer, you will use g-code commands including M206 for the home offset, M500 and M501 for the Marlin Firmware EEPROM feature, and G1 for controlled move to Z axis zero position.

Set Gap Between Nozzle And Bed Using G-Code, EEPROM & Marlin Firmware

Set Gap Between Nozzle And Bed Using G-Code, EEPROM & Marlin Firmware

About

Firstly, this guide may not be suitable for all 3d printers, probably those printers that are the delta type and those with the auto bed levelling feature. Apart from that, for this guide to work for you, you will need a 3d printer configured with a Z+ end stop.

On a lot of 3d printer set-ups, the gap between the nozzle tip and the build platform surface is just a fraction of a millimetre, so it does not take much to upset the gap distance. Things like levelling the build platform, changing the hot end nozzle and using different filament types can cause the first layer height to be out of calibration.

Usually, as accurately as possible, you would only adjust the final travel limit for Z axis in the Marlin Firmware, then upload the firmware to the controller motherboard. However, if adjustments are going to be made more often, it would be more convenient to adjust the final travel limit using the home offset feature.

The guide will explain a method of applying an offset to the Z axis to extend the maximum travel limit, initially set in the Marlin Firmware, using Pronterface. A combination of g-codes will be used through Pronterface so that the home offset can be set, saved and tested. An initial edit in the Marlin Firmware configuration.h file is required, but beyond that, you would only need to change the home offset value to change the gap distance between the hot end nozzle and the 3d printer build platform.

3D Printer Axis Crash Caution

3D Printer Axis Crash Caution – Axis crash is possible with manual jog when software end-stops are disabled

Removed Safeguards – Important

This guide, an extension to the Marlin Firmware v1, Basic Configuration Set-up Guide, covers editing the Marlin Firmware configuration.h file to enable EEPROM support and to disable software end-stops, and as a result of editing the configuration file, it will be important to note that some operational safeguards will be disabled; it will be possible to manually jog an axis beyond its travel limits, probably resulting in an axis crash and possibly causing damage. Accidentally pressing the 100mm jog button instead of the 10mm jog button, is an example of what could cause a 3d printer axis crash; this would normally be prevented by enabled software end-stops. Attempting to print models outside the physical print area could also cause an axis crash also.

Only use this method to set home offset, as described in this guide, if the users of your 3d printer are aware of the manual jog limits and the risk of crashing an axis when exceeding the limits. It would be recommended to include axis homing to the g-code compiler start file so that homing is automatically applied to the model g-code files at compile time. It would be good practice to manually home the 3d printer, using the printer interface such as Cura or a printer control interface, before starting each print.

Marlin Firmware Configuration

If you are attempting to configure the Marlin Firmware for the first time you will need to head over to the Marlin Firmware set-up guide here to get started with the basics.

It’s basically going to be a quick edit of the  Configuration.h before we get started with the main guide to configuring the home offset. Use the Arduino IDE search tool to quickly find the lines of code needed for editing.

3D Printer Marlin Firmware & Home Offset Set-up Example

3D Printer Marlin Firmware & Home Offset Set-up Example

Disable Software End-Stops

To configure the home offset successfully, we’ll need to be able to travel beyond the fixed travel limits set in the Marlin Firmware. When software end-stops are enabled, the home offset will not work outside the axis travel limits. If we want the axis to travel to maximum position plus home offset, we will need to disable software end-stops.

#define min_software_endstops false
#define max_software_endstops false

Software end-stops are enabled by default. To disable software end-stops, find the above lines of code in Marlin Firmware Configuration.h file and set each line to false as shown.

Enable EEPROM Suport

After setting the Z axis home offset on the 3d printer, we want to store the setting in EEPROM so that the home offset value we want to use is available automatically when the printer is started.

#define EEPROM_SETTINGS
#define EEPROM_CHITCHAT

To enable EEPROM support in the Marlin Firmware, uncomment the above code snippets by removing the  forward slashes at the start of each line of code.

Travel Limits After Homing

Ideally, we want to set a maximum travel limit that stops the hot end a good safe distance above the build platform with home offset set to zero, and then fill the gap between the nozzle and the build platform with home offset. If you change the build platform thickness by adding a glass surface for PLA and then remove glass surface for ABS, you will have to allow for the thickness of the glass also. A guide to clearing the current home off set is included further down this article.

#define Z_MAX_POS 80

Normally, you will only need to change the value for Z_MAX_POS; just edit the above line of code to the maximum travel limit you want to set for your 3d printer. On my 3d printer for example, I have around 90mm of travel on the Z axis, as shown in the above code, I’ve set the Z_MAX_POS to 80, that leaves around 10mm to play with when setting the home offset.

Marlin Firmware Home Offset Guide

Some Preparation

After the Marlin Firmware is configured as above, the build platform needs to be levelled before attempting to set the Z axis home offset. You will need to be prepared to fine tune the final offset measurement while the hot end and the heated build platform are up to working temperature. You can practice setting the home offset while the 3d printer is cold, this will avoid trial and error while the nozzle is hot and not extruding for long length of time.

Pronterface - 3D Printer Interface Software

Pronterface – 3D Printer Interface Software

Setting home offset and storing to EEPROM is done through the 3d printer interface software such as Cura and Pronterface. Both Cura and Pronterface have a terminal interface that allow the user to send g-code commands to the Marlin Firmware. For this guide, Pronterface will be used because manual jog controls and terminal are in the same application window for convenience.

Terminal inputs may be case sensitive in some 3d printer software interfaces, if you get an error or no response in the terminal feedback window, check that you are typing upper-case g-code commands.

Setting & Testing Home Offset

Quick Brief

There are seven steps to follow in this guide, first two steps will be to check and clear existing offset for the Z axis, followed by five steps to set and test new home offset. If you are using the Marlin Firmware home offset feature for the first time, please be sure to read through the whole guide first before changing any settings.

The guide describes a set-up that is similar to my 3d printer only, so the Z axis measurements used in this guide are there as a set-up example and not meant to be copied for use in other 3d printer set-ups. If you’ve read the guide in full, you’ll have an idea of what measurements to use on your 3d printer to set your own home offset.

Checking & Clearing Existing Home Offset

Saving a new home offset setting will replace a previously saved offset in EEPROM, so if you’re using a 3d printer you’re not familiar with, avoid unexpected results by first checking for existing offset setting. The next two steps will help to discover and clear an existing offset.

Step 1. This is a simple check to see if an offset has been set.

Check Current Home Offset Setting Stored In EEPROM

Check Current Home Offset Setting Stored In EEPROM

  1. Not an essential step to clearing home offset, put the 3d printer in a safe position by homing each axis after powering up the printer.
  2. Enter the g-code M501 in the terminal interface text box.
  3. Press the send button to send the g-code to the 3d printer.
  4. Data stored in EEPROM is then read to the terminal window. Look for the line with M206 to find the current Z axis home offset.

Step 2. You can fine tune existing offset by jumping to later steps, or you can start a fresh by setting offset to Zero.

Step 2 - Clear Existing 3D Printer Z Axis Home Offset

Step 2 – Clear Existing 3D Printer Z Axis Home Offset

  1. An illustration of what an existing home offset looks like, which can be compromised after build platform re-levelling.
  2. Clear the current Z axis home offset by sending g-code M206 Z0 through the terminal; we set the Z axis home offset to zero.
  3. Save the new home offset to EEPROM by sending g-code M500.
  4. Confirm that the new offset was saved to EEPROM by sending g-code M501.
  5. An illustration of what zero home offset looks like, the 3d printer should be homed after home offset changes.

Setting The Initial Home Offset – 3D Printer Cold

This part of the guide describes setting up an initial home offset while the printer is cold. Basically, we are setting a new offset that will be a centimetre or two short of what we need, we will get the hot end nozzle close to the build platform while the printer is cold. Then, later in this guide, we heat up the 3d printer for fine tuning the final offset.

Step 3. We prepare the printer for the next step so that an initial offset can be measured.

Step 3 - Test Z Axis Height & Z Travel Distance

Step 3 – Test Z Axis Height & Z Travel Distance

  1. First, home the 3d printer. The illustration shows that Z_MAX_POS is much less than Z axis physical travel distance, this should give us room to set an offset.
  2. Send the Z axis to the zero position by sending g-code G1 Z0 through the 3d printer software interface terminal.
  3. The Z axis should now be positioned at zero. We are now ready to measure the initial offset in the next step.

Step 4. So, moving forward from Step 3. c, we are now going to set a rough home offset value with the 3d printer cold, no heaters switched on. If you are just fine tuning the final home offset value,  you could probably skip to Step 5.

If you have a mirrored or glass build platform, slide a sheet of paper over the platform to avoid hot end nozzle reflection that can make you think the gap between the nozzle and platform is bigger than it actually is. If you prefer, centre X and Y axis over the build platform before measuring the gap between hot end nozzle and build platform.

Step 4 - Set New Home Offset For Z Axis

Step 4 – Set New Home Offset For Z Axis

  1. With the Z axis at zero position, as in Step 3. c, use the Z axis manual jog control to bring the hot end nozzle closer to the build platform in 1mm steps. Keep a count of how many 1mm steps, and stop when you get the nozzle about 1 to 2mm away from the platform. Make a note of the total of 1mm steps made for the home offset value. If fitted, the 3d printer LCD control interface will show Z as a negative number; this can be used as the home offset value, with the value changed to positive.
  2. The 3d printer build platform and nozzle is about a millimetre or two apart and we now know the initial offset value we want to start with. For my 3d printer, the initial home offset will be 8mm; because I allowed about 10mm for home offset when setting Z_MAX_POS in the Marlin firmware.
  3. We save the initial offset value to EEPROM, send the new offset value, using the g-code command M206 Z8, through the terminal; setting 8mm as the new home offset.
  4. Immediately save the new offset to EEPROM by sending the g-code M500.
  5. Check that the new offset was saved to EEPROM by sending g-code M501. Look for the line with M206 in it.
  6. With the offset now added and saved to EEPROM, -8 position becomes the new zero position, giving the Z axis a total of 88mm of travel, as the case with my 3d printer. The offset will be updated after homing the Z axis, in the next step.

Step 5. A new home offset value has been saved to EEPROM, and confirmed. Now it’s time to mechanically test the new offset before moving on to fine tuning. The 3d printer is still cold at this point, however, the build platform can be preheated now if preferred, especially if the platform takes a long time to heat up.

Step 5 - Test New Home Offset Setting

Step 5 – Test New Home Offset Setting

  1. To avoid disturbing the X and Y axis centred over the build platform, using the 3d printer software jog controls, home only the Z axis. When the Z axis is at the end stop, the gap between the hot end nozzle and the platform should be slightly more than both Z_MAX_POS and home offset added together.
  2. If the measurements check out as above, then it should be safe to send the Z axis to zero position, send the g-code command G1 Z0 through the terminal.
  3. The 3d printer Z axis should now be at zero position, leaving a millimetre or two gap between the hot end nozzle the the build platform as expected.

Fine Tuning The Initial Home Offset – 3D Printer Hot

Step 6. If you are jumping straight into fine tuning, you need to start from step 5. Right, we’re on to fine tuning the home offset now. This is were you need to be careful, because it is recommended to have the hot end and the build platform at working temperatures while setting the first layer height or gap between the nozzle and platform.

I use A4 photocopy or printer paper as a gap feeler for setting the gap between the nozzle and the platform. You may need to cut the A4 sheet to fit inside the printer, but have the sheet at a size so that it can be handled and positioned while avoiding hands and fingers touching the hottest parts of the 3d printer.

Step 6 - Fine Tune Existing Home Offset Setting

Step 6 – Fine Tune Existing Home Offset Setting

  1. Use the -Z axis jog control to fine tune the ideal offset, get the nozzle close enough to the platform to lightly grab the A4 sheet of paper. Keep a count of each jog move size for totalling later.
  2. Using the A4 sheet as a feeler gauge, in the case of my 3d printer example, the jog moves total is 2.5mm. This would show as -2.5 on the 3d printer LCD.
  3. An offset has already been saved to EEPROM, so we need to add 2.5mm to the existing offset, this would make the total home offset value 10.5mm. Send g-code M206 Z10.5 through the terminal.
  4. Store the new offset by immediately sending g-code M500.
  5. Check that the offset has been saved by sending g-code M501.
  6. After homing the 3d printer again, the Z axis will be updated, and the -2.5 position will become the new zero position. Go to step 7 to test the new settings.

Part 7. By now, the home offset should be ready for the first 3d print test, all we need to do now is test the offset setting, like in step 5, just to confirm we are ready to go. Once the following test is complete, home the 3d printer, and switch off the heated bed and the hot end nozzle heater.

Step 7 - Test Final Home Offset Setting

Step 7 – Test Final Home Offset Setting

  1. Home the 3d printer. The illustration shows how the settings look. The 3d printer LCD would show 90.5 at Z+.
  2. If you have set the home offset carefully, and there is no risk of a Z axis crash, send g-code G1 Z0.
  3. The hot end nozzle should now be A4 paper thickness away from the platform. Congratulations, home offset set.

Closing Notes

I hope you found this guide useful, A lot of care was made to avoid mistakes, but if you find any please let me know.

The graphical illustrations should provide a quick guide for return visits to jog the memory when needing to set a new home offset. If you are feeling confident and you find the 3d printer interface software jog controls don’t give you enough fine tuning, use the G1 controlled move command.

[bodyadsrich1l]

Related Articles

Marlin Firmware v1, Basic Configuration Set-up Guide

Marlin Firmware Home Offset Guide Using G-code M206

]]>
http://airtripper.com/1799/marlin-firmware-home-offset-guide-using-g-code-m206/feed/ 3