Having some trouble with limits and homing so though I'd express to see if

Having some trouble with limits and homing so though I’d express to see if I’m going mental.
I have my switches installed and wired as described (3.3v to switch, switch to X/Y/Z min/max). I have checked continuity from the board is ok and that when switched it is ok. However homing and limits do not work.

I’m totally expecting more setup is actually required but Chilipeppr and TinyG documentation has been read and executed to no avail.
What am I missing?

Do you have NO or NC switches? What is your FW version? Could you post a screenshot?

Firmware is 440.20
NO are standard on 3040 machines

What would you like as a screenshoot?
Is there a command you’d like run to produce that screenshot?

My 3040 was NO and I replaced cabling with shielded wires NC. For NC configuration the switch is connected to GND during normal operation and goes to 3.3V when a limit (or homing) action is triggered. This has to be set in the TinyG configuration settings, as well as limit/homing should be enabled too.

Can you post your TinyG configuration? Maybe put it somewhere online and send a link?

Are the limit switches connected directly to TinyG board (3.3V from TinyG) or do you have separate power supply (and optocouplers or level shifters)?

Could you try to home each axis separately (G28.2 X0 or Y0 or Z0) and see if any of the axis works? Same test procedure for limit switches firing?

Sorry mistakes have been typed (fixed above).

They are directly connected in the same manner as shipped. Two wires for each and the pins are NO. I do not know if using the other pins would make them NC.

The only setting I can confirm while at work is that $st is 0.

The Min and Max switch for each axis is using common input, so you need to wire only Xmin or Xmax for X axis (and not both), same rule applies for Y and Z. The 3040 limit switches (I guess mechanical ones) have 3 connectors labeled NC, NO and C. You should connect NO wire to the input pin, C wire to GND. NC should have no wire connected to it, as it is not used.

For each of two switches and for each axis you can check with a multimeter the voltage between NO and C connectors:

  • having the switch in open position (should be ~3.3V -> normal operation, input held up with internal pull-up resistor) and closed (0V -> limit action, input connected to GND).

I recommend to check that switching manually, so no machine won’t move beyond limits.

If you plan to use probing, use the same test procedure for probe input.

I am using Xmin for X-limit, Ymin for Y-limit, Zmax for Z-limit and Zmin for the Probe pin.

In case you wish to change to NC configuration, rewiring will be needed. Two switches pair is connected in parallel for an axis when using NO wiring, while NC requires serial connection.

In NC configuration the outer C connector from each of the limit switches pair should be connected to the positive voltage (3.3V or other voltage on the limit switches side e.g. 12V, if optocouplers are used), while outer NC connector should be connected to appropriate input pin on the TinyG board. The inner C and NC are connected together.

I think this is better to make NO configuration working first, and eventually change to NC in the future.

NC configuration is less immune to noise, as input pin is continuously connected to GND during normal operation of the machine.

Additionally it is possible to use optoisolators and use higher power supply voltage (e.g. 12V) on the limit switches side and 3.3V on the TinyG side.

OK I’m home now.
I’ve split out the min and max switches to be independent now.
I had wired them so the common went to 3.3v terminal (as like TinyG docs seemed to state). Now I’ve swapped to the Gnd Terminal. Its functions as you have stated above.

Its alive. Thank you Sebastian.
My switches look a bit crap so may get new ones but for now I’m so much happier.

I am glad it is finally working and from what I understood you are using NO now :slight_smile:

There is no need to mandatorily change the configuration and wiring to NC, but in my case I sometimes had faulty alarms from stepper motors, sometimes from the spindle start and power supply fan switching on. So finally, after various tests and tries I am using NC and optocouplers in my configuration.

I’ll start out as simple as possible then get more advanced. I’ve been using Mach since last Christmas (not 2015 but 2014) and it was all fine until mid november and it dived the head into the piece then the bed plate wrecking the spindle, plate and work.
So I’ve bought some extra I will fit over time as trust grows.