Hi, I'm really stuck with this one (and it should be easy)... sorry.

Hi, I’m really stuck with this one (and it should be easy)… sorry.

I’ve just added limit switches to all axis (6 total). Unfortunately, I read after wiring them up that it’s better to work with N/C contacts, so mine are currently N/O. I’m running a laser cutter at the moment, so hopefully I can get away with this…?

I have set $st=0 for N/O contacts, and followed through the exercise to configure the X axis homing variables.

When I attempt G28.2 X0, nothing happens apart from the whole thing locking up. I have to power off TinyG and restart to regain control. $clear does nothing.

During this frozen state, if I try to jog any Axis, the graphics screen shows the tool moving, but the actual tool doesn’t move. As soon as I release the key, the graphic tool jumps back to its original location. So I restart TinyG and try again…

Mechanically, I can hear the switches change state when the limits are reached, and electrically I can check the continuity is operating as expected for all 6 switches (N/O). They are connected between GND and the relevant axis terminal.

FYI - I also tried setting up the soft limit variables but it made no difference. Interestingly, I cannot get it to report home even when it is home. Also, the $sl variable is set to 1 (enabled), despite the fact that it says it wont do this unless it’s ‘homed’.

The example from the internet shows a different syntax to mine below. ‘X axis homing state: 1’ is what I’m hoping to see, but I get this…

$home
Homing state: Not Homed
tinyg [mm] ok>
$hom
Homing state: Not Homed
X position: 0.000 mm
Y position: 0.000 mm
Z position: 0.000 mm
A position: 0.000 deg
B position: 0.000 deg
C position: 0.000 deg
tinyg [mm] ok>
$sl
[sl] soft limit enable 1
tinyg [mm] ok>

Thanks for any comments / advice.

Mike

Hmm, this feels more like a TinyG config issue than ChiliPeppr. Have you tried using the Config widget under the TinyG widget in ChiliPeppr to help you get your settings correct? It feels to me like TinyG is thinking it passed a limit switch thus stops moving like it thinks it’s supposed to stop.

Hello Mike,
I will be happy to help you but more information is needed.

Here are few questions/hints:

  1. How do you connect 2 switches of the same axis (e.g. Xmin and Xmax):
  • separate inputs on TinyG for each limit switch
    or
  • shared input and switches wired in parallel (preferred and give you option to connect probe to Zmin)?
    and how are the inputs being configured in TinyG?
    Disable unused inputs in the configuration settings.
  1. Can you share your TinyG $$ output somewhere (Dropbox or other cloud storage)?

  2. Temporarily disable soft limit and hard limit (set homing only), jog machine to table center and try to home one axis per time while pressing switch with your finger. Keep your other hand on ESTOP or mouse over Feedhold red button in Chilipeppr.

Switch off your spindle motor while testing. It is possible that machine gets into Alarm state immediately due to electrical noise caused by motors.

Hi John & Sebastian,

Thanks for your help.

John, I cannot see a config option in the Widget drop down list? Where is the config option you are talking about please?

Sebastian, I have reset all switches to 0, and re-checked all settings for X axis. Attempting to check X-Axis only.

FYI - I have two switches on each axis one connected to Xmin and the other connected to Xmax, so separate inputs for each.

Sorry, I don’t have dropbox or cloud storage, so I’ll paste the config switches at the end of this message.

I have disabled soft limits and re-tested with the same results (ie freezes). However, I also tried (after resetting TinyG) pushing the X-axis home and then trying the G28.2 X0 command. The result was the X-axis moved away from the limit switch as expected, but then froze again immediately upon leaving home.

With the X-Axis in the home position (knowing that the G28.2 X0 will result in moving the tool away from the X-Axis home position), I tested the $hom command and got the following.

$hom
Homing state: Not Homed
X position: 0.000 mm
Y position: 0.000 mm
Z position: 0.000 mm
A position: 0.000 deg
B position: 0.000 deg
C position: 0.000 deg
tinyg [mm] ok>

Still not what I expected to see. I expected that at least the X axis would have recognized being home.

I have the left the X-Axis in the homed position, and obtained the following list:

I’m seriously considering giving up on this and re-wiring the limits to N/C, but I’ll wait to hear from you again before changing things. Thanks again…

$$
[fb] firmware build 440.20
[fv] firmware version 0.97
[hp] hardware platform 1.00
[hv] hardware version 8.00
[id] TinyG ID 5X3848-VBS
[ja] junction acceleration 100000 mm
[ct] chordal tolerance 0.0100 mm
[sl] soft limit enable 0
[st] switch type 0 [0=NO,1=NC]
[mt] motor idle timeout 2.00 Sec
[ej] enable json mode 0 [0=text,1=JSON]
[jv] json verbosity 4 [0=silent,1=footer,2=messages,3=configs,4=linenum,5=verbose]
[js] json serialize style 1 [0=relaxed,1=strict]
[tv] text verbosity 1 [0=silent,1=verbose]
[qv] queue report verbosity 1 [0=off,1=single,2=triple]
[sv] status report verbosity 1 [0=off,1=filtered,2=verbose]
[si] status interval 250 ms
[ec] expand LF to CRLF on TX 0 [0=off,1=on]
[ee] enable echo 0 [0=off,1=on]
[ex] enable flow control 1 [0=off,1=XON/XOFF, 2=RTS/CTS]
[baud] USB baud rate 5 [1=9600,2=19200,3=38400,4=57600,5=115200,6=230400]
[net] network mode 0 [0=master]
[gpl] default gcode plane 0 [0=G17,1=G18,2=G19]
[gun] default gcode units mode 1 [0=G20,1=G21]
[gco] default gcode coord system 1 [1-6 (G54-G59)]
[gpa] default gcode path control 2 [0=G61,1=G61.1,2=G64]
[gdi] default gcode distance mode 0 [0=G90,1=G91]
[1ma] m1 map to axis 1 [0=X,1=Y,2=Z…]
[1sa] m1 step angle 1.800 deg
[1tr] m1 travel per revolution 4.0200 mm
[1mi] m1 microsteps 8 [1,2,4,8]
[1po] m1 polarity 0 [0=normal,1=reverse]
[1pm] m1 power management 2 [0=disabled,1=always on,2=in cycle,3=when moving]
[2ma] m2 map to axis 0 [0=X,1=Y,2=Z…]
[2sa] m2 step angle 1.800 deg
[2tr] m2 travel per revolution 4.0200 mm
[2mi] m2 microsteps 8 [1,2,4,8]
[2po] m2 polarity 1 [0=normal,1=reverse]
[2pm] m2 power management 2 [0=disabled,1=always on,2=in cycle,3=when moving]
[3ma] m3 map to axis 2 [0=X,1=Y,2=Z…]
[3sa] m3 step angle 1.800 deg
[3tr] m3 travel per revolution 4.0200 mm
[3mi] m3 microsteps 8 [1,2,4,8]
[3po] m3 polarity 1 [0=normal,1=reverse]
[3pm] m3 power management 2 [0=disabled,1=always on,2=in cycle,3=when moving]
[4ma] m4 map to axis 3 [0=X,1=Y,2=Z…]
[4sa] m4 step angle 1.800 deg
[4tr] m4 travel per revolution 180.0000 mm
[4mi] m4 microsteps 8 [1,2,4,8]
[4po] m4 polarity 0 [0=normal,1=reverse]
[4pm] m4 power management 2 [0=disabled,1=always on,2=in cycle,3=when moving]
[xam] x axis mode 1 [standard]
[xvm] x velocity maximum 1800 mm/min
[xfr] x feedrate maximum 800 mm/min
[xtn] x travel minimum 0.000 mm
[xtm] x travel maximum 380.000 mm
[xjm] x jerk maximum 20 mm/min^3 * 1 million
[xjh] x jerk homing 1000000 mm/min^3 * 1 million
[xjd] x junction deviation 0.0500 mm (larger is faster)
[xsn] x switch min 1 [0=off,1=homing,2=limit,3=limit+homing]
[xsx] x switch max 0 [0=off,1=homing,2=limit,3=limit+homing]
[xsv] x search velocity 500 mm/min
[xlv] x latch velocity 100 mm/min
[xlb] x latch backoff 20.000 mm
[xzb] x zero backoff 3.000 mm
[yam] y axis mode 1 [standard]
[yvm] y velocity maximum 1200 mm/min
[yfr] y feedrate maximum 800 mm/min
[ytn] y travel minimum 0.000 mm
[ytm] y travel maximum 280.000 mm
[yjm] y jerk maximum 20 mm/min^3 * 1 million
[yjh] y jerk homing 40 mm/min^3 * 1 million
[yjd] y junction deviation 0.0500 mm (larger is faster)
[ysn] y switch min 0 [0=off,1=homing,2=limit,3=limit+homing]
[ysx] y switch max 0 [0=off,1=homing,2=limit,3=limit+homing]
[ysv] y search velocity 500 mm/min
[ylv] y latch velocity 100 mm/min
[ylb] y latch backoff 5.000 mm
[yzb] y zero backoff 1.000 mm
[zam] z axis mode 1 [standard]
[zvm] z velocity maximum 800 mm/min
[zfr] z feedrate maximum 800 mm/min
[ztn] z travel minimum -50.000 mm
[ztm] z travel maximum 0.000 mm
[zjm] z jerk maximum 20 mm/min^3 * 1 million
[zjh] z jerk homing 40 mm/min^3 * 1 million
[zjd] z junction deviation 0.0500 mm (larger is faster)
[zsn] z switch min 0 [0=off,1=homing,2=limit,3=limit+homing]
[zsx] z switch max 0 [0=off,1=homing,2=limit,3=limit+homing]
[zsv] z search velocity 400 mm/min
[zlv] z latch velocity 100 mm/min
[zlb] z latch backoff 5.000 mm
[zzb] z zero backoff 1.000 mm
[aam] a axis mode 1 [standard]
[avm] a velocity maximum 7200 deg/min
[afr] a feedrate maximum 7200 deg/min
[atn] a travel minimum -1.000 deg
[atm] a travel maximum -1.000 deg
[ajm] a jerk maximum 5760 deg/min^3 * 1 million
[ajh] a jerk homing 11520 deg/min^3 * 1 million
[ajd] a junction deviation 0.0500 deg (larger is faster)
[ara] a radius value 0.1990 deg
[asn] a switch min 0 [0=off,1=homing,2=limit,3=limit+homing]
[asx] a switch max 0 [0=off,1=homing,2=limit,3=limit+homing]
[asv] a search velocity 600 deg/min
[alv] a latch velocity 100 deg/min
[alb] a latch backoff 5.000 deg
[azb] a zero backoff 2.000 deg
[bam] b axis mode 0 [disabled]
[bvm] b velocity maximum 3600 deg/min
[bfr] b feedrate maximum 3600 deg/min
[btn] b travel minimum -1.000 deg
[btm] b travel maximum -1.000 deg
[bjm] b jerk maximum 20 deg/min^3 * 1 million
[bjd] b junction deviation 0.0500 deg (larger is faster)
[bra] b radius value 1.0000 deg
[cam] c axis mode 0 [disabled]
[cvm] c velocity maximum 3600 deg/min
[cfr] c feedrate maximum 3600 deg/min
[ctn] c travel minimum -1.000 deg
[ctm] c travel maximum -1.000 deg
[cjm] c jerk maximum 20 deg/min^3 * 1 million
[cjd] c junction deviation 0.0500 deg (larger is faster)
[cra] c radius value 1.0000 deg
[p1frq] pwm frequency 1000 Hz
[p1csl] pwm cw speed lo 0 RPM
[p1csh] pwm cw speed hi 255 RPM
[p1cpl] pwm cw phase lo 0.000 [0…1]
[p1cph] pwm cw phase hi 1.000 [0…1]
[p1wsl] pwm ccw speed lo 1000 RPM
[p1wsh] pwm ccw speed hi 2000 RPM
[p1wpl] pwm ccw phase lo 0.125 [0…1]
[p1wph] pwm ccw phase hi 0.200 [0…1]
[p1pof] pwm phase off 0.000 [0…1]
[g54x] g54 x offset 0.000 mm
[g54y] g54 y offset 0.000 mm
[g54z] g54 z offset 0.000 mm
[g54a] g54 a offset 0.000 deg
[g54b] g54 b offset 0.000 deg
[g54c] g54 c offset 0.000 deg
[g55x] g55 x offset 0.000 mm
[g55y] g55 y offset 0.000 mm
[g55z] g55 z offset 0.000 mm
[g55a] g55 a offset 0.000 deg
[g55b] g55 b offset 0.000 deg
[g55c] g55 c offset 0.000 deg
[g56x] g56 x offset 0.000 mm
[g56y] g56 y offset 0.000 mm
[g56z] g56 z offset 0.000 mm
[g56a] g56 a offset 0.000 deg
[g56b] g56 b offset 0.000 deg
[g56c] g56 c offset 0.000 deg
[g57x] g57 x offset 0.000 mm
[g57y] g57 y offset 0.000 mm
[g57z] g57 z offset 0.000 mm
[g57a] g57 a offset 0.000 deg
[g57b] g57 b offset 0.000 deg
[g57c] g57 c offset 0.000 deg
[g58x] g58 x offset 0.000 mm
[g58y] g58 y offset 0.000 mm
[g58z] g58 z offset 0.000 mm
[g58a] g58 a offset 0.000 deg
[g58b] g58 b offset 0.000 deg
[g58c] g58 c offset 0.000 deg
[g59x] g59 x offset 0.000 mm
[g59y] g59 y offset 0.000 mm
[g59z] g59 z offset 0.000 mm
[g59a] g59 a offset 0.000 deg
[g59b] g59 b offset 0.000 deg
[g59c] g59 c offset 0.000 deg
[g92x] g92 x offset 0.000 mm
[g92y] g92 y offset 0.000 mm
[g92z] g92 z offset 0.000 mm
[g92a] g92 a offset 0.000 deg
[g92b] g92 b offset 0.000 deg
[g92c] g92 c offset 0.000 deg
[g28x] g28 x position 0.000 mm
[g28y] g28 y position 0.000 mm
[g28z] g28 z position 0.000 mm
[g28a] g28 a position 0.000 deg
[g28b] g28 b position 0.000 deg
[g28c] g28 c position 0.000 deg
[g30x] g30 x position 0.000 mm
[g30y] g30 y position 0.000 mm
[g30z] g30 z position 0.000 mm
[g30a] g30 a position 0.000 deg
[g30b] g30 b position 0.000 deg
[g30c] g30 c position 0.000 deg
tinyg [mm] ok>

Do you connect limit switches directly to TinyG inputs? TinyG 3.3V and NO limit switches config is not really noise resistant. Assuming correct wiring, I suspect that your problems are related to electrical interference caused by motors.

I highly recommend NC connection (re-wiring is necessary, as NC must be connected in series).

In my setup I connect NC limit switches as following:

  • two X-axis (Xmin and Xmax) switches to Xmin input
  • two Y-axis (Ymin and Ymax) switches to Ymin input
  • two Z-axis (Zmin and Zmax) switches to Zmax input
  • probe is connected to Zmin

When you experience “lockup” are any of the LEDs on the TinyG flashing?