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

10 comments:

  1. You did good with your board - .016" is the smallest traces I've been able to mill. What type of cutter tool did you use? What size??

    You did good. Ken H>

    ReplyDelete
  2. Ken, sorry for the late response. I use a heavy-duty die grinder (like 40,000 rpm) and Trace Isolation bits from Precise Bits (http://www.precisebits.com/applications/pcbtools.htm). I also made some zero-backlash nuts that should help. I finally added the third one to my X axis and I had to shim all 3 of my spiders.

    ReplyDelete
  3. Pursue these simple advances on the off chance that you are an iPhone iOS device router-help.

    ReplyDelete
  4. https://techgave.com/chinen-salt-and-diabetes/

    ReplyDelete
  5. Nuestro centro ofrece a nuestros clientes un sistema de pago conveniente y flexible.
    Con pago progresivo para el programa de maternidad subrogada.
    For more details: gestacion subrogada precio

    ReplyDelete
  6. Nice post!! Thanks for sharing. If you want to know about Eero Update you can visit here.

    ReplyDelete
  7. Are you preparing for your TEAS exams, if yes, join the TEAS Test Prep Free sessions at The Adkins Academy. The academy conducts an online mastery class every Sunday and Wednesday. It is a great opportunity to get the coaching from Dr. Adkins and clear all your doubts. The doctor will clear all the concepts and help solve many complex questions. And best of all the schedule is flexible. It will also help you feel motivated as you move.

    ReplyDelete
  8. Fleet IQ is dedicated to assisting businesses in streamlining their fleet operations. It all begins with developing a proactive mindset. We've spent over a decade trying to understand the issues you face while managing a fleet of vehicles. We use technology and responsibility to assist control one of the greatest fleet expenses: automobile insurance, thanks to our experience. Vehicle insurance prices, after all, are steadily rising. Fleet IQ provides onsite services includes tire services, brake service. We provide onsite services for Fleet IQ customers includes Oil Change Service, Tire Sales & Service, Brake Service, GPS Tracking Software, Fleet Tracking System With Camera and Mobile Video Systems.

    ReplyDelete