Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.
Tag: Improvements
Making the world a better place, one piece at a time
The Protoneer CNC Shield has pin headers for GRBL’s Feed Hold and Resume inputs, so it seemed appropriate to put big buttons on the far end of the cable:
You could CNC machine a precise D-hole, but let’s stay realistic about the application. Applying a deburring tool enlarged the 9/16 inch hole enough to force the 16 mm threads into it, with the drill press holding the connector perpendicular to the box while I hand-turned the chuck to screw it in.
Although I like the Protoneer CNC Shield, I really really dislike using header pins as connectors:
MPCNC – Protoneer Wiring – SSR
Those pins are much too delicate.
The DC-DC solid state relay input connects to the Arduino’s +5 V power supply through the red mushroom disconnect switch. The mushroom is normally closed to turn on the SSR and connect the power brick’s +24 V supply to the motors; it opens when slapped. GRBL will continue about its business, but without any power to the steppers the MPCNC will stop dead in its tracks. Turn the mushroom cap clockwise to unlatch and reset.
The disconnect switch should also kill AC power to the router, when I get around to adding one to the mix, probably through a DC-AC SSR.
AFAICT, the cable should come out of the box on the end with the mushroom switch, putting the “normal” pushbuttons closer to me. I did it the other way around, because I want the panic button to be the most easily reached thing on the benchtop. If I have time to think about it, I can reach around the mushroom to the Hold switch.
Alas, what seemed like a better tube route didn’t work any better and, in fact, the generous loop snagged crosswise between the print head box and the R380’s frame. So I deployed the big diagonal cutters and a nasty end cutter to chop a channel through the side of the box:
Epson R380 – modified print head box
As far as I can tell, the thin section above the reinforcing gridwork exists specifically to get in the way of routing CISS tubes, but I suppose it could be just for pretty.
With the tubes coming directly off the top of the tanks and folding neatly as the print head moves under the frame, I could rearrange the supports to hold the tubes in a nearly straight line throughout their motion:
Epson R380 – straight CISS tube route
So far, so good.
Although the yellow ink now feeds properly and all the nozzles appear up on the test page, the printer output has an overall cyan tinge that gave the Annual Christmas Letter a gloomy aspect. Maybe the latest bottle of cheap Light Cyan ink isn’t quite as light as it should be?
Both bCNC and GCMC include Spirograph generators with more-or-less fixed patterns and sizes, because the code serves to illustrate the software’s capabilities:
MPCNC – bCNC Spirograph patternsGGMC Cycloids test patterns
The perspective makes a 29×19 inch sheet of paper (made from three B sheets and one A sheet) look not much larger than the 17×11 inch B size sheets in the first two pictures. IRL, it’s a billboard!
The code enumerates the possible gear tooth counts in a pair of vectors from which you select the desired stator and rotor gears using integer subscripts. Because I eventually scale the results to fit the plot area, there’s no need to keep track of actual gear pitch diameters.
Similarly, the pen offset from the center of the rotor gear is a pure number, which you can think of as the ratio of the offset to the rotor diameter. It can have either sign and may exceed unity, as needed, either of which would be difficult with a physical gear.
Figuring the number of rotor turns required to complete the pattern requires reducing the gear ratio to a fraction with no common factors, so I wrote a Greatest Common Divisor function using Euclid’s algorithm adapted for GCMC’s bitwise tests and shifts.
With those values in hand, a loop iterates around the entire pattern to produce a list of XY coordinates in normalized space. Because the formula doesn’t have the weird properties of the Superformula I used with the HP 7475 plotter, I think there’s no need to prune the list to eliminate tiny moves.
Scaling the entire plot requires keeping track of the actual extents along both axes, which happens in the loop generating the normalized coordinates. A pair of gears producing an odd number of lobes can have different extents in the positive and negative directions, particularly with only a few lobes (3, 5, 7 …):
Spirograph – 3 lobes – QnD Simulator
So I accumulate all four, then scale based on the absolute maximum; I added scalar min() and max() functions.
Converting the list of scaled points into G-Code turns out to be a one-liner using GCMC’s tracepath() library function. Previewing the results in a Web-based simulator helps weed out the duds.
The code needs cleanup, in particular to let a Bash script set various parameters, but it’s a good start.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The MPCNC instructions recommend running it for a while, taking it apart, then putting it back together, so all the parts have a chance to relax and get used to working together. To that end, I figured doing some full platform plots would run the rollers over the entire length of the rails:
MPCNC – Full-platform Spirograph – first pass
I taped three B-size sheets together, with an A-size sheet in the far right corner, into a 29×19 inch sheet to put borders around the MPCNC’s 28×18 inch work area. The tape is on the top surface to prevent embarrassing accidents where the pen snags on an edge, at the cost of blurry lines where the ink doesn’t stick quite right.
The far left corner of the paper washes up on the tool length probe’s base, but the pen position turns out to be so repeatable (it should be!) you can swap them with gleeful abandon and get good results:
MPCNC – Full-platform Spirograph – multicolor
The pen rumbles along at 12000 mm/min = 200 mm/s = 7.8 inch/s with no hint of wobblulation. Most likely, those big loops aren’t particularly challenging, although watching the big central assembly whip around a tight curve can be startling.
I modified the pen holder for 3-point support, as the recess for the pen flange isn’t quite deep enough:
MPCNC – Pen holder – 3 point grip
Good old masking tape holds the pens securely enough for now.
The glass plate I’d been using for B-size plots doesn’t cover the full area, but I’d set the Z axis limit switch to trip just before the bottom of the rails whacked into the glass. Extending the travel by 5 mm required a snippet of black tape:
MPCNC – Z axis switch – table limit
The patterns come from a scratch-built Spirograph generator, because I wanted to review what’s new in GCMC. More on the software tomorrow …
You can’t see the nib inside the cap, but you get the idea.
Flattening the top and adding a snippet of masking tape produces a better outcome:
MPCNC – Reshaped Tool Probe switch
I aligned the flat section so it’s parallel to the platform when the switch activates.
Stipulated: plotter pens aren’t a good test for tool length probing, because they have a locating flange to ensure a consistent position in the pen holder and a rigidly controlled flange-to-tip length:
HP 7475A Plotter Pen Body – in holder
What’s going on here involves configuring and testing bCNC’s overall tool change process: not using cutting tools preserves both sanity and hardware!
The flange offset puts the switch actuator on the midline of the base, not that that matters, and the base features rounded corners and a suitable legend, because I can.
I clipped the PCB’s through-hold leads nearly flush and stuck it to the flange with 3M permanent foam tape, which seems to work much better than screws & inserts for simple things that need never come apart.
The Protoneer CNC Shield includes a Probe input on the GRBL-compliant A5, although it took me a while to find the legend on the SCL pin in the I2C header. I moved the endstop power jumper to another header, then conjured a quick-and-dirty connector:
Protoneer CNC Shield – Tool Probe Wiring
When I embed the endstop switch PCB in epoxy, I’ll add a drop to the connector while engaging in Magical Thinking. The whole Arduino + CNC Shield must go into an enclosure after I finish measuring the motor currents.
To forestall discussions about switch repeatability and accuracy, suffice it to say the MPCNC doesn’t claim to be much more than a woodworking router, so those switches seem Good Enough.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The original doodles show a severely over-complexicated solution desperately searching for an actual problem:
MPCNC Tool Length Probe – doodles
Putting a large flat pan at the end of a relatively long lever arm, with the pivot arranged to put the pan level at the switch actuation point, made sense at the time. Give the relatively small tools I expect to use, directly ramming them into the switch lever should work just as well.
Putting all that complexity in harm’s way seemed like a Bad Idea when I sat down and looked at it in cold blood.
After fixing the yellow ink tube, the Epson R380 printer occasionally gave off a horrible clunk as the tubes slapped around inside the frame. This routing seems much quieter and, as you can see from the marks on the tubes, leaves much less free to flop around:
Epson R380 Printer – CISS tube routing
I cut a small collar (to the left of the white block with the red cable tie) to guide the tubing up over the edge of the ink cartridge holder, with a ramp from the upper edge and raised edges to hold the tubes in place, from a block of black closed-cell foam. It seems perfectly happy to do its job without anything other than the tubes holding it in place atop the cartridges.
There’s also a block of foam filling a gap under the printer’s top frame member (along the far left edge of the picture) to cushion the tubes as they whack against the edge.
So far, so good.
I’ve dumped a few more tanks of waste ink down the drain. When this printer eventually gives up, I’ll get a color laser and move on.