Tuesday, April 6, 2021

Pressure control, 1 kHz USB data logging

PI+Lead pressure control with ~30 hz bandwidth (probably will get it's own thorough post soon), native USB data transfer either way (logging at a little over 1 kHz, sending commands at ~15 hz from the GUI), python/QT gui running the show.  Orange = pressure command, blue = measured pressure:

Sunday, April 4, 2021

STM32 USB CDC + PyUSB Data Transfer

 First experiments using native USB CDC (communications device class) on STM32's, using the CubeMX libraries:

It's been surprisingly straightforward to get working.  I basically just followed this video from ST, with a few minor changes.  I've been able to hit up to 650 kilobytes/s transfer (micro to computer) which seems to be the limit for the ST libraries.  Put another way, I can log ~160 floats at 1 kHz.  Although not nearly as fast as USB Full Speed can be, it's way faster than serial,  it's non-blocking, has  CRC error checking with auto-retry, variable packet size, and so on.  Overall a very nice data transfer experience.  It's great to not have to think about packet structure, accidentally being off by one byte, error checking, and all the other headaches that usually go along with serial.

The gif is a PyQt GUI using PyUSB for USB data transfer, using pyqtgraph for plotting, same as the dynamometer GUI.  Plotting performance is a little disappointing.  I get ~9 FPS plotting 19 traces at 2000 points/trace.  Performance seems to scale linearly with number of traces, but not with number of points, which is kind of interesting - plotting 1/5 as many points only increases the frame rate by 50%.

Tuesday, March 23, 2021

Frequency response measurement

It's been a while since I did any system id for fun:

Pretty darn 2nd order (as expected from motor inertia and magnetic coupling stiffness).  Handy way to get generate a bode plot from timeseries data is  \(\frac{FFT(output)}{FFT(input)}\)


Sunday, February 21, 2021

Tuesday, February 16, 2021

Espresso Machine Group Head Machining


 The click at 0:41 is very satisfying

Questionable workholding stack:

Fancy "morphed spiral" profiling toolpath came out well:

Inlet and outlet visible

With fittings, shower screen and seal installed, and portafilter locked in.

Proper blog post on the way

Wednesday, February 3, 2021

Monday, January 18, 2021

First attempt at shrink fit tool holders

The eventual goal is to have these for all my tools so I can preset tool lengths and never swap ER collets.  This one was machined on a kind of sketchy lathe at work, so that's my excuse for the .0005" runout.  In the future I'll bore them out in the mill spindle.

Technically the tool length depends on how tightly you fasten the collet nut, so I did some "blind" testing, tightening the nut without looking at the dial indicator.  Seems pretty repeatable:

Sunday, January 10, 2021

Pretending the mill is a lathe

 A quick experiment in doing some turning on the mill.  The mill is in "TCP" mode, so I can jog it in work coordinate system rather than machine coordinate system, and turn a taper by jogging in the WCS Z axis.  Material is 17-4 PH stainless, 5000 RPM, .3mm DOC.

This clip shows how the mill is moving in both the Z and Y axis to make an 8 degree taper (indicating against an ER collet), but I only have to jog in Z on the pendant:

Thursday, January 7, 2021

Thin Part Fixturing

Using the super glue and blue tape trick to fixture some large (relative to the mill), thin parts.  I normally used double-sided tape for stuff like this, but didn't have any on hand.

Tape applied to stock and fixture:

Clamped while the super glue is curing:

Lots of Y-axis exercise profiling some semi-circular grooves:

Saturday, January 2, 2021

Gourd Ukulele Modifications

Finished making some long overdue fixes to the gourd ukulele.  Originally the neck was too thick and it had too much string action.

Tuesday, December 29, 2020

Gear Pump Closed Loop Pressure Control


Using a leftover pendulum motor controller, Moog brushless motor scavenged from the Media Lab years ago, and gear pump from ebay to play with closed-loop pressure control.  Pressure plotted on the computer screen (and shown on the gauge), pressure setpoint stepped up and down, and a needle valve used as a variable load.

Internals of the gear pump:  Food-grade, stainless body with PEEK/CF gears and bushings:

Monday, December 28, 2020