Can't get endstops to trigger

Basic Information:

Printer Model: V Core 3.1 500
MCU / Printerboard: Octopus Pro
klippy.log (25.3 KB)

I can’t get the endstop switches to trigger. They are working, an led lights up when the switch in closed and the sense pin goes to 5v, but the sense pin is at 3v when switch is open.
This is the same for both x and y endstops.

x is plugged into Diag0 (PG6) and Y into Diag1 (PG9)

In mainsail machine page, the endstop status doesn’t change (sync button pressed every time). Setting pull up (^) doesn’t appear to make any difference. Inverting the pin (!) in printer.cfg changes the indicated state and but no combination results in successful function.

Any ideas?

You should have the endstops connected to signal and ground, not 5V.

2 Likes

No, the endstops are 3 wire boards (supplied with kit from ratrig) not just a microswitch. So vcc, gnd, and signal

I am assuming it is the interaction with the BTT TMC5160 Pro drivers (SPI Mode) as i have read that the sensorless homing pin prevents the endstops triggering.
So should the diag1 pin on the tmc driver be clipped?

Typically you need to jumper your board accordingly and use the respective connectors that are meant for the endstops.
A quick look into the manual reveals:

Hi Sineos,
You may be my saviour once again! I will check this out later

If the endstop is wired to send 5V to the signal when closed, and the signal pin has a hardware pullup on it, then you won’t be able to make this work. The difference between 3V and 5V is not enough for a logic change. The easy solution is wiring to signal and ground.

I have no idea what is wrong, the stallguards pins have no jumpers on and i can measure 5v at vcc and 3.3v on signal pin with nothing connected to enstop pins.

But sadly it is currently irrelevant, as a slight ‘accident’ earlier has resulted in a fried octopus.

You missed to activate the pullup resistors for the endstop_pin inputs:

[stepper_x]
step_pin = x_step_pin
dir_pin = !x_dir_pin
enable_pin = !x_enable_pin
rotation_distance = 40
microsteps = 64
homing_speed = 50
homing_retract_dist = 5.0
endstop_pin = x_endstop_pin
position_max = 500
position_endstop = 0

to

[stepper_x]
...
endstop_pin = ^x_endstop_pin
...

If he’s using a switch that lights an LED when it is closed, then he has a valid connection to +5V and GND as the LED and its associated current limiting resistor is powered by +5V and current through them go to GND.

The questions are:

  1. Is the switch connected to the correct pin in the controller?
  2. Do the DIAG jumpers on the controller affect the operation of the switch?

It’s not trivial to figure out if the DIAG jumpers affect the switch operation.

The first problem is, the pinout drawing doesn’t list the controller pins for the diag pins (set on Jumpers J16 to J23):

So, you have to look at the schematics, start with “J16” and presuming the other seven diag jumpers are all the same, which is probably safe to do. But “J16” doesn’t offer any immediate clues:

So, you have to look for “DIAG0” which goes to the controller pin PG6:

AND the connector used for wiring the switch sensor:

So, we can see that PG6 is always wired to the switch sensor connector but what happens if the jumper is in place and we have a connection to DRIVER0_DIAG. It seems that DRIVER0_DIAG is a driver pin on the TMC motor driver which will overpower any signal from a switch and a (LED equipped) pull up:

So @sineos’s idea of pulling the DIAG jumper is probably the right solution to the problem.

Honestly, it shouldn’t be this hard but sometimes the controller manufacturer’s don’t fully fill out the pin sheet for their boards.

1 Like

I like fried octopus but in this case it is really bitter. Sorry to hear, man.

1 Like

Thank you mykepredko,

That is an incredibly detailed look into the pinout of the octopus board.

What you have shown, is what I had concluded. The board pulls the end stop signal pins logic high (3.3V) and the end stops provided by ratrig in the v core 3.1 kit connect the signal pin high when the switch is triggered, so this combination will never work.
I guess a simple microswitch wired between signal and ground is the answer (as suggested by jakep_82) and throw the ratrig swtiches in the bin.

I prefer fried squid with salt and chilli, this fried octopus is flavoured with rat and is very bitter!

Don’t throw away the Ratrig switch - I’ve used them on an Octopus board (I experimented with them on my Voron 2.4 because I didn’t love the X/Y switch that is normally used with the printer) and they work fine.

Sorry you’ve got a toasted board.

Have swapped out end stop switches wired sense pin to ground pin and now works.

Also Octopus Pro board isn’t fried, the spi reports an error and the TMC5160 Pro drivers dont work in the board, but installed TMC2209 drivers via uart (and dropped from 48V to 24V!) and is working.

3 Likes