Upgrades, a bigger project, and why that machining job might cost more than you expect (Part II).

Too long. It’s been too long since I last wrote on this blog, but sometimes regular work just has to been done first. In this past instance it was one longer design project and an extensive series of equipment and tool upgrades. The design project was a piece of lab equipment for Dr. Jinsook Roh, a neuroscientist at Temple University. Here’s a quick look at the whole thing. There are some detail photos later on.

Photoshopped best top view

Calculations. It was a fun project. There were mechanical engineering calculations — beam deflection, disk brake design, slipping and tipping, screw force. Nothing terribly esoteric, but nevertheless very satisfying. I also was able to use a variety of machines and tooling. Just for fun, I decided to make a list of what I used.

Machines. For machines and more involved tooling:

  • manual mill
  • CNC mill
  • drill press
  • lathe
  • horizontal band saw
  • carbide cutoff saw
  • tool grinder
  • universal cutter grinder
  • bench shears
  • bench punch
  • bender
  • boring head
  • auto-reversing tapping head
  • CNC touch probe
  • 3D-taster

Tooling, software, materials, and pieces. This is in addition to numerous milling cutters, drill bits, taps, edge finders, vises, parallels, measuring  and hand tools. And then there’s software — I count eight different pieces of software that I used for CAD, CAM, and engineering calculations.

It seems like a lot, but there were a lot of pieces, and multiple materials — aluminum plate, aluminum extrusion, low-carbon steel plate, low-carbon steel sheet, some hardened steel pieces to be modified, acetal, UHMWPE, and PVC. Here are some of the small pieces:


Which brings us back, briefly, to a question that I raised last time, “why that machining job might cost more than you expect.” Even for this project, which required only ordinary precision and did not involve esoteric materials, a rather stunning collection of machines, tooling, and software was needed. All these things cost money to purchase and maintain, which is reflected in the cost of a machining job.

Details. Here are a few details that I thought came out well:


Brake w_ safety pin


Arm support close up


By |November 4th, 2015|Design, Machining|Comments Off on Upgrades, a bigger project, and why that machining job might cost more than you expect (Part II).

Read More

Why that machining job might cost more than you expect — Part 1: Jigs and fixtures

More than you expect. People are often surprised about how much it costs to make something “simple.” One problem is that most of the manufactured items that we purchase in our daily lives are manufactured by the thousands, if not by the millions. For instance, if you need a nut or a bolt, you can go to a hardware store and buy one for pennies. A 3/8-24 “SAE Zinc Grade 5 Finished Hex Nut” costs only 15 cents at Home Depot. However, if you asked me to machine such a nut from scratch — from a hunk of metal — that would be another matter entirely. Hardware store nuts and bolts are made by the millions; but when you go to a machinist with your job, you might want only one part.

Mass manufacturing vs. a “one off.” Mass manufacturing is often carried out with special-purpose machines designed specifically to allow huge quantities to be produced at low cost. Low cost is achieved by spreading the high initial cost of the machine over the large quantities of parts produced. When you hire a machinist to do a small job, however, that machinist typically uses general-purpose machines — for example, drill presses, lathes, and milling machines — to make the part. For many situations, these machines, along with standard cutting tools, and various kinds of commercially available clamps and vises will do the job just fine. But, often enough, these things alone will not suffice.

Jigs and fixtures. A common situation is that there is no easy way to hold the part so that it can be machined, or there is no easy way to orient the part so that it can be machined accurately, or that there is no standard cutting tool that has the right shape to do the job. In these cases, the machinist needs to fabricate a jig, fixture, or cutting tool just so s/he can do your job.  A fixture holds the part down in a fixed position so that a machining operation can be accomplished. A jig, on the other hand, orients and guides a cutting tool (e.g., a drill bit) into the right position. In some sense, fabricating a jig, fixture, or special cutting tool is a way of making the general-purpose machine into the special-purpose machine required for your job. Naturally, fabricating these special items takes time, which translates into increased costs for your machining job. Sometimes making these special pieces will take longer than the rest of the machining job. This is explains why a “five-minute job” could actually take a couple of hours.

An example. Here is an example from a small “simple” job I recently did. I’ll leave some of the details out, just so we concentrate on jigs and fixtures. The job was to drill some holes in a 1–1/2″ thick piece of plywood to mount an apparatus. The apparatus was to have a number of mounting plates with mounting holes through which bolts would be inserted. These bolts would engage flanged nuts on the underneath side of the plywood. To keep the nuts from protrouding, they would be recessed in counterbores (circular “pockets”). This is illustrated in the following figure.

nut and bolt.77

The blue piece represents a mounting plate with a mounting hole. The figure shows both the hardware and what the underside “pocket” would look like. Pretty simple, except that the holes in the plywood, including the pocket, had to be exactly aligned with the mounting hole in the plate.

Two jigs. The solution to the problem of getting exact alignment was to make two jigs, shown in the figure below — the two aluminum pieces on the left. The piece on the right is a simple fixture, which I will talk about a little later.

jigs and fixtures

The way the jigs work is as follows. There is a jig that is used on the top surface, to allow us to drill straight through the center of the plate mounting hole. And there is a second jig that is used on the bottom surface, to allow us to drill a large diameter bolt hole in perfect alignment with the first hole drilled from the top.

Top jig. The top jig is explained by the illustration below. Again, the blue piece is the mounting plate. The aluminum jig fits into the mounting hole in the plate, which then guides the drill bit straight down through the center of the mounting hole, and perpendicular to the top surface of the wood.

top jig assembly.81

Bottom jig. After the hole is drilled through, the plywood is turned over and the drill exit hole is used as the center point for a Forstner bit, which makes the recess. Now the challenge is to drill a large-diameter hole for the bolt.  If one simply takes a  handheld drill with a drill bit of the appropriate diameter for the bolt, misery will soon follow. The drill bit will refuse to stay centered. The drill bit will “wander” in the soft wood, and the bolt hole will end up far from the center. But, another jig solves this problem, as shown below.

bottom jig assembly.83

This jig fits to the recess, or counterbore, to center the drill in exactly the right place and prevent the drill bit from moving off center while drilling.

And a fixture. That’s the two jigs, but I also needed a little fixture for this job. I’ll skip the details here, except to say that rather than using a regular flanged nut, I used a flanged nut that had two small slots cut into the flange, as shown in the figure below.

slotted nut.79

Since I had twenty of these slotted nuts to make, I used a CNC mill to make the slots. This was more or less a straightforward task, with a simple CNC program, except that the nuts were hard steel so that I had to go a little slow when cutting them. But there was also the problem of how to hold the bolts so I could machine them. For this, I made a little fixture to hold the nuts. The fixture looks like this:

fixture assembly.86

It’s an aluminum rod with a neck that fits inside the flanged nut. The neck has a threaded hole that allows the flanged nut to be bolted down tightly onto the fixture. The fixture was held in a collet block, the collet block in the machine vise, and the nut bolted to the fixture. Once everything was set up, I would pop the unmachined bolt into the fixture, start the milling program, and take the machined nut off the milling machine two minutes later. Here’s a little video that shows how everything works:

For this particular job, for which I made 20 holes and machined 20 slotted nuts, I also had to make two jigs and one fixture. But even if I had needed to make only one hole and only one slotted nut, I would still have needed to make the two jigs and one fixture.

Tags: ,

By |June 24th, 2015|Design, Machining|0 Comments

Read More

loopboost progress report #2

I’m been working on the preliminaries of the loopboost project. I have a basic concept for loopboost 1.0:


and I’ve working on the hardware and software block diagrams. I don’t have all the parts yet, but I should be able to start coding next week.

By |May 11th, 2015|Assistive Technology, Design, LoopBoost|0 Comments

Read More

Boxes, Cases, Enclosures — Part 1

Sometimes it takes more time and energy to make the project box (case, enclosure) than it takes to actually design and build the electronics. For a final product or a production version, that might make sense. But sometimes you just want something that will do the job, not take too much time, but still look good. Over the years I have watched hundreds of engineering students use laser cutters and 3D-printers to make their project boxes. That bothers me sometimes, especially the mess of cut acrylic sheets surrounding the laser cutters and the knowledge that most of these projects will find their way to the dumpster soon. It seems wasteful and ecologically unsound. Not to mention, this is an expensive way to make a temporary box. 3D-printing has its own problems, one of them being that it is a really slow way to make box. Taking four to six hours to print out an enclosure, when there are dozens of other students in the queue desperately waiting to print their parts, doesn’t seem consistent with the concept of unleashed productivity that 3D-printing is supposed to bring.

All of this waste and inefficiency is made worse by the fact that the project box might have to be remade a few times because of measurement errors and design changes. However, over the last few months I have been working on a system that uses small 3D-printed pieces, in combination with decorated foamcore panels, to make serviceable and attractive enclosures cheaply, quickly, and easily. Better still, these enclosures are quickly and easily modified if there are measurement errors or design changes. And a further advantage is that the 3D-printed pieces can be made up ahead of time, before the dimensions of the enclosure are known. Then, when the dimensions are set, the foamcore panels can be cut and the case put together in a manner of minutes.

I’ve worked out several different methods of building these boxes, which I’ll describe in upcoming posts. For now, I’ll introduce what I think is the best approach for small boxes. It basically consists of two plastic (3D-printed) endcaps which contain slots into which four foamcore panels fit into. A couple of pictures say it all:


Small box

Of course, the box need not be quite so plain. Here is rendering of something edgier:

Small box with stripe

In my next post on this subject I’ll provide some construction details. I also think I’ll have an OpenSCAD program available that generates the STL files for the endcaps.



By |April 26th, 2015|Design, Electronics|0 Comments

Read More

loopboost progress report #1 — a design road not taken

I’ve been working on the loopboost blog ( recently, laying down some design considerations before actually jumping into the hardware and software development. There are always important design decisions that are made at the very beginning of any design project. These are not always explicitly recognized or communicated, but since the loopboost project will be both public and open-source, I wanted to be very clear about these at the beginning. All this discussion is on the loopboost blog, so I won’t repeat it here; but I will include a concept sketch that I did early on. This sketch, however, represents a design road not taken.




By |April 20th, 2015|Assistive Technology, LoopBoost, News|Comments Off on loopboost progress report #1 — a design road not taken

Read More

Prototyping with modules and breakout boards

Using the LPKF Protomat ciruit board machine. In a couple of earlier posts I described rebuilding a LPKF Protomat circuit board etching machine. This wasn’t a recreational project (although I did enjoy doing it). I like to use the machine for quick prototyping when the circuit is not too complicated. This week I used the Protomat to build a board whose components are almost entirely made up of modules and break-out boards:


Modules and breakout boards as components. The components include a Modern Device “RBBB” Arduino-equivalent, an Adafruit real-time-clock breakout board, an Innogear HC-05 bluetooth module, and a Maxbotix ultrasonic rangefinder. There are a couple of other things that plug in as well. The whole system could be sustantially miniaturized, of course. The components could be squeezed closer together, but they are spread out this way because there is something that fits on top of this circuit, and this layout gives access to the pushbuttons and connectors when the other components are placed on top.

Better than the old days. In the “old days” these kind of modules and breakout boards were not available, and I would have had to design, lay out, and build an entire circuit board from scratch. This new way of doing things (thanks Adafruit and Sparkfun!) makes designing and prototyping so much faster. As the current project progresses, I will eventually have to design and lay out a board from scratch — with surface mount components most likely. For now, though, there’s nothing that can beat — in terms of time and convenience — building with off-the-shelf modules and breakout boards.

Spying on my cats. What is this board for? I can’t really say here because of intellectual property issues. There’s more to the project than what’s shown here. But the system shown here could be used to spy on my cats. Let’s say I want to know how much time they spend sitting on the big chair in my living room — and when they’re in that chair. I could use this system and point the ultrasonic range finder at the chair. The Arduino-equivalent would be programmed to recognize when something is in the chair and broadcast (by bluetooth) cat-in-the-chair and cat-not-in-the-chair data to a bluetooth-enabled computer in the house. The realtime-clock would allow the data to be time-stamped; so rather than sending out raw data, the system could send out more processed data: for instance, an hourly cat-in-the-chair report and a 24–hour report. The possibilites are endless. A report might include information such as “maximum uninterrupted sitting time.” As I write this, I’m beginning to think that  I might just build an extra one of these circuit boards so that I can spy on my cats. I don’t know whether they’ll be affected by the high pitch emitted by the ultrasonic range finder, but I’ll find out.

By |April 11th, 2015|Assistive Technology, Electronics, News|0 Comments

Read More

loopboost: a new open-source assistive-technology project

Loopboost logo for wp

Today I started a new open-source project called loopboost. The goal is to develop technology to help persons who have difficulty with working memory and attentional control. This would include persons with attention deficit disorder and brain injury. The project site is This project will build upon an idea that I developed about ten years ago, to develop an artificial phonological loop. The phonological loop is essentially the “inner voice” to keep ourselves focused and on-task. I won’t post everything from the loopboost site onto this one, but I will summarize progress and important project events here.

By |April 6th, 2015|News|Comments Off on loopboost: a new open-source assistive-technology project

Read More

Rebuilding the LPKF Protomat — The new software toolchain

The software problem. Now that I had the hardware under control, I moved on to the software problem. Originally the Protomat machine was supported by two pieces of LPKF software: CircuitCam and BoardMaster. CircuitCam took as inputs the circuit board layout pattern (Gerber files) and the drill information (Excellon file). CircuitCam then will figure out how to mill out a board with a small diameter milling cutter so that circuit board traces are electrically isolated from each other. These cuts into the copper-clad board are called isolation tracks. The standard LPKF isolation track is only 0.2mm (0.008 inch) wide. After the isolation tracks are generated in CircuitCam, one can export the LPKF milling machine data to a file. Typically this data would include both the data for the isolation tracks and for the drilled holes. Then, to have the Protomat machine manufacture the circuit board one would use the LPKF Protomat control software, BoardMaster. From BoardMaster one would read in the data file prepared by CircuitCam and then mill and drill the board. BoardMaster would organize the fabrication process in terms of “phases” (e.g., milling top side, milling bottom side, drill holes), associating each phase with a different milling cutter or drill diameter. The problem was, when I got rid of the LPKF electronics, BoardMaster would no longer work and I needed a new way of taking the Gerber and Excellon files and getting the Protomat to move appropriately.

The tool chain. Here is the toolchain I eventually worked out:

Protomat toolchain

The first step, of course, is to lay out the circuit board. I have been using Eagle as my circuit board design software, but I am moving to DipTrace (more about that later). This is how the board layout might look in DipTrace:


For both Eagle and DipTrace I generate the Gerber-X and Excellon files and then import them into CircuitCam. All I do in CircuitCam is to produce the isolation tracks.

This is how this same board looks in CircuitCam. The white lines are the isolation tracks.


So far, no difference with the old way of doing things when I could use BoardMaster. But now, with the new way of doing things, I export a DXF file from CircuitCam. In setting up the export job I make sure to include both the isolation traces and the drill holes. Also, if I am going to be milling out the bottom side of a board, I export a “flipped” DXF. (The standard view orientation for circuit board software is looking down from the top of the board, so that the bottom side is visualized as if you could see through the board. But to actually mill the bottom side, you need the turn the board over so you’re actually looking at it from the bottom side.)

Getting lucky. Now I have a DXF, and I need some way of converting that into G-code. I got real lucky here. I thought that this was going to be tricky, but it wasn’t. I had a copy of the SheetCam. I imported the DXF into SheetCam (a wonderful feature!) and then assigned an engraving tool to the lines associated with the isolation tracks. This engraving tool corresponds to the 0.2 mm cutter. Then there was the problem of the drill holes. But SheetCam can recognize small diameter circles and offer to make them the centers for drill holes. All you have to do is to say, “yes.” SheetCam will then allow you to associate a drill from your tool list to these drill centers. Even better, it will allow you to associate a range of circle diameters to a single drill. For instance, in one of my boards I had holes ranging from 0.039 to 0.043 inches. I let SheetCam know that for all these holes, I wanted to use a 0.040 inch drill. SheetCam automatically figures out all the tool paths. Here is what it looks like in SheetCam:


Modifying the postprocessor. The last step within SheetCam is to run the postprocessor to generate the G-code. If I were going to be using a regular Mach3–controlled milling machine, I would just choose Mach3 as my postprocessor. But this would generate G-codes to move the Z-axis. The Protomat machine, though, has only two z-positions: “up” and “down”, determined by the milling head solenoid. I mentioned in the earlier post that I set up Mach3 so that an M8 G-code would energize the solenoid to pull the milling head down, to cut or drill. And M9 would return the head up. So I modified the postprocessor. The new postprocessor issues an M8 at the beginning of each milling cut and issues an M9 at the end. Likewise, the new postprocessor issues M8 and M9 within each drill cycle. I’ll post the postprocessor code on github as soon as I figure out how to do that.

The last step: Mach3. There is nothing special about running the Mach3 job using the G-code generated by SheetCam. It just runs. If I had time and inclination, I might upgrade the hardware so that Mach3 could directly control the spindle speed. At this point there’s no great advantage to me for doing that. The one improvement that might make a difference is a better way of controlling the drill cycle dwell time. As it is, I issue an M8 command to pull the milling head down, wait a little while, and then issue the M9 command, and wait a little while before executing the next G-code command. These pauses give the head time to move down and back up. Not much time is needed for the milling cutter, but more is needed for drilling. And the bigger the drill, the more time is required for it to drill all the way through the board. Presently, I have a “long” dwell time that will work for larger diameter drills. This works, but it means that for smaller diameter drills I’m taking more time than I really need. I suppose that this would be a problem if I were making boards with lots of holes; but, really, I only use the Protomat for small boards, so this “wasted time” is not a big deal. For now, this project is done! Here’s the ciruitboard (slightly different version) that we’ve seen from DipTrace to CircuitCam to SheetCam:


By |April 3rd, 2015|Electronics, Machining|Comments Off on Rebuilding the LPKF Protomat — The new software toolchain

Read More

Rebuilding a LPKF Protomat 93s Circuit Board Milling Machine

Worth keeping. I acquired a dead twenty-year-old LPKF Protomat 93s circuit board etching (milling) machine. This machine, when working, makes circuit boards by mechanically etching, rather than chemically etching, the circuit board traces on a copper-clad board. It’s essentially a special-purpose milling machine. The special advantages of the Protomat, compared to a regular desktop milling machine, are: 1) it has a high-end high speed spindle (60,000 rpm); 2) it has a mechanical depth limiter to control the cutting depth of the milling bits; and 3) it is massively built with precision components. I thought it was definitely worth keeping; but, unfortunately, the electronics on my machine were bad. There are a couple of circuit boards in the machine; and it would have probably cost around $1,000 to replace the main board. That was way too much money for me, so I decided to replace all the electronics.

Goal: to rebuild as a Mach3–controlled CNC machine. My idea was to completely junk the existing electronics, and rebuild the Protomat as a Mach3 controlled CNC machine. It turns out that it was fairly easy to do, so if you have an old machine like this, you might be able to bring it back to life for a few hundred dollars.

Here it is working:

And here is what I did to get it going again.

The stepper-motor controller. The Protomat electronics controls three things: 1) the stepping motors that move the milling head in the X and Y directions; 2) the solenoid that pulls the milling head down to cut and drill the circuit board; and 3) the high speed spindle controller. Getting the stepping motors going again was straight forward. The steppers are bipolar NEMA 23 steppers, and I already had a stepper motor controller using Mach3, so it was just a matter of wiring up the stepper motors. My controller box is the Gecko G540–based STDR-4C system produced by Jeff Birt at Soigeneris, using the ethernet SmoothStepper. The only thing that gave me pause was setting the current limit for the steppers. There were no nameplates on the Protomat steppers. Motor nameplates usually give the current limit. However, by looking at other similarly sized motors, I concluded that 1.5 amps would probably be safe. As it turns out, at that setting the motors have not gone up in smoke, they do not run hot, and they run fast enough, so I think I made a good guess.

The solenoid-controller. To control the milling head solenoid, I had to first figure out the solenoid voltage. I guessed that it would be a standard solenoid voltage, either 12V or 24V. I connected various DC power supplies to the solenoid and found that 12V was too little to pull the solenoid, but 24V worked. I also noted that the original electronics had a toroidal transformer with a 24V tap, which I take as confirmation that it is a 24V solenoid. I also discovered that the solenoid has a diode across it. Next, I had to figure out how to control the solenoid. But that was easy since I already had the controller box, which provides a Mach3–controlled relay. Ordinarily this relay would be used to control a coolant system, but instead I used the relay to control the current to the solenoid. I’ll describe my software arrangement in a later post, but for now I’ll just note that I use a M8 g-code (coolant on) to energize the relay and solenoid, and a M9 g-code to release the solenoid.

The spindle-controller. Replacing the spindle control electronics was the biggest challenge. Initially, all I knew was that it was a three-phase motor because it had three wires going to it. But fortunately the spindle was marked, so at least I knew what I was dealing with. It’s a Jager 33–1 W02 spindle, with a maximum RPM of 60,000. I found the spec sheet online, which indicated that it had a maximum voltage of 21V, a maximum current of 7 A, and maximum driving frequency of 1,000 Hz. It took me a few days searching online to find something suitable. Most of the VFDs I found did not have high enough driving frequencies; and if I found one with a driving frequency that went up to 1,000 Hz, it was for motors with much higher operating voltages. Eventually I discovered the Sunfar E300 inverter, sold by Automation Technology as the “KL-VFD03 Mini-type Integrated Universal Inverter (VFD), 2.2KW.” And it was only $199.

This VFD has a maximum driving frequency of 1,000 Hz, which is just what I needed. It has dozens of user-adjustable operating parameters, but the key one here is the maximum output voltage, which is 25–250V. The spindle has a maximum operating voltage of 21V, but I figured that setting the VFD maximum voltage to its lowest value, 25V, would be close enough. So I purchase the VFD, connected it up, and it worked. I keep checking the temperature of the spindle to make sure that it is not overheating; and so far, so good. It is possible to control the spindle speed from Mach3, but I’ve been doing it manually.

220V supply. One small wrinkle is that the VFD needs a 220V supply, and I don’t have a 220V line where the Protomat is located. But I did have a spare 110V-to-220V step-up transformer. The one I had was 750 W. The spindle is only 170 W.

Circuit board quality. When I finally got the rebuilt system going, I was able to make some really nice boards:


I also took a close-up. The isolation cuts are very sharp:


Replacing the software.
The downside of replacing all the electronics was that I could no longer use the LPKF BoardMaster software to control the machine. I eventually worked out a tool chain to do that, which I will write about next time.

By |March 31st, 2015|Electronics, Machining|9 Comments

Read More

Hanging Suns

So now all the snowflakes in my front window have been replaced by suns. I strung them up with fine fiishing line — lots of knot tying. To get the spacing right, I made the simplest of jigs — two nails hammered into a 2 x 4:


I had trouble getting a good picture of the 3D-printed suns hanging in my window, so this will have to do for the time being:


I’m ready for spring now!

By |March 25th, 2015|Visual Design|0 Comments

Read More