Z axis, hotend nozzle offset in Marlin, explained

I aim these posts for those whom has very little or no experience in setting up a DIY 3d printer. However, the information might help more experienced builders as well.

Marlin is the most popular open source control software, designed to run 3d printers and in some cases other type of CNC machines.

One of the tasks during a DIY 3D printer build, is setting correctly the Z axis offset.

DIY I3 3d Printer

My DIY I3 3d Printer

What is the Z Axis offset and why is it important? 

In order for the software ” to know” where the hotend nozzle is positioned at, we have to pre-set the dimensions of the work space of the machine. The printer uses three on-off momentary switches – with the help of the control board – to let the software to interact with the physical world. When a switch is triggered, using the preset known dimensions, Marlin can calculate any desired position of the print head.

In the case of the Z axis or extruder nozzle offset, we only concerned about one of these three switches.

This particular switch can have a few variations, but in regards of the process of setting the offset, it is irrelevant which solution we are using. However for the sake of the article here are two of the most used conventional Z axis switches:

  • Mechanical momentary on-off switch
  • Electromagnetic or inductive (metal detecting) switch

and a couple of less conventional

Currently, I am using an inductive switch with my present set up.

When we talk about the offset, we mean the physical (vertical) distance between the tip of the nozzle at the point where the Z axis switch being triggered (called “zero” or home position) and the surface of the print bed. The offset distance is important for accurately starting our print`s first layer deposition. This is also one of the important factors for ensuring proper adhesion of the molten filament and the fabricated object to the print bed.

Hotend designs have a wide variation, it is important to understand the process of setting this attribute as accurately as possible, according to your needs. Especially if you plan to use various hotends or would like to design your own.

Hotend Assembly

Hotend nozzle and inductive switch

Different switches have different trigger points, usually measured from the surface of the printer bed. This distance is not important in relation of the process of setting the offset, however – along with the position of the switch (sensor) – it has an effect on the value of the offset. A perfect design would be, where the offset is zero, i.e. the trigger point is exactly where the nozzle would touch the bed. In reality, that is quite difficult to achieve.

The first layer of our print is usually between 0.1 mm-0.3mm, therefore to keep accuracy as tight as possible, it is good practice to use hotends where the required offset is not greater than 4 mm.

Setting or fine tuning the offset in Marlin:

To determine the required value for setting the offset, a combination of control mechanisms can be used.

A smart LCD control panel makes the process easier. This allows you to make changes in the printer set up by saving the attributes into the RAMPS or MKS board`s (or any Arduino Mega based control boards) EPROM.  This is a very easy way to change most settings and to move the print head without using G-code commands. However, using a software based console/ serial monitor is still necessary.

I3 DIY printer

Smart LCD control

You can use software based control solutions, such as the console panel of most slicers (Slic3r, Repetier, etc)  or an Octopi.

I prefer to use the Arduino IDE serial monitor.

The touch screen which are often supplied with cheap Chinese kits are not suitable for the process described below.

It is advisable to get familiar with Marvin, if you want to make eg. the offset changes permanent. Besides, during an initial set up of a DIY printer, the builder has to configure the Vanilla Marvin according to the built printer. A very good source of information can be found on Marlin`s own website. Most commercial DIY kits would have their own version supplied with the kit, ready to be uploaded onto the control board.

The Process of determining the accurate offset value

  1. Set the current offset value to zero; LCD navigation “Control> Motion> Probe Z offs” or typing “M851 Z0” in the serial monitor – This will help us to easily measure the desired accurate value of it.
  2. Home your printer head; LCD navigation “Prepare> Auto home” or typing the “G28” command in the serial monitor. – This will move the nozzle to “home” or “zero” position, which means that, because at the moment the offset set to zero, the machine “thinks” that the nozzle is touching the print bed (which in reality most likely is above the print bed by a few millimeters). Make sure that the nozzle is clean and free of residue filament. It is a good idea to pre-heat the bed and the hotend for the process, although in my experience it is not absolutely necessary. If you want to be super accurate, you can move the nozzle to the position where the sensor (switch) is. For that, you need to know the exact coordinates of that position.  At this occasion, I assume that our print bed is reasonably flat.
  3. Switch the Z axis sensor off; Type “M211 S0″ on the serial monitor. There is no option in the LCD menu for that – This will allow you to move the nozzle to “negative direction”, because bare in mind, at this point the machine “thinks” the nozzle could not go any lower as it is in Zero position and would not go “under” the print bed.
  4. Move the nozzle down to level of the print bed; LCD navigation: “Prepare> Move axis> Move Z> Move minus 0.1mm increment” and make a note of the value or type “G1  Z-0.5, G1 Z-0.6″, so on, in to the serial monitor, until the nozzle is at the desired position and make a note of the correct value (the value of Z) – A good practice is to put a piece of paper under the nozzle and move it (the nozzle) down till it touches the paper. You still need to be able to pull the paper without much effort. The offset value will always be negative, because of the physical attributes of the hotend assembly.
  5. Move the Z axis back up. LCD navigation “Prepare> Move axis> Move Z> Plus increment” or  type e.g. “G1 Z3” in the serial monitor. Be careful not to move to negative direction (downwards) as this might damage your hotend assembly and/or print bed
  6. Switch the Z axis sensor back on typing “M211 S1″ in the serial monitor.
  7. Set the determined value as the offset; LCD Navigation “Control> Motion> Probe Z Offs or typing “M851 Z<value of the offset>” in the serial monitor

    Z_offset_set_marlin

    Serial Console in the Arduino IDE

  8. Save that value in the EPROM of your controller board; LCD navigation: “Store Settings” or type “M500” in the serial monitor.
  9. Test by printing your favorite calibration print. I like to print Marvins from Thingiverse. (I have an army of Marvins). What you are looking for is good adhesion and a slight “squash” of the first layer of the print. In my experience, sometimes minor adjustments are needed in the pre-determined offset value to have it just right.
    I3 hotend assembly

    First layer and hotend assembly

  10. Consider to make your work “permanent” by updating the copy of Marlin which is running on your board. That requires to change your firmware and upload the updated one. The command is around line ~781 at the “Configuration.h” tab. Search for “#define Z_PROBE_OFFSET_FROM_EXTRUDER” and change the value.

That is it. Congratulation, you have successfully set the correct Z axis offset value on your 3D printer.

 

My 1st rite of passage to scratch build 3d printers

How one would start on building 3D printers without no prior knowledge about it? It is a massive subject for most and speaking from experience, it is difficult to make a choice where to start.

The first time I have ever encountered a 3d printer face to face, was through a very good friend of mine during some holiday in Hungary. He was already through a couple of self-made kits and was just building his first scratch made printer, a design which came from an Australian 3d printer enthusiast “tech2c”, called “Hypercube”.

This kind of 3d printing technology called, FDM (Fused Deposition Modelling or FFF (Fused Filament Fabrication) process. In simple terms, that means the printer is using a solid spool of plastic filament – like yarn in knitting – which is being deposited by the printer head, layer by layer, building the desired model up.

As I am luckily-unfortunately easily convinced about building interesting stuff, I was hooked on the subject quite quick.

The big question was, where to start!? In fact why would you even start to build one from scratch when you can just order a ready made one online which suits your needs.

To be honest this is an absolute superficial question regarding to most “crafting/ building” hobbies, whether that be model building or knitting. Basically, most people just does it for the process, for the joy of building and for the satisfaction of learning stuff. However, after a certain level, you actually can build an extremely capable printer for fraction of the money of an equivalent commercial one. Bare in mind though, this is not necessarily true to entry level printers and it is a long learning process with possibly significant(ish) investment along your journey.

There are number of options out there to start. You could jump right in to the deep end of it and pick one of the many available DIY printer designs from places like Thingiverse. Personally, I would not recommend that as, well,  firstly because you need a 3D printer to print many of the parts for it, secondly I believe you would need some knowledge about 3D printing to choose a design which would suit you.

I would say there are 2 (+2, I explain that shortly) reasonable routes are out there.

  1. Buy a reputable, ready made 3d printer, learn the general workings of it. Such as the process of 3D printing and different filament materials. With this option, you will know that you have a well made and working printer so you can concentrate your attention to the rest of the things without worrying about your machine. Good choice would be something like a readily assembled Prusa I3 or a LulzBot mini
  2. Buy a reputable DIY 3d printer kit. I would recommend this option to people whom have some knowledge of building anything (even if that was just LEGO) and willing to do a bit of research and thinking throughout the building process. The Prusa I3 DIY  kit or the Hephestos 2 are great options for that. These kits are tried and tested, good quality, have great support and development teams behind them
  3. (+1) Buy a Cheap Chinese kit or a ready made printer. Most of the 3D printer designs are open source designs, which means the ever resourceful Chinese manufacturers are producing their own versions of them with various success and quality. You have a wide range of DIY or ready made machines. Prices are varying and not necessarily reflecting how good the particular printer is. They all will work to a certain degree, but expect a steep learning curve and immediate desire for improvement parts in most cases, especially with the DIY kit versions. Now, I have admit I went with that choice. Why? Because I like to build stuff, figure out how things work, doing research and learning about stuff as much as possible on the hard way. It was challenging and frustrating at times, but overall I enjoyed it and I picked up a huge amount of knowledge through the process.
  4. (+2) Alternatively, you can get in touch with me and I might be able to help to start up.

I am planning to write more about 3D printing in general and my own printer builds and tips. Please follow this blog if you are interested.

Evolved Chinese 3D Printer

My Evolved 3D Printer which started life as an FlSun branded machine from China.

 

 

 

Collection of Bits II.

Here are the rest of the bits from the Chinese made Arduino set.

HC-SR04 – Ultrasonic distance sensor

RTC v1.0 – Real time clock module

ULN2003A – Stepper motor driver v1.0 on a breakout board

Sound sensor

Thumb Joystick

Relay breakout board

MPU6050 – Gyro and Accelerometer

Triple axis compass

8 bit expander

Apart from the above, there is a stepper motor, led matrix, extension and prototyping board, a numpad, LCD display and other easily identifiable pieces

 

 

 

Collection of bits

I couple of month ago I`ve dived into the world of Arduino microcontrollers. To get things going, I have purchased an original Arduino Uno starting set. It provides a tidy book which takes you through some of the things you can do with that little device. Everything is nicely explained and if you get through of all the projects you will get to know all the parts supplied with the kit.

Out of enthusiasm, I also purchased a Chinese “starter set” which is basically a collection of things you can use with the Arduino. There is no list or description of any sort of the parts, so if you like me and has no or very little experience, it leaves you with no clue whatsoever what is what.

So I thought it would be a good idea to make a list of the parts and by the POWER OF GREYSKULL Google, find out what I actually have in that box.  I am not listing obvious ones such as diodes, capacitors, resistors, general LEDs. I go through of the chips, transistors and a few sensors first.

IRF 520(N) Mosfet – Field Effect transistor

S9015 – general purpose PNP transistor

2N2222general Purpose NPN transistor

BC547BGeneral Purpose NPN Transistor

SS8050 – general Purpose NPN transistor

TMP 36GZ – Analog temperature sensor

LTV4N35Opto Isolator

6CW2CHFe38 bit shift resister

L293DNE – Half H driver/ H bridge (for driving inductive loads)

MAX7219CNG – LED matrix/ digit display driver

ATHDX – Tilt switch

VS1838B – infrared receiver

IR Led (clear) / photodiode (black) LEDs

 

 

 

 

 

Jack of all trade?

Have you ever heard the expression, “Jack of all trades, master of nothing”?

What do you think? Is it true? Does it need to be true? Can you be really not good in anything, if you are interested in everything (or a lot of things)?

What happens to people whom are interested in more than just one or two things at the same time? Well, in my experience, they are being looked down on. Actually, I am considered myself to be one of those “interested in everything” people, hence I say that. They are being considered as the people whom cannot focus on, make up their mind about, or  stick to anything. And most importantly the people, who does not really know much about certain stuff hence better not to form opinion, as how is that possible to know everything. But is that really true?

Due to social pressure and my upbringing, I have spent my last 20 years to find the THING which I like/ interested so much, that I can “stick with” on a very long term bases. I am not going to list every single thing here, but there is a wonderful expression which says “I was everything, but a hanged man”. I have enjoyed most of those things and in theory, I could imagine to do any of those things for a long time. Except that I cannot. I have completely failed to find ONE (or two) things which I like enough to not to do anything else.

Well, this has caused a lot of anxiety and pressure on me. I was constantly telling myself, I HAVE TO FIND THE ONE THING. That is what you hear from people, that is what you see around you, that is what you read in books, articles, blogs. FIND THE ONE THING, BE AN EXPERT, DO ONE THING!

With the advent of the MAKEr movement, suddenly there is an influx of people whom are doing a lot of things at the same time and they are immensely popular. Jimmy DiResta, just to name one, whom is being considered the “father of the maker movement” and started the backyard/workshop/ shed maker renaissance. Makers are real people, and by now, some are alternative media celebrities. I have picked up the habbit of watching these maker videos quite early. I was absolutely fascinated to see people, whom are having multiple interests and they make good use of it without being labelled “handyman”, “jack of all trades” or simply just crooks in a derogatory sense. Some of these guys even making videos about how they make a living from being interested in a lot of things. However, I have never quite managed to put my mind around that, mainly for the reasons outlined at the beginning of that post.

Soon, I have found myself in the same whirlpool of trying to find the one thing, the one business idea, the one trade, the one profession. Needless to say, just to fail in the process again and again.

However, I have found and tried wonderful things and every time I have found something I was interested in, I have realized, I still could not choose one to stick with.

Than one night when I was assembling a cheap Chinese electronic kit (a laser harp…), while in the meantime I was looking for new chisels for my woodlathe and for starter 3d printer kit on Ebay, finally I have settled on something.

What if, I am interested in all of those things which I have tried in recent years? What if my one thing is to make, create and know stuff about a plethora of things? Certain kind of things of course – I mean, for example I am not into learning practical brain surgery –  and although my list of interests is pretty long, they all involve the process of creating something. What if, this is my art, this is my “one” thing I am expert of. Creating. Trying. Discovering. Making. Knowing. Anything (almost).

So this blog is a start of that process. I will look again on those guys on YouTube with an even wider open mind. I think, I can understand now better when they give names such as “I like to make stuff” or “Make something” and presents this as a strength, not a weakness. I can see now better, what Laura is talking about when she says she want to make content about the process of creating.

This blog is my beginning to live off from which I am doing for a long time as a hobby.  Doing things, making, building anything. This blog and other online/ real life presence will be about that. Things I create and to show off which I take interest in at any one time.

It is time to accept myself,

It is time to be me.