Posts Tagged CNC
The CNC 3018-Pro router arrived with GRBL 1.1f installed on the Camtool V3.3 board and ran well enough, although it accelerated very slowly. After installing Home switches, figuring out the travel limits, and trying different speeds & accelerations, it runs much better:
Configuration values to remember for next time:
$1=100 turns off the stepper motor drivers after 100 ms of inactivity:
There’s no force worth mentioning on a diamond scribe when the motors stop, so there’s no reason to keep them energized, and the DRV8825 chips resume from the same microstep when re-enabled.
$3=5 reverses the X and Z motor rotation, so you can use the same type of cable on all three axes and have them move the way you’d expect.
$20=1 turns on Soft Limits, thereby producing an error when you (or the G-Code) tries to move beyond the machine’s limits, as defined by the
$120 $121 $122 values relative to the Home switch positions.
$21=0 leaves Hard Limits off, because I didn’t see much point in switches on both ends of all the axes for this little bitty machine.
$22=1 enables the Home cycle, after which you must start each session by homing the machine.
$27=1.000 sets the Pull-off distance from all three Home positions, so the machine ends up at absolute XYZ = -1.000 mm relative to the switch trip points after homing. This depends on the mechanics of the limit switches, but seems OK with the MBI-style switches I used:
$100 $101 $102 = 1600 set the XYZ step/mm, which requires knowing the 3018-Pro uses two-start leadscrews with a 2 mm pitch = 4 mm lead:
The Camtool V3.3 board hardwires the DRV8825 stepper controllers into 32 microstep mode, so:
1600 step/mm = (200 full step/rev) × (32 microstep/full step) / (4 mm/rev)
$110 $111 $112 = 1100 set the maximum speed along the XYZ axes in mm/min. Note the hard upper limit set by the maximum microcontroller interrupt rate of about 40 k/s:
1500 mm/min = 25 mm/s = (40×10³ step/s) / (1600 step/mm)
I’ll have more to say about speed limits, stepper current, torque, and similar topics.
$120 $121 $122 = 3000 set the acceleration along the XYZ axes in mm/sec². These are two orders of magnitude higher than the default acceleration, which accounts for the as-received sluggish acceleration.
$130=299.000 $131=179.000 $132=44.000 set the XYZ travel limits relative to the Home switch trip points, which feed into the
$20=1 Soft Limits. You could probably eke out another millimeter along each axis, but this is what I came up with.
With all those in place, the
G54 coordinate system puts the XY origin dead in the middle of the platform and the Z origin a little bit below its upper travel limit. Set them thusly:
G10 L2 P1 X-147 Y-90.6 Z-1.5
The original and tweaked GRBL configuration settings as a GitHub Gist:
The as-shipped configuration is mostly for reference, but ya never know when it might come in handy.
My collection of old USB cameras emitted a Logitech Quickcam for Notebooks Deluxe, with a tag giving a cryptic M/N of V-UGB35. Given Logitech’s penchant for overlapping names, its USB identifiers may be more useful for positive ID:
ID 046d:08d8 Logitech, Inc. QuickCam for Notebook Deluxe
It works fine as a simple V4L camera and its 640×480 optical resolution may suffice for simple purposes, even if it’s not up to contemporary community standards.
The key disassembly step turned out to be simply pulling the pivoting base off, then recovering an errant spring clip from the Laboratory Floor:
The clips have a beveled side and fit into their recesses in only one orientation; there’s no need for brute force.
Removing the two obvious case screws reveals the innards:
Three more screws secure the PCB:
The ribbed focus knob around the lens makes it more useful than a nominally fixed-focus camera.
Reassembly is in reverse order.
I miss having obvious case screws …
The clamp tightening screw is made from butter-soft Chinese steel with a swaged hex socket. As you’d expect, the hex wrench eventually (as in, after a few dozen adjustments, tops) rips the guts right out of the socket.
The screw has a M6×1.0 mm threads, but the thread around the hex recess is left-handed. While I could, in principle, print a 127 tooth change gear, rebuild the lathe’s banjo to accommodate it, then single-point a backassward M6 thread, it’s easier to just use a standard socket head cap screw:
The clamp screw passes through the block at an angle:
Fortunately, the screw is perpendicular to the angled side over on the left, making it easy to clamp in the Sherline’s vise:
Using the laser aligner seemed like a good idea at the time, but the top of the screw wasn’t particularly well-centered on the hole’s axis. I couldn’t screw the left-hand part (with the socket) in from the bottom and center the block near its surface, because then I couldn’t extract the screw before proceeding.
I used a diamond burr to grind out a flat for the screw head:
The flat came from about twenty manual
G2 I-2.5 full-circle passes, stepping down through the hard steel block 0.1 mm per pass, at a too-slow 4000 RPM and a too-fast 30 mm/min feed, with plenty of water squirted from one side into a shop vac snout on the other. The doodle in the background of the first picture shows a first pass at the layout, with the burr centered at X=-2.5; I actually did the grinding from X=+2.5 so most of the passes started in thin air.
The screw head started just shy of 10 mm OD and the burr just over 5.2 mm, so the ensuing 5 mm circles created a flat barely large enough. If the flat were perfectly centered on the screw axis, I wouldn’t have had to grind out another millimeter on the left side (toward the bottom of the tool holder body), but it worked out OK:
The trial fitting also showed the head stuck out ever so slightly beyond the far side of the block, where it would interfere with the blade, so I turned off 0.4 mm off its OD.
If I had a 50 mm SHCS in hand, I’d have used it. Instead, I extended the threads of a 75 mm screw, then lopped off the end to the proper length. I’ll spare you the ordeal, including the moment when I reached for the cutoff tool to shorten the screw. A bag of such screws will arrive shortly, in preparation for future need.
Now the [deleted] cut-off holder works the way it should have from the beginning.
GCMC includes a
typeset function converting a more-or-less ASCII string into the coordinate points (a “vectorlist” containing a “path”) defining its character strokes and pen motions. The coordinates are relative to an origin at the lower-left corner of the line, with the font’s capital-X height set to 1.0, so you apply a
scale function to make them whatever size you want and hand them to the
engrave library routine, which squirts the corresponding G-Code into the output file.
Such G-Code can annotate plots:
The scaled coordinates cover a distance L along a straight line, so putting them on an arc will cover the same distance. The arc is part of a circle with radius R and a circumference 2πR, so … polar coordinates to the rescue!
The total text length L corresponds to the total angle A along the arc:
A = 360° L / 2πR
It’s entirely possible to have a text line longer than the entire circumference of the circle, whereupon the right end overlaps the left. Smaller characters fit better on smaller circles:
The X coordinate of each point in the path (always positive from the X origin) in the path gives its angle (positive counterclockwise) from 0°:
a = 360° x / 2πR (say "eks")
You can add a constant angle of either sign to slew the whole text arc around the center point.
The letter baseline Y=0 sits at radius R, so the Y coordinate of each point (positive above and negative below the Y=0 baseline) gives its radius r:
r = R - y
That puts the bottom of the text outward, so it reads properly when you’re facing the center point.
Homework: Tweak the signs so it reads properly when you’re standing inside the circle reading outward.
Converting from polar back to XY:
x = r × cos(a) (say "times") y = r × sin(a)
You can add an XY offset to the result, thereby plunking the point wherever you want.
This obviously works best for small characters relative to the arc radius, as the lines connecting the points remain resolutely straight. That’s probably what you wanted anyway, but letters like, say, “m” definitely manspread.
Overall, it looks pretty good:
A doodle helped lay out the geometry:
The GCMC source code as a GitHub Gist:
Gripping a diamond engraver in a collet chuck worked well enough, but the MPCNC’s pen holder lacks sufficient downforce and lateral stiffness. The bit has a chrome-ish plated 3 mm shank, so I tinkered up a mount for a pair of LM3UU linear bearings from the LM12UU drag knife holder:
The shank isn’t exactly a precision part, but a few licks with a diamond file knocked off enough of the high spots so it slides reasonably well through the bearings. The bearing alignment is more critical than a simple 3D printed plastic part can provide, so a real version may need bearings in a metal shaft press-fit into the plastic; brute-forcing the bearings into alignment sufficed for now.
The butt end of the shank press-fits into a disk held down with three springs, similar to the LM12UU mount:
It draws Guilloché patterns just fine:
I don’t like how the spring-around-screw motion works, even if it’s OK for small excursions.
There’s a good reason this was the last pneumatic tee fitting on the rack:
The center fitting should be a male 1/4 inch NPT connection, but it’s completely un-machined. Alas, I no longer have a 1/4 NPT die in my tool chest, so it’s not an easy fix.
The two female connections are fine, so it must have been one of those rare QC escapes.
Lowe’s marked it down to $0.47 on clearance and I still couldn’t justify buying the thing.
The cover for Mary’s favorite seam ripper cracked long ago, has been repaired several times, and now needs a replacement:
The first pass (at the top) matched the interior and exterior shapes, but was entirely too rigid. Unlike the Clover seam ripper, the handle has too much taper for a thick-walled piece of plastic.
The flexy thinwall cover on the ripper comes from a model of the interior shape:
It’s not conspicuously tapered, but OpenSCAD’s perspective view makes the taper hard to see. The wedge on top helps the slicer bridge the opening; it’s not perfect, just close enough to work.
A similar model of the outer surface is one thread width wider on all sides, so subtracting the handle model from the interior produces a single-thread shell with a wedge-shaped interior invisible in this Slic3r preview:
The brim around the bottom improves platform griptivity. The rounded top (because pretty) precludes building it upside-down, but if you could tolerate a square-ish top, that’s the way to go.
Both models consist of hulls around eight strategically placed spheres, with the wedge on the top of the handle due to the intersection of the hull and a suitable cube. This view shows the situation without the hull:
The spheres overlap, with the top set barely distinguishable, to produce the proper taper. I measured the handle and cover’s wall thicknesses, then guesstimated the cover’s interior dimensions from its outer size.
The handle’s spheres have a radius matching its curvature. The cover’s spheres have a radius exactly one thread width larger, so the difference produces the one-thread-wide shell.
Came out pretty nicely, if I do say so myself: the cover seats fully with an easy push-on fit and stays firmly in place. Best of all, should it get lost (despite the retina-burn orange PETG plastic), I can make another with nearly zero effort.
The Basement Laboratory remains winter-cool, so I taped a paper shield over the platform as insulation from the fan cooling the PETG:
The shield goes on after the nozzle finishes the first layer. The masking tape adhesive turned into loathesome goo and required acetone to get it off the platform; fortunately, the borosilicate glass didn’t mind.
The OpenSCAD source code as a GitHub Gist: