rmetzner49:
I agree with Mike on that pullup topic. This will get it done, but I myself would give myself separate inputs for each switch. You can use the Analog Inputs as Digital Pins starting with A0=D19, A1=D20 etc. It's also a better idea to use the NC contacts of the switch and look for it to open. That way, if a wire breaks or something smashes your switch, you will stop and not tear up your screw.
Think about what you do when you hit a limit: Just doing a STOP on that axis is crude, whereas if you knew WHICH LIMIT, you can allow a move in the opposite direction. With the switches being "or'ed" like they are, you have to manually crank yourself off the limit.
The other consideration is how you define "home". Usually this is done by slowly going in reverse until you hit the reverse limit, then slowly going forward until you have come off the switch and hit a rotary index switch or encoder mark.
first of all-i like to thank you all for your responses.i did wire the switches as in diagram that i've posted above with 10K resistors. didn't work at all. i would assume it was due interference? i've ended up with 330 ohm resistors. this bring me to a next question-everyone is talking about best wiring practices, but i have no idea what exactly do they mean and how to apply it to my particular case. here is a close up on my setup on pic below. obviously a far cry from best wiring practices. i wired the limit switches with some speakers wire. whole thing looks just plain ugly after i done with it. can anyone give me some advise about what should i do to reduce the interference and where can i read about wiring management on such things like home made CNC?
and what is the good place(forum?) to find the answer or address all my CNC related questions.
it is arduino based setup ,running on grbl 0.9,using grbl controller as a front end gui.
another question i have is about homing. i've made a short vid of how things are working after i've added limit switches and press $H command in GRBL(without running $H first-machine would not respond to anything, giving me alert lock)
is this is how it's suppose to be? i did enabled hard and soft limit with soft limits are set to x=300,y=200 and z=100 mm. what happens after i send $H command is that machine would go first into a top of z -smashes into limit switch few times, then stops at very top, maybe 1-2 mm away from top switch on z. then it goes to far corner,does same on y,but hit switch only once on x and stayed there, in the corner,defined in soft limits. which doesn't looks logical at all.
Thank you once again for all your help and one more time- i would appreciate,if someone point me to the right direction or forum,where i can ask all those questions(because they are obviously not really related to arduino forum and this particular section of it)