Archives: Development

Pocket NC Touch Probe - Electrical (Part 3/4)

In part 1 and part 2, I covered my motivation and the mechanical hardware behind a touch probe add-on for my Pocket NC V2-50. In this post, I’ll cover my prototype electrical hardware.

My intention with the probe was to connect it logically “in parallel” with the existing tool setter probe that the Pocket NC has. I figured that would be likely easiest to integrate with the Linux CNC scripts when I got to the software point. The existing tool setter probe is located in the rotating B axis. That is connected to the Y axis via a single CAT5-ish cable, so my hope was that I could devise something which would pass through the necessary signals on that cable while also paralleling in the new touch probe.

Pocket NC Touch Probe - Mechanical Hardware (Part 2/4)

Last time in part 1, I talked about why I wanted to add a touch probe to my Pocket NC. This time, I’ll cover the basic hardware necessary to make it happen.

I decided to start with an inexpensive probe so that as I was figuring things out, I wouldn’t be too sad if I smashed it a few times. I’ve seen a number of other hobby machinists use the “vers.by” probes, so I decided to give them a try too.

Pocket NC Touch Probe - Motivation (Part 1/4)

When machining, you need to accurately position the cutting tool with respect to the workpiece. With the stock Pocket NC, there are two methods for doing so. The first is to rigidly locate the workpiece with respect to the B axis reference point using a fixture. The second, is to do manual touch offs. Nearly all of my work so far has relied on the former method, as using a manually touch off on a machine without manual controls isn’t all that precise or pleasant. And while possible, it is tedious to touch off against features more complicated than a single edge.

Fixing a chip evacuation problem on the Pocket NC

My Pocket NC v2-50 is a fine machine for its size class, but there are still plenty of annoyances. One of them is that chips can accumulate places they shouldn’t, either during a run, or over the long term.

There is a cavity near the back of the machine where the Y axis cables and cable guide retract into. That cavity is exposed to chips flying around, so they tend to accumulate there. There is a hole in the bottom of the machine where the chips could maybe fall out, except the hole is too small for any but the smallest of chips, and further, it is completely sealed off when mounted in the stock Pocket NC enclosure.

Compensating for FET turn-on time

A motor driver like moteus switches power to the phases of a brushless motor using a set of 6 (or possibly more), MOSFETs. The typical topology involves 3 high side N channel MOSFETs and 3 low side N channel MOSFETs arranged in 3 half bridges like this:

(example 3 half-bridge from DRV8353 reference manual)

(example 3 half-bridge from DRV8353 reference manual)

Since the gates of these FETs need to be driven with potentially high voltages, and you never want the high side and low side to be on at the same time, typically a gate driver is used. For the moteus r4.5 and earlier controllers, the DRV8323 driver from Texas Instruments is what performs this function. This driver lets you configure the drive current for each of the gates for both operations, charging up the gate and discharging it. For high power drive systems, charging up or discharging the gate too fast can result in undesired transients like accidentally switching the other FET on due to capacitive coupling, or inductive ringing as the current starts moving through the FET instead of the body diode. If the gate charges too slowly, then the FET spends much of its time not fully on, which increases power dissipation in the FETs.

Spurious writes to address 0x00000000 on an STM32

What happens if you accidentally write to address 0x00000000 on an STM32 microcontroller? Answer: usually almost nothing, because most linker scripts by default map a bank of flash there, and you can’t write to flash normally. The flash controller does notice and sets an error flag, but most applications aren’t exactly checking the flash peripheral’s error flags on a regular basis.

However, if you use the HAL to try and perform a flash operation, it doesn’t bother checking the error flags *before* trying to perform an operation. It just tries, and reports any errors it observes at the end. So, if you have an application that occasionally makes a spurious write to the zero address, and also performs flash operations, it will manifest as spurious failures of the flash operations.

Working on a new leg for the quad A1 - Part 1

I’m going to try something new for this effort, and instead of making a bunch of blog posts culminating in a video, I’m going to make a bunch of intermediate progress videos. They may, but may not, culminate in an overview blog post. Here’s the first!

Gear testing fixtures

The qdd100 servo uses a planetary geartrain as the transmission reducer. This consists of an outer ring gear, an inner sun gear connected to the rotor as the input, and 3 planets connected to the output. The tolerances of these gears directly impacts the performance of the servo, namely the backlash and noise.

To date, I’ve been hand-binning these and testing each servo for noise at the end of production. To make that process a bit more deterministic, and with less fallout, I’ve built up a series of manual and semi-automated gear metrology fixtures to measure various properties of the gears.