CNC


In my previous post I described the design process I went through in selecting the right components from my Rallylog that would fit into the Sparkfun Project Case, all while mounted on a PCB.  What follows is the process of getting the actual case machined with my Zenbot CNC machine.

How am I going to machine this thing?

I didn’t tackle any machining until after my PCB design stabilised (three revisions) but the day did come when I had to work out how I was going to automate the machining of the project case.  As I previously mentioned in my last post that I was going to use my ZenBot Mini CNC to do the work, I just need to figure out how it was going to do it. 

To tell the truth I have hardly used my CNC other than for prototype PCB isolation routing.  I had never used if for cut-outs or any 3D machining.  One thing I needed was a way to produce my tool paths or G-Code that Mach3 uses, Mach3 is the controlling software I use with my Zenbot.  It takes the G-Code and handles all the X,Y,Z movements. I could hand code G-Code but, hey, I’m not that good!!!  So I needed some CAM software  Alibre does have a CAM option, but I had a heart attack when I received the price, so after much googling I found Cambam,

The Fixture

As I mentioned I needed a way of holding the Sparkfun project case in a repeatable way as I need to machine 10 of these, also I was going to be doing the machining from the inside of the case, this way I could pocket around the LCD at the same time as I did my cut-outs and light pipe holes, all in one hit.  So some sort of fixture was called for…..

I decided to mill out the profile of the top spark fun case to create a fixture where I can just drop in any case top lock it in and then press the ‘go’ on Mach3.  To do this I imported the Sparkfun 3D STL Model that I used in Alibre, again I had some issues of the “standards” and used a open source program called Meshlab to first import in the STL model with the clean-up enabled then to save it as a new STL.  This work and I now had the Sparkfun project case in the CAM software

image

Some of the traps I found is that the model needs to be aligned with the Z-Axis 0, this is how the Cambam sees the top of the work piece.

Cambam has a handy function for exactly what I want to do, this “Mold” function, allows a mold to be created from the 3D object, and by varying the Clip Areas I can control how deep I want my mold, in this case just 3MM so I can get the Case top to sit nicely in the fixture.

My Zenbot can only take a max shank size of 1/8 as I had initially replaced the Dremal for a Wolfgang Engineering Spindle for my PCB routing, for those interested these spindles Rock!!! the spinout is incredibly tight.

Creating Tool paths

I first created 2 tool-paths in Cambam, one to rough out and remove most of the material quickly with a 3.175mm end mill (1/8)  and a second tool-path to finish with a ball mill to do the edge profiles.  Cambam generates the crossovers and the plunge rates based on the tool size.

image

image

image

Setting Machine Origin

Another feature of Cambam is I can set the machine origin, this is the origin of all the Axis (X,Y,Z) in relation to the work piece, now I have the way to repeatedly setup my work pieces by referencing everything back to this origin mark (red X below).  If I marked this on my fixture all I have to do is zero my Zenbot to this origin before I run the job and everything will be referenced correctly.   In this case it’s 5mm below the work piece corner.

image

Machining the Fixture

 

I had some scrap plastic board that came with some flat packed furniture that was to become my fixture.  Below you can see the rough tooling has finished and it running the finishing tool-path.  you can see where I marked my origin in the bottom right of the work piece.  I use this to Zero Mach3.Sparkfun fixture

Zenbot Maching Sparkfun Project Case Fixture

 

Perfect fit, no slop or play, I did re-jig my tool paths to go down another 1mm in depth so the inside of the case is aligned with my Z-Axis Zero (or the top of the fixture) that makes things easier when I go to do my cut-outs and pocketing.

Test fit

Machining the Project Case

Now that I had my fixture for the actual case I needed to work out my cut-outs, drills and pocketing, using the same project file in Cambam that I used for the above fixture machining, I created addition layers for my cut-outs.  This was good as I could see where everything was located in relation to the 3D model, I used measurements from my Alibre model to place the Circles and rectangles that were to become my machining profiles. 

The only gotcha is that you have to think in reverse as I’m machining from the inside.  Below are the cut-outs and drill points for the light pipes

 

image

This is with the pocketing areas added.  I decided to add the pocketing around the buttons as well just in case. 

image

With the machining tool-paths added, Cambam also has the ability to add tabs in the cut-outs so the work wont foul you bit.  I decided to try this.

image

The Results

I’m very happy with the way everything has worked out.  By putting in the extra work in the design stage it seems to have paid off, the Sparkfun Project Case fitted my assembled PCB like a glove, everything aligned up perfectly.

Here is the final result with cut-outs finished, light-pipes installed and the pocketing for the LCD and switches, the actual pocketing for the switches was not needed so the 3D model was fairly accurate.  I didn’t photograph any of the cutting in actions so will post a few more when I finish the rest off.

Result cutout and pocketing

I used the same procedure to machine out the end piece from my USB and SD card, that is: mill a mould fixture with a known offset and then generate tool paths within cambam for the cut-outs.

Case and Assembled PCB

Project case end

This is showing my REV B PCB in the case, this had the range issue and the separation of the ground plane below the ID-20 reader corrected the issue.

Snug home

Front with LCD installed

Side profil

Side profile

Light pipes and LCD working, showing a card read under my test program.

Led working

CNC


A few weeks ago I orderd my CNC Motor Controllers for the CNC machine.  Well the kits arrived today from Oatley Electronic www.oatleyelectronics.com.au.  I purchased 4 axis, although I will only need 3 for the time being I envisage the 4th Axis being in the future.  Looks like I have some assembling to do over the next few weeks.

CNC


After lots of research I’ve started to put some ideas to paper for the MK1 CNC Machine.  

Yes I know I could probably jump right in and start putting together bit and pieces, but I really want to learn to use some 3-D Modelling CAD Packages for future Robotics projects and since I will eventually need to model components so they can be exported to the CNC machine for milling, I thought it might be a good exercise by modelling the MK1 itself.

So here is the start of the X-Axis Linear Bearings

CNC - MK1 X-Axis Bearings

CNC


Over the past number of years, along with my interest in robotics and software development,  I have also had a keen interest in machining and metal work, I suppose ever since I build my first Stuart Turner stationary engine when I was 15 on my fathers Lathe,  BTW my father is also a very keen model engineer/machinist.  So wanting to merge my interests along came CNC.

I don’t own a lather / milling machine, actually I don’t even have a workshop myself (about to change with my new house being built), although I do have access to them when ever I want its still not the same as ducking out to the shed to whip up a part, in general I find making small components and PCBS a bit of a pain, mainly though lack of tools and proper work area.  So Getting back into the robotics/electronics scene after a long break has also re-kindled my interest in the CNC Area, especially for small robotic parts (plastic and aluminium) and one off PCBs (routing and drilling). 

So in my quest for knowledge, I spent the last few nights browsing what’s out there, and was very surprised to see the huge amount of work that people have done.  I must admit it had been a couple of years since I’ve last looked, and there there are some truly amazing machines out there (check out http://www.cnczone.com/).   Anyway I think I want to start off small first with a low cost pcb router/drilling using a 3-axis with a dremal.  Plenty of photos out there with low cost designs and common parts have inspired me to take some steps and begin some design work, so stay tuned.

 

Switch to our mobile site