heidelberg-makerspace / dai-makerspace-do-something

Issue tracker for tasks you could do in the DAI Makerspace
5 stars 0 forks source link

Filter interference on endstop line #105

Closed emka closed 7 years ago

emka commented 7 years ago

Using the grbl shield works fine except for an endstop issue: Y axis homes fine. X and Z axis (sharing on cable) will immediately stop the homing movement without touching the endstop at all. I think this is caused by interference on the unshielded cable.

It can be avoided by this patch:

diff --git a/grbl/limits.c b/grbl/limits.c
index 7e64294..18855f8 100644
--- a/grbl/limits.c
+++ b/grbl/limits.c
@@ -216,6 +216,7 @@ void limits_go_home(uint8_t cycle_mask)
     do {
       if (approach) {
         // Check limit state. Lock out cycle axes when they change.
+        report_realtime_status(); // without reporting it will fail, noise on endstop line?
         limit_state = limits_get_state();
         for (idx=0; idx<N_AXIS; idx++) {
           if (axislock & step_pin[idx]) {

With the patch applied X and Z will home just fine.

For a more robust solution I think we need to find an electronic filter solution against interference.

emka commented 7 years ago

When we tried to probe the endstop pin with an oscilloscope (without the above patch), the problem disappeared. We added 100pF between the endstop pin and GND, which solved the issue permanently.