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!

Leave a Reply