how to make something that makes almost anything
Sam Calisch
CBA

This week, we were to use the mechanisms lecture to build components of our capabilities/applications/machines.

DRO OCR and rotary EDM, aka "turn and burn"

TLA, FTW. This week Will and I worked on a rotary axis for the wire EDM machining center in CBA's shop. Usually work is fixtured to the side counter, protruding into the work area for the wire to cut. Our rotary axis mounts to the counter and extends a shaft into the working area. We imagine making parts that are designed to fit onto a shaft, so we will start with a blank that is already bored and has a set screw. As the wire machines away the blank, we turn it on the shaft. The machine controls its feed rate based on voltage, so it happily slows as we present more material by rotating, and speeds up when there is less material to cut.

We have no access to the coordinate values of the machine, and it would be a waste of resources to precisely measure them (when they already have amazing instrumentation). Instead, we use optical character recognition (OCR) with a webcam to extract the coordinate values from the digital read out (DRO).

A) Mounting web cam. B) View from camera.

Above we see a janky mount for the web cam, and the view of the camera. Using standard OpenCV tricks, we can correct the perspective, extract the green channel, and threshold the image. We then detect contours in this image to locate our region of interest (ROI) around the digits.

A) Perspective Correction and adaptive threshold. B) Supervising learning.

This region of interest is refit onto a standard dimension, and we use this training data for machine learning. I experimented with learning algorithms and feature vector representations of the digits that are detected. The two main algorithms used for these types of tasks are K-nearest neighbors and support vector machines. In practice, the two performed about nearly the same, though SVM ran faster online because it offloads some work to the training process, whereas KNN is "lazy learning".

KNN vs. SVM, from OpenCV

The success of SVM relies on linear separability -- the ability to route a hyperplane the separates the data (up to outliers). Often we use a kernel function to map data that isn't linearly seperable into a space where it is. For these tests, we use the radial basis function kernel, a common choice.

As far as feature vector representation, I experimented with both the "raw" form (just pixels as a vector), as well as the histogram of oriented gradients (HOG) method. I think the HOG form can do better recognition with lower dimension, but we have enough headroom that the difference is negligible.

Classifying coordinate values.

These results were so excited that Will and I wanted to build a quick rotary axis. I machined an aluminum bearing block to clamp to the EDM side counter, while will routed an HDPE mount for the stepper motor to remain above the water level. The bearing fit wasn't ideal (buy shafts and bearings together!), but the bearings were the only sealed ones I could find hanging around.

Using this rotary axis, we machined a captive helix into a hardened steel shaft. I didn't have the DRO reader in good enough shape to use, so we just ran the rotary axis "open loop". I wouldn't know how to make this part any other way. To come, I'd like to do more work on developing toolpaths for this rotary axis -- pessimal machining (removing all material) looks to be straightforward, and algorithms for bulk material removal are an exciting topic to develop.

Helix cut out of hardened shaft.

Reinforced Z axis for handibot

Reinforced Z axis for handibot

I spent some time this week working on a reinforced Z axis for Shopbot's handibot, for use with their 5 axis attachement. In 5 axis work, we end up wanting to drive the Z axis to its lower limit, so this improvement extends the range, as well as adds another carriage block to increase stiffness.

Quick change kinematic mount for BLDC motor spindle

This week I enjoyed reading Marty Culpepper's PhD thesis, which is a great example of managing the competing demands of repeatability and stiffness inherent to kinematic constraint. He says:

A kinematic coupling, as shown in Fig.1.7, can provide economical, sub-micron repeatability. They are relatively insensitive to contaminants, and for most designs, do not require an extensive wear in period. However, because these types of couplings transmit force through near point contact, care must be taken to design the coupling elements such that they can withstand the high contact stresses at these points (Slocum, 1988a) and maintain surface integrity after repeated cycles (Slocum and Donmez, 1988b). Though they can be designed for moderate stiffness, their ability to resist error causing loads is still limited by the mechanics which dominate the stiffness of the point contacts.

In my experiments in lost-foam casting, I may try a few of his quasi-kinematic couplings, which are easy to cast into a part, and require only a simple operation to create the precision surface.

BLDC kinematic mount cut file.

For my machine progress, I decided to experiment with kinematic couplings for quickly mounting BLDC motors as spindles. Since these motors are so cheap (~$10), I can imagine keeping a couple around with different end mills, and to change tools we simply swap motors. I decided to take as design constraints that I could securely mount the motor using only a single thumb screw, and the motor attachment part could be made on the waterjet (no milling). Obviously, we could get more precision from the mill, but since we'll need a few of these parts, I want them to be super simple to make.

With this cheap and cheerful approach in mind, I used pan head screws as the "spherical" surfaces. Clearly these are neither spheres, nor precision surfaces, but since we are simply constraining 6 points, we will still have a secure mount. If we were to match up the slots with pan heads differently, we could not guarantee the position of the end mill tip, but we could easily enforce a given matching. Up to the precision I care about for this machine, these concerns are fine.

This was a really quick project, but I was reasonably happy with it. The spindle is quickly and securely mounted, and I can imagine actually using this technique in my router workflow. Clearly, these brushless motors are only good for 1/8" shank tools, but I'll look around for a bigger motor for larger shanked tools.

MAS.865 2015