martin2250 / OpenCNCPilot

autolevelling gcode-sender for grbl
MIT License
377 stars 113 forks source link

General discussion #28

Open martin2250 opened 7 years ago

martin2250 commented 7 years ago

as the title states. please only use this thread for questions and discussion and open new feature requests for actual issues with OpenCNCPilot.

Martin

Donderda commented 6 years ago

Correct Workflow?

HI together - I'm trying to do my first steps using my CNC mill for PCB engraving. So far, everything looks (more or less) good. I've just one question about the correct workflow. At the moment I try this:

  1. Using the probe z-axis macro.
  2. Using the awesome autoprobe feature
  3. Loading G-Code (z-depth 0.1mm)
  4. Applying Heightmap
  5. Start

After 1. I neither change settings nor do I use the jog for position changes.

The mill starts and begins to mill. BUT: It looks like the milled lines are deeper than the 0.1mm :(. Am I doing something wrong? Or do I have some shitty settings (or is my mill just not calibrated correctly)? :D.

I would be happy if someone could enlighten me. Thank you again for this awesome piece of software!

Donderda commented 6 years ago

... maybe someone could provide me a nice demo gcode? Like this one. I tried this one, but it just cuts too deep...

canbaytok commented 6 years ago

Hi there!

First of all your workflow is correct, but I guess everyone needs to find the perfect settings for themselves. I included two example GCodes so can test it out for yourself.

The first gcode called "depthtest.nc" is for finding the correct Zdepth to mill. The copper layer is most of the time not thicker than 0.05mm, which is the depth I always use to mill my PCBs (Z-0.05). If you go too deep the cutting edge becomes wider, which widens the milled area and can cause problems, when trying to mill really small packages and traces. To use the code, just probe out the appropriate area and start the job. I used my usual feedrate of 100mm/min, which you should adjust if your machine can not handle it.

The second gcode, called boardtest.nc, is a really simple pcb. I used FlatCAM to create the gcode with the settings:

I also included the gerber files in case these settings are not applicable for you.

I would also recommend you adjust your grbl steps to match the correct values, if you have not done it already.

led.zip

Donderda commented 6 years ago

Thank you for the tests! I will report some results as soon as my new tools arrive ;-). I tried it with an old one, but the results are not as good as expected - but the tool is already very tattered :(.

Donderda commented 6 years ago

Okay, here are my results: It seems like the spindle doesn't touch the copper plate after I used the probing feature and applied the heightmap. Has anyone an idea what I'm doing wrong? 🤔

Donderda commented 6 years ago

Maybe these files might help helping? :)

Archive.zip

martin2250 commented 6 years ago

Hi Friedemann, If the probe cycle triggers before the tool makes contact you should go through the usual suspects:

(just saw the zip file, I can't open it right now) Martin

Donderda commented 6 years ago

Hi Martin, thank you for your reply :). The cycle triggers when it touches the plate. That's ok. But when I want to mill the tool doesn't touch the copper :/.

Regards from Kiel, Friedemann

Donderda commented 6 years ago

img_5139

Here you can see that the spindle/tool did touch the copper when I was probing. But not when milling ;-).

I keep now my mouth shut until someone replies :-P

canbaytok commented 6 years ago

the spindle shouldn't run, when you probe the pcb, because as you can see the pcb gets "destroyed".

Also the spindle seems to wobble too much, when running.

Donderda commented 6 years ago

Sorry, I took the picture AFTER probing while milling 😇. I think the "dots" occured because the pcb ist not as clean as it should be 🙈.

P.s. I don't think the spindle is wobbling this much, but I had some shaky hands when I took this picture. ;)

martin2250 commented 6 years ago
G90 G91.1 G21 G17
F100
G0 Z0.961
G0
G1
G1 X1 Z1.056
G1 X2 Z1.041
G1 X3 Z1.036
G1 X4 Z1.016
G1 X5 Z1.029

no wonder it doesn't touch the PCB...

is this the file that sirsenor posted? seems like it didn't recognize the g0z-.01 command. @sirsenor did you test this file on your machine? I never tried omitting the zero before a fractional number. maybe the -.01 gets interpreted as a 1 which would explain the empty G1. Two suggestions:

btw: the dots are normal, though you should probably lower your probing feed rate as the ones in your pricture seem quite deep.

canbaytok commented 6 years ago

Oh man your totally right and I am so so sorry. I wrote the gcode by hand and thought grbl recognizes .XX numbers as 0.XX.

xaoo commented 6 years ago

Hi Guys, I made a board with Eagle, then used pcb-gcode to generate my files, but the drill file has this err. How can I fix it?

image

martin2250 commented 6 years ago

remove the offending line, I thought I had set it up to ignore tool change commands...

xaoo commented 6 years ago

A, ok, will this still allow me to change the drills?

martin2250 commented 6 years ago

Yes, assuming you split up your files so that every gcode file has the toolpath for a single tool

xaoo commented 6 years ago

Its very strange. Ive tried all day to calibrate my china CNC 2418(aliexpress). Mill bit I use is a 01mm tip, 20 Degree.

Working with the attached files: TEST I`ve made, the one on the right-middle cnc tests

PCB-GCODE settings for the latest test: image image

Even if I use a min isolation of 0.6 my traces are bearably visible. :( this is my tap file renamed into txt to add it here. 6 x Sensors StepDown 5V.top.etch.tap.txt

Any ideea? I see some of you have a perfect board, how? :)

bensonsbc commented 6 years ago

Are you using The auto leveling feature? On open cnc pilot?

Best regards

Alexandre Benson Smith Desenvolvimento THOR Software www.thorsoftware.com.br (11) 9 9641-1808 (11) 4992-3496 (Enviado pelo celular)

Em sex, 29 de jun de 2018 16:12, George Dicu notifications@github.com escreveu:

Its very strange. Ive tried all day to calibrate my china CNC 2418(aliexpress). Mill bit I use is a 01mm tip, 20 Degree.

Working with the attached files: TEST I`ve made, the one on the right-middle [image: cnc tests] https://user-images.githubusercontent.com/948710/42109967-2d780ee4-7be8-11e8-8a5f-2f2bd417ffed.jpg

PCB-GCODE settings for the latest test: [image: image] https://user-images.githubusercontent.com/948710/42110189-f13e4b72-7be8-11e8-895b-e9cf4725faf5.png [image: image] https://user-images.githubusercontent.com/948710/42110250-15cdc3d2-7be9-11e8-9ed0-b3e415ff3d7c.png

Even if I use a min isolation of 0.6 my traces are bearably visible. :( this is my tap file renamed into txt to add it here. 6 x Sensors StepDown 5V.top.etch.tap.txt https://github.com/martin2250/OpenCNCPilot/files/2150601/6.x.Sensors.StepDown.5V.top.etch.tap.txt

Any ideea? I see some of you have a perfect board, how? :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/martin2250/OpenCNCPilot/issues/28#issuecomment-401447842, or mute the thread https://github.com/notifications/unsubscribe-auth/AiE9SOjLHIW8lsKGi_eRbQ6Ykzudn6yoks5uBnwIgaJpZM4NFfEl .

bensonsbc commented 6 years ago

How deep are you milling?

What speed (feed) are you using?

Alexandre Benson Smith Desenvolvimento THOR Software www.thorsoftware.com.br (11) 9 9641-1808 (11) 4992-3496 (Enviado pelo celular)

Em sex, 29 de jun de 2018 16:12, George Dicu notifications@github.com escreveu:

Its very strange. Ive tried all day to calibrate my china CNC 2418(aliexpress). Mill bit I use is a 01mm tip, 20 Degree.

Working with the attached files: TEST I`ve made, the one on the right-middle [image: cnc tests] https://user-images.githubusercontent.com/948710/42109967-2d780ee4-7be8-11e8-8a5f-2f2bd417ffed.jpg

PCB-GCODE settings for the latest test: [image: image] https://user-images.githubusercontent.com/948710/42110189-f13e4b72-7be8-11e8-895b-e9cf4725faf5.png [image: image] https://user-images.githubusercontent.com/948710/42110250-15cdc3d2-7be9-11e8-9ed0-b3e415ff3d7c.png

Even if I use a min isolation of 0.6 my traces are bearably visible. :( this is my tap file renamed into txt to add it here. 6 x Sensors StepDown 5V.top.etch.tap.txt https://github.com/martin2250/OpenCNCPilot/files/2150601/6.x.Sensors.StepDown.5V.top.etch.tap.txt

Any ideea? I see some of you have a perfect board, how? :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/martin2250/OpenCNCPilot/issues/28#issuecomment-401447842, or mute the thread https://github.com/notifications/unsubscribe-auth/AiE9SOjLHIW8lsKGi_eRbQ6Ykzudn6yoks5uBnwIgaJpZM4NFfEl .

bensonsbc commented 6 years ago

Sorry see The info on the bottom of The image.

The circles are not round, wich lead me to think The bit are forcing The material and get stuck, like if you are going too fast.

Try to mill slower (30 instead of 100), and not so deep.

You need to adjust by trial and Error...

Start slow, then increase... Try shallow.

Alexandre Benson Smith Desenvolvimento THOR Software www.thorsoftware.com.br (11) 9 9641-1808 (11) 4992-3496 (Enviado pelo celular)

Em sex, 29 de jun de 2018 16:17, Alexandre Smith benson@thorsoftware.com.br escreveu:

How deep are you milling?

What speed (feed) are you using?

Alexandre Benson Smith Desenvolvimento THOR Software www.thorsoftware.com.br (11) 9 9641-1808 (11) 4992-3496 (Enviado pelo celular)

Em sex, 29 de jun de 2018 16:12, George Dicu notifications@github.com escreveu:

Its very strange. Ive tried all day to calibrate my china CNC 2418(aliexpress). Mill bit I use is a 01mm tip, 20 Degree.

Working with the attached files: TEST I`ve made, the one on the right-middle [image: cnc tests] https://user-images.githubusercontent.com/948710/42109967-2d780ee4-7be8-11e8-8a5f-2f2bd417ffed.jpg

PCB-GCODE settings for the latest test: [image: image] https://user-images.githubusercontent.com/948710/42110189-f13e4b72-7be8-11e8-895b-e9cf4725faf5.png [image: image] https://user-images.githubusercontent.com/948710/42110250-15cdc3d2-7be9-11e8-9ed0-b3e415ff3d7c.png

Even if I use a min isolation of 0.6 my traces are bearably visible. :( this is my tap file renamed into txt to add it here. 6 x Sensors StepDown 5V.top.etch.tap.txt https://github.com/martin2250/OpenCNCPilot/files/2150601/6.x.Sensors.StepDown.5V.top.etch.tap.txt

Any ideea? I see some of you have a perfect board, how? :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/martin2250/OpenCNCPilot/issues/28#issuecomment-401447842, or mute the thread https://github.com/notifications/unsubscribe-auth/AiE9SOjLHIW8lsKGi_eRbQ6Ykzudn6yoks5uBnwIgaJpZM4NFfEl .

martin2250 commented 6 years ago

that is not how a 0.1mm V bit should cut. did the tip break off? try using a new tool and starting with a really shallow cut (maybe as low as 0.02mm) and slowly increase the depth in 0.005/0.01mm steps until you make it through the copper. A feedrate of 100mm/min for every 10000 1/min of spindle speed should be totally fine (I'm using 6-700mm/min with 25k/min spindle speed even for very intricate boards, though your machine has to be able to handle the acceleration)

xaoo commented 6 years ago

Hi,

No, this bit is fine, I guess, picture attached. drill-bit

Right now, I`ve tried 0.03 zDown image

and 0.045 zDown image

I would try with S1000, feed rate of 30-40 and zDown of .02 and increat by .01 step. thank you

deHarro commented 6 years ago

Hi Guys! I had troubles too when I first encountered OCP and tried to mill my boards.

In the meanwhile I have managed to get boards milled on the first try and I noticed, that nowhere is mentioned that one have to zero the drill bit before starting the job. (At least I didn't see an explicit hint on that fact).

Perhaps it’s not necessary if you use the drill bit for probing, but I use some sort of spring loaded test pin for the probing procedure. This has the advantage, that even if the Z axis doesn’t stop (perhaps by forgetting to connect the board to the Arduino sense input) when reaching the surface of the board, I have enough time to stop the probing manually and fix the problem. The spring rescues the board and the drill bit. The negative part of this is, I have to change the bit before I can start milling and the drill bit has to be zeroed before.

So I made a macro that zeroes the bit and retracts the spindle to 1 mm above the board. When I then start the milling process, OCP knows exactly where it has to move to.

One additional failure I often made (and make from time to time, still :-( ) is, I forgot to apply the just measured height map to the G-code. This results in milling pictures like you showed us.

Concerning Martins hint on wobbling drill bits, I realized, that even a small wobbling destroys the result. The drill bits I bought at ebay from china. From 10 bits around one or two are very well, the others are not centered. Happily I have one clamp which is somewhat uncentered and so I combine the bad clamp and one of the bad bits to get a working set.

Here is the procedure I use the adjust the bit: I fasten my drill bit by hand, so I’m still able to turn it in the clamp. Then I start the spindle (again with a macro) with around 3000 rpm and closely look at the tip. During the acceleration and deceleration I see, whether the tip is absolutely centered or whether it wobbles. Stop the spindle. If it wobbles, I turn the bit some degrees in the clamp and again start and look. This procedure is repeated until no wobbling occurs. Then I fasten the clamp and test again. Sometimes the fastening process disturbs the alignment and I have to realign the bit again. It’s a tedious process, but in the end you get a perfect result. Have a look at this board.

Hopefully this thoughts help somewhat...

Harald

xaoo commented 6 years ago

Hi Guys,

1 .How can I start from pos 2? Why is always this tool start with an offset, pos 1?

image

  1. Is there a button to send the machine to 0,0,0 if I move it from my 0,0,0 pos?
Donderda commented 6 years ago

Are you sure 1. isn’t your starting point? Try to check your settings on your g-Code generating toolset...

How are you generating the code?

Am 04.07.2018 um 21:36 schrieb George Dicu notifications@github.com:

Hi Guys,

1 .How can I start from pos 2? Why is always this tool start with an offset, pos 1?

Is there a button to send the machine to 0,0,0 if I move it from my 0,0,0 pos? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Donderda commented 6 years ago

Furthermore you can move your router to the desired position (manual „tab“) and set the current position to zero.

martin2250 commented 6 years ago

Hi @xaoo,

OpenCNCPilot starts exactly where your gcode tells it to start (X0Y0). Only the features of your PCB don't extend this far, so the height map does not need to extend to X0Y0. If you want it to "start as pos. 2" you have to move your PCB design. setting that position to zero will only move your design further towards positive XY.

deHarro commented 6 years ago

Hi xaoo, to express it perhaps more clearly: Your design has a zero point at X0Y0. This is where OCP starts. Since the resulting board should have a border (to keep soldered parts from hitting the edge), the outmost traces are displaced somewhat away from the edges. OCP calculates the surrounding rectangle of only the to be milled features, so this is the resulting offset between "1" and "2" you see. The finished board should have the remaining border, still, so you have to (or at least should) use a board big enough to provide the corresponding area around the traces. This is absolutely normal for electrical boards.

Harald

xaoo commented 6 years ago

One more thing regarding milling depth, I have new tests:

36692992_1962437830454402_4463269278870667264_n

Unfortunately I switched from from 0.1 20degree bit(picture above) to 0.1 30degre bit, but I have the same issues, milling it too damn deep. gcode.txt

The traces are too thin and remaining copper for holes are to narrow. I used F30 with Z-0.05, then I switched from Z-0.05 until Z-0.025, same depth..

Can you recommend a good quality bit from bandgood/aliexpress/dx.com, if they have any??

Thank you

trietdao95 commented 6 years ago

Hi @martin2250 , I want to ask what is test pattern on Probing? I see you set it to (x x + y y) / 1000.0. How to use or change this?

martin2250 commented 6 years ago

@xaoo: I'd recommend the more common D shaped cutters (D shape when looked at from below, so half the tip is ground off) over your triangular cutters. I don't use a specific brand, just bought the cheapest ones from china. That said some quality brand ones will run you ~9$/pc but have given me slightly better results, but I don't think it's worth it in this case.

@trietdao95: There is a checkbox somewhere in that dialog that is clearly related to this, just try it out. Isn't there even a tooltip?

classbproject commented 5 years ago

Hi, two quick questions - Are there plans to make this available for a linux OS, perhaps one that can run on a RPi? And second, is there a way to make the grid lines on the UI a little less darker?

martin2250 commented 5 years ago

Hi @classbproject,

until recently it was impossible to run WPF apps on linux, but .net core 3.0 alpha was released a few days ago. I'll try to port it over but I can't make any promises. I really hope it works as I'd love linux support as well. As for the UI lines, I can add a setting to change the opacity when I get around to it.

classbproject commented 5 years ago

Sure, thanks.

martin2250 commented 5 years ago

Nevermind, seems like desktop apps will still only run on windows :( https://blogs.msdn.microsoft.com/dotnet/2018/05/07/net-core-3-and-support-for-windows-desktop-applications/

voneiden commented 5 years ago

@martin2250 I didn't spot a license for the code, is there one?

martin2250 commented 5 years ago

@voneiden Thanks, I thought I already added one. OpenCNCPilot is now licensed under the MIT license.

voneiden commented 5 years ago

Neat, maybe it was already there but I just couldn't find it on the Github mobile version. I haven't tried OpenCNCPilot (running linux), but does it support orienting gcode? If not, that's something to consider implementing as it's a pretty useful feature for double sided PCBs. The second side can be aligned in software, utilizing for example drill holes, rather than trying to align the PCB physically by hand.

That of course requires recalculating the gcode values which places quite a bit of faith on the software to do it reliably.

martin2250 commented 5 years ago

There was no license until your tip, thanks for that. Moving the toolpath around would be pretty trivial to implement and OpenCNCPilot would do it absolutely reliably (the gcode is parsed and recalculated completely when applying a heightmap anyways), but I think this should be done by whatever software you use to generate the gcode in the first place. I use FlatCAM and it generates the gcode so that I can flip the board and align it using the same locating holes the first side used. Other than that you can always use work offsets to 'move' your toolpath precisely in software. Aligning the boards by hand shouldn't be something you need to worry about in the first place.

PS: I'd love to have OpenCNCPilot on Linux, it just isn't possible without moving to a completely different software ecosystem. OpenCNCPilot and Fusion 360 are the single reason that I still dual boot my Laptop.

voneiden commented 5 years ago

Indeed, Fusion 360 is unfortunate. I completely forgot that FlatCAM has that alignment hole functionality - I haven't used it because I have a workflow that has served me well enough. What I've done previously (with bCNC) is to align the code based on two actual PCB pad holes at opposing ends. It has a feature where you can store a number of points containing the physical coordinate of the hole in the real world versus the desired position of the hole in the gcode. It can then apply a transformation on the gcode based on these mappings (which generally should be just a rotation around a Z axis as the XY scale remains constant). From OpenCNCPilot perspective the tricky part might be relative coordinates such as those in arcs (I and J). I haven't gotten as far as thinking if you can rotate those around their own Z axis or if they need to be converted to absolute coordinates and rotated around the transformation axis.

You can argue that measuring the hole position by jogging is more inaccurate than having fixed alignment holes and I do agree with that, but based on my own experience I can eyeball it by jogging within +-0.1 mm and that has been enough for my purposes.

martin2250 commented 5 years ago

Internally, OpenCNCPilot uses absolute coordinates for everything anyways, the rest is just some simple matrix/vector math (as long as all arcs are in the XY-plane). Still I don't think this would be better or even easier than physically aligning the PCB.

Your method requires drilling the through holes and vias before flipping the board. This makes probing the board for the second side pretty hard, as probing locations could end up inside a hole. Also the heightmap wouldn't be parallel to the board anymore, so probing the board right up to the edge would be risky.

voneiden commented 5 years ago

Still I don't think this would be better or even easier than physically aligning the PCB.

Now now, let's be fair here, aligning the board by hand is unnecessary, slow and unreliable. The other two methods discussed are reliable and while the software transformation is slower by a minute or two when compared to simply flipping the board on the alignment pins, it conserves stock material. So I'm willing to argue that best approach here depends on whether you want fast turnaround or minimize stock waste.

In practice the board edge is a non-issue as standard eyeballing gets the board pretty close to parallel. The drill holes are a concern, that is correct, and off the top of my head I can't remember any auto leveling implementation that avoids them automatically (although I have a fuzzy memory that it has been done by someone). With my current toolchain, I simply check that the leveling grid does not conflict with the holes before running it. Usually no action required.

As a side note, I've read some comments in the past pointing out some hobbyist prefer drilling the holes first to reduce the risk of tearing the pads. While that has never happened to me, I can see why someone would perceive it as an advantage.

Anyway, this is not a feature request, just some food for thought. Keep up the good work for the community. 👍

martin2250 commented 5 years ago

aligning the board by hand is unnecessary, slow and unreliable

absolutely agree, I meant aligning it with pins

it conserves stock material

how? You can use tiny 0.8mm holes and paperclips to align the board, I usually just use the mounting holes that I need to drill anyways, so there is no need to place the alignment holes outside the PCB.

I also remember a video on youtube that claimed that the algorithm can avoid holes. I think it was some software for Mach3/LinuxCNC, no idea how they interpolate the height with a non-uniform pattern, this probably requies some sort of mesh triangulation. I've also heard about drills tearing out pads, but never had it happen personally, even with crazy small annular rings and I always drill after isolation routing.

Anyways, this won't be high on my todo-list, I'll consider it when I have some time on my hands.
Cheers!

canbaytok commented 5 years ago

Hello everyone,

I was wondering what the resolution of the Z axis of your machines is (steps/mm) ? I am currently trying to isolate PCBs with QFN footprints and believe the resolution of only 800 steps/mm is really hindering me in achieving my goal.

classbproject commented 5 years ago

Have you tried checking with a dial gauge if your machine is physically capable of moving at that small increments? I have not tried QFN but with a 10 deg 0.1mm bit I can easily route TSSOP layouts. The Z feeds have to be quite slow because the bit tips are quite delicate. My Z is at 400 steps/mm. Also wouldn’t your X and Y resolutions also matter?

martin2250 commented 5 years ago

Resolution isn't the limiting factor for most applications, backlash is. I use 40-50µ as milling depth and an error of ~5µ is still acceptable. That is equivalent to half a step of error at 100 steps/mm. If your machine has backlash, you can easily have more error due to backlash than from low resolution. My machine also has 800 steps/mm on all axes and a test PCB with two QFNs (one at 45 degrees) came out pretty much perfectly.

What kind of leadscrew are you using? My machine uses preloaded ball screws (C7 P1) which have very little backlash.

canbaytok commented 5 years ago

I am using the standard lead screw that came with my 3018 chinese CNC. I guess I'll have to do some research and get myself a better z axis.

bensonsbc commented 5 years ago

I think Z axis does not have a lot of problem of backslash, I think the gravity handles it....

Best regards,

Alexandre Benson Smith Desenvolvimento THOR Software www.thorsoftware.com.br (11) 9 9641-1808 (11) 4992-3496 (Enviado pelo celular)

Em sáb, 10 de nov de 2018 21:06, sirsenor <notifications@github.com escreveu:

I am using the standard lead screw that came with my 3018 chinese CNC. I guess I'll have to do some research and get myself a better z axis.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/martin2250/OpenCNCPilot/issues/28#issuecomment-437629008, or mute the thread https://github.com/notifications/unsubscribe-auth/AiE9SEpqKWllr-hwW0lzZAx3VoSPqEgpks5ut1wNgaJpZM4NFfEl .

canbaytok commented 5 years ago

Alright I think I know where the problem was.

First off I ordered an anti-backlash nut from china and will install it on my machine as soon as I get it.

After some more experimenting I noticed that the probe position ("PRB") grbl sends to OCP was always off by at least 0.005mm from the zero position of the Z axis. I just went with it and set my milling depth to 0.01mm and lowered it in 0.001mm increments until I was satisfied with the resulting PCB. I did the same thing when I routed off the soldermask and the result was a decent looking breakout board for a 2x2mm QFN IC. I will definitly experiment some more tomorrow and maybe post some pictures.