A few more Limit Switch questions for ShapeOko 2

Discussion about the arduino based g-code interpreter, grbl
kristenanne77
Posts: 432
Joined: Thu May 08, 2014 11:34 am

A few more Limit Switch questions for ShapeOko 2

Post by kristenanne77 » Mon Dec 04, 2017 2:00 pm

I enabled Homing with $22=1.

I started the homing sequence and while it was starting ... heading upward on the Z axis, I manually triggered the z axis switch to see if it would stop moving upward and then continue in the x or y direction.
Nothing happened.
I wired the x, y and z switches to pins 9,10, and 11 on arduino uno..
I read in different locations that 9,10 and 11 were the proper arduino limit pins (for x,y, and z respectfully)... and somewhere else I read that pins 9,10 and 12 were the x,y and Z limit pins .
Which is it?

Currently I have my x switch going to pin 9, the y switch going to pin 10 and the z switch going to pin 11.
Question 1:
Is it possible that I need to reconnect the z switch to pin 12 instead of 11?
Question 2:
If do have to connect the z switch to arduino pin 12 instead of pin 11 ....... is there a way I can "software switch" the functions of pins 11 and 12, so I don't have to take the boards out to physically resolder the pin?
Question 3:
Assuming I get the right pin connection to the Z limit switch, Can I test with only one switch (z axis) wired up, or do I need to have all switches connected for the Homing cycle to even start running?

Thanks
K

WillAdams
Posts: 8608
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: A few more Limit Switch questions for ShapeOko 2

Post by WillAdams » Tue Dec 05, 2017 5:37 am

Please check in w/ chamnit and the folks at: https://github.com/grbl/grbl

Does

>on our machines the inout pin setting for limit switches is $5=0

help?
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets

RobCee
Posts: 587
Joined: Wed Jan 08, 2014 11:33 am
Location: Birmingham, UK

Re: A few more Limit Switch questions for ShapeOko 2

Post by RobCee » Tue Dec 05, 2017 4:41 pm

The answers to your questions depend on which version of GRBL you are running, as the pins changed for limits at one of the revisions (in order to add other functionality). This was part og the change from v0.8 to v0.9. If you are using v1.1 (if not, you should be!) then you should be fine to connect your Z-Limit switch to pin 12. For all the pin connections, refer to this diagram.

Q1: Yes, you may have to switch over your connection from pin 11 to pin 12, dependant on your GRBL version (v0.8 or lower use pin 11, v0.9 and later use pin 12).

Q2: There is a way to 'software switch' the pins, by compiling your own version of GRBL locally, but it would cause you fewer issues going forward if you used a 'default' build.

Q3: You should be able to test with just one switch, but be aware that your machine will still move in the other directions, but won't find anything to tell it to stop... Keep close to your power switch!

Good luck
ShapeOko2 #3400 - Chinese 800W AC Spindle - Stiffened X-Axis - TR10 Z-Axis - Inverted Z Motor - Hall Effect Limits - Drag Chains & Custom Brackets

kristenanne77
Posts: 432
Joined: Thu May 08, 2014 11:34 am

Re: A few more Limit Switch questions for ShapeOko 2

Post by kristenanne77 » Wed Dec 06, 2017 5:13 am

I am a little confused. If I keep my z limit switch on pin 11, which grbl version do I need to install on the arduino?
Also, how can I tell which version I am currently running?

Thanks
K

RobCee
Posts: 587
Joined: Wed Jan 08, 2014 11:33 am
Location: Birmingham, UK

Re: A few more Limit Switch questions for ShapeOko 2

Post by RobCee » Wed Dec 06, 2017 9:38 am

You should run your arduino with the latest (1.1f) version of grbl, it is much better/faster/more robust than the earlier versions.

Just wanting to keep your limit connected to pin 11 is not a sensible justification for running the older version, I believe.
But, what is the challenge you have with shifting the connection to pin 12? This should be fairly simple in most installations, reconnecting a terminal or moving a jumper pin.

When you initially connect your controller to grbl, you should get a message similar to this:

Grbl 1.1e ['$' for help]

Alternatively if you send a $i command from your controller to grbl it should tell you which version you are using.
ShapeOko2 #3400 - Chinese 800W AC Spindle - Stiffened X-Axis - TR10 Z-Axis - Inverted Z Motor - Hall Effect Limits - Drag Chains & Custom Brackets

Picengraver
Posts: 42
Joined: Sun May 11, 2014 5:05 pm
Location: Florida
Contact:

Re: A few more Limit Switch questions for ShapeOko 2

Post by Picengraver » Wed Dec 06, 2017 1:29 pm

Use this diagram. I don't recommend you try to recompile Grbl to swap pins. You may need pin 11 PWM output for spindle on/off later if you do not already use it now.
John Champlain
www.picengrave.com
Attachments
Arduino 9x Pins.jpg
Arduino 9x Pins.jpg (53.13 KiB) Viewed 1604 times

kristenanne77
Posts: 432
Joined: Thu May 08, 2014 11:34 am

Re: A few more Limit Switch questions for ShapeOko 2

Post by kristenanne77 » Fri Dec 08, 2017 2:02 am

Thanks again. Okay, I will attempt to solder to pin 12.
How do I download the new grbl and install on arduino?

Thanks
K

RobCee
Posts: 587
Joined: Wed Jan 08, 2014 11:33 am
Location: Birmingham, UK

Re: A few more Limit Switch questions for ShapeOko 2

Post by RobCee » Sat Dec 09, 2017 5:28 pm

There are some every helpful instructions on the grbl wiki page
General information here: http://github.com/gnea/grbl/wiki
Installing (flashing) grbl to an Arduino: http://github.com/gnea/grbl/wiki/Flashi ... an-Arduino
ShapeOko2 #3400 - Chinese 800W AC Spindle - Stiffened X-Axis - TR10 Z-Axis - Inverted Z Motor - Hall Effect Limits - Drag Chains & Custom Brackets

kristenanne77
Posts: 432
Joined: Thu May 08, 2014 11:34 am

Re: A few more Limit Switch questions for ShapeOko 2

Post by kristenanne77 » Sat Dec 16, 2017 5:10 pm

I soldered pin 12. And flashed the arduino with the new version grbl 1.1.
Unfortunately all the settings for steppers etc are all gone and I didn't write them down ahead of time .
Anyone know the original Shapeoko 2 grbl settings I need before trying to run machine?

Thanks
K

RobCee
Posts: 587
Joined: Wed Jan 08, 2014 11:33 am
Location: Birmingham, UK

Re: A few more Limit Switch questions for ShapeOko 2

Post by RobCee » Sat Dec 16, 2017 6:35 pm

Oops! Sorry we forgot to mention that part...

You can find a picture of some older default settings from Grbl 0.8c in the Shapeoko2 wiki page - look for the 'Configuring' section at the bottom. This will give you a start.
The later version of Grbl has more options, so you will have to go through them. But it is worth reviewing what they do from the Grbl wiki too.

I bet you never thought it was going to take this much effort... It is worth it though, it's a lot of fun in the end!
ShapeOko2 #3400 - Chinese 800W AC Spindle - Stiffened X-Axis - TR10 Z-Axis - Inverted Z Motor - Hall Effect Limits - Drag Chains & Custom Brackets

Post Reply