Keep it simple

My Z-Probe prototype used a standard sized servo. Of course, this kind of servo seems a little bit oversized for this use. Thus, I looked around for smaller alternatives.

I found some nice micro servos on ebay:

IMG_0892.JPG

These servos not only are tiny, they are also cheap. I bought 3 of them for 4 Euros a piece.

I started to redesign the printed parts of the z-probe prototype. But compared to these micro servos, the mechanical construction was huge. Too huge!

After thinking about this for a while, I found a solution: Keep it simple!

Here’s what I came up with:

It’s basically just the servo with an opto endstop pcb glued to it…

Its smaller, it’s simpler, it’s adjustable and it works great.

Here’s a how to build the probe:

I also simplified the z-probe firmware, based on the latest G3Firmware. Since the firmware now natively supports servos (for the Unicorn pen plotter), I was able to reduce the code patches to just a few lines for the z-probe commands.

Unfortunately I wasn’t able to update my forked firmware repository on GITHub. I’m (still) really uncomfortable with using git! Each time, it’s a pain in the ass to merge new revisions from the remote repository with my forked repositories (locally and/or on GITHub). I’m pretty sure, that this is supposed to be easy, but there always are problems, errors or conflicts. And I’m still looking for a good tutorial for these hacker tasks…

Anyway, until I’m in the mood to check out git again, here are the few code changes necessary to support the z-probe in the newest firmware revision:

v2/src/shared/Commands.hh:
105 105 #define SLAVE_CMD_GET_SP			32
106 106 #define SLAVE_CMD_GET_PLATFORM_SP		33
107 107
    108+#define SLAVE_CMD_ENGAGE_Z_PROBE		128
    109+
108 110 #endif // SHARED_COMMANDS_H_
v2/src/Extruder/Host.hh:
18 18 #ifndef HOST_HH_
19 19 #define HOST_HH_
20 20
   21+// ZProbe settings
   22+// 750ms
   23+#define ZPROBE_TIMEOUTINTERVAL ((micros_t)750000L)
   24+
   25+// Angles in Degree
   26+#define Z_PROBE_ENGAGE_ANGLE  0
   27+#define Z_PROBE_DISENGAGE_ANGLE 50
   28+
21 29 void runHostSlice();
v2/src/Extruder/Host.cc:
149 149 			to_host.append8(RC_OK);
150 150 			return true;
    151+		case SLAVE_CMD_ENGAGE_Z_PROBE:
    152+			{
    153+				uint8_t angle = ((bool)from_host.read8(2))?Z_PROBE_ENGAGE_ANGLE:Z_PROBE_DISENGAGE_ANGLE;
    154+				board.setServo(1,angle);
    155+				micros_t endDelay = board.getCurrentMicros()+ZPROBE_TIMEOUTINTERVAL;
    156+				while(board.getCurrentMicros()<endDelay); // Wait for Servo
    157+				board.setServo(1,-1); // Switch Servo off
    158+			}
    159+			to_host.append8(RC_OK);
    160+			return true;
151 161 		case SLAVE_CMD_GET_SP:
152 162 			to_host.append8(RC_OK);
153 163 			to_host.append16(board.getExtruderHeater().get_set_temperature());

The ReplicatorG patch can be also simplified (no more EEPROM preferences for the Z-Probe). But I didn’t find time for this yet. For the time beeing, you can simply use the patched version from here.

Well, I still have 2 servos left…

I wonder what I can do with one of these and a slightly modified version of this thing, directly glued to the servo arm. I’m pretty sure it’ll work just as fine as that thing, only with 16 parts less…

Keep it simple!

Boxing (Round 2)

IMG_0725.JPG

With a second working 3d printer in the house, I needed an extra filament spindle box. It was easy enough to build the first one for my Makerbot, so why not build a second, improved one?

The most wanted improvement was a window.

It turns out, that it’s not only nice looking but sometimes also important to see what’s going on inside the box. So I changed the design slightly to sport a window on the front.

Since it turned out, that the second disk above the filament spool on the turntable isn’t really needed (the spindle’s construction is self-supporting and the box’s top keeps the filament on the spindle), I recycled the spare plywood disk in the second filament box: It got promoted to be the turntable. (If you don’t have an extra plywood disk at hand, see here how to cut the disk out of a rectangular sheet of plywood with a Dremel).

Needing even less wooden parts (no front side, no plywood for the turntable), the remaining material was even cheaper to get. Including the sheet of transparent plastic (“Hobby Glass”, a sheet of 2mm transparent LDPE, 25x50cm), the whole stuff cost me less than 5€ (!).

IMG_0710.JPG

Here’s the updated part list for the box:

QtySize (mm)Material
2310 x 310MDF 10mm
2310 x 120MDF 10mm
1290 x 120MDF 10mm
1280 x 280Plywood 4mm
1~ 300 x 130 Transparent plastic, acrylic, glass...

There were some requests for detailed drawings, so here you go:

(These drawings are also available as PDF. I added them to thing 3640 on thingiverse.com.)

The change in design is, that -instead of a front wall- there’s a groove for a sheet of transparent plastic (or acrylic, or glass, or whatever).

If you got a circular saw, the grooves are quite easy to make: Adjust the circular saw blade’s height to about half the MDF thickness (i.e. if you use 10mm MDF, adjust the saw to 5mm). Then use the saw’s stop to saw the groove 10mm from the front side of the bottom, top, left and right parts (I hope I’ve got the technical terms about right in English…).

If you don’t have a circular saw at hand (I don’t!), you might use a Dremel to cut the grooves. That’s slightly more work and probably not as exact, but it’s good enough:

IMG_0708.JPG

After cutting the grooves and drilling all holes, the assembly of the box is quite easy. I used some glue for additional stability.

IMG_0712.JPG

Then I did measure the final width of the front window (including the depth of the grooves).

Cutting the LDPE sheet was very easy: After slightly slitting the sheet with a box cutter, the sheet can be broken at a table’s edge. It’s like cutting glass, only with a knife and without the cullets.

IMG_0722.JPG

Now I was able to mark the final height of the window:

IMG_0721.JPG

Another LDPE-cut later, the box was almost finished:

IMG_0723.JPG

I didn’t change the inner construction of the box. So all printed parts, ball bearings and rods are the same as in the first box.

I added one last improvement to the box’s turntable: Since the filament roll tends to loosen up a little bit on the turntable, it can happen that some loose filament “falls” from the turntable. That’s usually not a big problem, but it could lead to a turntable-jam.

To avoid that, I used some paper (160g/m2) to build kind of a “cake setting ring” around the turntable (maybe one could actually use a real cake setting ring for this?).

IMG_0729.JPG

The paper ring catches the loose filament windings, but it doesn’t interfere with the unwinding mechanism itself.

Test Drive

IMG_0639.JPG

As you know, I’m working on the long term project, using Mecanum wheels for a robot with omnidirectional driving capabilities.

Today, I received the gear motors for my Mecanum wheel chassis prototype:

IMG_0645.JPG

These are 12V gear motors with a 1:50 gear reduction. The spindles are running at approx. 104 RPM.

To drive these motors from an Arduino Duemilanove, I use the motor shield from ladyada.net (at least for the prototypes).

IMG_0646.JPG

Here’s a short video of testing the controller/motor setup:

Already having printed all 4 Mecanum wheels, I thought I would be nice to assemble the whole shebang and give it a test drive.

All combat takes place at night, in the rain, and at the junction of four map segments.

Robert De Niro in “Wag the Dog”

Well, there were some bumps on the road.

When designing the Mecanum wheel, I planned to use them with stepper motors. Although it’s generally nice to have exact control of the (stepper) motors’ RPM, I’m sure that the wheels’ slipping on the ground is quickly killing this advantage. Because of the much simpler controller electronics, I switched over to the above mentioned gear motors.

The main problem here: The stepper motors have a 5mm spindle, the gear motors have 6mm spindles. Thus, I ended up with 5mm bores in the wheels for the 6mm gear motor spindles.

I re-drilled the center bores in the Mecanum wheels with a 6mm drill. After that, the wheels fit on the motor spindles but -of course- now the captive M3 nuts for the spindle set screws didn’t fit anymore.

To solve this problem, I needed to file down 4 M3 nuts to about half their height:

IMG_0649.JPG IMG_0661.JPG

Although this solved the problems with the changed spindle diameter, the whole process most likely didn’t enhance concentricity of the wheels. Printing a new wheel (without the rollers), takes more than an hour. Cleaning up the printed object, glueing in the ball bearings and assembling the rollers takes at least another hour. Since it’s a prototype anyway, I  chose to go with the fast, easy and maybe less precise solution.

I mounted the four motors with some quick and dirty printed clamp assemblies to a plywood base plate.

IMG_0655.JPG

The clamps were printed relatively quick and they give me some freedom in (re-) adjusting the motor/Mecanum wheel positions. However, this sort of mount mechanism might not be ideal for long time use.

And here’s what the first prototype looks like:

IMG_0653.JPG

The black Mecanum wheel in the front right is the first I printed. I had no liquid rubber then and I didn’t find the time and mood to completely disassemble the wheel in order to apply the liquid rubber to the rollers, yet.

The Arduino controller runs a pretty simple test sketch in the following movie, to test the four general drive modes (forwards, backwards, left, right):

Now I need to beef up the robots sensors and firmware. I really like the idea to add a gyroscope to recognize wanted and unwanted direction changes. And, of course, the thing definitely needs some kind of collision sensors…