Benbox Laser Machines/CO2 Lasers/3D Printers

Kit Assembly => Assembly Help => Topic started by: nottingham82 on January 21, 2017, 11:41:20 AM

Title: Wiring home switches
Post by: nottingham82 on January 21, 2017, 11:41:20 AM
Ok so I think I have read every topic we have on homing switches.  I am super afraid of letting out any of my magic smoke so soldering on my laser toy is scary.  I know they need to be put in parallel on the D9 pin.  I saw how gallant @ggallant571  (I think) wired his on the backside (Picture below) but I will screw that up for sure.  Then I saw how @Johnb63303 did it by soldering on new female headers on his nano.  I like that option but that is wayyyyy more soldering for me to screw up.  Does anyone else have any diy easy wiring solution for home switches?
Title: Re: Wiring home switches
Post by: ThothLoki on January 21, 2017, 11:58:04 AM
You could grab some pcb like this http://www.banggood.com/5Pcs-7x9cm-PCB-Prototyping-Printed-Circuit-Board-Prototype-Breadboard-p-944697.html?rmmds=search (http://www.banggood.com/5Pcs-7x9cm-PCB-Prototyping-Printed-Circuit-Board-Prototype-Breadboard-p-944697.html?rmmds=search), put some female headers on it with long pins. Put that in the controller board and put the nano into the "wing shield". You can then solder additional headers onto the pcb or even terminal.
Title: Re: Wiring home switches
Post by: Zax on January 21, 2017, 12:46:23 PM
If you don't want to solder to the board, put a header between the Nano and board and bend the D9 pin at 90 degrees. Then you can solder to the header.

http://www.banggood.com/1Pcs-40Pin-Single-Row-2_54mm-Round-Female-Header-Pin-p-937210.html?rmmds=search
Title: Re: Wiring home switches
Post by: ggallant571 on January 21, 2017, 12:48:41 PM
Buy an L8 or build one of my DLCM boards. They have headers.
Title: Re: Wiring home switches
Post by: Lob0426 on January 21, 2017, 12:56:22 PM
The DLCM board has longer headers and is easier to connect to.
Title: Re: Wiring home switches
Post by: Zax on January 21, 2017, 01:08:32 PM
Can you post a link to the DLCM board?

You may be able to use a Screw Shield, the original Nano version had through pins, the v2 doesn't but you can use the Uno one with minor mods.
Title: Re: Wiring home switches
Post by: nottingham82 on January 21, 2017, 01:57:43 PM
If you don't want to solder to the board, put a header between the Nano and board and bend the D9 pin at 90 degrees. Then you can solder to the header.

http://www.banggood.com/1Pcs-40Pin-Single-Row-2_54mm-Round-Female-Header-Pin-p-937210.html?rmmds=search

Ok so I have a header between my L7 and the nano.... so what you are saying is pull out my nano and bend the d9 pin so it does not run into the header but all the other pins do.  Then solder to the nano? or solder to the header connected to the board? 

FYI I hate wiring! I'm a mechanical guy not an electrical guy!
Title: Re: Wiring home switches
Post by: rokemronnie on January 21, 2017, 02:18:00 PM
Can folks post photos of where and how you installed your home switches?
Title: Re: Wiring home switches
Post by: Zax on January 21, 2017, 02:23:50 PM
You don't bend the Nano pin, you bend the header pin so it's totally reversible and worst case you mess up the header.
Title: Re: Wiring home switches
Post by: ThothLoki on January 21, 2017, 03:24:35 PM
This is similar to what I was talking about making. https://www.amazon.com/WYPH-Terminal-Adapter-Arduino-ATMEGA328P-AU/dp/B00X3L2RJK/ref=pd_sim_147_1?_encoding=UTF8&pd_rd_i=B00X3L2RJK&pd_rd_r=8ZEESGTP0PMTXKG93A36&pd_rd_w=cUCud&pd_rd_wg=xWN3m&psc=1&refRID=8ZEESGTP0PMTXKG93A36 (https://www.amazon.com/WYPH-Terminal-Adapter-Arduino-ATMEGA328P-AU/dp/B00X3L2RJK/ref=pd_sim_147_1?_encoding=UTF8&pd_rd_i=B00X3L2RJK&pd_rd_r=8ZEESGTP0PMTXKG93A36&pd_rd_w=cUCud&pd_rd_wg=xWN3m&psc=1&refRID=8ZEESGTP0PMTXKG93A36)

Edit
This would work with female headers with long leads https://www.amazon.com/dp/B00ZBVVPLG?psc=1 (https://www.amazon.com/dp/B00ZBVVPLG?psc=1)
Title: Re: Wiring home switches
Post by: Zax on January 21, 2017, 04:00:09 PM
I have several of those, if you used the headers with long leads they would be perfect.
Title: Re: Wiring home switches
Post by: rokemronnie on January 21, 2017, 04:40:56 PM
Ok so I think I have read every topic we have on homing switches.  I am super afraid of letting out any of my magic smoke so soldering on my laser toy is scary.  I know they need to be put in parallel on the D9 pin.  I saw how gallant @ggallant571  (I think) wired his on the backside (Picture below) but I will screw that up for sure.

I don't have the best soldering skills either. Instead of trying to solder two wires to one solder pad on the bottom of a pcb, I'd solder a single wire and use it as a jumper.
Title: Re: Wiring home switches
Post by: HaniC on January 21, 2017, 07:42:20 PM
Zax, I'm curious why do you keep recommending running X and Y in parallel, when is probaby just as easy (or easier) to wire up to individual pins?
Title: Re: Wiring home switches
Post by: ggallant571 on January 21, 2017, 07:56:14 PM
@ThothLoki - Thanks for posting the Nano adapters. Just ordered a couple. Look perfect for prototyping.
Title: Re: Wiring home switches
Post by: Administrator on January 21, 2017, 08:17:01 PM
@ThothLoki - Thanks for posting the Nano adapters. Just ordered a couple. Look perfect for prototyping.

I think I'll grab a few myself...question: how do wires attach? screws or via spring clamp?

UPDATE: I see from another listing it is screw in to hold the wires.
Title: Re: Wiring home switches
Post by: nottingham82 on January 21, 2017, 08:31:50 PM
hmmm ok I ordered the adapter thor's little brother posted and some leads.  We will see how this goes.  Pictures to follow when i get it set up.  Thanks loki for the amazon links.  I had some amazon gift cards which is why i started looking at switches to begin with.
Title: Re: Wiring home switches
Post by: ThothLoki on January 21, 2017, 08:43:31 PM
My pleasure land of Robin Hood  ;)
Please keep us updated. I have yet to add end switches myself, so I am very interested to see how this goes.
Title: Re: Wiring home switches
Post by: ggallant571 on January 21, 2017, 08:46:29 PM
Just did a google search and ebay is about 1/4 the amazon price when including shipping. Wonder if there is a difference.
Title: Re: Wiring home switches
Post by: ThothLoki on January 21, 2017, 10:18:53 PM
I would say because it is eBay. Yeah, it is $6.88 from amazon, but you will get it in two days. Otherwise, it does t look too different.
Title: Re: Wiring home switches
Post by: nottingham82 on January 26, 2017, 08:26:18 AM
ok the parts arrived!! should have home switches and my stepper motors fixed this weekend.
Title: Re: Wiring home switches
Post by: Lob0426 on January 26, 2017, 03:30:41 PM
Pictures of my home switch placement asked for by @rokemronnie.

Title: Re: Wiring home switches
Post by: rokemronnie on January 26, 2017, 05:21:44 PM
Thanks.
Title: Re: Wiring home switches
Post by: ThothLoki on January 26, 2017, 08:22:57 PM
LOOKING GOOD!!!! Cant wait for the opportunity.

Can you post some pictures of your board when you get that done?
Title: Re: Wiring home switches
Post by: robertch on January 27, 2017, 12:04:42 AM
quick question sorry for the hijack but have bought these will they work for homing for me ?

http://www.banggood.com/10Pcs-Mechanical-End-Stop-Endstop-Limit-Switch-With-Cable-For-CNC-3D-Printer-RAMPS-1_4-p-1073099.html (http://www.banggood.com/10Pcs-Mechanical-End-Stop-Endstop-Limit-Switch-With-Cable-For-CNC-3D-Printer-RAMPS-1_4-p-1073099.html)
Title: Re: Wiring home switches
Post by: Zax on January 27, 2017, 04:47:14 AM
Yes. Those will work.
Title: Re: Wiring home switches
Post by: robertch on January 27, 2017, 05:46:10 AM
Yes. Those will work.

Thanks Zax
Title: Re: Wiring home switches
Post by: nottingham82 on January 29, 2017, 08:44:12 AM
Ok so i was working on the wiring of the nano adapter and home switches last night.  It looks very plug and play except 1 thing.  I need some jumper splitters so I can run the ground for the switches and back into the shield for the stepper motors and laser.  I found one on ebay but it ships from china.  This is the only one i can find.  Has anyone seen any other places?

http://www.ebay.com/itm/1-to-2-Female-Jumper-Splitter-Cable-Lead-for-Dell-PowerEdge-6850-1470W-PC-Server-/401108663540?hash=item5d63f07cf4:g:NBEAAOSwP~tW6b6g

Title: Re: Wiring home switches
Post by: ThothLoki on January 29, 2017, 08:53:30 AM
If you have some jumpers just cut them and wire nut them together to make one of these. If you want more professional look, order that and use the wire nut one until it gets there.
Title: Re: Wiring home switches
Post by: nottingham82 on January 29, 2017, 09:01:12 AM
Yeah I ordered a bunch of jumpers so I think that is what I'm gonna have to do.  I wanted a solderless solution because I dont trust my soldering.  However If there is only one solder joint in the whole board I did it will be easy to find the problem.
Title: Re: Wiring home switches
Post by: nottingham82 on January 29, 2017, 10:59:07 AM
ok broke down and did the soldering.  course im out of shrink tube. So Ill have to do that tomorrow. It is mocked up for now though.

 Zax I think I'm doing something wrong but i dont know what.

I have the switches wired to d9 and ground and have them in parallel wired to normally open. I turned on home switches in t2.  Hit the home button.  It then moves the x axis in a positive direction.  The home switch is just in my hand for test purposes so I push the switch.  It then says alarm and stops.  I must be doing something wrong but I cant sort out what. Im on firmware 1.1e
Title: Re: Wiring home switches
Post by: Zax on January 29, 2017, 11:07:53 AM
When you say it moves positive, do you mean to the right?

It should initially move left towards 0, then when the switch activates it will pull off a small amount and stop. Then it will repeat the process on the Y-axis, moving forwards towards 0.

It is probably alarming as it doesn't pull off as expected.
Title: Re: Wiring home switches
Post by: nottingham82 on January 29, 2017, 11:18:18 AM
yes i mean it moves positive which is not what i expected.  It moves positive until i push the switch then it alarms.  I pushed the job buttons to make sure i had x right and it jogged the right way.  I yanked the shield and wires off so i could get some actual work done.  I will try again a little later.  But as far as you can tell it shouldnt have done that?
Title: Re: Wiring home switches
Post by: Zax on January 29, 2017, 11:21:45 AM
It sounds like D9 may be grounded and it's moving the wrong way to try and release the switch but after a small distance fails.

If as it's moving you press the switch does it stop moving?

Title: Re: Wiring home switches
Post by: nottingham82 on January 29, 2017, 11:25:54 AM
Yes it doesn't alarm until I press the switch. It just moves positive. 

Pressed home, do you want to home, yes, I let it move a bit in the positive x, pressed the switch, x motion stops, alarm
Title: Re: Wiring home switches
Post by: Zax on January 29, 2017, 02:24:10 PM
Check your $23 value, it is usually 3 so that the axis home to lower left (default for Grbl is upper right like limit switches).

If you have reversed any axis, perhaps you need to change the value. I haven't come across that before.
Title: Re: Wiring home switches
Post by: robertch on February 02, 2017, 10:36:19 PM
so haveing read through all this post i am still confused as to how to install my switches

i have interpreted all this as i solder one wire from each switch the red one :) to D9 and the ground from each to ground ?

having already blown one Nano which i still dont know how i did it i am asking for someone to help a non electrical person to install my switches without blowing another nanao and help would be appreciated
Title: Re: Wiring home switches
Post by: wild.bill on February 02, 2017, 11:29:55 PM
so haveing read through all this post i am still confused as to how to install my switches

i have interpreted all this as i solder one wire from each switch the red one :) to D9 and the ground from each to ground ?

having already blown one Nano which i still dont know how i did it i am asking for someone to help a non electrical person to install my switches without blowing another nanao and help would be appreciated

I have all the parts sitting in front of me and I am using the same switches you asked about a little while back. They come with a cable that has red, black, green wires. The way to wire it is both of the black wires go to ground, both green wires go to D9, and the red wire is not
needed, but if you do connect it to 5V it will make the LED on the switch work.

A little while back I said that I was building a new A3 design cutter / CNC and today I wired it all up. I ended up using the CNC Shield board (with UNO). I did find an issue with this board - its still the old design but all the signals come out to headers so you have to swap Z-min and Servo Enable. But with this board I have not needed to do any soldering, I just plugged the connector for the home switch to the board. I am still waiting for my Z axes so I set it up today with X and Y homing on separate pins and tested it all.

There is a way in GRBL to see the state of your home switches. Without the details now set $10=19 (default is 3), reset the controller to restart the software and then if you send a $? command you get status back which will show if any home pins are triggered. NOTE: it looks like T2 block's the status output from displaying so I had to use GRBL Controller for this. With this I was able to confirm that I had all 3 axis wired properly.

I will take some pictures of the machine and wiring soon - I have had the FLU all week so I am moving real slow.
Title: Re: Wiring home switches
Post by: robertch on February 03, 2017, 12:08:27 AM
I have all the parts sitting in front of me and I am using the same switches you asked about a little while back. They come with a cable that has red, black, green wires. The way to wire it is both of the black wires go to ground, both green wires go to D9, and the red wire is not
needed, but if you do connect it to 5V it will make the LED on the switch work.

A little while back I said that I was building a new A3 design cutter / CNC and today I wired it all up. I ended up using the CNC Shield board (with UNO). I did find an issue with this board - its still the old design but all the signals come out to headers so you have to swap Z-min and Servo Enable. But with this board I have not needed to do any soldering, I just plugged the connector for the home switch to the board. I am still waiting for my Z axes so I set it up today with X and Y homing on separate pins and tested it all.

There is a way in GRBL to see the state of your home switches. Without the details now set $10=19 (default is 3), reset the controller to restart the software and then if you send a $? command you get status back which will show if any home pins are triggered. NOTE: it looks like T2 block's the status output from displaying so I had to use GRBL Controller for this. With this I was able to confirm that I had all 3 axis wired properly.

I will take some pictures of the machine and wiring soon - I have had the FLU all week so I am moving real slow.

thank you sir you are a gentleman
Title: Re: Wiring home switches
Post by: Lob0426 on February 03, 2017, 12:32:18 AM
Here is a picture of the back of my board. My soldering is sloppy!
Title: Re: Wiring home switches
Post by: robertch on February 04, 2017, 10:29:14 PM
Check your $23 value, it is usually 3 so that the axis home to lower left (default for Grbl is upper right like limit switches).

If you have reversed any axis, perhaps you need to change the value. I haven't come across that before.

@zax can you help me setup homing in T2 i have done the switches and the unit still works but i can work out yay but i can work out how to do what is needed in T2 i turn it on and it says have you set G26 and G23 i think ????? help :)
Title: Re: Wiring home switches
Post by: robertch on February 05, 2017, 02:11:20 AM
further to this the switches do not seem to be doing anything

i have put the multimeter on the switches while plugged in and powered with the switch in the open position (not depressed i get no tone if i press the switch i then get tone

if i move the unit out onto the work area and hit home it moves the x towards my zero point but if i depress either switch it just keeps going and crashes into the gantry
Title: Re: Wiring home switches
Post by: Zax on February 05, 2017, 03:52:54 AM
So you are using Grbl 1.1e and have wired the 2 N.O. switches in parallel to the D9 pin, enabled homing in T2Laser and you get the "red house".

Clicking the "red house" the machine moves to the left but triggering the switch doesn't stop it? Is that correct?

It sounds like you have something wrong with the wiring, double check your switches are connecting GND to D9 when pushed.

Title: Re: Wiring home switches
Post by: robertch on February 05, 2017, 04:12:20 AM
So you are using Grbl 1.1e and have wired the 2 N.O. switches in parallel to the D9 pin, enabled homing in T2Laser and you get the "red house".

Clicking the "red house" the machine moves to the left but triggering the switch doesn't stop it? Is that correct?

It sounds like you have something wrong with the wiring, double check your switches are connecting GND to D9 when pushed.

Pretty sure they are

this is a dump of grbl if it helps

Connected
Grbl 1.1e Ready
$0=10 Step pulse, microseconds (10)
$1=25 Step idle delay, milliseconds (25)
$2=0 Step port invert, mask (0)
$3=2 Direction port invert, mask (0)
$4=0 Step enable invert, boolean (0)
$5=0 Limit pins invert, boolean (0)
$6=0 Probe pin invert, boolean (0)
$10=19 Status report, mask (1)
$11=0.020 Junction deviation, mm (0.020)
$12=0.020 Arc tolerance, mm (0.020)
$13=0 Report inches, boolean (0)
$20=0 Soft limits, boolean (0)
$21=0 Hard limits, boolean (0)
$22=1 Homing cycle, boolean (0)
$23=3 Homing dir invert, mask (0)
$24=100.000 Homing feed, mm/min (100.000)
$25=1000.000 Homing seek, mm/min (1000.000)
$26=250 Homing debounce, milliseconds (250)
$27=1.000 Homing pull-off, mm (1.000)
$30=255 Max spindle speed, RPM (255)
$31=0 Min spindle speed, RPM (0)
$32=1 Laser mode, boolean (1)
$100=80.000 X steps/mm (80.000)
$101=80.000 Y steps/mm (80.000)
$102=80.000 Z steps/mm (80.000)
$110=5000.000 X Max rate, mm/min (5000.000)
$111=5000.000 Y Max rate, mm/min (5000.000)
$112=5000.000 Z Max rate, mm/min (5000.000)
$120=800.000 X Acceleration, mm/sec^2 (800.000)
$121=800.000 Y Acceleration, mm/sec^2 (800.000)
$122=5000.000 Z Acceleration, mm/sec^2 (5000.000)
$130=400.000 X Max travel, mm (400)
$131=300.000 Y Max travel, mm (300)
$132=200.000 Z Max travel, mm (200)
Title: Re: Wiring home switches
Post by: robertch on February 05, 2017, 04:25:36 AM
some photos if it helps
Title: Re: Wiring home switches
Post by: Zax on February 05, 2017, 04:35:35 AM
I think you are on the wrong side of the Nano.
Title: Re: Wiring home switches
Post by: robertch on February 05, 2017, 04:38:44 AM
I think you are on the wrong side of the Nano.

crap i think you are right  ;D
Title: Re: Wiring home switches
Post by: robertch on February 05, 2017, 05:04:36 AM
I think you are on the wrong side of the Nano.
@Zax

you are worth more money  :D

looks like it is working now

now just got to work out how and were to put the switches
Title: Re: Wiring home switches
Post by: Zax on February 05, 2017, 05:10:28 AM
 ;)

I hope the next gen of lasers come with limit switches, it wouldn't cost them much to add.
Title: Re: Wiring home switches
Post by: robertch on February 05, 2017, 06:02:39 AM
does anyone have any suggestion for how or where to mount the switches got them taped on for now but realy want something more secure and permanent ?
Title: Re: Wiring home switches
Post by: ggallant571 on February 05, 2017, 07:34:16 AM
I used the smaller (don't know proper name) auto locking t-nuts. Used the laser to cut an insulating pad from PVC shelf liner. The 2 holes align with the slots in the 8020 rail.
Title: Re: Wiring home switches
Post by: robertch on February 05, 2017, 07:04:07 PM
I used the smaller (don't know proper name) auto locking t-nuts. Used the laser to cut an insulating pad from PVC shelf liner. The 2 holes align with the slots in the 8020 rail.

thank you kind sir will see what i have to cut up tonight and give it a try
Title: Re: Wiring home switches
Post by: nottingham82 on February 05, 2017, 07:43:30 PM
ok i got mine mock wired with the limit switches attached and i have the wrong wire connectors so im just wrapping the bare wire around the terminals till i get this figured out. 

So here is my problem.  It homes +x then +y.  I then reversed the x and y axis and it homes -x and -y or toward 0,0 like its supposed to.  But then my axis are backward when it is done homing.  I have tried resetting parameters, reloading the firmware.  I have my laser set up right.  the board is in the back 0,0 is in the lower left.  any thoughts?
Title: Re: Wiring home switches
Post by: Lob0426 on February 05, 2017, 07:57:48 PM
There are two direction settings that affect axis movement.

$3 (direction port invert) and $23 (homing direction invert)

Did you reverse the axis by moving wires or by changing settings!

Use $3 to change the axis direction to move to bottom left with the control board away from you.
Example $3=3

Use the home direction settings $23 to make the axis move towards the switches.
Example $23=3

There is a chart in the settings for the correct number versus the axis changes.
https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration
Title: Re: Wiring home switches
Post by: nottingham82 on February 05, 2017, 08:26:31 PM
did not change wires nor settings.  my settings are stock 1.1e


$3=2 Direction port invert, mask (0)
$23=0 Homing dir invert, mask (0)

from what you are saying it sounds like $23 should be 3?  how do I change this in t2? I can see what the grbl says but I havent ever tried to change it.
Title: Re: Wiring home switches
Post by: nottingham82 on February 05, 2017, 08:47:53 PM
also i figured out why it alarmed.  I was holding the switch in my hand and i didnt realize it finds the switch lets go then presses and lets go one more time.  If you just click it once it freaks out cuz it is trying to push the button another time and it should only be a step away. If you click the button twice it thinks everythings good and goes to the next axis.

edit: here is a picture of my no solder solution
Title: Re: Wiring home switches
Post by: ThothLoki on February 05, 2017, 09:04:25 PM
Wow Nottingham. Looks like that shield is working out well. Why the jumpers instead of long female leads?
Title: Re: Wiring home switches
Post by: nottingham82 on February 05, 2017, 09:07:54 PM
I could do long female to male leads.  Actually I have them as they came with the jumper leads.  The original plan was to mount the shield to the acrylic but the wires are not very agile nor bendy.  So it just kinda hovers there behind the board and im afraid to force it into another position and break a jumper lead tip. 
Title: Re: Wiring home switches
Post by: ThothLoki on February 05, 2017, 09:10:41 PM
Still looks good! Think I am going to have to make one of these so I can put homing switches onto my machine
Title: Re: Wiring home switches
Post by: nottingham82 on February 07, 2017, 08:48:57 PM
ok so i got the homing switches wired and it homes just fine but homing is backward from jog movements.  IE it thing its moving toward 0,0 and its actually moving the opposite direction.  So to fix this i can reverse the x and y axis but then after i home if i go to jog it jogs the wrong way.  So if I go +X it moves in the -X direction exactly opposite of the homing direction.  So per gallant I need to reverse my homing $23 but I dont actually know how to do that.  Any advice? 
Title: Re: Wiring home switches
Post by: wild.bill on February 07, 2017, 09:02:26 PM
ok so i got the homing switches wired and it homes just fine but homing is backward from jog movements.  IE it thing its moving toward 0,0 and its actually moving the opposite direction.  So to fix this i can reverse the x and y axis but then after i home if i go to jog it jogs the wrong way.  So if I go +X it moves in the -X direction exactly opposite of the homing direction.  So per gallant I need to reverse my homing $23 but I dont actually know how to do that.  Any advice?
Did you build your own GRBL software or use something already built? I did my switches the other day and found the same thing, then in the GRBL code I found a line to uncomment that makes the switch positions the machine origin. After that the left front is 0,0 which is where the switches are.
Title: Re: Wiring home switches
Post by: nottingham82 on February 07, 2017, 09:08:30 PM
no i use zax grbl and i dont know how to edit it :( I'm not a code guy
Title: Re: Wiring home switches
Post by: ThothLoki on February 07, 2017, 09:24:37 PM
Go into debug mode in T2

First, go to the laser control screen, then check the checkbox in the lower right corner by the big red button. You can the enter all the grbl setting in the field where the gcode normally shows. What to set $23 to.......beats me
Title: Re: Wiring home switches
Post by: robertch on February 07, 2017, 09:38:04 PM
no i use zax grbl and i dont know how to edit it :( I'm not a code guy

i think when i was getting it working for me i hit send default perameters under the machine menu in t2 controller window and it set the parameters i needed not sure though i do know it was g23=0 and then it was g23=3
Title: Re: Wiring home switches
Post by: nottingham82 on February 07, 2017, 09:47:36 PM
woo hoo got it.  $23=3 then pressed enter and boom homing is the right direction
Title: Re: Wiring home switches
Post by: nottingham82 on February 07, 2017, 10:00:00 PM
the no solder solution.  No soldering on the board that is.  I soldered some jumpers together though and I still need some shrink tube for a few solder points.
Title: Re: Wiring home switches
Post by: Zax on February 08, 2017, 03:37:23 AM
Nice solution, very neat job.

FYI: The default setting should be $23=3, both in my compiled Grbl and the upload defaults. I will double check it.
Title: Re: Wiring home switches
Post by: ThothLoki on February 08, 2017, 06:14:40 AM
Looking good!
Title: Re: Wiring home switches
Post by: nottingham82 on February 18, 2017, 02:32:12 PM
So I'm up on Xanadu and the firmware and home switches are still working.  I sanded down my alignment board and recut my grid to match the home position.  Now I can go right to the middle of my work piece when i align with the grid.  Ie my 100x100mm coasters. I place at 0,0. home the machine.  jog to 50,50 and set workpiece home which is now at the center.  I do this because many of my files are not made to use the whole 100x100 stone. Much faster than the old method of jogging to the edge and moving back 50mm for each axis.

My nano is still sitting 6 inches away from my machine but it hasnt created any problems yet.
Title: Re: Wiring home switches
Post by: Zax on February 18, 2017, 02:52:32 PM
Are you using the saved (preset) positions?
Title: Re: Wiring home switches
Post by: nottingham82 on February 18, 2017, 03:11:40 PM
not yet.  I might start doing that.  I have several pieces i am starting to make regularly. 
Title: Re: Wiring home switches
Post by: pascalp on March 01, 2017, 10:38:17 AM
My home switches are OK, thanks to all contributors.

A piece of plywood to support the Y switch
X switch is screwed on laser support.


Title: Re: Wiring home switches
Post by: Zax on March 01, 2017, 11:14:36 AM
Now you can set a preset to "true home" of your grid 0,0 or other locations for accurate placement.
Title: Re: Wiring home switches
Post by: ggallant571 on March 01, 2017, 04:12:50 PM
Why wasn't the plywood laser cut?
Title: Re: Wiring home switches
Post by: pascalp on March 01, 2017, 11:26:20 PM
It could have been; laser cut, milled or 3d printed, but the quick and dirty way to get it fast was a handsaw.
It was just a test, but it works. So, it will maybe stay for a while  :-[
Title: Re: Wiring home switches
Post by: ggallant571 on March 02, 2017, 07:25:10 AM
Just giving you a hard time!!!! I spent about 3 hours designing and testing the insulating spaces I used to mount the limit switches. Probably would have taken less than a minute with a knife.
Title: Re: Wiring home switches
Post by: nottingham82 on March 05, 2017, 10:29:47 PM
no you only home 0,0 then tell the software what your maximum engrave-able area is.  So you only need an x zero and a y zero homing.  You can do the extra two but those are called limit switches.  Not homing switches.
Title: Re: Wiring home switches
Post by: pascalp on March 06, 2017, 12:13:40 AM
Right, my hardware configuration is only "homing switch" and corresponding parameters.
My engraving area is secured by "soft limit". Using GRBL 1.1, it's rely of the size parameters X and Y ($130 , $131 ) and "soft limits" need to be activated with $20=1 .

The V wheels are the last version send with Eleksmaker A5, they replace the previous white-round.
They are good, except that they are poorly assembled. A spacer is missing between bearings, so when you tighten the wheel, you may easily over-tighten bearings and they act as a "brake" not a bearing. I've noticed this problem when mounting them, but dismantling the wheels could be tricky, so I've take care when adjusting them.
Title: WARNING!!
Post by: Hydroid on March 17, 2017, 12:52:38 PM
quick question sorry for the hijack but have bought these will they work for homing for me ?

http://www.banggood.com/10Pcs-Mechanical-End-Stop-Endstop-Limit-Switch-With-Cable-For-CNC-3D-Printer-RAMPS-1_4-p-1073099.html (http://www.banggood.com/10Pcs-Mechanical-End-Stop-Endstop-Limit-Switch-With-Cable-For-CNC-3D-Printer-RAMPS-1_4-p-1073099.html)

WARNING: If you use these switches as supplied, with all three wires connected, disaster will strike! (Switch.bmp photo attached).

I had read this entire thread as I have recently bought a A3 2.5W engraver from Gearbest and had purchased these exact switches from Banggood. I have used these switches before without incident, but always a separate isolated switch per axis - never in parallel as described within this thread.

So, today, I mounted my first switch on the X axis. Because I wanted the LED on the switchboard to light when the switch was activated, I also connected the positive red wire to the Vcc pin of the Nano - a convenient spot to get a positive feed. I connected the switch (X axis) and then set GRBL $22 to '1', and in my case, because the homing direction was opposite to what I needed, I also had to set $23 to '3' to get the X and Y drive going towards Front-Left when I issued the $H homing command....

As I said, I connect JUST THE X AXIS SWITCH (ONE SWITCH) and issued the $H command. The X axis began to move towards the left and it hit the switch and homed out as it was supposed to - and the LED light up as I wanted it to. It then moved away slightly, the LED went out and then the Y axis began to move towards the front as it was supposed to. AS I only had the ONE switch connected, I just depressed it as required to simulate the Y axis getting home. All worked well so I went ahead and mounted the Y axis switch and connected it too. I then manually jogged the head out to the midpoint of each axis and issued a $H command to test out the homing. The X axis again moved toward the left and all looked good.... However, when the X axis switch depressed, the stepper stopped and the laser came on at a low level and I heard the computer 'ding' as the COM port deactivated... ??? What the... Thankfully, because I have done the '1K ohm' mod on the laser signal line, the laser only came on at low power and no burning took place... Then, I noticed that unmistakable odour of burning electronic components emitting their 'magic blue smoke' - In this case, my Nano. I quickly pulled the USB plug but it was too late. I disconnected the switches and plugged the USB in. All I got was a brief pulse of the Nano's power LED but no connection... My Nano is TOAST!

I have been an electronic hobbyist for over 40 years and I broke my own #1 rule. NEVER hook up anything that I haven't tested while being supplied by my current limiting power supply. Had I done this, I would have discovered and rectified the problem without toasting my Nano..

The problem lies with the particular design of these switches and what happens when you parallel them. I drew out the equivalent circuit schematic showing the two switches and the common connections going to the Nano - See attached 'Schematic.bmp'. All is fine until ONE switch "makes" it's limit while the OTHER switch hasn't. I have traced, in RED, the flow-path that occurs from positive to negative when the X axis switch has triggered (at HOME position) while the Y axis switch has not. As you can see, there is a DEAD short between positive and negative. This is what blew out my Nano as not too many chips can stand feeding a direct short to ground...

So, there are two ways to utilize these switches in the parallel configuration talked about on this thread:

The first, don't use the red wire - leave it disconnected and just use the green wire to D9 on the Nano and the black wire to ground on the Nano.

The second, and the one I'm using as I still want the red switchboard LEDs to light, is to MODIFY the switchboard. Circled in blue on the schematic is the section of circuit that needs to be eliminated to prevent a short while still allowing the LED to light. As it turns out, because of the way these boards are made, all you have to do is cut the normally closed (NC) legs off the board's micro-switches (DO BOTH BOARDS) - shown in attached 'Switch-Mod.bmp". A quirk to this mod is that BOTH switchboard LEDs will light when either switch is 'made' but that's OK - I find it makes it easier to see the LED because you now have two that you can look at...

I hooked everything up temporarily and did extensive testing with my Fluke and current limiting power supply and the shorting issue is now gone...

Now, to go and shop for a new Nano... Imagine a Robin Williams imitation: Here Nano, nano... :-)

Regards, John.
Title: Re: Wiring home switches
Post by: nottingham82 on March 17, 2017, 01:51:41 PM
You do not need all 3 wires!! you need to wire them as Normally open.  One wire is for ground and then you need to pick the appropriate other wire.  One wire is for normally open and one wire is for normally closed.  Mine says NC and NO and com (similar to yours).  Com is the ground.  The wire that goes to NC does not get connected to anything. This a 2 wire mod. only two wires should go from the nano to the switches. 
Title: Re: Wiring home switches
Post by: Lob0426 on March 17, 2017, 02:02:13 PM
You can wire NC or NO. You can wire them parallel or separate. You can wire them as limits or home or both. The settings are all available if you want to compile your own firmware from grbl. In none of those cases do you supply power to the switch. Signal and ground are the only wires you ever use!

Some where in there you hit the right switch combo to back feed power to a pin.
Title: Re: Wiring home switches
Post by: Hydroid on March 17, 2017, 02:14:11 PM
You do not need all 3 wires!! you need to wire them as Normally open..... This a 2 wire mod. only two wires should go from the nano to the switches.

I never said you needed three wires. What I said was that IF you use all three wires on these switches - with two in parallel - you WILL create a dead short from + to -.

I agree, you only need to use TWO wires, but as I stated, I want the LED to work, so I'm using all three..... with the modification...

Regards, John.
Title: Re: Wiring home switches
Post by: Moonie on March 25, 2017, 08:42:48 AM
So just to recap:

I have the L7 board. I need to do the soldering thingy to add the switches for my X and Y axis? So got the limit switches also from banggood. The two red wires from both the X and the Y limit switch paired together goes soldered onto pin D9. The black wires (also paired) goes soldered to the ground pin ( I don't use the green wires at all ! Is this correct ? Do I have to do a recompile of the software or wil the T2 software work as is ? ( Running latest software and firmware)

Also does anybody have a link to the "new" V groove black wheels since I still have the old round ones.

Also I took the leap and ordered a Eleksdraw. I presume that the T2 software will not work on this since I see that you have to upload firmware etc ?

Sorry for all the questions but I know nothing about electronics and I live in South Africa so replacing a part normally is a 3 to 4 month excercise ! And I want to be sure I don't screw it up 😀
Title: Re: Wiring home switches
Post by: ggallant571 on March 25, 2017, 10:32:56 AM
I would securely glue a header to the L7 and run 30 gauge wire from the header to pin 9 on the backside. Then you can  plug/unplug the CPU board without playing with the home switches. You can wire the limit switches to individual I/O pins if you configure the firmware.
Title: Re: Wiring home switches
Post by: Hydroid on March 26, 2017, 09:05:05 PM
So just to recap:

I have the L7 board. I need to do the soldering thingy to add the switches for my X and Y axis? So got the limit switches also from banggood. The two red wires from both the X and the Y limit switch paired together goes soldered onto pin D9. The black wires (also paired) goes soldered to the ground pin ( I don't use the green wires at all ! Is this correct ?

No, if you're using the same switches as I posted a picture of in message #78 above, then leave the two red wires disconnected - You only need those if you want the small red LED's on the switch boards to operate - and you need to do the mod I spoke of or you will create a dead short.

What you want is to connect both black wires together and solder them to a ground point. Then connect both green wires together and solder them to D9.

Regards, John.
Title: Re: Wiring home switches
Post by: Moonie on March 26, 2017, 09:43:22 PM
John,

Thanx. I wil use the first method since I don't need the LED. So just connect the green and black.

Regards
Gerrit
Title: Re: Wiring home switches
Post by: Hydroid on March 27, 2017, 11:52:18 AM
John,

Thanx. I wil use the first method since I don't need the LED. So just connect the green and black.

Correct :-)
Title: Re: Wiring home switches
Post by: Maverick on October 03, 2017, 01:42:32 PM
no you only home 0,0 then tell the software what your maximum engrave-able area is.  So you only need an x zero and a y zero homing.  You can do the extra two but those are called limit switches.  Not homing switches.

Once you have homing switches in place, how do you set the maximum parameters in the T2 software? Do these max values stop the machine running further than it can in the X and Y directions ?
Also what settings need to be changed in T2 to enable homing ? I have not yet learned about all the $ settings I keep reading about, are they used to change the direction of homing ?

Thanks heaps!   
Title: Re: Wiring home switches
Post by: Zax on October 03, 2017, 03:10:15 PM
You enable the home switches from the menu, if you have a standard Eleks style machine you shouldn't need to do anything else.

It isn't necessary, but to set the machine size (which will activate virtual limit switches) just click your machine size or use the custom size in the Sketch pop-up and then click Machine Size in the Settings menu on the laser screen.
Title: Re: Wiring home switches
Post by: Maverick on October 06, 2017, 06:05:53 PM
Hi guys,

So I have added limit switches, X and Y linked in parallel, to create a circuit between the D9 and ground when "home" is reached, I set $23 to 3, and it homes to the left (X axis) (manaSE at the back of machine) and hits the first switch and stops, it does not pull away, or try to home down (Y axis). What am I doing wrong to get it to home both directions ?

My belt is on the top for the X axis, and I have to have invert X ticked to jog in the right direction, can jog direction and home directions be set differently ?

Thanks heaps in advance !
Title: Re: Wiring home switches
Post by: ThothLoki on October 06, 2017, 06:44:03 PM
awesome job
Title: Re: Wiring home switches
Post by: Maverick on October 06, 2017, 08:24:50 PM
(http://oi66.tinypic.com/zu2uyu.jpg)

Yes I know normally it shouldn't but I have a plastic square under the bolt to spread the force as to not cut through the belt. It has a very strong hold and doesnt spin the belt when I tighten the bolt. Belt tension is perfect :)

Any help on the homing direction?
Title: Re: Wiring home switches
Post by: nottingham82 on October 06, 2017, 08:56:44 PM
https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration

look at $23
Title: Re: Wiring home switches
Post by: Zax on October 07, 2017, 09:55:46 AM
@Maverick In T2Laser you enable home switches in the Settings menu on the Laser Control screen, I think you did it manually which should also work.

So it contacts the switch and stops? It doesn't back off or error?

I'm not sure I follow the jog direction vs. home direction question, you should always have negative left and positive right.
Title: Re: Wiring home switches
Post by: Maverick on October 07, 2017, 01:03:14 PM
All sorted thanks heaps for that Nottingham! All I needed to do was changed the pulloff distance to 2mm, (it was 1mm) now it triggers and seeks the switch then does the Y axis perfectly.

Each time you connect, do you need to re-home the machine, or can you permanently set the home position using the hard wired home switches, then all work is relative to this 0, 0 coordinate?

I've manually set the max travel distances,  as with the mods it not exactly A3 anymore, but the values in the brackets dont match what I set when I display the parameters?
Title: Re: Wiring home switches
Post by: nottingham82 on October 07, 2017, 01:42:52 PM
if you put the machine back at 0,0 before you power down then no you wouldnt need to rehome.  I rehome though.  I rarely leave it a 0,0.  I usually use a center start point so I may home the machine then move it to 50,50 to start my engraving.  Then shut it down.  The next time I power up the machine thinks its at 0,0 but its really at 50,50.  If you rehome it realizes it was at 50,50 and resets 0,0.
Title: Re: Wiring home switches
Post by: Zax on October 07, 2017, 02:07:54 PM
Zax, I'm curious why do you keep recommending running X and Y in parallel, when is probaby just as easy (or easier) to wire up to individual pins?

The default firmware uses D9 so you only need 1 additional connection to the board, I also include a firmware that uses D9 and D10 if you so choose. The Nano has limited output pins so with 3 axis (6 pins), home, limits and emo you use them up.
Title: Re: Wiring home switches
Post by: Lob0426 on October 07, 2017, 03:17:47 PM
All limits are "hard limits" that create an alarm. If a switch is tripped without the $H homing command it is treated as a limit. You can use the same switch for homing and a hard limit.

https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration

Just to repeat; All limits are treated as alarms, this stops movement on all steppers and the spindle, in our case it turns off the laser. Soft limits do this also. Then you have to cancel the alarm after fixing what caused the alarm.
Title: Re: Wiring home switches
Post by: laser_cutter on October 07, 2017, 10:36:27 PM
The default firmware uses D9 so you only need 1 additional connection to the board, I also include a firmware that uses D9 and D10 if you so choose. The Nano has limited output pins so with 3 axis (6 pins), home, limits and emo you use them up.

Thanks for adding the D9 and D10 option. For the d9, d10 option does it matter if I wire the switches NC or NO?
Title: Re: Wiring home switches
Post by: Zax on October 08, 2017, 04:13:33 AM
No. You just need to set the Grbl parameters ($5) to match, on my CNC I use NC switches as they are safer (if a wire breaks the machine won't try to home).
Title: Re: Wiring home switches
Post by: laser_cutter on October 08, 2017, 01:04:53 PM
For Homing switches, anyone have advice on gauge of wire and if it should ne solid or strands?
Title: Re: Wiring home switches
Post by: ThothLoki on October 08, 2017, 01:07:20 PM
solid would probably be easiest

You don't need large wire. I suggest something like 24-26 gauge . Just use some wires from a CAT5 cable
Title: Re: Wiring home switches
Post by: ggallant571 on October 08, 2017, 01:27:28 PM
Depends on where you mount the switch. If it is on the frame and not subject to cable flexing during operation then either should be ok. If it is mounted on a carriage then I think stranded is the only option.
Title: Re: Wiring home switches
Post by: laser_cutter on October 18, 2017, 05:43:23 PM
No. You just need to set the Grbl parameters ($5) to match, on my CNC I use NC switches as they are safer (if a wire breaks the machine won't try to home).

I have a switch on X and a Y, X is on D9 and Y on D10 - both in bottom left hand corner.  I get GRBL 1.1f Ready, though when I upload the 1.1f X/Y home sw. I get "Upload failed"

So strange behavior, when I click the Red House the laser moves to the right - opposite of the Home switch which is to the left. When I click the emergency stop, it stops. I click the open lock and the Red House appears. When I click the red house again, the Y and X move in the right direction toward the Home switches. However, say the Y switch is activated first, that X stops whereever it is.

I have NC set up, with COM to same gnd pin; Do I need to edit the grbl parameters to get the homing on X (D9) and Y (D10)?

Copied from Display Parameters
Connected COM3 115200
Grbl 1.1f ['$' for help]
$$
$$
$0=10 Step pulse, microseconds (10)
$1=25 Step idle delay, milliseconds (25)
$2=0 Step port invert, mask (0)
$3=3 Direction port invert, mask (0)
$4=0 Step enable invert, boolean (0)
$5=1 Limit pins invert, boolean (0)
$6=0 Probe pin invert, boolean (0)
$10=1 Status report, mask (1)
$11=0.010 Junction deviation, mm (0.020)
$12=0.002 Arc tolerance, mm (0.020)
$13=0 Report inches, boolean (0)
$20=0 Soft limits, boolean (0)
$21=0 Hard limits, boolean (0)
$22=1 Homing cycle, boolean (0)
$23=1 Homing dir invert, mask (0)
$24=100.000 Homing feed, mm/min (100.000)
$25=1000.000 Homing seek, mm/min (1000.000)
$26=250 Homing debounce, milliseconds (250)
$27=1.000 Homing pull-off, mm (1.000)
$30=255 Max spindle speed, RPM (255)
$31=0 Min spindle speed, RPM (0)
$32=1 Laser mode, boolean (1)
$100=80.000 X steps/mm (80.000)
$101=80.000 Y steps/mm (80.000)
$102=80.000 Z steps/mm (80.000)
$110=3000.000 X Max rate, mm/min (5000.000)
$111=3000.000 Y Max rate, mm/min (5000.000)
$112=3000.000 Z Max rate, mm/min (5000.000)
$120=200.000 X Acceleration, mm/sec^2 (800.000)
$121=200.000 Y Acceleration, mm/sec^2 (800.000)
$122=200.000 Z Acceleration, mm/sec^2 (5000.000)
$130=400.000 X Max travel, mm (400)
$131=300.000 Y Max travel, mm (300)
$132=200.000 Z Max travel, mm (200)

With the above X will home, but Y will not home.
Title: Re: Wiring home switches
Post by: Zax on October 18, 2017, 07:12:41 PM
You need to set the $5 and $23 parameters. I think with NC switches you’ll need $5=3, then set the homing directions using $23.
Title: Re: Wiring home switches
Post by: laser_cutter on October 18, 2017, 07:25:17 PM
You need to set the $5 and $23 parameters. I think with NC switches you’ll need $5=3, then set the homing directions using $23.

Thanks, $5=1 for NC is what I got from the 1.1 github page.

Any ideas on why the Y axis will not home?
Title: Re: Wiring home switches
Post by: Zax on October 19, 2017, 05:15:33 AM
You are correct, I was thinking it was like the others and used a bit mask.

So when the X-homes, it drives into the limit and then out, slowly back to trigger again and then jumps back to 0 - is that working correctly?

You may need to increase the pull-off distance (e.g. $27=2) to make sure it's clearing the switch.
Title: Re: Wiring home switches
Post by: laser_cutter on October 19, 2017, 06:18:15 AM
You are correct, I was thinking it was like the others and used a bit mask.

So when the X-homes, it drives into the limit and then out, slowly back to trigger again and then jumps back to 0 - is that working correctly?

You may need to increase the pull-off distance (e.g. $27=2) to make sure it's clearing the switch.

The X will drive, bump the switch and back away a tad.   I did read about $5=1 that a power cycle might be required. Will have to test everything again later today. Thanks for you input.
Title: Re: Wiring home switches
Post by: Zax on October 19, 2017, 08:13:26 AM
It should then move back to the switch a 2nd time at the slower feed rate, if it doesn't it's not pulling off far enough or you are getting a bounce on the switch (increase the debounce setting).

$24=100.000 Homing feed, mm/min (100.000)
$25=1000.000 Homing seek, mm/min (1000.000)
$26=250 Homing debounce, milliseconds (250)
$27=1.000 Homing pull-off, mm (1.000)
Title: Re: Wiring home switches
Post by: laser_cutter on October 19, 2017, 04:38:29 PM
It should then move back to the switch a 2nd time at the slower feed rate, if it doesn't it's not pulling off far enough or you are getting a bounce on the switch (increase the debounce setting).

$24=100.000 Homing feed, mm/min (100.000)
$25=1000.000 Homing seek, mm/min (1000.000)
$26=250 Homing debounce, milliseconds (250)
$27=1.000 Homing pull-off, mm (1.000)

Thank you.

$27=2 got both x and y to home.
$23=3 homes to bottom left corner.

All sorted, thanks for your help.
 
Title: Re: Wiring home switches
Post by: Lob0426 on October 19, 2017, 05:04:17 PM
Once you get all moving in the right directions you can adjust those settings up a bit.

You can set the homing seek 4000. And the homing feed is safe at 400 to 500. Those will keep your accuracy while speeding up the homing.

I use even higher settings than those with no problems.
Title: Re: Wiring home switches
Post by: KidBV on March 20, 2018, 10:49:30 AM
Hi, Maverick. On your comment

Re: Wiring home switches
« Reply #88 on: October 06, 2017, 06:05:53 PM »

is on the picture something red on laser module.
What is it?

Thanks, BBcz
Title: Re: Wiring home switches
Post by: Zax on March 20, 2018, 11:04:10 AM
It looks like pawpaw's air assist, but doesn't have a fan mounted.
Title: Re: Wiring home switches
Post by: KidBV on March 21, 2018, 12:23:32 PM
I see this for first time and i'm very curious what is it... :-)
Title: Re: Wiring home switches
Post by: KidBV on March 21, 2018, 12:24:09 PM
I see this for first time and i'm very curious what is it... :-)
Title: Re: Wiring home switches
Post by: Zax on March 21, 2018, 01:45:15 PM
Air assist improves cutting (and may also help with engraving), this is a low pressure design using a fan and duct to clear smoke from the laser path. You can also use a compressor for high pressure air jet to clear the kerf and smoke, which is more effective when cutting.