gnea / grbl

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino
https://github.com/gnea/grbl/wiki
Other
3.99k stars 1.59k forks source link

Zprobe issue #1196

Open ReinierGielen opened 1 year ago

ReinierGielen commented 1 year ago

Hello I have a DIY cnc with an arduino UNO and Grbl 0.9f and it works fine. We used a makeshift Z-probe connected to GND and A5 and that worked. No I was smartening up the build and ordered a standard z-probe from AliExpress.

Now I am having issues with the Z-probe. I checked the wiring and fixed an issue. I now have 4,9v difference on the probe and when I manually touche the clamp on the touchplate during probing the machine responds like expected. BUT when I connect the clamp to the drill bit and start a probe it goed up and not down. So I measured the voltage between the drill and the touchplate and found 3.1v I assume this is to low and makes GRBL think the drill is touching the plate.

2 questions.

Any help is appriciated

GrahamJB commented 1 year ago

The movement of the Z probe is controlled by your Gcode sender software (Candle, UGS, Openbuilds etc.) NOT Grbl!

Check the settings your sender program uses to perform the Z probe sequence.

From: ReinierGielen @.> Sent: 19 February 2023 2:07 PM To: gnea/grbl @.> Cc: Subscribed @.***> Subject: [gnea/grbl] Zprobe issue (Issue #1196)

Hello I have a DIY cnc with an arduino UNO and Grbl 0.9f and it works fine. We used a makeshift Z-probe connected to GND and A5 and that worked. No I was smartening up the build and ordered a standard z-probe from AliExpress.

Now I am having issues with the Z-probe. I checked the wiring and fixed an issue. I now have 4,9v difference on the probe and when I manually touche the clamp on the touchplate during probing the machine responds like expected. BUT when I connect the clamp to the drill bit and start a probe it goed up and not down. So I measured the voltage between the drill and the touchplate and found 3.1v I assume this is to low and makes GRBL think the drill is touching the plate.

2 questions.

Any help is appriciated

— Reply to this email directly, view it on GitHub https://github.com/gnea/grbl/issues/1196 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN5WWEVKRARXC7IV243BP3WYISIZANCNFSM6AAAAAAVA7MZIM . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/ABN5WWEQYZKPM4ZEYWFUR6LWYISIZA5CNFSM6AAAAAAVA7MZIOWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHF5UBKDI.gif Message ID: @. @.> >

ReinierGielen commented 1 year ago

I am using UGS 0.9f and the gcode is G38.2 Z-10 F100 which I also tried manually from the console. As I explained the code does what it is supposed to doe and responds correctly when I touch the touchplate with the clamp. The connection is detected and the direction is reversed.

But this does not work when the clamp is attached to the drill bit. The the drill goes up not down.

The only differens I could fine was the voltage difference

I do think that it is GRBL that detects if the pin A5 is HIGH or LOW. 4.9v is obviously HIGH. And if I study the behaviour I suspect 3.1v is LOW. This would explain why things happen as they do.

Is this correct ? and how do I fix it

GrahamJB commented 1 year ago

Is your movement mode absolute (G90) or relative (G91)?

The Gcode I use for Z probing is

G91; G38.2 Z-100 F100; G0Z1; G38.2 Z-2 F10; G92 Z19.10; G0 Z2

My probe base is 19.10mm thick.

From: ReinierGielen @.> Sent: 19 February 2023 3:16 PM To: gnea/grbl @.> Cc: GrahamJB @.>; Comment @.> Subject: Re: [gnea/grbl] Zprobe issue (Issue #1196)

I am using UGS 0.9f and the gcode is G38.2 Z-10 F100 which I also tried manually from the console. As I explained the code does what it is supposed to doe and responds correctly when I touch the touchplate with the clamp. The connection is detected and the direction is reversed.

But this does not work when the clamp is attached to the drill bit. The the drill goes up not down.

The only differens I could fine was the voltage difference

— Reply to this email directly, view it on GitHub https://github.com/gnea/grbl/issues/1196#issuecomment-1436014943 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN5WWHK5PWUBE72OTUOEHDWYI2LNANCNFSM6AAAAAAVA7MZIM . You are receiving this because you commented. https://github.com/notifications/beacon/ABN5WWHXCKSGHVXYUJACNULWYI2LNA5CNFSM6AAAAAAVA7MZIOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSVS7MV6.gif Message ID: @. @.> >

ReinierGielen commented 1 year ago

Probably the same probe as mine 19,16mm. I use the same commands. The actual probe command is G38.2 it moves the drill down 100 ( Z-100 ) with the speed 100 ( F100 ). It is all doing that when the probe is NOT connected to the drill. As it should because the pin A5 with 4.9v is HIGH. As soon as the probe loop is closed the pin drops to 0 and the movement stops and retracts.

But if the probe is connected to the drill it retracts directly when the command is given. This is what is should do is it is already touchin the plate making A5 LOW. Therefore my question is 3.1v considered to be low ?

GrahamJB commented 1 year ago

My apologies,

I now fully understand what you are saying.

I would check the power wiring and earthing of the router board. Connecting the probe base to the bit by a clip should not give that voltage drop.

Is 3.1V too low, I don’t know, I would have to check the Arduino specs but I think the problem lies elsewhere.

From: ReinierGielen @.> Sent: 19 February 2023 3:58 PM To: gnea/grbl @.> Cc: GrahamJB @.>; Comment @.> Subject: Re: [gnea/grbl] Zprobe issue (Issue #1196)

Probably the same probe as mine 19,16mm. I use the same commands. The actual probe command is G38.2 it moves the drill down 100 ( Z-100 ) with the speed 100 ( F100 ). It is all doing that when the probe is NOT connected to the drill. As it should because the pin A5 with 4.9v is HIGH. As soon as the probe loop is closed the pin drops to 0 and the movement stops and retracts.

But if the probe is connected to the drill it retracts directly when the command is given. This is what is should do is it is already touchin the plate making A5 LOW. Therefore my question is 3.1v considered to be low ?

— Reply to this email directly, view it on GitHub https://github.com/gnea/grbl/issues/1196#issuecomment-1436024692 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN5WWF5BPDIMPIEULRSZEDWYI7JXANCNFSM6AAAAAAVA7MZIM . You are receiving this because you commented. https://github.com/notifications/beacon/ABN5WWHWMJ4S7ROK4TPP4GLWYI7JXA5CNFSM6AAAAAAVA7MZIOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSVS77XI.gif Message ID: @. @.> >

langwadt commented 1 year ago

3.1V is on the edge for 5V. What connects to the bit, GND or A5? if it is A5 try swapping the connection so the bit is GND

ReinierGielen commented 1 year ago

LOL, that was just what I was doing now and it indeed solved the problem. I was color blind. The probe has a red and black wire. The plate is black the clamp is red. And ofcourse I connecte black to ground and red to power. But in this case that is not the right way to connect it. On my previous probe the wires where reversed and it always worked. This way there is no voltage drop at the start and that explains everything.

Thanks for all the help