Archive for category Electronics Workbench

3D Printing: Native G-Code?

From a discussion on the Makergear 3D printer forums

From a new M2 user disillusioned by the learning curve:

Is there a 3D CAD software out there that natively creates .g or .gcode files It’s not just a 3D printing thing.

CAD (computer-aided design) software produces a solid model, which a CAM (computer-aided manufacturing) program then converts into the specific dialect(s) of G-Code required by whatever machine tool(s) will create the widget. You can create the solid model using many different CAD programs and convert it into G-Code with many different CAM programs, each with its own collection of features and warts.

3D printing calls the CAM program a “slicer”, but it’s a different name for the process of converting geometry into machine instructions.

Even in subtractive manufacturing using lathes and mills, you absolutely must understand how the G-Code interacts with the production hardware.

I unfortunately don’t want to learn all the nuances and parameters of the slic3r software

Then you must use a service like Shapeways: you create the model, send it to them, and get a neat widget a few days later. Their laser-sintered powder process provides much better built-in support than you’ll ever get from consumer-grade fused-filament printers, you can select from a wide variety of materials (including metals!), and, as long as you follow their straightforward design guidelines, you’ll never know how the magic happens.

If you intend to create more than a trivial number of widgets, though, the cost in both cycle time and money will begin gnawing at you. In round numbers, I’ve been designing and printing one widget a week for the last seven years, so adding a printer to my basement shop and learning how to use it has been a major win.




3D Printing: Slow Hot End Temperature Oscillations

From a discussion on the Makergear 3D printer forums

A Makergear M2 user encountered a temperature control problem:

Problem: Temperature fluctuation on the hotend +/- 7 degrees C when set in the controls. A little more extreme when printing (~+/- 15).

Slow cycling like that indicates the hot end’s PID loop coefficients don’t match reality.

Preheat the extruder to maybe 200 °C, run a PID calibration (M303), store the results in EEPROM (M500), and that should do the trick.

PID coefficients depend on the hot end’s physical condition, so you should re-do the calibration whenever anything changes on the hot end. Even removing & reinstalling the same hardware will change the contact points between, say, the thermistor and its hole in the hot end.

A dab of good heatsink compound on the thermistor should stabilize its contact with the hot end, although that will change the reported temperature and PID coefficients. Probably doesn’t make any real difference, but I felt better:

M2 - Thermistor with heatsink compound
M2 – Thermistor with heatsink compound

Which prompted a question from a user who regularly swaps entire hot ends to change nozzle diameters:

run a pid cal when I set my starting height each time I switch?

Assuming you swap entire hot ends, including their thermistor & heater, then you can calibrate each one, write down its PID values, manually set ’em with M301 when you install it, then use M500 to store ’em in EEPROM.

Because you bend those fragile thermistor wires every time you swap hot ends, keep a couple thermistors on hand. You’ll need ’em.


Leave a comment

3D Printing: Peculiar Octopi Problem

From a discussion on the Makergear 3D printer forums

A Makergear M2 user had a strange problem:

Octopi claims the serial connection went down.

LED2 was blinking red, rapidly, and LED3 was shining with a steadfast red light.

LED2 shows the extruder heater PID loop is running and LED3 shows the extruder fan is on:

You just never noticed the blinkiness before … [grin]

Because the extruder heater is still running, the firmware hasn’t detected a (possibly bogus) thermal runaway or any other fatal problem. It’s just waiting for the next line of G-Code, but Octopi isn’t sending it.

Casually searching the GitHub issues, there’s a report of intermittent serial problems from last year:

Which points to the FAQ: … eption/228

Look at the Octopi Terminal log to see if the conversation just before the failure matches those descriptions.

Assuming you haven’t updated the printer firmware or anything on the Octopi, then something physical has gone wrong.

First and least obviously, the Pi’s MicroSD card has probably started to fail: they’re not particularly durable when used as a mass storage device and “the last couple of years” is more than you should expect. Download a fresh Octopi image, put it on a shiny-new, good-quality card (*), and see if the situation improves.

Then I’d suspect the Pi’s power supply, even though you’re using the “official rpi power supply”. All of those things contain the cheapest possible electrolytic capacitors, running right on the edge of madness, and produce bizarre errors when they begin to go bad. Get a good-quality wall wart (**), ideally with a UL rating, and see if the situation improves.

While you’re buying stuff, get a good-quality USB cable (***) to replace the one that (assuming you’re like me) you’ve been saving for the last decade Just In Case™. Use the shortest cable possible, because longer does not equal better.

After that, the problems get truly weird. Apply some tweakage and report back.

(*) This is harder to do than you might think. You may safely assume all cards available on eBay and all “Sold by X, Fulfilled by Amazon” cards will be counterfeit crap. I’ve been using Samsung EVO / EVO+ cards (direct from Samsung) with reasonable success: … sk-memory/ … ification/ … 22y+zq29p/

The card in question eventually failed, so having a backup card ready to go was a Good Idea™.

(**) Top-dollar may not bring top quality, but Canakit has a good rep and costs ten bucks through Prime.

(***) Amazon Basics cables seems well-regarded and work well for what I’ve needed.

, ,

Leave a comment

Juki TL-2010Q Needle LEDs: Installed!

The combined illumination from the COB LED bar on the rear of the arm and the (renewed) COB LEDs over the needle does a pretty good job of lighting up the work area:

Juki TL-2010Q Needle LEDs - cloth illumination
Juki TL-2010Q Needle LEDs – cloth illumination

That’s a staged shot with a quilt square from the top of the pile. You’d (well, Mary’d) sew along the lines, not across a finished square.

The remaining deep shadows under the foot require an LED with an imaging lens on a gooseneck; precise piecing requires feeding fabric into the needle with alignment exactly where those shadows fall.

The light levels look harsh and shadowy on the bare base:

Juki TL-2010Q Needle LEDs - front
Juki TL-2010Q Needle LEDs – front

The shadow extending leftward from the needle comes from the arm’s shadow of the rear LED bar. The hotspot specular reflections of both LED arrays aren’t quite as glaring in real life, but a matte surface finish would be better.

The needle LEDs sit on the bottom of the heatsink inside the endcap:

Juki TL-2010Q Needle LEDs - installed
Juki TL-2010Q Needle LEDs – installed

The COB LED PCB has a weird pink tint, perhaps due to the silicone filter passing all the yellow and blue light downward, with red light reflected into the PCB.

After one iteration, I settled on a 20 Ω 1 W ballast resistor:

Juki TL-2010Q Needle LEDs - ballast resistor
Juki TL-2010Q Needle LEDs – ballast resistor

It drops 3.6 V to provide 180 mA of needle LED current and dissipates 640 mW, with the LEDs burning about 1.5 W to raise the heatsink just above room temperature. The extrusion on the rear arm is pleasantly warm and the resistors seem happy enough.

Looks good to us and it’s much much much better than the feeble Juki needle LED.



Juki TL-2010Q Needle LEDs: Simple Cable Clip

A straightforward cable clip:

TL-2010Q Needled COB LED - cable clip
TL-2010Q Needled COB LED – cable clip

It looks better than the previous hack bent from a snippet of PET clamshell:

Juki TL-2010Q Needle LEDs - cable clip
Juki TL-2010Q Needle LEDs – cable clip

Ream out the holes with suitable drills, clean out the slot using Tiny Bandsaw™, and it’s all good.

In retrospect, the slot isn’t worth the effort, because it doesn’t open wide enough to admit the cable and doesn’t provide any clamping force; a simple block with two holes would do as well. If the heatsink didn’t already have a 3 mm screw in play, I’d use an adhesive-backed clip from the early Kenmore LEDs.

The OpenSCAD source code isn’t much to look at:

// Cable clip
// Reoriented into build position, because we only need one

ClipWall = 3*ThreadWidth;
Clip = [15.0,10.0,CableOD + 2*ClipWall];

module CableClip(CableOD = 2.0) {

ClipSides = 4*3;
ClipRadius = Clip.y/2;
ScrewOD = 3.0;
ClipOC = Clip.x - ClipRadius - CableOD/2 - ClipWall;

        difference() {
          union() {
              cube([Clip.x - ClipRadius,Clip.y,Clip.z],center=true);
          translate([0,0,-(Clip.z/2 + Protrusion)])
              PolyCyl(ScrewOD,Clip.z + 2*Protrusion,8);
          translate([ClipOC - Clip.x/2,0,0])


Leave a comment

COB LED Autopsy

The intent was to wire the “5 W” COB LED to the 12 VDC supply grafted on the Juki TL-2010Q, through a suitable resistor around 18 Ω. Unfortunately, the next morning I managed to run 12 V directly to the LEDs, which produced an astonishingly bright flash of blue-white light and an opportunity for some post-mortem analysis.

A sharp tap with a chisel popped the COB LED PCB off its heatsink:

Destroyed COB LED - epoxy bond
Destroyed COB LED – epoxy bond

That’s a pretty nice thermal joint and ought to transfer as much heat as reaches the back surface. Mechanically, it yanked one of the nickel tabs right off the solder pads; obviously, I must now level up my soldering game.

Scraping the yellow silicone filter off the PCB reveals the minuscule LEDs:

Destroyed COB LED - excavated yellow silicone
Destroyed COB LED – excavated yellow silicone

You’ll recall they’re arranged in three series sets of six:

Circular 12V COB 18 LED panel - copper layout
Circular 12V COB 18 LED panel – copper layout

Some probing revealed five of six LEDs in one set was still functional:

Although a few other LEDs across the PCB survived, that’s not the way to bet when you run so much current through the poor things.

Ah, well, that’s why I always buy a few more parts than I really need …


Juki TL-2010Q Needle LEDs: Trial Fit

Stripping the components from the back of a “5 W” COB LED gets it ready for action:

G4 COB LED PCB - stripped
G4 COB LED PCB – stripped

Jumpering the pads with nickel strips harvested from various NiMH and lithium cells restores the original contact pads to service:

Juki TL-2010Q Needle LEDs - COB LED jumpers
Juki TL-2010Q Needle LEDs – COB LED jumpers

A bit of bandsaw artistry produced a replacement for the OEM LED bracket:

Juki TL-2010Q Needle LEDs - trial installation
Juki TL-2010Q Needle LEDs – trial installation

The epxoy bonding the LED to the heatsink happens a few paragraphs ahead in this story, but the view justifies it. The 2 mm hole just to the right of the 3 mm SHCS aligns the heatsink to a pin in the machine’s frame, ensuring it doesn’t twist around under vibration.

The view from below (in a mirror on the machine’s bed) shows the COB LED just barely fits in the opening:

Juki TL-2010Q Needle LEDs - trial fit
Juki TL-2010Q Needle LEDs – trial fit

I screwed the bare heatsink into the Juki, applied double-stick tape to the COB LED, aligned LED with opening, and stuck it in place. Back in the shop, I traced around the LED to figure out what part of the heatsink needed removing, introduced it to Mr Disk Sander, and contoured it to match the LED.

Clean everything with denatured alcohol, put the heatsink on a glass plate, and clamp it to the height gauge:

Juki TL-2010Q Needle LEDs - heatsink alignment
Juki TL-2010Q Needle LEDs – heatsink alignment

Butter up the LED PCB with JB Kwik epoxy, having previously masked the contact pads (with masking tape!) to prevent oopsies:

Juki TL-2010Q Needle LEDs - epoxy on COB LED
Juki TL-2010Q Needle LEDs – epoxy on COB LED

Raise the height gauge, align LED & heatsink, lower height gauge to squish epoxy into an even layer, raise slightly to ensure the aluminum heatsink doesn’t short the nickel strips, and fast forward a few hours:

Juki TL-2010Q Needle LEDs - heatsink curing
Juki TL-2010Q Needle LEDs – heatsink curing

Peel off the masking tape and solder a cable in place:

Juki TL-2010Q Needle LEDs - cable installation
Juki TL-2010Q Needle LEDs – cable installation

The transparent doodad around the cable is a PET clamp snipped from a consumer electronics clamshell package, then punched and folded to suit. It didn’t work particularly well, so more rummaging will be required.

Foreshadowing: all this went swimmingly and looks pretty good (in a techie sort of way), but I’ve been running a nasty cold (stipulated: there being no pleasant colds). Building While Stupid is never a good idea, as the part of your brain in charge of telling you you’re about to do something catastrophically wrong is the first thing to go.

More to come …