The Case, Commissioning And The PCB


I had enough marine ply left together with the offcut of the baseboard to build a box to house the computer.  I used quick release blocks to bolt the baseboard onto the top of the box.  The power switch is top right on the front of the box.  The two holes at the bottom left of the case are for the power and disk activity LEDs.

Here's the front:
box front
Here's the back:
box rear
You can see the keyboard, mouse and video connections at the bottom right.  Above that is the PC-DIO-24 connector.  Left of that is the Ethernet connection.

Software

In order to do something really useful with this machine, it needs to be able to understand a drilling language.  Building upon the test program, I designed a more advanced piece of code that could take keyboard-entered commands as well as drill control files using a sub-set of the Excellon language.  Excellon can also handle routing so it meant I only had to implement one standard.  It doesn't undertand all Excellon commands but it does enough to understand the output from Eagle.  It will be relatively easy to add new commands as and when required.

Once this new software (called the very original "drillcon") had been calibrated with the millimetres per step values that I calculated earlier, it was time to give it a drilling test.  It wasn't very photogenic so there's no picture of it, but it put the holes right where they were supposed to be.  Next I tried a routing test.  I wasn't prepared to put a real routing bit in yet so I used a pencil lead instead.
Here's the result:
routing test

The Circuit Board

The first real drilling job for this project was to be the drilling of the printed circuit board to replace the circuitry on the breadboards.  I created an alternative version of the schematics that had sockets instead of the sensors and drill coils.  I layed out the board design and made the PCB.
I mounted a paper printout of the board on the Y axis drill plate and taught the drillcon program where the drill bit was.  I then drilled two test holes in the paper printout to verify I had mounted the printout square.  By manually getting the platform to drill two holes in the PCB, I could then align the PCB and paper printout by simply putting a couple of pins through the holes.  There must be a better way, but I wanted to make sure that I was going to get my drill holes in exactly the right places.

The result:
PCB
Now while it was doing the drilling, I had set up a video camera to record the operation.  This board has over 200 holes of 4 different diameters.  The first two were similar enough diameters to use the same 0.8 mm bit.  That was about 150 holes and it took 90 minutes to drill them.  I converted the video to MPEG1 and speeded it up.  Once speeded up, I could see that the X axis moved up and down as it traversed.  This wasn't apparent to the unaided eye.  I believe the reason for this was that the lock-nuts weren't gripping the bearing tightly enough.  That was a leftover from the weaker stepper motor which wasn't strong enough to move a tightened X axis.  This meant that the drilling depth varied across the board.  My board mounting was also too flexible and the two together resulted in some holes not being drilled all the way through.  Not a complete success then, but at least it was easy to redrill the imperfect holes since there was already a hole to put the drill bit into.
The other thing I discovered was that although I was only drilling into the base of the PCB and not the copper itself (after all, I was drilling into the etched away hole positions), the 0.8 mm drill bit was completely blunt once it was finished.  The Excellon control language has a facility to count the number of holes made with a particular bit and to force a tool change after a preset count.  Clearly I need to implement this function in future.
That done, I glued the printout of the board top to the PCB as a poor-man's silk screen and did the bit that everyone loves - stuffing the board with components and soldering them in.
Like this:
filled PCB

Now I screw it to the base of computer box underneath the Ethernet card.  Here's a picture of that with the Ethernet card temporarily removed to gain access:
PCB mounted in
                                box

Put the Ethernet card back in, feed the motor drive and sensor cables into the computer box and bolt the drilling platform baseboard back onto the computer box.
Just time to tart up the sides with Tux in a very fetching yellow hard hat:
hard hat
                                    Tux

Also a good idea to put some warning signs on the baseboard:
warning
Eye warning    Machinery warning

That's it.  A Do It Yourself, 3 axis computer controlled drilling and routing machine - "Drillcon 100".

The Future

There are a few things on my list of things to do.  The top of my list is speeding it up.  This is actually harder than it sounds.  The computer has to generate the coil energisation patterns for every step to get the motors to rotate.  That's easy but there has to be a delay between them or else it'll send them so fast that the motors won't turn at all.  So there's a "usleep" between the pattern changes.  The problem is that a usleep causes a program reschedule so that even if you ask for the shortest possible delay, you always get a delay of the scheduler time slice.  There are a couple of nasty hacks I could use to get round that but I'd prefer a more elegant solution.  I'm currently looking at using RTAI-Linux which has a nano-scheduler with a much finer time resolution that a timer could be hooked onto.  I may or may not be able to use the existing Comedi driver with that but even if I can't, the code to talk to a simple 82C55 interface card isn't difficult, even if I have to write a low level RTAI kernel module.  I've done it before talking to a PCI industry pack carrier card so I'm sure I can do it again.
Once the speed is sorted out, the sensors will be a lot more useful and I can mount them permanently and incorporate their use into the drillcon program.
I still have a real routing test with copper clad board to do.
I'd like to be able to fit an appropriate pen into the drill chuck so that I can use the machine as a poor-man's silk screen printer.  That's only really useful when I use surface mount components since I can then draw the component outlines on the copper side.
I also had the idea of using this machine as a 3D mapper by replacing the drill bit with a switch mechanism connected to the drilling depth circuitry.  The idea then would be to make the machine perform a scan of rows and columns of X, Y coordinates and use the depth switch to tell it when the depth tip had touched the object being scanned.  That would eventually produce a grid of X,Y & Z coordinates that could be imported into a 3D CAD package.  I had an idea for the depth sensors using a pin with a magnetised end sitting inside a tube.  At the top of the tube would be mounted a Hall effect sensor that could detect when the magnetised pin end was lifted up next to it.  For a system relying on actual contact, it ought to be very low friction and very low force.
There's also the possibility of fitting a display screen of some kind to the drilling platform itself - either connected to the video port or perhaps a simpler text-only device controlled by a serial port.  It's not a high priority though since the drilling machine can be controlled remotely with SSH from any machine on my local network.  The network is how the Excellon control programs get to the box in the first place since it has no floppy or CDROM drives let alone anything as modern as a USB port.  The drilling machine doesn't actually need a monitor, mouse or keyboard at all.

Update
I have produced a new version of the software (version 1.1) that uses full steps for the Z axis rather than half steps.  That makes the drilling cycle twice as fast and actually increases the torque of the stepper motor because two coils are always energised.  I've also implemented the drill bit life code so that after a preset number of holes, the drilling program stops and requests a new drill bit.

Update 2
The computer became unstable so DrillconUSB was born.

So finally...