Visual alignment mod for shapeoko

Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

Re: Visual alignment mod for shapeoko

Post by Will Winder » Fri Jan 11, 2013 4:13 pm

PsyKo wrote:
Will Winder wrote:How has Universal Gcode Sender been treating you?
I'm planning to revisit the jogging functionality soon, are there any features or improvements you would like to see? Or other things that would make your life easier?
I have one recommendation (I think this should be a completely new topic). For some reason, I always have to restart my UGCS after finishing a job. This resets my zero position.
I already updated to last version of UGCS. I will update to last version of GRBL soon.

Any idea ?
Thanks
That bug should be fixed for you in 1.0.5, unfortunately the jogging commands are not working as well as they did in 1.0.4 (once you upgrade to 0.8c). Sorry for trying to derail the thread, carry on!
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

PsyKo
Posts: 430
Joined: Thu Aug 30, 2012 8:42 pm
Location: France

Re: Visual alignment mod for shapeoko

Post by PsyKo » Fri Jan 11, 2013 4:25 pm

If you need help, feel free to contact me via PM. I can definitely help.
Shapeoko #736
Kress 800, Z Axis upgrade, dual Y, 600mm X&Y rails, metal spacers and V Wheels, home switches, 4th axis
Goko - Free CNC Control Software - http://www.shapeoko.com/forum/viewtopic ... 380#p44380

wlanfox
Posts: 74
Joined: Sat Oct 20, 2012 10:49 am

Re: Visual alignment mod for shapeoko

Post by wlanfox » Fri Jan 11, 2013 7:29 pm

Will Winder wrote:
PsyKo wrote:
Will Winder wrote:How has Universal Gcode Sender been treating you?
I'm planning to revisit the jogging functionality soon, are there any features or improvements you would like to see? Or other things that would make your life easier?
I have one recommendation (I think this should be a completely new topic). For some reason, I always have to restart my UGCS after finishing a job. This resets my zero position.
I already updated to last version of UGCS. I will update to last version of GRBL soon.

Any idea ?
Thanks
That bug should be fixed for you in 1.0.5, unfortunately the jogging commands are not working as well as they did in 1.0.4 (once you upgrade to 0.8c). Sorry for trying to derail the thread, carry on!
Yes agree with this one too, While making PCBs there is usually a combination of 3+ files, Isolation routing, Drill files (1+), Cutting board. And as PsyKo mention one has to re-align per file (this is the source of a lot offset errors).

Other "features" I would love are:

1) T6, I was thinking of editing the code and making the change to intercept the tool change command (T6) and have a configuration for this command, for example tool change is at X0,Y0,Z40. Then allow me to zero out the Z-axis since different tools have different lengths and continue :) this will be so great since I wouldn't have to restart for tool change and I could combine the 3+ files into 1 file with T6 in between. Even if there is no configuration I can insert the gcode G0 X0 Y0 Z40 then T6 as long as it pauses, allows me to zero z-axis and continue.

2) while using the jog feature, it will be nice if it only send the command for the one axis I press the button for, instead of all 3 axis, I had the unfortunate event of braking a few 0.3mm end-mills because I had used the command interface to change the z-axis up 10, then wanted to jog left or right by say 10mm, but by doing so it send the command G0 X10 Y0 Z0 (oops!!) I would expect the command do be only for the axis the button was pressed like "G0 X10".

Another more common problem; process a gcode file file ended with code as some non zero coordinate, then I use jog control to move Z-axis... again it sends G0 X0 Y0 Zval. Imagine I was drilling a whole and there was an offset error, press cancel. Then try to move up to take the drill bit out of the hole. oops again G0 X0 Y0 Z<val>.

3) I tried 1.0.5, I like how you are now querying grbl 0.8c for the machine axis coordinates (would probably help with (2)), the one thing that didn't like is that now is messing up with calibration / characterizing, for example I want to move x-axis right in 3.5mm increments and measure per move. in 1.0.4 it would set the value 3.5, and hit the X+ per increment resulting in commands like G0 X3.5 Y0 Z0, G0 X7 Y0 Z0, G0 X10.5 Y0 Z0, and so on, for each one of this I would take a measurement with a digital caliper.

But now since it updates current position, it will send commands like G0 X3.5 Y0 Z0, G0 X7.42 Y0 Z0, G0 X10.42 Y0 Z0, since is taking what grbl thinks the machine is at and adding 3.5, which I agree it should be the default behavior, but it will be nice to be able turn it off. Now I have to calculate for every move to get what I want or use the command line... for example for above I would have to enter 3.58 (10.5-7.42) and do this for every subsequent jog increment. As you can see I moved back to 1.0.4 because of this.

4) Spindle ON/OFF

5) ABORT/STOP button ;)

But as mention before this probably deserves its own thread...

FYI also thinking about ways to add Vision controls but not sure if this could be added or it belongs different app. Is there a ways I can write a separate APP that interfaces with UGCS?

Thanks a a lot for this awesome app and your considerations for these new features.

-wlanfox
Last edited by wlanfox on Fri Jan 11, 2013 10:32 pm, edited 3 times in total.

wlanfox
Posts: 74
Joined: Sat Oct 20, 2012 10:49 am

Re: Visual alignment mod for shapeoko

Post by wlanfox » Fri Jan 11, 2013 7:47 pm

PsyKo wrote:0.1
wlanfox wrote:around 0.1 drift in a delta of 40mm on Z axis

This looks like a good precision. Anyway, I think it's always better to align at the lowest possible Z.

Do you have any recommendation on the design of the camera holder ? If attached to the makerslide, with 2 copies of the same holder, it should be pretty parallel ? Is this due to inaccuracy while machining the holder ?
PsyKo,

Is actually better then what it seems :), since we basically have a right triangle where the angles are fixed, the base is directly proportional to the height. Meaning that at 40mm height the drift (base) is 0.1mm. at 20.0mm h, b is 0.05mm, at 10.0mm h, b is 0.025...

Now when I change tools, these usually have the same length, but lets just say for argument sake that from tool to tool the height difference is 10.0mm my drift would be 0.025mm and since I know this I can actually derive a linear equation to account for it... Of-course thinking when using vision recognition and software will have the calibration factor to use depending on height.

this is now getting into the machine tolerances, if you look at my other post where I was characterizing the micro stepping accuracy, my machine has an accuracy of 0.15 worst and 0.08 worst average (FYI this was done with enable/disable the motors, with the motors energized all the time $7=255, accuracy of the machine maybe better).
http://www.shapeoko.com/forum/viewtopic.php?f=28&t=1039

So yes not bad, not bad at all :)

When I start a new PCB job, I always re check the camera to bit x,y offset and adjust my offset values if needed. This is the process I follow:

1) decide where 0,0,0 is
2) drill a small whole (so far I have been making a 0.05mm hole)
3) Move z-axis to 20mm (this is also my tool change height)
4) move to the camera offset and verify cross-hair is dead-center, if not adjust and use new offset for subsequent alignments.
5) change bit to isolation v-shape bit, zero z-axis, move to safe height (I use 2mm above 0)
6) if I moved away from X0,Y0 then move bit back to X0, Y0 using camera cross-hair and then offset to 0,0.
7) start job :)
8) when changing tools go back to 20mm, change tool, align, continue...

-wlanfox
Last edited by wlanfox on Thu Jan 24, 2013 10:41 pm, edited 6 times in total.

wlanfox
Posts: 74
Joined: Sat Oct 20, 2012 10:49 am

Re: Visual alignment mod for shapeoko

Post by wlanfox » Fri Jan 11, 2013 10:50 pm


PsyKo
Posts: 430
Joined: Thu Aug 30, 2012 8:42 pm
Location: France

Re: Visual alignment mod for shapeoko

Post by PsyKo » Fri Jan 11, 2013 11:03 pm

wlanfox wrote:Interesting and related to PCB board alignment...

http://hackaday.com/2013/01/11/letting- ... brication/
http://blog.alessiovaleri.it/using-tran ... ng-part-1/

-wlanfox
Yes, it's simply a rotation matrix. Quite easy but very clever. This also might be useful for double sided PCBs. PCB orientation can be a pain when dilling with double sided. With this hack, no need to worry about it anymore.
wlanfox wrote:this is now getting into the machine tolerances
I have to try and measure my Shapeoko tolerances. I never had a chance to do it, but I noticed that milling a 10mm x 10mm wood square gave me something around 9.7 x 9.7mm. I definitely want to try with the motor lock setting $7 (among some other parameters in Cambam exact stop vs constant velocity).
I plan to use Hall effect home sensor. Some user announced a 0.01mm accuracy. This definitely might help for aligning holes. But I'll have to check against the Shapoko accuracy first.
Shapeoko #736
Kress 800, Z Axis upgrade, dual Y, 600mm X&Y rails, metal spacers and V Wheels, home switches, 4th axis
Goko - Free CNC Control Software - http://www.shapeoko.com/forum/viewtopic ... 380#p44380

BrianThorkild
Posts: 11
Joined: Tue Jan 01, 2013 2:42 pm

Re: Visual alignment mod for shapeoko

Post by BrianThorkild » Thu Jan 17, 2013 12:00 am

The entire thing is very impressive. Using the MakerSlides the way you did for clamping is awesome!
I really am very interested in what code you used to even make the PCB?
I have Eagle and tried some of the plugins, Not really very good. I tried "Linegrinder" just dies every time.
Any ideas.
I am going to do the camera and microscope. I eventually want to do watch parts.
:mrgreen:

PsyKo
Posts: 430
Joined: Thu Aug 30, 2012 8:42 pm
Location: France

Re: Visual alignment mod for shapeoko

Post by PsyKo » Thu Jan 17, 2013 11:15 am

I use pcb-gcode for Eagle. It works good so far. I've done a few PCB without any trouble (except human error :) )
Shapeoko #736
Kress 800, Z Axis upgrade, dual Y, 600mm X&Y rails, metal spacers and V Wheels, home switches, 4th axis
Goko - Free CNC Control Software - http://www.shapeoko.com/forum/viewtopic ... 380#p44380

wlanfox
Posts: 74
Joined: Sat Oct 20, 2012 10:49 am

Re: Visual alignment mod for shapeoko

Post by wlanfox » Thu Jan 17, 2013 3:36 pm

BrianThorkild wrote:The entire thing is very impressive. Using the MakerSlides the way you did for clamping is awesome!
I really am very interested in what code you used to even make the PCB?
I have Eagle and tried some of the plugins, Not really very good. I tried "Linegrinder" just dies every time.
Any ideas.
I am going to do the camera and microscope. I eventually want to do watch parts.
:mrgreen:
Well thanks, :)

I used KiCAD and pcb2gcode (http://sourceforge.net/apps/mediawiki/pcb2gcode)... but in reality no matter what tool you use, if you can create the gerber files, then you can translate to gcode with pcb2gcode (there are other alternatives out there, this one has work for me so far). The two issue I have with pcb2gcode, first no matter what the input file is the output is always inches :'(, second the drill files are G81 gcode which grbl doesn't support. To deal with these annoyances I catered two python scripts that do the translation after pcb2gcode; one for G81 to G01 gcode and the other one from inch to mm.

If you look at my other post I attached Arduino project with the millproject file that you can use with pcb2gcode.
http://www.shapeoko.com/forum/viewtopic ... 1039#p8387

I also use OpenSCAM to check the output and make any corrections if not happy with the result.
http://openscam.com/

There is also this online gcode visualization tool too.
http://www.buildlog.net/gview/index.html


-wlanfox
Attachments
gcode-py-scripts.tar.gz
it contains g81tog01.py and gc-in-mm.py
(2.63 KiB) Downloaded 82 times

PsyKo
Posts: 430
Joined: Thu Aug 30, 2012 8:42 pm
Location: France

Re: Visual alignment mod for shapeoko

Post by PsyKo » Sat Jan 19, 2013 1:07 pm

Will Winder wrote:
That bug should be fixed for you in 1.0.5, unfortunately the jogging commands are not working as well as they did in 1.0.4 (once you upgrade to 0.8c). Sorry for trying to derail the thread, carry on!
Sorry to pollute the code, but has this bug been fixed ??

Thanks
Shapeoko #736
Kress 800, Z Axis upgrade, dual Y, 600mm X&Y rails, metal spacers and V Wheels, home switches, 4th axis
Goko - Free CNC Control Software - http://www.shapeoko.com/forum/viewtopic ... 380#p44380

Post Reply