-
Notifications
You must be signed in to change notification settings - Fork 3.1k
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Z limit switch not working #1128
Comments
from the wiki: For Grbl v0.9 with variable spindle PWM ENABLED: (NOTE: The Z-limit and the On Sat, Nov 12, 2016 at 10:34 AM, JoshuaFM notifications@github.com wrote:
|
Hello JoshuaFM! I encountered the same problem (limit switch for z-axis not working). #include "config.h" #ifdef CPU_MAP_ATMEGA328P // (Arduino Uno) Officially supported by Grbl. // Define serial port pins and interrupt vectors. Maybe you can try this for your project, too. All in all, the whole grbl project is great!! Thanks to the author and all contributors! |
Hi all, that really looked to be the solution to my problem, but the sourcecode modifications (#include "config.h") did not help. I installed limit switches for all 3 axis (min and max). All NO connected. I've set $21 and $22 to 1 and left $5 to 0; What I did for troubleshooting so far:
Right now I'm clueless and desperated. BTW: I compiled with config.h enabled #define VARIBLE_SPINDLE and therefore connected z-limit switch to PIN 12 and the spindle enable signal to PIN 11 (tested the variable "spindle speed" and ok) I'm using arduino uno with grbl shield on top. |
one more strange thing: I tried to change the order of homing axis in config.h It seems, like entries within config.h take no effect when it comes to homing, but will be considered in other areas (e.g. status report) |
How are you uploading to the Arduino? If using the Arduino IDE, do you only have one instance of the grbl firmware in the library folder. If you have more than one instance, it is hit or miss which file is used in the upload/ compile. |
First I compiled and uploaded with arduino. |
@SteBuTOS First, you should probably move to grbl 1.1 at https://github.com/gnea/grbl/ as grbl 0.9 is no longer recommended for new installs or requesting support. Second, if you changed the HOMING_CYCLE definitions order and recompiled/uploaded the change, and it made no difference to homing - then you aren't modifying the right copy of grbl. Make sure the only copy you have and are editing is under the Arduino libraries folder and called grbl. There must be no other copies even if you've renamed them. Third, you probably know this, but it is always best to home Z first so that the XY homing can avoid obstacles. |
@eociar your comment re adding |
Hello to all |
You can easy adapt the cnc shield to the new versions of grbl, you bend the cnc shield pins that needs to be swaped the you can solder the 2 wires on the bottom of arduino and conect to the bend pins |
Excellent idea and solution, thank you very much. |
In grbl 1.1 just comment out the VARIABLE_SPINDLE line in config.h to get it working if you don't need hardware PWM output on for variable spindle output voltages. |
Wanted to say thanks to arjun1299 - commenting out VARIABLE_SPINDLE fixed the issue for me - there's a detailed explanation of what it's all about in config.h itself. You'll need to delete previous Arduino libraries, recompile and re-upload. My Z limit switches work now - thanks!! |
The above steps answer the question, however for anyone unsure on the exact steps to do this: Firstly to test if what is and is not working. Connect to the arduino using something like universal Gcode sender, (Baud rate may have to be 115200) Changing the $10= <<numbers here For me entering $10=17 Holding down endstops and sending ? allows you to check the status. On Github I then downloaded the grbl 1.1 file. Extracted it (with e.g. winrar) and using notepad ++ opened the file: Pressed CTRL + F to search for: VARIABLE_SPINDLE I then saved the file. Using the arduino official computer program: When navigating to the file you need to select the grbl folder, within the grbl-master folder. Then ensure you're connected to your arduino: Tools>port> your com port number here Then, sketch>include library>grbl (at the bottom) Then press the right hand arrow icon to upload it. Close the arduino program. If you see that, it should work. You can also invert the limit switches if needed, if you want a normally closed vs normally open set of limit switches. Reverse by setting $5= to 1 I've spent so many hours reading helpful articles, and even though this one gave the right answer, it was a faff to know how what to comment out and compile. I've never posted, only consumed help articles.. so hopefully in like 5 years time this will help someone. Have a wonderful day and hope this saves you a few hours of troubleshooting o7 |
Thanks for this...battling with same issue. Hoping to resolve using your suggestions |
So glad this helped, from memory my board died and only when getting a second did I realize my code was fine but hardware broken. I'm also very surprised at my past self for the comment I added, I usually just consume content, never write up a fix and move on. However glad I was able to help, it will encourage me to contribute more solutions in the future. Best of luck |
Ok, so I have wired my x, y and z limit switches to an arduino cnc shield, what happens is that when i press the switch from x or y it detects it and stops, but when I press Z, nothing happens.
I checked my wiring and everything is okay, I used a multimeter on the Pins and the X and Y have 5Volts, while the Z has 0 volts. I know they have 5v because they have an internal pull up resistor, but what is happening with my Z? Why is it not working?
The text was updated successfully, but these errors were encountered: