Saturday, 28 February 2015

The last wiring, the first calibration

Z axis still has trouble moving down. Trying some suggestions:

Next issue: Left and right X mounts are offset. Relatively easy to fix on the left-hand nut. After alignment, they stand 36.6 mm off the base plate at home.

Width is 190mm (due to different extruder design), depth is 200mm, and height is... curious. Seems to move more than it's supposed to. What it thinks is 160 mm is actually 193. Measuring it with a ruler says 20.5 to the bed. Changing firmware to use STEPS_PER_UNIT = 200*13.25/1 for Z. Also changed Z_HOME_POS to 205, X_MIN_POS to -95, and X_MAX_POS to 95.

Note to self: Do not move the X axis 200mm out, then home Z. It sounds nasty when the extruder motor hits the Z top holder and prevents reaching the Z stop.

Second calibration shows a Z movement of 204 mm when doing 20 10mm steps. Yielding STEPS_PER_UNIT = 200*13.25/1. That's a nice number and a good match. True height is 204mm.

Wired up the heater and Mister Thermistor. "Room" temperature is found to be about 80ºC - talk about global warming! Need to calibrate. Tried using an infrared gun, but that doesn't work well since it measures the outside temperature. Need to calibrate by getting the entire thing to a known temperature and then measure the resistance. Or measure on one of the spares I bought. Easier to do that at home in the oven with an oven thermometer.

Following's nice calibration instructions. Mostly good, except - the bed isn't close to level, about 1mm difference between corners. And not in the linear fashion I would expect from differences in corner support height, but more difference towards the end, which might indicate bending.

A sheet of paper catches in the max-x/min-y corner and at the max-x/max-y corner (but not quite in between), at the min-x/max-y corner there is about a millimeter gap, and at home there's maybe half a millimeter. Adding two washers on the home corner helped there, but it's definitely sagging.

Also fixed the inverted X belt.

Questions of the audience:

How home my Z steps/mm was off? Are threaded rods really different between UK and Germany?

Should I oil the Z threaded rod?

Update: Testing an equivalent thermistor at home showed it working as expected. I hope I haven't broken/short-circuited something when glueing it in.

Saturday, 21 February 2015

Meet Mister Thermistor

Today's progress was small but important: I soldered wires onto the hotend heater and the replacement Thermistor, and then glued it in with some JB Weld that FabLab fortunately is in possession of. I do believe that was the last piece that needed mounting, and the last wires that need soldering (except perhaps the cooling fan, but that's an optional part, so it doesn't count).

Next time: figure out why the Z-axis gets stuck (needs oil? Bad rod?) and test the extruder!

Sunday, 15 February 2015

Testing, testing, 1, 3, 2...

Hacking has been on house-hunting hiatus. Now I am back.

After hearing back from which part would come apart, I unscrewed the bottom of the extruder. The power resistor is fine (though the glue has come out a bit, but there's a distinct lack of thermistor. Need to drop by Conrad (Heißleiter S861 Epcos HEISSLEITER, PRÄZ.TEMP.-MESSUNG, S861, Bestell-Nr.: 500682 - 62), they have some. Also need to get glue, suggested is JB Weld.

In the meanwhile, I can test the motors. First installing software according to

- Download Arduino IDE v22. No such thing, their numbers go 1.0.N, 1.5.N, 1.6.N. I have 1.5.8 which I updated for the ATTiny programming. But then that page was last updated 3 years ago. Which means... he's talking about 0.22. From February 2011. I sure hope it's upwards compatible.

- This is neither gen6 or Sanguinololu, skip.

- UltiMaker's RepG 25 build. That could either ReplicatorG which comes in versions 23 and 34 but nothing in between, or UltiReplicatorG which does come in a version 25 (see Going with URG because that was the newest version in Nov. 2011 when that part was written.

- UltiMaker Marlin firmware has moved, tree/v_1 is gone, but tree/Stable/Marlin is probably ok. Unfortunately, there is no download button, there, only at the root dir. Oh, look, this is EricZahn's Marlin, not nophead's. I'll go with nophead's, not because it's more fixed necessarily, but because it's more likely to have fixes for Mendel90. Based on earlier Arduino experience, placed in in ~larsrc/Documents/Arduino.

Oh, the Melzi uses MiniUSB rather than USB-B of the Arduino. Fortunately, FabLab does have a collection of every imaginable USB cable, plus a few I hadn't seen before.

Powering it up and connecting it has less effect than I hoped for. Shouldn't there at least be a single Blinkenlicht? The PSU is nice and quite, I had to feel the air from the fan to check that it was on.

No Melzi appears in the Arduino menu. My earlier Arduino experience was misremembered. It needs to be in ~larsrc/Documents/Arduino/hardware. There you are, little puppet! Actually, there two of you are. Which one do I have? Android Cozy Magnifier app to the rescue, it's an ATMega1284.

There is power on the Melzi, as measured at the yellow and black cables. The dummy 5V load is also active.

Have to do some testing on my own, since the manual just says "comes with test firmware". This is fortunately where Arduino rocks: The same program I used yesterday to make my ATTiny programmer blink can be used here with merely adapting the pin number. Nice little test, aaand...

Third-party platform.txt does not define compiler.path. Please report this to the third-party hardware maintainer.

Ran into this yesterday, too. Then, I just had to change a line in platforms.txt, but the Melzi doesn't come with one of those.

Ah, but the Marlin instructions said to open Marlin.pde in Ardiuno and compile that. Not that the Marlin download comes with one of those. There's Marlin.ino, let's try that just for shits and giggles. Still complains about the compiler.path, and then dies with a RunnerException.

Noticed the Mendel90 instructions talk about a Marlin/Marlin/Marlin (!) dir. Maybe that's expected somewhere, trying to move it into that configuration. Oh, look, a new error message:

In file included from Marlin.h:24:0,
                 from cardreader.cpp:1:

fastio.h:2579:2: error: #error pins for this chip not defined in arduino.h! If you write an appropriate pin definition and have this firmware work on your chip, please submit a pull request

Also, the Melzi doesn't turn up in the boards menu any more:(

Tried installing an Arduino 1.0.5. It doesn't recognize the Melzi drivers at all. Tried copying a platforms.txt into the Arduino app's config files, no go. But copying it into ~larsrc/Documents/Arduino/... worked! The firmware now compiles.

Next up: Uploading. Selected Melzi, picked the tty USB port, and don't really know if the Programmer setting makes a difference here, so I tried them all, and for all got a "missing upload.tool" error.

Found a GitHub issue about this, which seems to indicate that upload.tool and bootloader.tool should be set to avrdude or some other default value. Added them as avrdude (dude!), to get by this error.

I don't even know if my ATMega came blank. Ah, the joys of self-sourcing.

There's no section on installing the software on a mac in the manual, only Windows and Linux. Fortunately, the Linux instructions seem similar enough to what I had to do for the Arduino, so I'm pretty sure it works.

Maybe the USB cable I dug up was bad? Trying a different one, and switching the mains power jump back and forth, indeed got a light to shine! And it even succeeds in uploading! Though the light goes out again after that. That seems to be a function of the firmward, the blink program blinks happily.

Installed Pronterface (Printrun) and started it. It immediately went into shutdown because the extruder temperature was too low (missing thermistor, duh!). By adding a 65K resistor across the thermistor inputs, I fooled it into running and could do basic movement tests.

X axis: Moves, homes nicely (with my little hack), but refuses to go more than halfway across for no obvious reason.
Y axis: Works beautifully.
Z axis: Moves, but rather jumpily. When homing, it stopped almost at the top, and now it refuses to go downwards again. I may have to switch direction of the Z endstop to have it hit in time.
Bed: Heats up nicely.
Extruder: Can't test yet, not wired.

Part of the Z problem and all of the X problem turned out to be the hex nut on the threaded rod having come undone on the right side. This made the X axis slanted enough that the motor didn't like it. Fixing that, the motor moves nicely, but I still can't get down, there is too much resistance. Maybe I need to oil it.

Required reading: Arduino 3rd-party Hardware Specification.

Also, why does Arduino keep asking for incoming network connections? It has no business with that.