Monday, May 19, 2014

Heightmap Engraving Test

I am in the process of making a plastic extrusion head so I can try 3D printing on my DIY CNC mill.  While that's in the works, I thought I'd give engraving a try.  CamBam has a 'heightmap' feature which will map grey values into the Z axis.

I started with a photo of my friends hot rod Beetle.
First I needed to crop out all the background junk and crop to include just the bug.
Then covert to monochrome and mirror it.  Since this will be viewed from the 'unmilled' side, reversing the image is necessary.


Here is the screen during milling (Linux CNC).  I used a 60 degree double-flute V bit that I normally use for isolation routing PC boards, probably not ideal for this task, but it is a proof-of-concept only, so who cares!?!

The aftermath.  I was so blown away by the results of my first attempt, that I decided to keep it.  I will actually give it to the owner of the bug.



On a simple Beech (Birch?) stand.  Size is about 4x6 inches.
With the red under-lighting on



Saturday, November 30, 2013

New autoleveller software

Found a new autoleveller to try for PCB isolation routing:  http://www.autoleveller.co.uk/.  It received good feedback on the forums, so I'll give it a shot.  Been a while since I used my router, so I had to upgrade EMC to LinuxCNC (same stuff, different name).  Here's my setup:
  • Eagle 6.5.0
  • PCB-GCODE 3.6.0.4
  • LinuxCNC 2.5.0
  • AutoLeveller 0.7.7
After re-configuring all my stepconf settings in LinuxCNC, the autoleveller worked very well.  Here is a boring, but thankfully short video of the probing process.  For the "probing tip" I use the actual cutting tool that I will use for the routing.  
video
In addition to the new version of Linux CNC, PCB-GCODE and the new Autoleveller, I also made two other enhancements to my mill.

 Shimming the Spider

I use Lovejoy spider couplings between my steppers and the drive screws.  When last I used auto levelling, I noticed the Z axis stepper was making fine adjustments, but there was too much play between the couplers, and most of that fine movement was lost.  I carefully trimmed a strip of aluminum from a soda can and carefully wrapped it around the rubber coupling spider.  You can see a bit of this shim in the video below.  No play in the coupling.  Here is a short video of the Z-axis in action during board milling.  I was surprised how much it moves!
video

FWIW, here is a photo of one half of the coupler (the threaded rod is 1/4-20).  For reference are the original spiders I used from Jameco.  I actually had no problem with them, I just "felt better" with the big, beefy, professional spiders!

Anti backlash nuts

I figured some of the problem might be with backlash, so I crafted a home made set of anti backlash nuts for each of the axis'.  Before threading the rod into the coupling, I put on a square nut and a spring, then compressed the spring before treading into the coupling.  What is not in the photo are two small aluminum "L" brackets that sit on either side of the square nut to prevent it from turning.


Results

Here is the outcome.  This is consistent across the entire board.  Although not a complex design, it was demanding and a sufficient test.  Here is a 20x magnified shot of a 9mil trace.  This run my tool was too deep, it should have been 16 mils wide.  I still have the old habit of routing deeper to avoid 'air milling'.  Next board I'll back out the tool 1 mil.

What I am looking at is the consistency of the trace width.  Horizontal, vertical and diagonal the width is spot-on.  also, the lines are very straight edged.


PCB Milling tip

I covered the copper with a good layer of WD40 before milling.  This made a HUGE positive difference.  The edges of the copper were milled very clean, just a light once-over with a ScotchBright pad was all it took.

Click for larger image
Here is the same magnification on a different board, cut earlier, without the mods and without WD40.  This image is after sanding with 120 grit paper!









Sunday, December 30, 2012

PICduino Stepper Motor Shield

Continuing with the PICduino theme, I made a 'shield' to test some VID29 stepper motors.  These are small, inexpensive ($15 for 6), geared steppers designed for automotive instruments.  These steppers draw very little current and can be driven directly from the PIC outputs.  A single port (Port B in my case) can drive two steppers.

VID29 stepper shield
(click for larger image)
This PICduino shield has 8 LEDs (Port C), two steppers (Port D), two pots for analog-in tests, and a MAXIM MAX232CPE RS-232 driver to test some communications. 

These boards are sized to fit the Hammond Manufacturing
"Multipurpose Plastic Enclosures (1591XX "S" Series) Economical Version" enclosures ($4.95 in single unit quantities at DigiKey).  One issue with the Arduino is the cost of enclosures is about half the cost of the fully populated CPU board!

If you need a bit more board space, you could extend the board a bit to take up the full space inside the enclosure (check the enclosure datasheet for max PCB size).

I have typically been an Assembly Code hacker, and for this project I needed some more advanced math, so I tried my first C programing in 15 years.  I had some trouble getting my mind around pointers, but once that was handled, the code worked great!

This stepper has 6 phases for a complete cycle, with 3 phases making up one degree of movement (you can see where the math requirements come from).

In the short video, I have the unit move 30 phases (10 degrees) 18 times (180 degrees total). 

(NOTE: When I play back this video, the audio is out of sync, and the pointer appears to be a bit "jerky" in one-or-two places.  This is an issue with the video, the point moves beautifully smoothly).

Wednesday, December 19, 2012

Experiments with auto levelling and PCB routing

By their nature, PC boards are not as flat and smooth as we would like.  I have equipped my CNC with a sacrificial table (MDF) that can be leveled using set screws.  I can attach a dial caliper to my Z axis, and I can dial in the platform to within a thousandth-or-two.  Still, my PCBs are sometimes cut too shallow, forcing me to risk fingertips using an x-acto knife, or too deep, ruining the fine geometries I try to keep.

The concept of an 'auto leveler' makes great sense, and I decided to give it a try.

My setup

EDIT - see current posting 
  • EMC on Linux (the version numbers escape me).  
  • CadSoft Eagle 6.3.0 on Windows 7
  • Testing the PCB-GCODE with the auto leveller  pcbgcode_tags_2.0-alpha1-r68.zip from the PCB GCODE forum on Yahoo
  • CNC machine is homebuilt based on the BuildYourOwnCNC machine
  • I have created my own 'anti backlash' nuts that allow me to place SMD devices with 50mil lead pitch
    That's about as fine as this old man can solder, so it's good enough for now.

Day one, wasted

After two half-days of getting frustrated, I turned to the forum, Art was very prompt to respond. I needed to move the autoleveller code outside of C:\Program Files(X86).  I moved them to my D:\ drive and progress was made.

Lesson 1:  Install the AutoLeveller files NOT in the Program Files directory.  (for Windows 7 at least)

Setting the initial entries into all the PCB-GCODE-SETUP fields was helped by Dan, MoDFI on the Forums. This is a good starting place

Download the new math.h if you are using Eagle 6.  Replace the old one by renaming it 'math_old.h' - don't delete anything!

How the autoleveller works

From the novice perspective.  Gcode allows for the saving and retrieval of data during the milling process. 
Here are some snippets from the Gcode produced for the calibration board:

Variables are defined:

   #101=0.5000    (clearance height)
   #102=0.0400    (traverse height)
   #103=-0.0200   (probe depth)
   #104=30.00     (traverse speed)
   #105=1.00      (probe speed)
   #106=-0.5000   (tool probe depth max)

 
The variables above come directly from the settings in PCB-GCODE-SETUP:











This bit of GCode repeats throughout the beginning of the .tap file
  1.  G00 Z[#102]
  2.  #2000 = #5063
  3.  (PROBE[1,0])
  4.  G00 X-0.4585 Y0.2170 Z[#102] F[#104]
  5.  G38.2 Z[#103] F[#105]
Line 1  move the Z axis to '#102', where #102 is the traverse
           height (0.0400")
Line 2  I have no idea
Line 3  not too sure, I'm guessing this is setting the 
           storage location for the first probe
Line 4  moves to the X  &  Y coordinates for the measurement 
           (based on the Probe Grid Size setting) with Z = the Traverse
           Height and the movement speed (F) of 30 ips (Probe 

           Transverse Feed Speed)
Line 5  'G38.2' is the actual "probe" command


Lesson 2:  Set up the 'probe in' signal on your CNC machine 

To avoid punching holes in your PCB, you need to wire-up and configure the "Probe In" line using the StepConfig Wizard (EMC).  I already had all my inputs brought to an opto isolation board so wiring up and configuring this line took only a few minutes.  For my installation, I needed to check the "invert signal" checkbox for the Probe In line.  For the actual probe, I use the same bit I will be using to mill.  I do not move the bit at all between probing and milling, I just disconnect the wire and turn on the spindle.

Lesson 3:  Calibrate your setup.

The copper on a 1oz PCB is
35 µm or about 1.4 mils (.0014") thick.  That isn't much if the surface of the PCB is 'waving around' by 3-4 thousandths or more!  I recommend playing around with this calibration board and 'futzing' with your settings until you have the best results possible.


Milling the board

It took me a couple of attempts to figure out the flow.  
  1. Align the board and do the top etch 
  2. Drill the bottom two mounting holes (0.125").  These are used when
    the board is flipped to align for back milling
  3. mill bottom traces
  4. mill outline of board
  5. drill holes
Lessons 4 and 5:  Careful not to "spot drill" the holes too deeply.  First board was ruined as the default spot drill depth (-0.011") was too deep and wiped-out most of my vias.  Changing to -0.004" was fine.
Also, drill the two alignment holes after probing/milling - the probing/leveling process stops if you happen to probe within one of the mounting holes.

The board

I designed a board (CADsoft Eagle) modeled loosely after the "Arduino" concept - a small, basic CPU "motherboard" into which 'shields' could be plugged.  I am currently playing with the Microchip PIC processor family, so I made a modified PICduino setup.   The motherboard gives me a +5 and optional +3.3V supplies, connection for the ICSP (In Circuit Serial Programmer) a PIC 16F777 44 pin, TQFP package, optional crystal and a power indicator.  There is a LOT of space left over for whatever I can think of for Rev 01.  Traces are typically 0.016" unless there is a powerful reason to go smaller (not on this board).


Top (Click for larger image)


Bottom (Click for lager image)
CPU detail (Click for larger image)











Helpful Links

Mill PCBs 







 http://woodworkerbcncrouterproject.blogspot.com/2013/11/new-autoleveller-software.html

Experiments with auto levelling and PCB routing

By their nature, PC boards are not as flat and smooth as we would like.  I have equipped my CNC with a sacrificial table (MDF) that can be leveled using set screws.  I can attach a dial caliper to my Z axis, and I can dial in the platform to within a thousandth-or-two.  Still, my PCBs are sometimes cut too shallow, forcing me to risk fingertips using an x-acto knife, or too deep, ruining the fine geometries I try to keep.

The concept of an 'auto leveler' makes great sense, and I decided to give it a try.

My setup

EDIT - see current posting 
  • EMC on Linux (the version numbers escape me).  
  • CadSoft Eagle 6.3.0 on Windows 7
  • Testing the PCB-GCODE with the auto leveller  pcbgcode_tags_2.0-alpha1-r68.zip from the PCB GCODE forum on Yahoo
  • CNC machine is homebuilt based on the BuildYourOwnCNC machine
  • I have created my own 'anti backlash' nuts that allow me to place SMD devices with 50mil lead pitch
    That's about as fine as this old man can solder, so it's good enough for now.

Day one, wasted

After two half-days of getting frustrated, I turned to the forum, Art was very prompt to respond. I needed to move the autoleveller code outside of C:\Program Files(X86).  I moved them to my D:\ drive and progress was made.

Lesson 1:  Install the AutoLeveller files NOT in the Program Files directory.  (for Windows 7 at least)

Setting the initial entries into all the PCB-GCODE-SETUP fields was helped by Dan, MoDFI on the Forums. This is a good starting place

Download the new math.h if you are using Eagle 6.  Replace the old one by renaming it 'math_old.h' - don't delete anything!

How the autoleveller works

From the novice perspective.  Gcode allows for the saving and retrieval of data during the milling process. 
Here are some snippets from the Gcode produced for the calibration board:

Variables are defined:

   #101=0.5000    (clearance height)
   #102=0.0400    (traverse height)
   #103=-0.0200   (probe depth)
   #104=30.00     (traverse speed)
   #105=1.00      (probe speed)
   #106=-0.5000   (tool probe depth max)

 
The variables above come directly from the settings in PCB-GCODE-SETUP:











This bit of GCode repeats throughout the beginning of the .tap file
  1.  G00 Z[#102]
  2.  #2000 = #5063
  3.  (PROBE[1,0])
  4.  G00 X-0.4585 Y0.2170 Z[#102] F[#104]
  5.  G38.2 Z[#103] F[#105]
Line 1  move the Z axis to '#102', where #102 is the traverse
           height (0.0400")
Line 2  I have no idea
Line 3  not too sure, I'm guessing this is setting the 
           storage location for the first probe
Line 4  moves to the X  &  Y coordinates for the measurement 
           (based on the Probe Grid Size setting) with Z = the Traverse
           Height and the movement speed (F) of 30 ips (Probe 

           Transverse Feed Speed)
Line 5  'G38.2' is the actual "probe" command


Lesson 2:  Set up the 'probe in' signal on your CNC machine 

To avoid punching holes in your PCB, you need to wire-up and configure the "Probe In" line using the StepConfig Wizard (EMC).  I already had all my inputs brought to an opto isolation board so wiring up and configuring this line took only a few minutes.  For my installation, I needed to check the "invert signal" checkbox for the Probe In line.  For the actual probe, I use the same bit I will be using to mill.  I do not move the bit at all between probing and milling, I just disconnect the wire and turn on the spindle.

Lesson 3:  Calibrate your setup.

The copper on a 1oz PCB is
35 µm or about 1.4 mils (.0014") thick.  That isn't much if the surface of the PCB is 'waving around' by 3-4 thousandths or more!  I recommend playing around with this calibration board and 'futzing' with your settings until you have the best results possible.


Milling the board

It took me a couple of attempts to figure out the flow.  
  1. Align the board and do the top etch 
  2. Drill the bottom two mounting holes (0.125").  These are used when
    the board is flipped to align for back milling
  3. mill bottom traces
  4. mill outline of board
  5. drill holes
Lessons 4 and 5:  Careful not to "spot drill" the holes too deeply.  First board was ruined as the default spot drill depth (-0.011") was too deep and wiped-out most of my vias.  Changing to -0.004" was fine.
Also, drill the two alignment holes after probing/milling - the probing/leveling process stops if you happen to probe within one of the mounting holes.

The board

I designed a board (CADsoft Eagle) modeled loosely after the "Arduino" concept - a small, basic CPU "motherboard" into which 'shields' could be plugged.  I am currently playing with the Microchip PIC processor family, so I made a modified PICduino setup.   The motherboard gives me a +5 and optional +3.3V supplies, connection for the ICSP (In Circuit Serial Programmer) a PIC 16F777 44 pin, TQFP package, optional crystal and a power indicator.  There is a LOT of space left over for whatever I can think of for Rev 01.  Traces are typically 0.016" unless there is a powerful reason to go smaller (not on this board).


Top (Click for larger image)


Bottom (Click for lager image)
CPU detail (Click for larger image)











Helpful Links

Mill PCBs 







 http://woodworkerbcncrouterproject.blogspot.com/2013/11/new-autoleveller-software.html

Sunday, February 19, 2012

PCB Alignment for double-sided milling

I wanted to be able to mill the top, flip the board, mill the bottom, drill the bottom, all without having to re-set the X and Y home position.

First off, I use the non-commercial CADsoft Eagle license, which limits me to a 3x4" board.  I decided to use board mounting holes to do "double duty" - mounting holes and  aligning the boards for milling.  I pre-drilled a bunch of PCB 'raw stock' with two precisely placed mounting holes (more on that later).

Alignment pins need to be placed on the top side of the sacrificial board.  To do this, mount the X-Y home block and home the X & Y axis.  Then drill four 0.125" holes 0.3" deep into the top of the sacrificial board at:
  1. X =  3.80, Y = 0.15
  2. X =  0.15, Y = 0.15
  3. X = -0.15, Y = 0.15
  4. X = -3.80, Y = 0.15
I cut-off some old, broken drill bit shanks to 0.4", chamfered the ends a bit to ensure no burs and epoxied them into the holes.

Sacrificial board, top view.
(click for larger image)

The image shows the sacrificial board, mounted on the milling table.  I could extend the life by drilling half of my boards via the top, and half via the bottom.  In the image, you can see all the drilling so far is via the bottom of the board.  No particular reason.

PCB mounts to the left two pins (negative X coordinates) for bottom etching/drilling and flips over to the right two pins (positive X coordinates) for top etching/drilling.  Thin double-sided tape is used to hold the PCB securely to the sacrificial board.


Friday, February 17, 2012

Setting the tool home point quickly

Home Block Top
(click for larger view)
Now that we can quickly and accurately mount and re-mount the sacrificial board to the milling table, let's turn our attention to the top side of the sacrificial table.  First, we need a method to quickly, accurately and repeatedly 'nail' the X=0 and Y=0 points, without having to "eyeball it".

To do this, I made an "L" shaped jig, with conductive brass edges that pins very snugly onto the top of the sacrificial board.  The conductive strips are wired into the X-home and Y-home inputs of my optical interface board (see earlier post on Option Isolation Board).

The idea is to set the zero point one time, good for etching and drilling both sides of the board without having to reset anything.
Home Block Bottom
(Click for larger view)

The alignment pins are 1/4" aluminum rod, epoxied into place and are on a 3.0 inch center-to-center.

The square brass bar is set into small dados so they are sticking out just a little bit proud of the wood surface. This ensures the tool will touch the bar before it touches any wood.

This block fits snugly into the holes drilled in the sacrificial table in the previous step.

Home Block mounted to
sacrificial board (click for lager image)