New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probing - Wiring Setup.and usage. #464

Closed
Protoneer opened this Issue Aug 10, 2014 · 14 comments

Comments

Projects
None yet
8 participants
@Protoneer
Contributor

Protoneer commented Aug 10, 2014

I had a quick look at the Wiki page but there were very little details about the probing feature in V0.9.

My questions are around:
x How does the wiring work?
x What kind of probes can be used?
x General overview of the probing process...

Thanks.

@gerritv

This comment has been minimized.

gerritv commented Aug 10, 2014

Form the Readme in Edge:
The G38.2 straight probe and G43.1/49 tool offset g-code commands are now supported. A simple probe switch must be connected to the Uno analog pin 5 (normally-open to ground). Grbl will report the probe position back to the user when the probing cycle detects a pin state change. (https://github.com/grbl/grbl/blob/edge/README.md).
Whatever probe you design should be able to handle some over travel, the Z movement likely won't stop immediately. Some sort of spring arrangement would do.

So the probe is anything that will take pin A5 to ground when it touches your object. The probe position is relative to machine 0. A typical porbe command might be G38.2 X20 Y15 Z-100 (in mm mode). You should set a slow feed rate , e.g. F20 (20mm/min). The G38 will move to X and Y, then Z axis will lower to -100 until the probe makes contact with your object, at which time movement stops. Grbl will report the machine position of the probe touch. E.g.

g38.2 x5y6z-100
[PRB:0.030,0.040,-0.645](this is what comes back from Grbl when the probe switches to ground)
A typical cycle might look like:
N01 set feedrate
N02 G0 X(pos1) Y(pos2)
N03 G38.2 Z-100
N04 G0 Z0 (retract probe)
change to new pos1 and pos2
Repeat from N02

If using Mach3 or LinuxCNC, then this would work directly: http://www.scorchworks.com/Gcoderipper/gcoderipper.html. Grbl doesn't do variables (yet/never?) so you would need to write some sort of preprocessor to handle the operation based on the gcode that GcodeRipper outputs. But it can be done. Just run gcode ripper on one of your gcode files and look at its output, you will see the sequence of operations.

@gerritv

This comment has been minimized.

gerritv commented Aug 10, 2014

Including the feedrate in the same block as probe command will work as well, the resulting code is shorter
G0 F1000 X20 Y30 Z0 (position probe at high speed)
G38.2 F10 Z-100 (moves probe toward table at 10mm/sec)

@chamnit

This comment has been minimized.

Member

chamnit commented Aug 10, 2014

@Protoneer : Yep. @gerritv is right. Grbl just detects a pin change on the probe pin, so any kind of device could work on it. I left it up to the user to determine what that is. A few examples that I know of are a tool length offset touch-off pad in the Carbide 3d Nomad 883 machine, a DIY touch-probe could work on this, and quick auto-leveling using John Lauer's Chilipeppr. I think he has a few videos on quick ways to do this when setting up to mill a PCB.

@LaserEngraver

This comment has been minimized.

LaserEngraver commented Oct 6, 2017

Thank you very much for your answers.
Unfortunatelly, Pin5 is connected to one pin of the A4988 Stepper Motor Drivers :-(
So I have to choose an other one, but it´s hard to say, which one is free on my Eleks Maker Board.

@jahnj0584

This comment has been minimized.

jahnj0584 commented Oct 6, 2017

@LaserEngraver

This comment has been minimized.

LaserEngraver commented Oct 6, 2017

ooopppppssss thank you :-)

@LaserEngraver

This comment has been minimized.

LaserEngraver commented Oct 6, 2017

O.K. probe sequence is working with:
N10 G38.2 Z-120 F500
N20 G10 L20 P1 Z0
N30 G91 G0 Z3

But...... if an end-Switch will be touched, the axis stops at once and retracts in the other direction.
If now the PROBE-Sequence is running and the Switch will be touched, the axis Need some mm to stop (like a ramp). This is not so good, because a milling tool would be pressed into the part.
What Need to be changed in the grbl-file that in case of probing the axis will stop at once when the Switch is "activated"?

thx

@DEF7

This comment has been minimized.

DEF7 commented Dec 13, 2017

I've been using the probe pin successfully (after the addition of a capacitor to eliminate false positives) for a long while now, but need to probe off unconductive materials - so I built a 3D touch probe of the always-on type. I know I need to invert the pin, but I'm unsure about this 'pull-down resistor' stuff. Does this mean that there will be a resistor in parallel to the probe itself, effectively shorting the probe pin to ground while the probe already is? When the probe stylus makes contact and breaks the circuit, then only the resistor will be grounding the probe pin? So, at no point is the pin actually floating high (due to the internal pull-up resistor)?

@LaserEngraver

This comment has been minimized.

LaserEngraver commented Dec 13, 2017

Hi,
I can´t answer your question about the capacitor, because I don´t use any.
But I think you need to insert it in paralell to the switch.
Why you need to invert the pin, because of an nc-used switch?

Now my process looks like following:
I inserted a microswitch into a case. It´s a normally open one with a long pcs of metal (to have a long "spring"-way after 1st contact).

Now I have to add this switch on top of the material (if material thickness is increased, the switch is on a higher position).
Then I run the probe-sequence with fast z-movement.
After switch has been activated, the z-axis will lift up 10mm and move then down again, but now with really low speed, to stop directly after the switch is 2nd activated.
Then z will be lifted up 0,5 mm again and stop.
The new 0-point will be stored into the arduino to keep it if you need more parts with similar thickness.

The code looks like:
N10 G38.3 Z-140 F500
N20 G91 G0 Z10
N30 G10 L20 P1 Z0

N10 G38.3 Z-140 F50
N20 G91 G0 Z0.5
N30 G10 L20 P1 Z0

Hope this helps you.

@DEF7

This comment has been minimized.

DEF7 commented Dec 13, 2017

No, that doesn't help me. I've already been using the A5 pin to detect when the cutter contacts a conductive surface for years. This doesn't help with wood/plastic, which requires that I carefully adhere and flatten out foil onto the surface - something that is a big waste of my time, especially when I can make a probe and use that instead. Grbl supports inverting the pin specifically for these types of probes, but I'm unclear as to the pulldown resistor aspect. I'm not here to ask whether or not I need a touch probe, that wasn't my question. That boat has sailed, I already spent all my free time in the last week designing and making the probe, now I just need to know exactly what wiring it up entails.

@DEF7

This comment has been minimized.

DEF7 commented Dec 13, 2017

I made a probe that's just like these:

https://hackaday.com/2011/06/09/diy-cnc-touch-probe/
http://gtocs.blogspot.com/2012/04/garys-diy-cnc-touch-probe.html
https://www.thingiverse.com/thing:721620

and from forum posts I've dug up on the web people have been using them just fine with Grbl, but the threat of 'frying the arduino' as stated on the Github page if a pulldown resistor is not used makes me nervous. It also doesn't make sense because when using the probe pin while not inverted also fry the electronics when contact is made and GND is directly hooked up to the probe pin via cutter + worksurface?

I'm wondering if the resistor is even necessary.

@thawkins

This comment has been minimized.

thawkins commented Nov 7, 2018

just buy a small piece of copper clad blank printed circuit board, and solder a wire to one corner. that then becomes a flat conductive surface to lay ontop of the work while probing. alternativly i small piece of metall sheet with one corner bent up, and a hole drilled thought it would allow attachment of a wire with a nut and bolt. it does not matter what it is so long as the thickness is known.

@109JB

This comment has been minimized.

109JB commented Nov 8, 2018

just buy a small piece of copper clad blank printed circuit board, and solder a wire to one corner. that then becomes a flat conductive surface to lay ontop of the work while probing.

That works great for setting tool length, but not so much for things such as detecting a hole center, probing an edge, mapping a contoured surface, etc. For things like that an actual probe works well.

Also, for tool setting, a non-pliable surface can result in chipping of tools particularly if the probing speeds are too fast, or if the tool is carbide. Keep the probe speeds low enough and it should be fine for HSS tools.

@DEF7

This comment has been minimized.

DEF7 commented Nov 8, 2018

just buy a small piece of copper clad blank printed circuit board, and solder a wire to one corner. that then becomes a flat conductive surface to lay ontop of the work while probing. alternativly i small piece of metall sheet with one corner bent up, and a hole drilled thought it would allow attachment of a wire with a nut and bolt. it does not matter what it is so long as the thickness is known.

My goal is to map the top surface of a workpiece for a V-carving, which is very sensitive to an irregular surface because it can totally ruin the end result if not planed out or compensated for, and because I work with various pieces of degraded wood (for aesthetic) the goal is to not plane the top surface perfectly flat. Yes, if your one and only goal is to figure out just where the tool is relative to the top surface of the workpiece then a simple little contact piece sitting on there with a known thickness is just fine. My purposes are a bit more involved than that though.

I've been having no problems whatsoever with my custom-made 'always-on' probe:

image

image

image

image

Originally I planned to just buy one off Ebay/Amazon, but all of them were way too long. My machine only has a few inches of travel so I needed something with a super low profile, and since apparently I'm the only person on the planet who needs a low-profile touch probe I had to design and fabricate one myself from scratch. I learned to use and drew it up in DesignSpark Mechanical - literally the first 3D CAD program I've ever used. Exported the various relevant features as DXF files and CAM'd them using VisualCAM. I then cut all the pieces out of various sheets of acrylic I had lying around from other projects, picked up some nuts and bolts at the local hardware store and was off to the races.

It took some adjusting to ensure that the contacts were all level (by twisting the bolts that are screwed through the bottom into the cap-nuts inside that function as contacts against the stylus carriage's contacts) but since I got that dialed it has been working great over the last year without any problems.

The real trick was wiring up to the galvanized bolts with a junky soldering iron and no flux! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment