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.