Skip to content

TinyG Homing and Limits Troubleshooting

aldenhart edited this page Jan 28, 2013 · 4 revisions

The fact that you are here implies you are having problems eitehr getting homing to work, or with limit switches, or both. Please first read the Tinyg Homing page and make sure you understand how homing and limits are supposed work and be configured.

Homing Problems

Configuration

Most homing problems are configuration problems. Especially if you are running normally closed switches. If you are having issues with homing check your configuration before you do anything else

  • Is your $st switch type variable set to the switch wiring you are using? Check is $st in the system group ($sys) is 0 for NO switches, 1 for NC. All switches must be of the same type.
  • Are the switches set correctly up for all axes that have switches? I'd recommend disabling limits until you have homing working, then going and back and enabling limits if you want to. To configure an axis for homing set the min or max switch to 1, and the other switch to 0. Here's a typical config by way of example:
  • $xsn=1
  • $xsx=0
  • $ysn=1
  • $ysx=0
  • $xsn=0
  • $zsx=1
  • Is your motor polarity set correctly - i.e. does the motor move in the correct direction? X typically moves right for positive motion, Y moves away from you (away from the front of the table), and Z moves up for positive motion. Homing will get confused if your motion direction does not agree with the notion of "min" and "max" for the $_sn and $_sx settings.
  • Is the $_tm maximum travel set for the size of the table? If it's too short the search move may never reach the switch.
  • Is the _lb latch backoff long enough to actually clear the switch? If not you will not have an accurate zero.
  • Have you allowed a sufficient $_zb zero backoff? If ZB is too small you run the risk of misfiring a limit switch when you return to zero.

Axis starts and stops a few times before performing its search

You probably have NC switches that are incorrectly configured as NO switches ($st=0 instead of $st=1)

Limit Switch Problems

Limit switches fire in the middle of a cutting job

This is a common problem in many CNC setups (not just TinyG). Here are a few handt references:

What's usually happening is that electrical noise from the spindle or some other source is being picked up by the switch lines and is firing the limit switches spuriously. Here are some tips on diagnosing and fixing this problem.

First, try to stop the noise at its source

  • Try running the job with the spindle off and see if you get the same behavior. If not, it's likely that electrical noise being generated by the spindle is the culprit. You can also put an oscilloscope on the switch lines and look at the noise and see if it comes and goes as the spindle is turned on and off.
  • Brushless spindles are quieter both electrically and mechanically than spindles that have commutator brushes in them.
  • Some noise can be damped by putting a ceramic capacitor of sufficient voltage (typically 300v or more) across the spindle power lines. Experiment with different values, such as 1 uF or 0.1 uF. If the spindle is AC the capacitor cannot be polarized (most ceramics are not polarized).
  • You can also damp some noise by running the spindle wiring trough a ferrite bead or toroid.

Clone this wiki locally