Auarhau wrote:You said "that diagram is correct", which one did you refer to?
I'm referring to the "highly regarded diagram" from earlier in this very thread
. It's correct, but it can be improved simply by adding a couple of wires and removing the resistors.
There are many ways of doing it. If you're not very sure how to begin, and the schematics don't "speak" to you, I'd say start with the simplest approach. It's just wires, no resistors or capacitors. It can be improved later without messing with the wiring on the machine (all the work will be in the electronics enclosure).
You are right, you need to repeat the two-switches-on-three-wires jiggery-pokery twice, for the X and Y axes, and a single switch (with three wires) for the Z axis. Here's what the wiring may look like for each of X and Y:
You need to connect a total of five signals: +5V, GND, and the three switch signals. However, to use just five connector pins, you'd have to splice the GND and +5V for the three axes somewhere outside the electronics box. If you have 4-pin DIN connectors, you could use one per axis and avoid splices, or you could wire two axes into one connector and the third into another connector. For the connector with two axes, simply run the cable from each axis into the connector, and solder the two +5V wires together to one pin, the two GND wires to another pin, and the switch wires each to its own pin. Like this (the connector pins, at the top, are shown in a line for clarity):
If you have a screw shield, the rest is easy: all +5V wires (orange in my drawings) go into the IOREF terminal of the Arduino, GND (blue) to one of the GND pins, and the limit switch signals (yellow) to D9, D10, and D12 (or D11). If you don't have a screw shield, splice wires with DuPont pins at the end of these wires, and plug those into the female headers. Or solder them to male pin headers, and plug those in. Or use a prototyping shield -- many possibilities.
Now if you want to add the pull-ups and filters, and maybe the Schmitt triggers, you can do it on a breadboard, or soldered on perforated board ("perf board"). You can also solder them "in air", but that can be a recipe for disaster: if you don't secure them, they may shift and touch a motor connection, which could fry everything.