Friday, 22 June 2012

The only way is up

I have always had my machines home away from the bed, with the Z limit switch at the top. Reprap software has always done the opposite, homing towards the bed. As I wanted Mendel90 to work with standard Reprap hardware and software I designed a bottom limit switch with a fine screw adjustment. Playing with it like that for a few days reinforced my opinion that homing upwards is much better.

I have clips in the corners of my bed, and being limited to using the Prusa PCB heater and the smallest bulldog clips I can find means the corners are no go areas. That means there is no homing sequence that guarantees not to crash the head. G28 homes X and Y to a corner and then homes Z, so that is a guaranteed crash. I had to home X first and then move to the middle before homing Y, then move to the middle and home Z. But if Z was already lower than the clips and Y was at one extreme then homing X would crash. So then I raised Z a few mm before homing but that means if Z was at the top it could ram the bar clamp.

After a few days I had crashed the head several times, ripped the tape on my bed and the final straw was homing Z with some crap on the nozzle. That stopped the nozzle reaching the bed so it failed to trigger the endstop. That caused it to pull the nuts out of the X ends and then spin endlessly so the levelling was lost.

I really hate levelling the bed when there are four points (it is easy with three, but without redesigning the PCB, I am stuck with four). So I went back to having a fixed limit switch at the top. It has the following advantages: -

  • Z homes to the top first, so it is always a safe operation no matter what the starting position is and what is on the bed or if there is any plastic stuck to the nozzle.
  • It prevents the Z axis ramming into the top, which is potentially damaging because it can exert quite a lot of force. Driving Z past the bottom is fairly safe because the nut traps are open at the bottom. That means the maximum force it can apply to the nozzle is the weight of the X axis.
  • Z = 0 is defined to be when the nozzle touches the bed (when hot) but it never has to actually go to that position. It is defined by putting the distance from the end stop in the firmware configuration so adjusting it is a matter of tweaking a number rather than a screw adjustment. I set it roughly by nudging to 8mm while rolling an 8mm bar under the nozzle. Then I extrude an outline, cool it and measure its height. I can then correct the number to get the first layer exactly the right height. There is no trial and error, just a simple adjustment procedure.
  • The end stop is much simpler as it no longer needs to be adjustable.
I had to hack Marlin to make it work. If the homing position is towards the top it does Z first instead of last.

I also like my X Y origin to be in the middle of the bed, not one corner. That means the G code doesn't need  to contain the origin offset, everything is sliced to be at 0,0. The comments in configuration.h implied that you could define the origin in the middle but then the soft limits didn't work. I changed the way the axes are defined to be more flexible. Instead of defining just the HOME_POS and the MAX_LENGTH I define the MIN_POS, MAX_POS and HOME_POS. For X and Y they are -100, 100 and - 102 as Mendel90 has exactly 200 mm of travel plus 2mm clearance each end and 2mm to the end stop. So the axis only ever hits the endstop during homing. After that the soft limits prevent it hitting any of the ends. Z cannot be driven lower than 0, so it can just touch the bed worst case.

The code is available on Github. I will remove the bottom endstop from the Mendel90 configuration as I don't see any need for it. Changing a number in the firmware is so much easier than tweaking a screw.

Since reverting to this method I have not had any head crashes or homing mishaps, it just works. I also have ooze free unattended starts with the following G code.

M83 ; use relative distances for extrusion
G28
G1X5Y99F9000 ; Go to the middle of the front
G1Z0.05 ; close to the bed
M104 S200 ; set extruder temp
M190 S55 ; set bed temp & wait
M109 S200 ; wait for extruder temp
G1E5F50 ; extrude a blob
G1X40F4000 ;wipe 40mm along the edge of the bed
G1Z0.3 ;lift Z 

Tuesday, 29 May 2012

Bed levelling

This is an excerpt from the Mendel90 build instructions, which are work in progress, but it can be applied to other machines.

The best way I have found to level the bed relative to the nozzle is to use a dial gauge mounted in place of the extruder using this clamp. If you don't have a dial gauge you can roll a rod or slide some film under the nozzle and feel when it is just touching.



The two pillars at the back of the bed have a washer under them to ensure the front can be made both higher or lower than the back. Those pillars are tightened and not adjusted. Front - back adjustment is achieved by adjusting the two pillars at the front. Left - right adjustment is done by turning the Z lead screws. Ideally there would be only one mounting point at the front as only three points are needed to mount a stiff sheet like glass. Having four makes the adjustment more tedious as they tend to bend the sheet and interact with each other.

Start by sliding a washer under the front pillars to set them to the same height as the back. Move the gauge or nozzle to the middle of the back of the bed. Note that level on the gauge, or nudge the Z axis to just touch your feeler. This is the level that we want the whole bed to be at.

Move to the back left corner and adjust the left lead screw to get the same level as the middle. Move to back right and adjust the back right lead screw. Moving the gauge all the way across the back should now read the same height.

Now move to each of the front corners in turn and turn the pillar until the height is correct. Lock them in place by tightening the top screws through the bed.

The whole bed should now be level but usually you need to repeat the procedure a few times due to the interaction of the four points.

Sunday, 22 April 2012

Ooze free unattended start

Normally plastic oozes from the nozzle during warm up due to thermal expansion and gravity. It is then necessary to prime the extruder by running it for a few seconds to fill up the now empty barrel. Any oozed or extruded plastic then needs to be removed, typically with tweezers, before the build can start.

This procedure is inconvenient because it means you have to stay with the machine during the warm up sequence rather than simply starting a build and letting it get on with it. I discovered a simple solution which I now use on my Mendel and Mendel90.

I remove any filament hanging from the nozzle while it is cold and then start the machine and leave it. My software moves the nozzle to the front edge of the bed and parks it 0.05mm above the surface. It then warms up the extruder and the bed. As soon as the plastic starts to ooze from the nozzle it meets the relatively cold bed and sets. That seals the nozzle and prevents and more ooze. I leave the small gap to ensure the bed does not take heat away from the nozzle.

When the bed and extruder reach their operating temperatures the software waits for two minutes to allow the nozzle to expand to its full length, otherwise I find the first layer height is inconsistent. The extruder is then run for a couple of seconds to prime it before doing a rapid move 50mm along the edge of the bed to wipe it. It then lifts to 1mm and moves to the start of the build. I always start that with a blob and an outline.

Here is a video of the sequence on my Mendel90:



So now I can start my machines and leave them to do their own thing. I use Python scripts but it should be easy to do the same thing in G code. The technique works with PLA as well as ABS shown above.