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

Re: A few more Limit Switch questions for ShapeOko 2

Post by kristenanne77 » Sat Dec 16, 2017 6:52 pm

I started experimenting and have it jogging.
Also for homing I enanbled the $22=1.

Now the problem is .... I have 3 switches connected..... not on the machine but fully connected (they are the hall effect switches sold by a mr. patterson.
(here are the switches I bought, along with the breakout board
https://www.tindie.com/products/kevpatt ... sor-343rt/)
My idea to test the switches was to start homing $H and use a magnet to trigger the z switch first, hoping it would change direction and then trigger the x or y switch with the magnet (depending on which way it was moving ... and then trigger the last switch. ... just to make sure the switches were doing something. I know the switches are connected properly because the led is lit up green, and then turn red when it is near a magnet).
Okay, so I started homing, it starts moving upward, I use the magnet to trigger the switch for thse z axis .... nothing happens... so I shut it down .
Are there any other grbl settings I need to set for the switches so they respond?

(yes, I am learning a lot about grbl)

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 » Sat Dec 16, 2017 7:10 pm

Yes, you need to configure Grbl to have homing enabled. There are also settings for which direction / to what corner one homes in.

The SO3 instructions at: http://docs.carbide3d.com/shapeoko-faq/ ... le-homing/ should cover the basics --- I'm sure this information is on the wiki, but I don't know of a straight-forward, step-by-step take on it.
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets

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 7:26 pm

Would the Carbide Motion Controller work for the ShapeOko arduino-gshield board?
Currently I am using Universal GCodeSender

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 » Sat Dec 16, 2017 8:56 pm

I'm afraid not, it's specific to the Carbide Motion board for Carbide 3D machines --- I was just referring you to the Grbl settings / numbers.
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 » Sat Dec 16, 2017 9:56 pm

If I remember correctly, you also need to enable hard limits ($21=1) when you enable homing ($22=1) in order to let it work.

Universal Gcode Sender is a great thing to use for your Shapeoko2. It's not perfect, but it will do 99% of what you need.
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 » Sun Dec 17, 2017 11:11 am

"If I remember correctly, you also need to enable hard limits ($21=1) when you enable homing ($22=1) in order to let it work."

Limits and Homing are independent. Can use either without the other.
Merry Christmas All,
John Champlain
www.picengrave.com

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

Re: A few more Limit Switch questions for ShapeOko 2

Post by kristenanne77 » Tue Dec 19, 2017 3:49 am

I tried $21=1 (in addition to the previous $22=1).
Tried homing, triggered the switch for z axis, ... nothing.
Another thing I noticed was that when I used to connect to Universal Gcode Sender by opening the com port, ... it would "lock" the spindle in place stiffly, and I could jog it from that point.
NOW after connecting and opening the com port, the spindle does not lock in place. I can still jog it, but could also move it by hand. Wierd.
I did a $$ and copied the settings I currently have. Any suggestions to get it working properly would be helpful.

Thanks
K

Grbl 1.1f ['$' for help]
[MSG:'$H'|'$X' to unlock]
>>> $$
$0=10
$1=25
$2=0
$3=4
$4=0
$5=0
$6=0
$10=1
$11=0.010
$12=0.002
$13=0
$20=0
$21=1
$22=1
$23=0
$24=25.000
$25=500.000
$26=250
$27=1.000
$30=1000
$31=0
$32=0
$100=40.000
$101=40.000
$102=40.000
$110=5000.000
$111=5000.000
$112=5000.000
$120=400.000
$121=400.000
$122=400.000
$130=200.000
$131=200.000
$132=200.000
ok
>>> G91 G0 Z1
error:9
>>> G91 G0 Z1
error:9
>>> $X
[MSG:Caution: Unlocked]
ok
>>> G91 G0 Z1
ok
.

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 19, 2017 6:34 pm

The 'locking' of the motors is set by the Step Idle Delay value. Set $1=255 to keep the motors energised between motions.

It sounds like your switches for the limits are not functioning as expected. Can you explain (or draw a simple diagram to show) how you have them connected?

You can also try sending a ? to Grbl and checking what it reports - it may (or may not) indicate a problem on one of your limit connections.
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 » Tue Dec 19, 2017 8:06 pm

Arduino-Gshield to breakout board.PNG
Arduino-Gshield to breakout board.PNG (575.73 KiB) Viewed 1036 times
The hall effect switches
https://www.tindie.com/products/kevpatt ... sor-343rt/

Go to a breakout board
https://www.tindie.com/products/kevpatt ... -breakout/


which is connected to the arduino on pins 9,10 and 12
(Not 9,10 1nd 11 which I originally did at the start of this post)
The actual solder connections are made on the gshield which mounts
directly on the arduino.
The picture shows the breakout board connections to the solder connections on the Gshield which is sitting on top of the arduino which is hidden from view.

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 20, 2017 11:24 am

Right, it begins to make a bit more sense now.

First, we need to double check your wiring. It appears from your diagram that you may have the breakout board connected to Pin13 instead of the GND Pin, although this may just be in the diagram you provided. It is worth double checking though. Also, your limit sensors are shown connected to the incorrect pins, but I expect this is to do with the switch from 9, 10, 11 to 9, 10, 12.

Second, on the breakout board you appear to be connecting the Vpullup to GND which will probably have the opposite effect to that which you are looking for. Have you done this on instructions from Kevin?
My logic would suggest that it should be connected to the +3.3 terminal on the breakout board, but only if you are using the break out board's optional RN1 on board pull up resistors.
Your Arduino and Grbl are already configured to pull-up these sensor inputs, so you may not need to do this externally (sometimes you do if your environment is electrically noisy).
I would try it without the connection and see what happens.

Lastly, you are only showing connections to single sensors and ideally you will need to get them wired in pairs, at least for the X & Y axes. I am assuming that you are still testing, so you are just trying to get something working before you complete the process properly.

Let us know how you get on with this.
ShapeOko2 #3400 - Chinese 800W AC Spindle - Stiffened X-Axis - TR10 Z-Axis - Inverted Z Motor - Hall Effect Limits - Drag Chains & Custom Brackets

Post Reply