586,069 active members*
3,484 visitors online*
Register for free
Login
IndustryArena Forum > Other Machines > PCB milling > Cheap & simple height-probing
Page 1 of 9 123
Results 1 to 20 of 169
  1. #1
    Join Date
    Apr 2009
    Posts
    42

    Cheap & simple height-probing

    Those of you trying to produce fine features by isolation routing may find this interesting:

    http://phk.freebsd.dk/CncPcb/

    Enjoy,

    Poul-Henning

  2. #2
    Join Date
    Apr 2007
    Posts
    1955
    That is a neat idea. Actually, it is quite useful for not only PCBs, but a whole lot of areas such as engraving. The board traces are cut quite sharp compared to some I have seen.

    Thank you for sharing that idea, and welcome to cnczone.

    HarryN

  3. #3
    Join Date
    Jun 2004
    Posts
    33
    really interesting hope to see more

  4. #4
    Join Date
    Oct 2005
    Posts
    41
    Well I think that is quite brilliant. In conception, and, from the picture on your web site, in practice. I gave up on isolation routing because I could not guarantee producing smd pads at 32thou centres. You have there 4thou lands at 20thou centres.
    Unfortunately I use different control software, and my brain clouds over when I see C code.
    Mach3 uses G31 to probe, and stores the coordinates in #2000 to #2005. I should be able to work out where to substitute those and hopefully the rest of the syntax would parse ok.
    I'm going to give it a go, anyway.
    Any pointers would be appreciated.

    Dave

  5. #5
    Join Date
    Jun 2008
    Posts
    1
    this is my first posting so sorry if there are any errors...

    Reply to DHookings,
    I'm in the same boat, C-Code makes my head hurt..

    I currently make pc boards on my Mach3 driven mill with much success, but recently have discovered board thickness variations (insert grumpy sound here!).

    A floating head spindle could work, but my Wolfgang spindle isn't threaded to accommodate the foot that I have (long story, could send pictures to clarify).

    Any development ideas?
    Anything I can do to help??

    Cheers!
    Mark

  6. #6
    Join Date
    Aug 2009
    Posts
    62
    Quote Originally Posted by bsdphk View Post
    Those of you trying to produce fine features by isolation routing may find this interesting:

    http://phk.freebsd.dk/CncPcb/
    Good work! and thanks for sharing ;-)

  7. #7
    Join Date
    Mar 2003
    Posts
    1
    Has there been any further work on this? This could be a VERY valuable tool. Too valuable to just let the development go dormant. I would love to help, but unfortunately it is beyond my current capability.
    al

  8. #8
    Join Date
    May 2005
    Posts
    2502
    Very clever!

    Best,

    BW
    Try G-Wizard Machinist's Calculator for free:
    http://www.cnccookbook.com/CCGWizard.html

  9. #9
    Join Date
    Apr 2009
    Posts
    42
    Quote Originally Posted by alenz View Post
    Has there been any further work on this?
    I have made a couple of PCBs using this method, you can see one of them here:

    http://ing.dk/uploads/society/content/201.png

    The method has a lot of potential, but there are some ugly corners that need to be cleaned up, before it is ready for "prime time" use by people who cannot tweak C-code at will.

    Right now, it works well enough for me, that I don't spend a lot of time on it, and since I only make a few PCB's a month, that is unlikely to change fast.

    If somebody wants to adopt the project, I'll happily hand it over, along with a long email with random notes and observations...

    Poul-Henning

  10. #10
    Join Date
    Dec 2009
    Posts
    3

    Compiling the code

    All,

    Can anyone give me any clues as to how to compile and get the code running (Ubuntu 8.04), I get an error pretty early in teh compile that I can;t get past...
    make plt2g
    cc -g -O0 plt2g.c -o plt2g
    plt2g.c: In function ‘stitch’:
    plt2g.c:1038: error: ‘list’ undeclared (first use in this function)
    plt2g.c:1038: error: (Each undeclared identifier is reported only once
    plt2g.c:1038: error: for each function it appears in.)
    plt2g.c:1038: error: expected ‘;’ before ‘{’ token
    make: *** [plt2g] Error 1
    peter@peter-mini-CNC:~/Code$

    From looking at the code the probelm appears to be either an include thats gone wrong (though there are not other errors shown, or the code is out os synce` with teh header from the web page that I downloaded...

    Anyone happen to have a pre-compiled binary for the EMC2 release of Ubuntu 8.04 ?

  11. #11
    in plt2g.c change

    Code:
    #include <sys/queue.h>
    to 
    #include "queue.h"
    make sure you downloaded the queue.h from the website

    you may or may not have to deal with srandomdev(), which srandom(time(NULL)) should take care of.

  12. #12
    Join Date
    Dec 2009
    Posts
    3
    Thank you, that got me further (and yes I did need to put the srandomdev fix in) and now I'm looking at another compile error...

    Seems that the hypot function does not exist in my math.h libraries...I presume.

    peter@peter-mini-CNC:~/Code$ make plt2g
    cc -g -O0 plt2g.c -o plt2g
    /tmp/ccn6ddff.o: In function `sort_seg':
    /home/peter/Code/plt2g.c:340: undefined reference to `hypot'
    /home/peter/Code/plt2g.c:348: undefined reference to `hypot'
    /home/peter/Code/plt2g.c:354: undefined reference to `hypot'
    /tmp/ccn6ddff.o: In function `draw_vectors':
    /home/peter/Code/plt2g.c:539: undefined reference to `hypot'
    /home/peter/Code/plt2g.c:570: undefined reference to `hypot'
    /tmp/ccn6ddff.o:/home/peter/Code/plt2g.c:630: more undefined references to `hypot' follow
    /tmp/ccn6ddff.o: In function `do_file':
    /home/peter/Code/plt2g.c:1210: undefined reference to `emit_gcode'
    collect2: ld returned 1 exit status
    make: *** [plt2g] Error 1
    peter@peter-mini-CNC:~/Code$

    I created a simple "result=sqrt(x*x+y*y)" substitute function that seems to satisfy that requirement but now a call to "emit_gcode(j) fails since emit_gcode is not defined anywhere., though there is a prototype for it in plt2g.h

    You can probably tell my coding is very rusty...

  13. #13
    Join Date
    Dec 2009
    Posts
    3
    Got it compiling... just ignored the makefile and went with

    cc -o plt2g -lm emit_gcode.c plt2g.c

    And it compiled and gave me a runnable binary...

    OI still have no idea why its trying to read HPGL, since pcb_gcode puts out GCode.... confused.

    So of course now I have no idea what to do with it :-)

    Any instructions available ?

  14. #14
    Sorry, I just happened to have an unbuntu VM open as i saw your post. I don't know much about that program at all.

  15. #15
    Join Date
    Apr 2009
    Posts
    42
    Quote Originally Posted by prosys View Post
    So of course now I have no idea what to do with it :-)
    Hi, it's probably better if you start with the lastest code
    I have:

    http://phk.freebsd.dk/CncPcb/pcbopt.c

    You'll probably have the same compile-trouble as with the old code.

    This program reads the output of PCB-Gcode and spits out new g-code with the height-probing in it.

    Poul-Henning

  16. #16
    Join Date
    Oct 2005
    Posts
    41
    Quote Originally Posted by prosys View Post
    All,

    Can anyone give me any clues as to how to compile and get the code running (Ubuntu 8.04), I get an error pretty early in teh compile that I can;t get past...
    make plt2g
    cc -g -O0 plt2g.c -o plt2g
    plt2g.c: In function ‘stitch’:
    plt2g.c:1038: error: ‘list’ undeclared (first use in this function)
    plt2g.c:1038: error: (Each undeclared identifier is reported only once
    plt2g.c:1038: error: for each function it appears in.)
    plt2g.c:1038: error: expected ‘;’ before ‘{’ token
    make: *** [plt2g] Error 1
    peter@peter-mini-CNC:~/Code$

    From looking at the code the probelm appears to be either an include thats gone wrong (though there are not other errors shown, or the code is out os synce` with teh header from the web page that I downloaded...

    Anyone happen to have a pre-compiled binary for the EMC2 release of Ubuntu 8.04 ?
    Sorry can't help you with C code, but I have written Visual Basic code for Mach3 that works on Gcode produced by Target3001. It inspects the gcode, works out the extents, then probes at 10mm spaces. After that it produces new gcode with the new Z heights, breaking up long tracks into smaller parts according to where it intersects the 'cells'. Worked first time, which is a first.
    I knew it was a good idea when I first saw it.

    Dave

  17. #17
    Join Date
    Oct 2009
    Posts
    80
    Quote Originally Posted by dhookings View Post
    Sorry can't help you with C code, but I have written Visual Basic code for Mach3 that works on Gcode produced by Target3001. It inspects the gcode, works out the extents, then probes at 10mm spaces. After that it produces new gcode with the new Z heights, breaking up long tracks into smaller parts according to where it intersects the 'cells'. Worked first time, which is a first.
    I knew it was a good idea when I first saw it.

    Dave
    Could you share this code?

    Thanks

  18. #18
    Join Date
    Oct 2005
    Posts
    41

    VB code for height adjustment.

    Quote Originally Posted by ee_t View Post
    Could you share this code?

    Thanks
    No problem. It would have to wait until Sunday though as I am off today to celebrate the new year.
    But bear in mind it is a fix for me personally, made for my machine and the software I use. Also, I have only used it once in anger, although it worked superbly.
    For instance, it is designed for output from Target 3001. Any line with Z1 (not Z01) is ignored as Target only uses Z1 for a bite into the material, and never has any other instructions on the same line. So if you had Z01 on a line it would pass through unaltered.
    When I get back I'll post the Visual Basic code.

    Dave

  19. #19
    Join Date
    Aug 2009
    Posts
    62
    Can someone please explain how all this work?

    It just work on EMC2 or also in any other CNC control software? -- I am using EMC2, I never saw in my life any other software.

    How is the hardware used? -- it's just a 2 copper wires connected to PC parallel port?

    Is there any configuration needed on EMC2, for parallel port input pin?

    Could this code be done in Python?

    I have until now used my CNC and EMC2 for working as a 3D printer: http://code.google.com/p/casainho-pr...terEMCRepStrap

    Thank you.

  20. #20
    Join Date
    Apr 2009
    Posts
    42
    Quote Originally Posted by casainho View Post
    Can someone please explain how all this work?
    This works by probing the pcb surface in a grid over the PCB's area, and then, in the G-code, interpolating the Z coord accordingly.

    In other words, you run the g-code from pcb-gcode through a program and run the G-code that comes out on your machine, and your machine will do all the necessary math to interpolate to the right height.

    In theory, pcb-gcode could emit height-probing g-code directly, but I have no intention of trying to do that, because I still want the job sorted afterwards to speed it up.

    I have no idea if it works on other software than EMC2, EMC2 is what I have.

    If you have not, see my original explanation at:

    http://phk.freebsd.dk/CncPcb/

    Poul-Henning

Page 1 of 9 123

Similar Threads

  1. My simple and cheap steel desktop router
    By fahque99 in forum DIY CNC Router Table Machines
    Replies: 6
    Last Post: 03-02-2009, 08:22 AM
  2. are there still no simple cheap good USB controllers?
    By lithium in forum Controller Cards
    Replies: 21
    Last Post: 01-16-2009, 08:49 PM
  3. Simple, cheap servo controll.
    By Kirbeh in forum Stepper Motors / Drives
    Replies: 4
    Last Post: 01-09-2008, 09:33 AM
  4. Simple cheap mill
    By JBV in forum Mechanical Calculations/Engineering Design
    Replies: 4
    Last Post: 11-23-2005, 12:20 AM
  5. Simple cheap CNC router
    By mwalach in forum DIY CNC Router Table Machines
    Replies: 7
    Last Post: 10-29-2005, 01:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •