This is not fancy, flexible, or robust. It configures a prologix usb-gpib converter to grab screen captures from a LeCroy 94xx or 93xx oscilloscope, store the resulting HPGL into a file, and convert that file to a .png using the HP2xx conversion program.
You need to have pyserial and HP2xx installed. Both are available through repos.
Usage: sudo python screencapture.py [/dev/tty of usb converter] [gpib address of scope, which has to be between 2 and 30, because lecroys behave weirdly outside that range.]
This should work with early Waverunners like the LT3xx series. I have not yet gotten it to work but that’s a setup issue with the Prologix. A Waverunner will need a much larger buffer.
To do: use a serial.inwaiting loop to only use as much buffer size as needed.
I’m also incompetent at posting code on wordpress apparently, so you can go to github: lecroy scope screencap on github
if __name__ == '__main__':
if len(sys.argv) != 3:
print "Usage: ", os.path.basename(sys.argv), "
comport = sys.argv
addr = sys.argv
ser = serial.Serial()
ser = serial.Serial(sys.argv, 9600, timeout = 2.0)
print("Setting up usb-gpib device")
ser.write('++addr ' + addr + '\n')
print("Setting up scope screen plot parameters")
print("Acquiring screen capture")
s = ser.read(65536)
f = open("scope_output.txt","w")
print("Done writing to file! Using HP2xx to convert to png image.")
print("Finished converting image to png")
except serial.SerialException, e:
except serial.KeyboardInterrupt, e:
Traditional Japanese wood joinery with nontraditional CNC equipment
Japanese joinery is famously intricate, with centuries of history using hand tools to provide robust, durable, and beautiful joints in wood without the use of metal fasteners. John decided to go about making these by using modern CAD/CAM software and a CNC mill to rough out a joint known as a Stepped Gooseneck Splice, in Japanese, Koshi-kake Kamatsugi. This joint is used where wood sees intermittent tensile stress, like the lintel of a doorway. Traditionally this is done with a lot of attention to layout and a painstaking process of chiseling out wood and fitting up the result.
John chose to do this by modeling the joint in FreeCAD, then processing the solid model in PyCAM. PyCAM produced some layers that had extraneous vertical retractions and plunges, so he goes through how to edit g-code to copy good paths to lower layers that have flaws. Alternatively, he could have tried out Heekscad, another CAM program available for GNU/linux with a fairly robust CAM processor. John chooses to rough out the cut with a 0.25″ millbit that just cuts in straight lines to remove material quickly, then trace the outline of the cut with a 0.125″ mill to get a good representation of the final shape, which he cleans up by hand with a chisel. The result is a joint that has the same function and look as a traditional one, in a fraction of the time. Check out the video after the break.
This requires control over the Z axis, which many CNC routers don’t have, although here’s a previous Hackaday article about adding Z axis control to your router.
Note to anyone confused by this post: it’s my reference material for applying to be a Hackaday editor. Once that’s done, I’ll come back and clean it up and turn it into a substantiative post about Japanese joinery.
Slotting/shaping/keyway attachment for Atlas 618 lathe
I have a recurring need to make splines, keyways, and other linear features, and while in some cases I could do this on my mill, using an indexing head on the bed, it’s a pain to set up and align. In many cases, the stuff I want to make, the mill can’t manage, like broaching keyways in pulleys.
In the past, I’ve ground a custom toolbit and clamped it in the lathe toolpost and then used the carriage traverse to run it along a workpiece in the lathe spindle. This has a couple of advantages: the workpiece is automatically centered and colinear with the cutting tool, and I can cut a slot the length of the lathe bed. However, it’s slow and it puts a lot of strain on the carriage rack, because that’s how the carriage traverses the bed: me twirling a wheel that runs a pinion that runs on the rack, and I have to take very fine cuts in steel or risk damaging the traverse mechanism.
I recently made a new cross slide for my lathe, that allows me to bolt workpieces to the cross slide, and was thinking about bolting a linear way onto it to make a nice smooth shaper mechanism, but then I realized that I already have a linear way: the stock lathe compound slide.
I’d seen pictures online of arm-powered shapers, using a long lever arm that the user pulls to power the shaper ram, and realized I could do the same as a bolt-on to the Atlas 618, without permanently modifying the lathe.
This is a really crude implementation, to see if it works.
I cut a piece of 1/2″ steel tubing the length of the compound slide plus its travel, welded a couple of nubs onto the bottom of the tubing so it fits on the cross-slide carriage between the edge of the compound swivel and the apron the Atlas 618 uses to protect the cross slide screw from chips, and slotted and drilled the tailstock end of the tubing. Then I made a bracket out of angle iron, that bolts into the end of the compound slide, after removing the compound screw and bracket. The angle iron bracket has a hole in it, parallel to the hole in the slotted tube clamped onto the cross-slide. Another piece of 1/2″ steel tubing, with matching holes, is bolted to both of those (with a short idler to prevent over-constrained movement.) Assembled but not on the machine, it looks like this:
Here it is on the lathe.
A top view
and a view of the idler and the compound attachment point.
The result is that I can traverse the compound slide rapidly with one hand, while advancing the tool into the workpiece with the cross slide screw, after tightening the cross slide way clamp. That way there’s no force on anything that can’t handle it. Traversing is quite quick (especially with a dab of oil on the cutting tool.)
Here’s a video me operating it.
One interesting side-effect of using the compound slide is that I can set the compound slide at a slight angle (slight, because it runs into the lever arm fulcrum clamped to the cross slide body.) That means I can cut tapered splines (I’m not sure why I would ever want that) or more usefully cut square tapers. Those used to be pretty common on bicycles, for instance.
Because of the geometry of the tool contact point and the lever arm contact point on the compound slide, my first attempt using a tool clamped in the quick change toolpost was unsuccessful: the leverage exerted by the tool point twisted the toolpost, and that resulted in the tool digging in even more, a feedback loop that made the whole attempt unsuccessful. Instead I milled a toolholder that mounts the tool tip directly in line with the axis of rotation of the compound slide, and now it works very well.
A picture of a random demo internal spline cut in 6061-T6. I was cutting about 0.010″ per traverse, using the Atlas 618’s locating pin and index holes on the headstock bull gear to accomplish the workpiece indexing.
A better solution will be to replace the outboard headstock bearing tensioning nut with a nut that has a keyway on it (gee, I wonder how I can make a keyway?) so I can stick index plates onto it, and then clamp the headstock rotation by an arm that goes down to the threading banjo bracket. That’s next.
Laser Cut Ball Mill Designed in Inkscape for a Glowforge Laser Cutter
I designed this ball mill using Inkscape. I cut it on the new Glowforge laser cutter that Mad Scientist Hut received. It uses a porcelain jar and ceramic balls to keep from contaminating the material being milled.