gloomyandy / RepRapFirmware

OO C++ RepRap Firmware
GNU General Public License v3.0
256 stars 60 forks source link

Sbase 1.3 optical endstop issue #87

Closed stisa closed 3 years ago

stisa commented 3 years ago

Hi, I have a delta that uses a MKS sbase 1.3, running smoothieware. On smoothie, all 3 endstops work correctly. When I flash firmware 3.2.2, two of them work correctly, while one (Z) is stuck triggered. The leds on the endstops themselves react correctly when I manually trigger them, but there's no change in the output of M119.

I have checked:

The endstop in smoothie is configured as gamma_max_endstop 1.29v, ie it is pulled down. In config.g I have M574 Z2 S1 P"ZMax".

All the endstops are the same, but only 1 out of 3 shows this behaviour.

Anything else I'm missing?

gloomyandy commented 3 years ago

It sounds like one of the endstops you have may be marginal in terms of the voltage and compatibility with the control board. It may be that by using a pull down on the input pin, it nudges the endstop in the acceptable range. Using a pull down on an endstop pin is a little strange, because most boards (including the sbase) usually have a pullup resistor on endstops and so activating the mcu pulldown will be creating a potential divider on the input, but I guess if it works... Unfortunately RRF does not support setting a pulldown on a pin, so there is no easy way for you to duplicate what smoothieware is doing. It may be possible to add an external resistor to the endstop, or maybe just replace the endstop that is giving problems?

stisa commented 3 years ago

That's the default value for the endstop with this printer (Tevo Little Monster), but yes it is a little weird. Replacing the endstop is probably the easiest, I'll give that a try, thanks.