-
2 Attachment(s)
New Autoleveling PCB software
Dear CNC PCB guys,
Inspired by the ideas from Poul-Henning Kamp [Height probing for PCB isolation routing with Eagle/pcb-gcode], I have created software to probe the surface of a blank piece of copper, then use the probed coordinates to adjust the Z height during the milling process, i.e. the tool height varies according to its X, Y position. I have also filmed the first test and also produced 2 identical circuits; with and without the autoleveling software running to demonstrate the results. Currently, I have tested with linuxCNC (it may or may not work in Mach3 at the moment, but definitely will in the future) and the GCode was originally generated with pcb-gcode. The software itself accepts a GCode file as input and outputs an optimised autoleveleled file.
I know there is an autoleveler for PCB-GCode already but I couldn't get it to work and my software should work on any gcode file produced from any isolation software and should be easy to use too.
Why wouldn't the copper be level?
- Table might not be level relative to the tool
- Blank copper might have significant flex
Why is this a problem?
- Some areas of your board are lower than your Z zero while other areas are higher, leading to deep cuts in some areas and shallow cuts in other areas
- Occasionally, a very small ammount of the tip will break off if there is a lot of pressure from a deep cut. Then your tool won't touch the surface at all and you will need to re-touch-off Z and re-run all or part of the code
- Bits and boards are wasted
To demonstrate this problem, here is a pic of a non-autoleveled circuit board:
Attachment 8750
There is a huge area in the bottom left which is completely missing. This is with a leveled table so only the board flex is an issue here.
This is the exact same 100x80mm circuit with my autoleveling software in operation (same pcb-gcode settings, same method of fixing the board down etc.):
Attachment 8751
As you can see, this is much more consistent. The traces are thin but thats due to the settings in pcb-gcode and Eagle, not the autoleveler.
I also filmed the whole autoleveled milling process. Here is the cut down video:
http://youtu.be/R8o2Sy-KPUU
Where can I get the software? As soon as I make a website to stick it on I will add a link. Assuming there is interest in this project?
Happy Milling :),
Daedelus.
-
Re: New Autoleveling PCB software
Looks good Daedelus. Would it be possible to use this type of software instead of skimming the table. Possibly modifying the PP to add/subtract from the G-code programmed Z values instead of shimming the bed? G.
-
Re: New Autoleveling PCB software
Hi Geoffrey, when you say skimming the table, I presume you mean milling out an area to make it flat? In the video, you can see I have already done just that (the MDF sacrificial layer has been pocketed 1mm) but it still was not good as the first pic shows. But yes, you wouldnt even need to skim / pocket the table using this software.
In fact, the Z height is calculated using a bilinear interpolation technique which gives a good result. You could probably get a good result with much fewer probe points (depends on the board size and quality). I would need to experiment to find out.
best,
James.
-
Re: New Autoleveling PCB software
Thanks Daedelus. Yes, I was asking if an unlevel (not necessarily uneven) table could be probed once and that information used to modify the Post Processor and add/subtract Z values for all future programs, not just for each individual program. Hope that makes sense. G.
-
Re: New Autoleveling PCB software
Quote:
Originally Posted by
GEOFFREY
Thanks Daedelus. Yes, I was asking if an unlevel (not necessarily uneven) table could be probed once and that information used to modify the Post Processor and add/subtract Z values for all future programs, not just for each individual program. Hope that makes sense. G.
Thanks Geoffrey, thats an interesting idea. Sorry, when you said PP I thought you meant "probe points" rather than "post processor". The problem is, by default, any information stored in GCode variables is lost for new sessions. In linuxCNC you can log stuff so I guess you could read the log file back in each time before starting a new job but then the Z information would be useless whenever you changed tool bit. Worth thinking about though, thanks.
James.
-
Re: New Autoleveling PCB software
James, the way that I work and most pcb machines is that the tool length is always constant due to setting a collar on the 1/8th shank using a preset press. G.
-
Re: New Autoleveling PCB software
I am looking forward to see a download link, so that I can see if this will work with Mach3.
-
Re: New Autoleveling PCB software
What a musical machine, if it was mine I'd be forever trying to make it play Jingle Bells :very_drunk:
-
Re: New Autoleveling PCB software
:playful::playful::playful: Noisy isn't it. and slow.
-
Re: New Autoleveling PCB software
The Autoleveller software is now available at www.autoleveller.co.uk so please feel free to download and try it.
There are many changes planned but any feedback or questions are very welcome, good or bad.
Most of the instructions are on the page but if there is anything confusing, or anything not explained, please let me know either in the comments section at the bottom of the page or here.
enjoy,
-
Re: New Autoleveling PCB software
Daedelus: Does this now mean that my NDA is now void :concern:?
-
Re: New Autoleveling PCB software
Great work! I actually bought cnc-usb software as Andrej (the author) agreed to integrate Z probing to help with pcb milling etc..
A few points to note when Z probing...
In case it's not obvious, you need a very accurate Z axis when using this probing technique ...especially if you are probing a lot across the stock - because any Z backlash will seriously affect the measurements (& more importantly - the outcome!) My small CNC machine only uses threaded rod & modest nuts...I got poor results initially due to too many probe points in conjunction with backlash errors - best to probe as little as you think you can get away with.
It's still a good idea to level your bed.... pcb milling is all about minimizing the errors (cause when your V cutting tip is only 0.2mm, every little bit of Z accuracy counts)
Be sure to probe to the g code extremeties...most 'divergences from the mean' are due to clamping at the edges (& the inevitable bowing up...albeit small - in the centre)
-
Re: New Autoleveling PCB software
Thanks Hank, the backlash info is worth noting.
I consider myself a hobbyist when it comes to CNC and machining in general (my background is in software engineering / development) however, my machine does include anti-backlash nuts and I have no idea what the probing accuracy would be like without them. From what you say, it would not be that good. In this situation, would it help to reduce the Z (probing) feed-rate to improve accuracy? Also, yes, it would be a good idea to level the bed as you say.
-
Re: New Autoleveling PCB software
Mad Professor has been aiding me a lot with running the software and testing with Mach 3. I am aware that he used the software when etching a design on a metal box lid. This shows that Autoleveller is not the sole domain of PCB designs.
Anyway, thanks Prof. Your help is very much appreciated.
-
Re: New Autoleveling PCB software
Here is one of the cases I did some engraving on that I used Daedelus Autoleveling software with.
!!! Warning !!! you may want to turn down your speakers before starting the below video.
https://www.youtube.com/watch?v=ffwB0BBL__w
The half cases are extruded aluminium and are anodized black, and the surface is anything but flat.
-
Re: New Autoleveling PCB software
Prof. This is a great video to show the versatility of Autoleveller (i.e. not just for PCB's). Would you mind if I link to it from the web page?
-
Re: New Autoleveling PCB software
I have no problem if you wish to use the video or link to it on your web site.
-
Re: New Autoleveling PCB software
Daedelus,
Thanks for posting your software. I especially like the the fact that it is independent of the originating program. As you know, we ran into this problem with Eagle and the original developer disappeared when Eagle had a new version.
Just downloaded it and look forward to giving it a try.
-
Re: New Autoleveling PCB software
No problem. :peaceful:
It seems quite reliable, but its still early in development so let me know if you find any bugs.
Daedelus.
-
Re: New Autoleveling PCB software
Daedelus,
Last evening, I set up Eagle V6.x so I could see how your program would work. Everything seemed to go fine, but I would like to offer a suggestion.:encouragement::encouragement:
I can speak only for myself, but for PCB use, I have a fixed fixture on my machine and for doing operations on the TOP of the board, I use fixture 54. For Operations on the bottom of the board, I use fixture 55. So when setting up, I home the machine and load a previously saved fixture file that automatically gives the proper offsets to the various fixtures. Of course as setup, your program does not include any fixture offsets and I would suggest adding a dialogue box to indicate which fixture is going to be used when you parse an individual file. I say give the option to set one because as you say, this can be used for other operations other than PCB work and who knows what fixture offset may be needed?
Thanks in advance and so far, really like how things are setup.:thumsup:
-
Re: New Autoleveling PCB software
Absolutely,
This is one of the features on my list that I want to add.
I am aware that many 'PCBers' use different offsets for top and bottom, but personally I have never tried anything other than G54. If the original file is G55 for example then the additions made by Autoleveller should not affect this and G55 should be used in the output file as well but I haven't tested yet so I cannot confirm. It might be best to stick with G54 for everything currently. As you say though there should be an option to explicitly set the offset.
thanks,
-
Re: New Autoleveling PCB software
Another reason I bring fixtures up is that I do not use Mach or Linuxcnc as my controller. I use Turbocnc and it defaults to G53 on power up so when I used the test case last night, if I ran it on the machine, it would be in G53 until it hit the modified code portion after the probing sequence. I can easily put G5x in manually until you get it sorted out.
And if anybody else is reading this and wants to use Turbocnc, I have a customized version that captures the probing position for use in this software.
-
Re: New Autoleveling PCB software
TurboCNC support is another feature on my list. :smile:
Quite a big list, but its good to know that people want and will use the additions.
-
Re: New Autoleveling PCB software
It was fairly easy to do (and I am NOT a programer!) I just added enough code to the G31 section to map the position data to the variables 2000-200x. Then I just use the a modified Mach post to generate the gcode.
Matter of fact in the original leveling software, linuxcnc and mach shared the same post.
-
Re: New Autoleveling PCB software
Ive not looked into it yet but if the variables are the only things which need changing then it should be easy to support TurboCNC directly from the software. Good going.
-
Re: New Autoleveling PCB software
Box stock Turbocnc does NOT map the position to variables. I had to add that to the code and re compile.
As far as I know, there are only a three or four copies in existence that will map to the variables. I think I sent one to an acquaintance and I have three on various systems here at the house.
-
Re: New Autoleveling PCB software
OK, so there might not be much thats possible from the Autoleveller side in this respect then. I'll have a look at TurboCNC at some point anyway and see if theres anything else I can do to support it apart from fixture selection as per your original suggestion.
Good work on the custom TurboCNC version. BTW :smile:
-
Re: New Autoleveling PCB software
thanks for the thumbs up, but it wasn't much. Actually added only about 2 lines of code and a public variable. Would be happy to share the version if anybody is interested. If you want the code, will also supply that with the usual password on the zip file.
-
Re: New Autoleveling PCB software
Daedelus,
Congratulations on your program, an excellent job. As a programmer, I too was considering writing something similar but as I managed to get the Autoleveller version of PCB-Gcode working, the need to do so lessened.
Your approach of making it independent of PCB-Gcode is definitely a step forward and as you point out in your earlier posts, makes it much more generally applicable to a range of other uses.
I have had a little play with your program using a PCB-Gcode file and all went well. As you asked for feedback, I have a couple of comments / suggestions.
1) In the output file, after the inserted probing code, just after the motor speed command (S25000 in my case) your code inserts an S20000 command. A bug I guess.
2) In the Probe Settings section of your GUI, you have a Z Safe Height parameter. After looking through the output Gcode file, this only seems to be used (together with the X and Y parameters) to define the point to return to after the probing stage. As the whole area has just been probed at "Probe Movement Height" we have to assume that it is clear and therefore is this parameter really necessary.
3) The probing, whilst essential, is time consuming and therefore anything that can be done to minimise the time it takes has to be good. Only the part of the board that is going to be machined needs to be probed, therefore could I suggest that your code analyses the input file to pick out the X and Y extremities and therefore automatically sets the parameters X, Y, X Length and Y Length, thus minimising the number of probe points. This has the added benefit of four less parameters to fill in and to possibly get wrong.
Thanks again for your efforts. Keep up the good work.
-
Re: New Autoleveling PCB software
Thanks very much for the encouragement and feedback. I appreciate it.
In general, I agree that anything that can automate and reduce the user effort or potential for problems is a good move.
1. Ah yes, I forgot about this. Good spot. The problem is in LinuxCNC the motor does not start when you use M3 until there is a speed set. For some reason the version of PCB-GCODE I have does not add a Speed setting so my motor does not start. I added the S20000 bit for myself really but I meant to make some other arrangement for this. In reality, my own motor has a max. of 7000rpm and theres no speed control so for me it doesnt matter what I set S to. Its either on or off.
2. Good point. :smile:
3. Another good point. I was actually adding this a few minutes ago :smile: Well I was making a primitive parser for reading GCode files, so that extremities (and other things can be displayed). Actually I was thinking that in some cases you might want to probe and level only a small portion of a board despite the surface in the original file being much larger. So actually you would still need those text boxes. Maybe there could be a pop-up box asking if you want to automatically adjust these settings based on the results from parsing. This would reduced the user effort a bit.
thanks,
-
Re: New Autoleveling PCB software
Hi Daedelus,
Thanks for the swift reply.
On point 1. I know what you mean about PCB- Gcode. The first board I did with it resulted in the drill burying itself in the board without the motor running. Actually, the problem is not that you put the S command in the output file but rather it goes in after the real one. If you put it at the top of the Gcode all should be well.
3) I agree that the parameter boxes should stay. One simple solution might be to default the X, Y, X Length and Y Length boxes to 0. If they are zero when the user clicks "Create Leveled Gcode" then use the automatically generated extremities but if none zero, use those values.
Good luck with the parser.
-
Re: New Autoleveling PCB software
Good point with the S command. Seems like the easiest solution for now. Ill do that. Its nice to know other people have had the same problem with PCB-GCode.
On point 3, thats a good idea the more I think about it. I'll probably default them to empty rather than zero though.
ta,
-
Re: New Autoleveling PCB software
Thanks for creating this Daedelus! I have not used your application yet but I plan to create some pcbs in the future and I will definitely give your software a try.
One question, do you think it would be possible to use your software to allow me probe a curved wooden surface (covered in foil?) before engraving it? I have a few ideas that this would be ace for!
Thanks again,
Jim
-
Re: New Autoleveling PCB software
Hi Jim,
Yes I think it would be possible but the foil would need to be extremely flat. Almost painted on.
best,
-
Re: New Autoleveling PCB software
Great, I was thinking of using some self adhesive foil tape or even spray glueing ordinary foil to the surface, probe, make the cuts and then worry about how I get the foil off! :o)
Thanks,
Jim
-
Re: New Autoleveling PCB software
I just had a thought...
As of this current version, G2 and G3 commands (arcs) are not supported. This is OK for PCB's because commands are usually G1 (linear) but for whatever you have in mind, this may not work yet if your GCode file has any G2 or G3 commands. I do explain this in the website somewhere but I am worried that you may have missed it and it is worth re-mentioning here I think.
I think MadProfessor managed to get round this problem when he converted these G2's and G3's into lots of G1's using CamBam?
This may not be a problem for you but I just thought I'd mention it.
best,
-
Re: New Autoleveling PCB software
Daedelus: Regarding the G2 and G3 moves, I made a new Post Processor within CamBam, and there is an Option called "Arc Output" this was selected to "Convert To Lines".
Now all the G2 and G3 arcs are turned into lots of small lines, suitable for your probing software.
-
Re: New Autoleveling PCB software
Thanks for the swift reply Prof.
I don't personally use CamBam but converting to lines is not a built in function as the Prof explained.
Is there a simple macro or something which you can paste here Prof.? Might help some, at least until I do support it.
-
Re: New Autoleveling PCB software
Ahh I see - Yes my plans did include G2/G3 arcs (I had you look up the meaning - very new to g-code)... interesting workaround with CamBam Prof, unfortunately I do not use the software. I will look to see I have any similar options.
Thanks.
-
1 Attachment(s)
Re: New Autoleveling PCB software
Daedelus,
Thanks for the autoleveling software! Couple of thoughts:
- Its great that you used Java, as it lets me run it on my Linux box.
- Also, would it be possible to calculate the board x & y dimensions from the input g-code itself, rather than have the user enter those values?
I decided to test out the v0.5 release you have on your website:
I tested it with a very simple board (gcode file) I've created from Eagle v6.4 & pcb-gcode 3.6.0.4 (latest release); however, after loading the leveled gcode into EMC2 (linuxCNC v2.5), I get an "attempt to divide by zero" error message at line 7604 and I'm unable to continue. I've attached the original gcode & the leveled gcode in the attached zip file. Do you know what i'm doing wrong? I set the x/y coordinates to 0, and entered the x dim as 36.7 & the y dim as 20.1
Also, in your previous posts, you mentioned new versions of your autoleveling software; however, on your website I've only been able to find v0.5. Do you have a location where you are uploading the latest releases?
Thanks once again for the great software!