Friday 7 December 2012

Mendel90 updates

It has been a long road but I am now in a position to sell complete kits for Mendel90. My original plan was to use laser cut acrylic but the companies I got quotes from could not guarantee the holes sizes would be accurate enough to be tapped. I also found out that 3mm Dibond is stiffer than 6mm acrylic as well as being a lot lighter and cheaper. The downside is that the polyethylene core is too soft and the aluminium wall too thin to tap a thread into reliably. That meant replacing all the screws with nuts and bolts, which made the machine fiddly to put together. To fix that I reversed all the bolts and put nut traps in the plastic parts. The design still supports the MDF and acrylic variants with screws, but I only sell the plastic parts for these.

Picture courtesy of  Alzibiff, a Mendel90 owner who is also a photographer: 
Because the underside of the base now has screw heads protruding, the machine has to have some form of feet to raise it. I added two aluminium square tubes, which also provide stiffness as they are directly under the stays. An added  bonus is that the wires for the Y axis can now run underneath the base to improve the appearance. Another advantage is that the printed cable clips can now be replaced by zip ties that go through holes in the panels.

I changed the default electronics from Sanguinololu to Melzi because it includes the SD card interface and fan drive on board and uses screw connectors rather than friction fit. These are the only connectors I have found to be reliable in the long term and it will allow me to offer a no solder version of the kit. After a couple of false starts I now have a reliable source of these and they are 100% functionally tested using the same motors as I provide in the kit.

I also changed the PSU to an ATX500 because I can buy them in the UK with CE approval and they come with integral mains inlet and switch, obviating the need for the kit builder to do their own mains wiring.  It is also shorter, allowing room for the Melzi (which is very long and thin). The downside is it needs a pair of load resistors on the 5V and 3.3V to get the 12V rail to be close to 12V under load. These are provided in the kit.

To stop the deeper power supply sticking out beyond the base I moved the right hand stay inwards. It is now directly behind the  Z bar that it braces, which is better from a structural point of view and gives maximum space for the electronics bay. A couple of plastic brackets hold the ATX PSU in place.

The build height is increased to 200mm as there is very little downside to doing so and it makes room for the Melzi electronics.

I added a spool holder which suspends the spool between the stays on 608 bearings using a couple of triangular brackets.

In order to turn the filament through 90 degrees I use a PTFE Bowden tube. That also has the benefit of removing any drag on the head when the extruder pulls filament from the reel. The only force on the head is that required to bend the loop of filament and the tube, which has only a thin wall.

The end of the tube is terminated by a printed connector with a flange that just sits on top of the extruder. That allows the extruder to reverse without having to push the filament back up the tube.

There is dust wiper on entry to the tube which consists of a block of foam squeezed into a smaller box with the filament running through a slot in the middle. It prevents dust that settles on the spool being dragged into the extruder.

I made a few tweaks to the extruder. I now use J-Head nozzles so I integrated a groove mount into the Wade's block. The nozzle is a tight fit and I press it in with printed jig and a vice with rubber jaws.

After the first five kits I found I could no longer get the J-Head MK4B and had to switch to the MK5B. That isn't long enough for a machine like Mendel90 because the bottom of the carriage ends up too close to the bed. I had to extend the bottom of the Wades' block so that it now protrudes below the carriage. In order to do that I had to make it a little slimmer to fit through the hole and that had the side effect of making the bearing housing symmetrical about the filament path. I think the reason it wasn't before is because there isn't room for the bolt heads on the motor plate side. I solved that by turning the bolts around and using captive nuts in the bearing block. That also makes the springs much easier to fit as the nut engages before the spring has to be compressed. The hob position is now further up the bolt at 25mm meaning more of the shoulder enters the bearing.

Other minor changes were that I lowered the motor a few mm so that it traps the head of the mounting screw  making it easier to fit to the carriage. I also replaced the spring that I used to retain the nut on the hobbed bolt with a lock nut and a star washer. They only need to be finger tight.

In order to be able to offer a solder-less version of the kit I made a tiny break out PCB for the extruder motor and heater connections.

I also made the socket on the end of the X cable an IDC version. That meant the pin to wire connections had to be 1:1, so I had to increase the number of pins from 9 to 15. The heater wires were previously doubled up to handle 2 Amp heaters but now I have enough pins for three wires giving about 4 Amps. There are also wires for a fan and a Z probe.

I simplified the X ribbon cable layout. Previously I had a pair of grounded wires acting as guard between the X limit switch and the noisy motor wires. Instead I simply moved the limit switch wires to the other side of the cable, where the quiet signals are. It actually makes the X end wiring neater and gives me the extra two wires for the extruder heater so that the cable remains 20 way, which is a standard size.

On the subject of ribbon cables: I increased the one for the bed from 24 way to 26 way making that a standard size also and two extra wires for the bed heater is not a bad thing.

In order to be able to print small items and items with steep overhangs in PLA I took a leaf out of Richard Gain's book and added a ducted fan to the carriage. I couldn't use his design directly because he has a longer nozzle mounted in a different orientation. This is my compressed version.

 The exit of the duct produces a ring of air directed inwards. The idea is to direct the air onto the part close to where the new plastic is being laid down without cooling the nozzle.

Because the Melzi only has a single fan output I removed the bed cooling fan but left the hole and fan guard for it. It is something I use to speed up production by cooling the bed rapidly at the end of a build, but the 80mm high airflow fans are expensive. They used to be cheap when they were used in PCs but they have all switched to quiet ones nowadays with less flow. If you want to add one you can hack a MOSFET onto the expansion port of the Melzi and control it with M42 in Marlin.

The OpenScad model now includes everything in the kit, which is everything needed to build the machine apart from some sticky tape used to secure the PTFE tubing. Most things are visible in the rendering but a few generate BOM entries only. These are things like wires and ribbon cables, which are hard to draw. Resistors, thermistors, sleeving and heat shrink are all drawn in places close to where they are used.

Having everything in the model is the only way to keep the BOM 100% accurate. I also re-structured the sub assemblies so that they reflect the order things are assembled rather than their placement in the machine. For example the Z lead nuts were in the X end assemblies because that is where they end up, but when assembling they are fitted to the leadscrews and then inserted into the X ends, so they need to be part of the Z axis assembly.

I created a detailed build manual for the kit in OpenOffice format. It links to a lot of pictures generated by the model so that they automatically update. The manual is also checked into GitHub, so there is a version matching each revision of the machine. I had started with instructions in the Reprap wiki but that soon become impractical as it can only represent a single version and all the images need to be manually updated. It can't link to images on GitHub for instance. Although the manual is for the kit version of the machine, it will also be useful to people making the other versions. The main differences are that different fasteners are used. The PDF version is here.

The first five kits were commissioned for a build a weekend hosted by the GIST lab in Sheffield during the university's Festival of the Mind. Due to various supply problems I only just managed to get all the parts together in time and then only with a lot of help from a couple of friends. I ran out of time completely to do the instructions so I stayed up all night and hacked some together. Despite that the build weekend went well.

Two of the teams completed their machines on day one and were extruding plastic. By the end of day two all the machines were completed, two teams were printing items downloaded from Thingiverse, another was extruding. Unfortunately two were held up by faulty Melzis. I hadn't tested them beforehand because I had five spares, but it turned out one of the originals had a small fault and none of the spares worked at all. Needless to say I won't be using those suppliers again!

The Derby Makers team won the "Golden Spanner Award" awarded for "the best demonstration of the Craft and Magic of Technology". Here they are printing.

Picture courtesy of Derby Maker Glyn Smith.
More pictures of the weekend here.

The build weekend was very helpful for ironing out snags. This lead to tweaks in the design and the instructions being greatly expanded.

Kit details:


Build volume 200mm x 200mm x 200mm.
Filament 3mm.
Nozzle size 0.4mm.
Footprint 465mm x 419mm.
Height 400mm, with spool 609mm.


The kit contains everything needed to get printing including ~ 50m of Faberdashery PLA. You will need a PC and some tools to put it together and run it, details at the start of the manual. Some things included in the kit are: -

  • Melzi electronics with Atmega1284P, ROSC shorted for correct microstepping, tested and programmed with Marlin firmware configured for Mendel90
  • Micro SD card for pause free printing, comes pre-loaded with all the software needed to print on Windows (Linux equivalents can be downloaded) and a USB to SD adaptor for direct connection to a PC.
  • 0.4mm J-Head MK5B hot end for 3mm filament, pre-assembled with thermistor, resistor, wires and sleeving.
  • ATX500 PSU with quiet fan and dummy load resistors.
  • USB cable.
  • Prusa MK2 heated bed with 2mm glass sheet.
  • 3mm aluminium composite panels CNC cut and drilled.
  • 5 NEMA17 43Ncm stepper motors.
  • 8mm hardened high carbon rods with h6 tolerance as required by the linear bearings.
  • T2.5 metal pulleys and polyurethane belts with steel reinforcement.
  • CNC hobbed bolt.
  • Extruder break out PCB.
  • 1% thermistors to avoid the need for temperature calibration.
The complete BOM is here.

The big advantage of the design is that the axes need no alignment to ensure they are orthogonal. The only calibration required is bed levelling, Z height and extruder flow rate. Details in the manual.

The price of the kit is £499, plus VAT in the EU, plus shipping. For availability check the forum post here.

Sunday 25 November 2012

More accurate thermistor tables

A couple of weeks ago I wanted to create some thermistor tables for Marlin. At that time it had a copy of, which I think was written by Zach Smith based on my article "Measuring temperature the easy Way". It uses the simple two constant thermistor equation based on the resistance at 25°C and beta.

The two constant formula was adequate for my own software because I have separate constants for each thermistor that I use and I calibrate them against a thermocouple at the working temperature and room temperature. Marlin however has a thermistor table for each type of thermistor, so if you use the same thermistor for the bed and the hot end they share a table. The problem with the simple equation is that beta is not very constant and depends on temperature. There are several values given on the datasheet for different temperature ranges
, none of them very applicable to our application. If you have beta correct for the hot end at say 250°C it is about 7°C out at the bed temperature, say 130°C.

I decided to make a new script which uses the three constant Steinhart–Hart equation. The graph shows the difference between the two equations over a large temperature range: -
The two constant equation is only accurate around the two temperatures the constants are calculated at (in this case 25°C and 256°C). When these are at opposite ends of the thermistors range the error in the middle is quite large.

The script I made is Its parameters are resistances at three temperatures. The tables is makes look like this: -

    {     344,       300     }, // r=   101 adc=  21.47
    {     369,       295     }, // r=   108 adc=  23.08
    {     397,       290     }, // r=   117 adc=  24.83
    {     428,       285     }, // r=   126 adc=  26.75
    {     461,       280     }, // r=   136 adc=  28.84
    {     498,       275     }, // r=   147 adc=  31.12
    {     538,       270     }, // r=   160 adc=  33.63
    {     582,       265     }, // r=   173 adc=  36.37
    {     630,       260     }, // r=   188 adc=  39.38
    {     683,       255     }, // r=   205 adc=  42.69
    {     741,       250     }, // r=   223 adc=  46.32
    {     805,       245     }, // r=   243 adc=  50.31
    {     875,       240     }, // r=   266 adc=  54.71
    {     953,       235     }, // r=   290 adc=  59.55
    {    1038,       230     }, // r=   318 adc=  64.88
    {    1132,       225     }, // r=   349 adc=  70.77
    {    1236,       220     }, // r=   384 adc=  77.26
    {    1351,       215     }, // r=   423 adc=  84.42
    {    1477,       210     }, // r=   466 adc=  92.32
    {    1617,       205     }, // r=   515 adc= 101.05
    {    1771,       200     }, // r=   570 adc= 110.68
    {    1941,       195     }, // r=   632 adc= 121.30
    {    2128,       190     }, // r=   702 adc= 133.01
    {    2335,       185     }, // r=   782 adc= 145.91
    {    2562,       180     }, // r=   872 adc= 160.11
    {    2811,       175     }, // r=   975 adc= 175.70
    {    3085,       170     }, // r=  1092 adc= 192.81
    {    3384,       165     }, // r=  1225 adc= 211.53
    {    3711,       160     }, // r=  1378 adc= 231.95
    {    4066,       155     }, // r=  1554 adc= 254.15
    {    4451,       150     }, // r=  1756 adc= 278.21
    {    4866,       145     }, // r=  1989 adc= 304.15
    {    5312,       140     }, // r=  2258 adc= 331.99
    {    5787,       135     }, // r=  2570 adc= 361.68
    {    6290,       130     }, // r=  2934 adc= 393.15
    {    6820,       125     }, // r=  3357 adc= 426.25
    {    7373,       120     }, // r=  3852 adc= 460.80
    {    7945,       115     }, // r=  4433 adc= 496.54
    {    8531,       110     }, // r=  5116 adc= 533.16
    {    9125,       105     }, // r=  5921 adc= 570.31
    {    9722,       100     }, // r=  6875 adc= 607.60
    {   10314,        95     }, // r=  8007 adc= 644.61
    {   10895,        90     }, // r=  9356 adc= 680.92
    {   11458,        85     }, // r= 10968 adc= 716.13
    {   11998,        80     }, // r= 12903 adc= 749.86
    {   12509,        75     }, // r= 15234 adc= 781.80
    {   12987,        70     }, // r= 18051 adc= 811.66
    {   13428,        65     }, // r= 21469 adc= 839.27
    {   13832,        60     }, // r= 25635 adc= 864.50
    {   14197,        55     }, // r= 30732 adc= 887.30
    {   14523,        50     }, // r= 36995 adc= 907.68
    {   14811,        45     }, // r= 44725 adc= 925.72
    {   15064,        40     }, // r= 54309 adc= 941.52
    {   15284,        35     }, // r= 66249 adc= 955.23
    {   15472,        30     }, // r= 81195 adc= 967.02
    {   15633,        25     }, // r=100000 adc= 977.08
    {   15769,        20     }, // r=123783 adc= 985.58
    {   15883,        15     }, // r=154025 adc= 992.71
    {   15978,        10     }, // r=192694 adc= 998.64
    {   16057,         5     }, // r=242427 adc=1003.54
    {   16121,         0     }, // r=306773 adc=1007.56

The ADC values in the table are multiplied by 16 because Marlin uses oversampling to give four more bits of precision. The old tables just multiplied the integer ADC value by 16 but I multiply it before rounding it to an integer so the table has the same precision as the oversampled ADC reading.

The script can also take ADC values as parameters instead of resistances. This allows you to calibrate a thermistor in situ. If you set the temperature to a value in an existing table and let it settle and then measure it with a thermocouple you know that the ADC value for the measured temperature is the value in the table for the set temperature. You can then produce a new more accurate table.

Two days after I put it on Github ErikZalm added a new script to the official version of Marlin to do exactly the same thing:, amazing coincidence! It is different code but I think it uses exactly the same maths to find the three coefficients using simultaneous equations that I lifted from here

Wednesday 15 August 2012

Peel-able support?

One of the few advantages commercial FFF machines have over Reprap at the moment is that breakaway support works much better. In particular the UP printer from PP3DP is reputed to have easily removable support using only the same material it builds with, i.e. ABS.

Today I was redesigning the Mendel90 ribbon clamps to have nut traps to make assembly easier and came up with this design: -

I thought I could print it using the bridging ability to span the slot in the base but it failed abysmally. I think it is because it is so close to the heated bed the bridge sags a lot more that it would normally do.

I tried the support option in Skeinforge but I have never got it to work well. It puts a sparse zigzag under the bridge and the flow rate can be reduced to make it weak. The problem is then that when it is removed the top layer of the support bonds more strongly to the part above than that it does to the support below, so it gets left behind. Worse still the bottom layer of the object is more strongly attached to the top of the support than it is to the layer above, so it is very hard to remove just the support.

I think the reason for this is that when the support is sparse the layer above drapes down in between the gaps. That reduces its contact to the layer above and increases its contact to the layer below. This sketch illustrates my theory: -

When I watch videos of the UP printer it looks like the top of the support is solid and flat. This reminds me of the way I used to do rafts. I made the top layer of the raft almost solid and raised the bottom layer of the object a little to make it peel-able. Indeed support is just the same as a raft, it is just that it is elevated.

To test the theory I hacked my host software to load a separate file for the support so that it could be sliced as a normal object and so have a solid top. It also has a solid base of course, which is another advantage over Skeinforge's sparse support as that can easily become detached from the bed.

When extruding I did the support for each layer before the object's layer and did it a bit lower. I also missed off the outline to give a gap of one filament width at the ends. I worked out the diameter that the object's infill would be if it was not squashed into an oval. I offset the support downwards by the difference between that diameter and the normal layer height. That means that when extruding the underside of the object that is being supported the filament is not being squashed, so has minimum contact with the support. It doesn't droop though and the next object layer is squashed against it making the bond above stronger.

The bottom layer of the support is thinner than the rest because of the downwards offset, so I had to reduce the flow rate accordingly. 

It wasn't peel-able by hand but I could separate it cleanly with a penknife, something I have not been able to do before.

The bottom layer of the bridge has round filaments that do not touch (as they are not as wide as they should be) but that is always the case with bridges. The difference is they do not droop and are well bonded to the layer above.

They are of course a little lower than they should be. A better scheme might be to have the support at normal height and raise the head as it passes over it. That would give even better bonding to the layer above which would tend to fill in the gaps. It would need rapid Z movements though.

I would be interested to see what the bottom of a supported surface of an object from an UP printer looks like.

To test the idea further I tried making a sphere. I made the support in OpenScad by subtracting it from a cylinder. To get some lateral clearance I did a Minkowski sum of the sphere with a thin disk.
$fa = 10;

R = 20;
clearance = 0.5;
h = R - R * cos(60);

module sp()
    translate([0, 0, R])
    difference() {
        translate([0, 0, h / 2])
            cylinder(r = (R * sin(60) + 2), h = h, center = true);
        minkowski() {
           cylinder(r = clearance, h = 0.01, center = true);
color("red") sp(); 

The support was pretty difficult to remove because it ended up quite dense as Skeinforge makes solid layers when there are shallow sloping sides. Also the sparse infill ends join up to make a complete outline. It is more a proof of concept rather than a practical way to make support.

This is the underside of the sphere where it met the support. It looks quite good but above it there is some distortion to the spherical shape that I cannot explain.

So I think having a solid top surface on top of sparse support is the way to go and a dense bottom layer to anchor it to the bed. In between it can be very sparse but it would then need several solid layers to become flat.

It still takes some effort to remove, so I don't know if it is as good as the UP support yet. The difference may be the plastic.

Tuesday 31 July 2012

Melzi mod

In my previous post: StepStuck I described how Pololu stepper drivers (and the open source equivalent StepSticks) are not configured optimally for the typical motors used for RepRap. Not surprisingly Melzi suffers from the same problem as it just has the same circuit on board the single PCB.

This video is a good demonstration of the effect of enabling the A4988's "low current micro step mode". The Z axis is stepping slowly and you can hear a buzz with pauses in it. When I short out R20 it sounds a lot smoother, but still not perfect.

So I replaced all the ROSC resistors with 0R links.

Mendel90s at Manchester Mini Maker Faire

There were people asking questions non-stop on Saturday. We didn't even get time to eat or drink all day! Sunday was a little less manic and I managed to take these pictures in a rare quiet moment.

From the left a Dibond Mendel90 with 200mm build height, my acrylic Mendel90, Richards's Emaker Huxley and on the far right his polycarbonate Mendel90 printed by the Huxley: -

Mary points out the differences between Mendel90 and the Sell's Mendel opposite: -

Richard brought a large collection of printed objects which went down well lots of children: -

Most visitors hadn't seen 3D printing in real life before but a reasonable number had heard of it. All the people that inquired were pleasantly surprised how affordable it is.

More pictures of the rest of the faire can be found on Tony's blog.

Friday 27 July 2012

Sanguinololu fan hack

I needed to add a fan drive to my Sanguinololu in a hurry so I did this: -

It is just a 6 pin female connector with three of the pins bent out of the way and a protected logic drive MOSFET soldered across two pins. The fan wires are soldered to the tab of the MOSFET and the 12 V pin.

The connection details can be found here: The gate of the MOSFET is pin 1 and it connects to the pin labelled PWM B12. It is actually digital pin 4. The source of the MOSFET, pin 3 connects to ground.

I used a BTS134D but pretty much any protected logic drive MOSFET will work. 

A plain MOSFET needs a series gate resistor to not exceed the maximum output current of the logic pin (and to prevent possible HF oscillation due source pin inductance), a pull down resistor to prevent it floating before the pin is defined as an output (during the bootstrap) and a diode for back EMF protection. That requires a small circuit board as in this Thingiverse thing.

I found that adding the FAN_PIN definition to Marlin corrupted the bed temperature reading unless I commented out #define FAST_PWM_FAN.

Thursday 26 July 2012

Manchester Mini Maker Faire

I will be showing a couple of Mendel90s at the Manchester Mini Maker Faire this weekend, including this taller one made from Dibond.

Richard Gain will be showing his polycarbonate Mendel90 and the RepRapPro Huxley he used to make it.

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
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.

Thursday 19 April 2012

ABS Fudge

Many months ago I put some HIPS, ABS and PLA in a jar of limonene. The HIPS dissolved completely fairly quickly and the ABS and PLA were seeming unaffected. I then forgot about it until yesterday.

The PLA is still completely unaffected but the ABS has become soft like fudge.

I assume that given long enough the limonene removes the styrene content from the ABS.

It looks like it is feasible to use HIPS as a support material for PLA and then remove it with limonene. Limonene isn't cheap though and it remains to be seen how much HIPS it can dissolve before it becomes too dilute.

More trifurcated PLA

I repeated the PLA in acetone experiment with red PLA and pure acetone. Same result, trifurcation after a few minutes:

Here is what happens to an object:

These were identical PLA clothes-pegs, one was dipped in acetone for a few minutes.  It fell apart when I tried to pick it out with tongs.

A bit of Googling reveals acetone causes PLA (which is normally amorphous) to become crystalline. That explains why it loses its transparency I think. It also becomes rubbery and crumbly.

Not a very useful result, but it does show that acetone would not be any good for cleaning out a hot end filled with PLA. Also I think people have suggested you could use ABS as support for PLA and dissolve it out with acetone but that plainly will not work either. The opposite works, dissolving the PLA with an alkali.

Sunday 15 April 2012

Peeled PLA

I have read conflicting forum posts as to whether acetone dissolves PLA or not, so I dropped a piece into a jar of acetone for an hour or so. The effect was truly bizarre:

It split into three strands a bit like peeling a banana. It was clear PLA but the acetone was polluted with ABS, which is why it turned white I think. Whereas it is normally transparent and brittle, it has become translucent soft and flexible. When I opened the jar it was under pressure so I think it evolved some gas.

So acetone doesn't dissolve PLA, but it appears to trifurcate it!

Not a very scientific experiment as I should have done it with pure acetone, but interesting never the less.

Friday 6 April 2012


When I built my Mendel I used A3977 stepper drivers. Before that I did some maths to show that the component values need to be carefully selected to match the motor in order to achieve 8× microstepping. Makerbot produced a board with four potentiometers and I published settings for motors popular at the time.

Since then Pololu stepper drivers have become popular (and the StepStick clone), but they only have one thing that you can adjust: the current. They also have 16× microstepping, which makes the range of component values that work even smaller. I was always pretty sure the off-time would be wrong for the motors we use and while commissioning my second Mendel90 I could hear that it was wrong, so I decided to look into it.

When stepping one motor at a constant speed you should hear a single pitch at the step rate. If the off-time is too short then the lowest current microsteps cannot be achieved, the motor pauses twice every 16 microsteps so you hear a lower pitch sound as well.

If you step the motor very slowly (G1X10F1) you can hear a sequence of steps with a pause.

The reason for this is that the lowest current step when ×16 microstepping is 9.8%. If the current is set to 1A then that is only 98mA. The minimum on-time for the chip is fixed at 1μs and my formula predicts the off-time needs to be at least 54μs with 1.65Ω motors. That would require a 47k resistor but the value fitted is only 10K. That gives an off time of 12μs which isn't even long enough for 8× microstepping. The situation is even worse on the Z axis with two motors in parallel.

The problem with increasing the resistor to 47k is that the switching frequency drops to 14kHz, which is audible. So my conclusion is that the A4983 is not really suitable for driving such low resistance motors. The A3977 allows you to control the minimum on-time so you can avoid the switching frequency becoming too low.

Later Pololus and some StepSticks use the A4988 chip. That has an interesting section in the datasheet: -
Low Current Microstepping. Intended for applications where the minimum on-time prevents the output current from regulating to the programmed current level at low current steps. To prevent this, the device can be set to operate in Mixed decay mode on both rising and falling portions of the current waveform. This feature is implemented by shorting the ROSC pin to ground. In this state, the off-time is internally set to 30 μs. 
Conceptually an easy mod to do, simply short out R4, but due to the size and location of the resistor and the age of my eyes it was not at all easy. I applied the mod to a StepStick and it worked, the steps are now regular, no missing beats. Running is a bit quieter but I think the motors are more noisy when stationary. More investigation is needed.

What to do with my A4983 Pololus? Well if I increase the current to 1.3A and change the resistor to 36K then the minimum frequency is 17kHz, which is ultrasonic to me nowadays due to the age of my ears. Alternatively switching to 8× microstepping and using a 22K resistor keeps it above 30kHz and the current can be 1A.

I don't think constant off-time choppers are the best idea. The current range is too limited and the switching frequency varies wildly. As the two halves of the chip run at different frequencies they can generate beat frequencies in the audio band.

The other thing I don't like is that they regulate the peak current so there is an offset of half the ripple current which can make the first step inaccurate.

Tuesday 13 March 2012

Mendel90 files

I have put the Mendel90 files on GitHub. There is the OpenScad source code plus some Python scripts that, given a machine configuration, will generate all the STL files for the printed parts,  DXF files for the sheets, SVG drill templates, a master BOM with a matrix showing where the parts are used and sub-assembly BOMs for each of the sub-assemblies.

Two standard configurations are included: Sturdy90 is the MDF version with 10mm rods that I have had running for three months. Mendel90 is an acrylic version with 8mm rods and the same build area as a Mendel that I have assembled but not run yet. The generated files for these two configurations are also on GitHub.

The directory structure is as follows: -

├───imported_stls       The pulleys and gears that I use but don't have OpenScad source for.
├───mendel                 Generated files for the Mendel90 variant.
│   ├───bom
│   ├───sheets
│   └───stls
├───Prusa_retrofit       A Z motor bracket that allows the Mendel90 x-axis to be fitted to a Prusa.
├───scad                    The OpenScad source.
│   ├───conf               OpenScad configuration files.
│   ├───utils                Utility modules for making objects, such as polyholes.
│   └───vitamins          Models of the non-printed parts.
└───sturdy                  Generated files for the Sturdy90 variant

The top level directory contains the build scripts. To make all the files for a machine run: - machine_name

To make just the bom, sheets or stls run, or machine_name.

machine_name can be mendel or sturdy. To make your own variant copy scad\conf\mendel_config.scad or scad\conf\sturdy_config to yourname_config.scad and edit it. Then run make_machine yourname.

To view the model of the whole machine open scad\main.scad. It will take about 8 miniutes to render but after that you can pan and zoom it at reasonable speed and changes takes less time to render.

To view a sub-assembly open the individual scad files. Set the exploded flag in config.scad to make exploded views.

scad\conf\config.scad contains constants that should be independent of machine variant, for example screw clearance hole sizes. It includes machine.scad that is generated by the build scripts to include the configuration for the specified machine variant.

Thanks to sevikkk (Vsevolod Lobko) for making the scripts work on Linux as well as Windows.

I will put the build instructions in the RepRap wiki soon. These will mainly consist of the exploded views of each of the sub-assemblies with the list of parts in it. Unfortunately OpenScad can't export images from the command line at the moment so they have to be made manually in the GUI.

On my todo list is to add scripts to make images of all the STL files, PDFs from the SVG files using inkscape and produce the BOMs in spread sheet format using OpenOffice. I also need to write a script to tile the SVG files to allow them to be printed on A4 sheets and taped together like the Darwin bed template.

Thursday 16 February 2012

Mendel90 finishing touches

I have tweaked a lot of things since building the prototype. The design is fully parametric meaning each part works out how big it should be from basic parameters like the desired build volume, rod diameter, the motor sizes and the layer height used to print it. That means any little modification can change everything slightly, which is why I won't release the files until it is finished. For example, if I increase a screw hole clearance then the brackets might get a bit bigger and that will knock on to moving the holes in the sheets and may increase the sheet size slightly. I also want the drill templates to be accurate so every part that needs a mounting hole had to be modelled, even the cable clips and wire holes.

The cable clips are designed to keep the limit switch wires away from the motor wires to prevent crosstalk. The hole sizes are calculated from the wire size and the number of wires using circle packing rules and so are the holes through the frame for the wires.

The printed holes that need to be accurate sizes are polyholes if they are vertical, truncated teardrops if they are horizontal. I added on half the layer height to all the horizontal teardrops and nut traps to allow for the staircase effect of the layer sampling.

Another change that had a lot of little knock on effects was to allow thin sheets to be used for the vertical parts of the frame, requiring nuts on the back. That necessitated moving the buttresses and fixing blocks to avoid clashes. The net result is that you can specify the thicknesses of the sheets and whether to use nuts. If using nuts it will calculate the the screw length just long enough to work with a Nyloc nut and generates a clearance hole in the sheet. When not using nuts it calculates a screw short enough to not go right through, generates a pilot hole and adds a star washer under the screw. If the sheet is hard it generates machine screws and a hole to be tapped, otherwise it generates a wood screw.

In order to standardise the screw lengths I made all the parts of the brackets that take a screw the same thickness.

I want the BOM to be accurate and remain that way, so the model includes everything apart from the hot end and the electronics. I haven't used any libraries so there are no dependencies apart from OpenScad itself.

I modelled the belt twists and the tension loop to get an accurate assembly diagram and length on the BOM (hopefully I haven't tested that yet). I also modelled the cable strips to get their lengths. The one to the extruder was tricky as it is completely free-form and the ends differ in X, Y and Z. I modelled it as half an ellipse with a shear transform to gets the ends in the right place. It is probably not mathematically accurate but looks about right. Interestingly there isn't a simple formula for the circumference of an ellipse as there is for a circle, only numerical approximations.

I redesigned my fixing blocks to have slotted holes to allow a bit of adjustment. I also changed the hole depth to allow the same screws to be used as elsewhere and cut away some plastic that wasn't adding much to the strength.

RepRap firmware uses a bottom limit switch that needs a fine adjustment. It also needs a coarse adjustment to allow for different nozzle lengths. I found this difficult to accommodate because of limited space at the bottom of the z-axis. This is the design I arrived at after much deliberation: -

The switch is mounted on a lever that is hinged at the bottom by a thin section of plastic and sprung against a screw adjustment by two rubber washers. An extra type of vitamin but I am not impressed by printed springs.

I developed exploded diagrams to make the build instructions. A picture like this with its bill of materials should be self explanatory.

The z-couplings don't need as much clamping strength as the ones I designed for the Prusa (they only need to rotate the screw and not hold the weight of the x-axis) so I was able the make them slimmer, which was necessary to avoid a clash with the z-motor bracket when using NEMA14 motors on the Huxley sized machine.

As you can see two pictures above I also added some pointers on the lead screws. These can be set to face the rods when Z is homed and can then be used to observe if the two motors have got out of step and whether the z-limit switch is repeatable.

This is what the Mendel size machine with 8mm rods looks like with a 6mm acrylic frame and a 10mm base (without the bed).

Note that to make transparency work in OpenScad you have to draw the transparent objects after all the things you might be able see through them.

The hole cut through the gantry is just big enough to make the Y-carriage. I prefer to make my Y carriages from DiBond as I think they are a bit lighter and handle heat better, but acrylic should be OK and it seems a shame to waste such a big bit. I wouldn't recommend it on the MDF version as that is thicker and so even heavier. I have seen people mount PCB beds directly on MDF but I found that even when spaced off and insulated it warps enough to keep throwing the bed out of level.

I offset the Y-axis to allow the ribbon cable for the bed power to be central. That makes it easier to attach the wires to the PCB. I don't think there is any problem with the belt being nearer to the two bearing side, in fact it is probably better.

I had to slim down the back of the Y-idler bracket to prevent a clash with the bar clamp on the Huxley90. The overly long bolt is simply to reduce the number of unique fasteners. Similarly the cable clips could use smaller screws but I kept them the same as the other base screws. On the Mendel90 the base screws are M4 or No6, on Huxley90 they are M3 or No4.

I used a hacked up D connector shell on the prototype with hexagonal posts for locking. To remove those as vitamins and I designed a printed version that uses normal M3 nuts and screws for the locking. It also has a cable clamp optimised for the ribbon cable and its supporting plastic strip.

Again an exploded view makes it clear how the captive parts fit.

I also crudely modelled the tie-wraps because the 10mm bearings require longer ones to be on the BOM.

Modelling the wing nuts showed that one can clash with the X-end if it is oriented in some directions. Fortunately the bolts are captive hex heads so you can rotate the head and try again if the nut happens to stop where you don't want it. I am currently using M4 extruder mounting screws but I see the Prusa2 has moved to M3. I think that would solve the clash with smaller wing nuts but there are a lot of extruders and hot end designs using M4 I think, so I am not sure if I will follow. In any case it is simply a configuration parameter if you are printing your own.

You can see that I added a small part to the belt tensioner. It works a lot better than the Nyloc I had in the design before.

I also added some more nut traps to make assembly easier. Even a pair of "flying" ones inside the X-motor bracket. You can just see one here:

I have done a lot of changes the make things scale correctly for a Huxley sized version. This uses 6mm rods and NEMA14 motors.

I need to make a smaller extruder though as a Wade's is way too big. I plan to do a mini Wade's with a NEMA11 motor for 1.75mm filament. That will make the carriage smaller and reduce the width of the machine.

I also want to make a parametric PCB heater design to allow arbitrary machine sizes.

So as you can see I have put a lot of work into this since Christmas. In fact nearly all my spare time, until 2am a lot of evenings. I get really ticked off when people demand that I release the files before it is finished. Unlike a lot of people I don't put half baked things on Thingiverse, only tried and tested designs.

As all the parts have changed a little bit I am in the process of printing all the Mendel sized 8mm ones to check them. I will then release the design on GitHub. I had wanted to release it with make files to generate all the STLs automatically but it seems the command line option of OpenScad is currently broken so people will have to make their own if they change any of the parameters.

Saturday 7 January 2012

Bearings, Bushings and Bars

My last post started a discussion about why I got only a few hundred hours of use from PLA bushings and in particular commercial IGUS bushings. I think I mounted the IGUS bushings well enough. I printed PLA holders and reamed them to a 10mm bore, which gave a nice press fit.

I had intended to use a small self tapping screw to retain the flange but found I didn't need them. That is what the two holes are for. They are triangular because they are polyholes.

The holders have slotted screw holes and were screwed to the underside of my Prusa's Dibond Y carriage. I started with them loose and then tightened the screws as I ran the axis up and down to ensure they were aligned well. I then applied lithium grease.

When first fitted they had no slop and very low friction. After a few days of continuous use the holes in the bushings had elongated and there was noticeable slop. At that point I replaced them with LM8UU bearings in prototype bearing holders I designed for the Mendel90.

These have run for thousands of hours with no noticeable wear. They do have more friction than bushings though. It seems higher to start with but they seem to "wear in" quite quickly and it drops.

My suspicion was that the surface quality of the stainless steel rods that I used was to blame, so I have just had a look with a microscope.  I used a cheap USB "Traveller" microscope from Aldi and a times 4 objective lens. The magnification is much greater than that though when photographed and blown up to screen size. 

Here are a couple of pictures of an off-cut from the stainless steel rods I used on my Mendel: -

Obviously you can only have a small strip in focus due to the curvature of the rod but you can see it looks far from smooth. The difference between the pictures is mainly the lighting angle.

Here is a mild steel rod bought on eBay, sold for Reprap use, so probably typical of what most people use: -

Quite a lot smoother, so hopefully most people get better life from PLA bushings than I did.

Here is a bright steel rod from a 2D printer, or maybe a flat bed scanner, I can't remember which, but it will have used bushings: -

It seems to have a finer grain structure but doesn't look particularly smooth.

And here is a "precision round rail (Induction Hardened)" sold for use with linear bearings that I got from Zapp Automation.

It looks the best out the four, so I guess you get what you pay for.

I think for soft bushings to last you need high quality rods. LMUU bearings seem to be more tolerant.