"Hit limit switch" interrupt during placement? Check switch!
Posted: Wed May 13, 2015 11:09 am
Hi,
I spent quite some time debugging an issue with almost random stops of TinyG during pickup and / or placement of components.
TinyG would shut down with "Hit limit switch" message from time to time when moving Z-axis but could not figure out why at first.
Turns out, the switch I was using for Z-max had electrical bouncing. When the Z-axis was moving up again after pickup or placement, TinyG would not "see" one deterministic state change of the switch but multiple.
See the following oscillogram:
Not sure, if there is any software debouncing done in TinyG firmware and how / with which delays it is implemented.
Anyways - once I replaced the switch by a new one, the issues disappeared.
Hope this is helpful if anyone suffers similar issues
Malte
P.S.: I am currently considering replacing the microswitches for Z-axis by optical or magnetic endstops, like the ones used on RepRap 3D printers:
http://reprap.org/wiki/Endstop
I do assume this mod would improve vertical accuracy and eliminate any potential bouncing issues. For X and Y the mechanical switches are fine as optical / camera homing is already very accurate.
However, if bought or produced in bulk, opto endstops for all axis might be cheaper than precision micro switches - something Juha might want to consider
I spent quite some time debugging an issue with almost random stops of TinyG during pickup and / or placement of components.
TinyG would shut down with "Hit limit switch" message from time to time when moving Z-axis but could not figure out why at first.
Turns out, the switch I was using for Z-max had electrical bouncing. When the Z-axis was moving up again after pickup or placement, TinyG would not "see" one deterministic state change of the switch but multiple.
See the following oscillogram:
Not sure, if there is any software debouncing done in TinyG firmware and how / with which delays it is implemented.
Anyways - once I replaced the switch by a new one, the issues disappeared.
Hope this is helpful if anyone suffers similar issues
Malte
P.S.: I am currently considering replacing the microswitches for Z-axis by optical or magnetic endstops, like the ones used on RepRap 3D printers:
http://reprap.org/wiki/Endstop
I do assume this mod would improve vertical accuracy and eliminate any potential bouncing issues. For X and Y the mechanical switches are fine as optical / camera homing is already very accurate.
However, if bought or produced in bulk, opto endstops for all axis might be cheaper than precision micro switches - something Juha might want to consider