<p>Perhaps the culprit is a pull-up resistor on the board. Normally, endstops on 3D printers use the microcontroller's internal pullups. These have a resistance of around 50kΩ, which is far too high to be a problem. However, if lower value pull up resistors are used on your main board, this could cause a problem.</p>

<p>The resistor of your voltage divider form, when the output of the sensor is low, a parallel pair of resistors to ground, with an effective resistance equal to <code>1/(1/10+1/15) = 6kΩ</code>. If there was (let's say) a 4.7k pull-up resistor on the board, you'd expect to see around 2.8V on the output (because the pull-up resistor, together with the two resistors of your voltage divider, forms another voltage divider).</p>

<p>I don't have the Anet A8 main board myself, but on pictures I do see a set of 6 resistors suspiciously close to the thermistor and endstop connectors.</p>

<p>You could verify my suspicions by unplugging the endstop, powering down the electronics and then measuring the resistance between the endstop signal and 5V pins.</p>

<p>Possible solutions:</p>

<ul>
<li><p>Desolder the offending resistor. This is pretty easy with SMD parts: you just alternate between heating up both sides until it slides off.</p></li>
<li><p>Use a diode in place of a voltage divider. Anode goes to the endstop connector, cathode to the signal of the probe. This prevents the high voltage of the probe from being seen by the electronics, while allowing the probe to drain the current from the pull-up resistor.</p></li>
</ul>

<p>With this last solution, make sure the reverse leakage current of the diode is not too high. If it has a reverse current of (let's say) 50uA, then 50uA flowing through the (supposed 4.7k) pull-up to ground would raise the voltage at the signal pin to 5.002V. This is unlikely to be a problem, but with higher value resistors or higher leakage you'd see the voltage raise higher above 5V (which the microcontroller won't like).</p>

CC BY-SA 3.0
2017-08-24T14:29:48.143Z
Thank you very much. I will try to verify if it is in fact due to the pull-up resistor. If that is indeed the culprit I will try to install the diode as you suggested. If not, I will try an optocoupler. Thank you very much.
Also very nice to see a fellow puzzle designer answer my question ;)
Disousa
CC BY-SA 3.0
2017-08-24T07:55:54.870Z
2017-08-24T07:55:54.870Z
Tom van der Zanden
<p>Today I installed an inductive sensor (4 mm sensing distance, NPN) on my printer to perform auto-bed leveling. The sensor works at 12 V and the board at 5 V, so I used a voltage divider (as suggested in many places online) using a 10kOhm and a 15kOhm resistor.</p>

<p>In testing the sensor, I noticed that the sensor's LED turns on, but the printer (Anet A8) doesn't recognize the fact that the sensor is triggering. I'm running the Skynet3D firmware, though I still have not switched to the version with auto bed-leveling. Regardless, the inductive sensor should still act as a limit switch, yet the Z-Axis motor does not stop when the sensor triggers. Am I doing something wrong, or missing a step?</p>

<p>I have also measured the voltage across the leads that connect to the board and the voltage is slightly over 5 V when the sensor is not triggered, and lowers to around 2.5 V when the sensor triggers. I get the feeling it should be closer to 0 V.</p>

<p>Thank you very much for any help.</p>

<electronics>
Auto Bed Levelling - Printer not detecting, but sensor is triggering
Disousa
# Auto Bed Levelling - Printer not detecting, but sensor is triggering

(Asked by: username_0 on 2017-08-24)

Today I installed an inductive sensor (4 mm sensing distance, NPN) on my printer to perform auto-bed leveling. The sensor works at 12 V and the board at 5 V, so I used a voltage divider (as suggested in many places online) using a 10kOhm and a 15kOhm resistor.

In testing the sensor, I noticed that the sensor's LED turns on, but the printer (Anet A8) doesn't recognize the fact that the sensor is triggering. I'm running the Skynet3D firmware, though I still have not switched to the version with auto bed-leveling. Regardless, the inductive sensor should still act as a limit switch, yet the Z-Axis motor does not stop when the sensor triggers. Am I doing something wrong, or missing a step?

I have also measured the voltage across the leads that connect to the board and the voltage is slightly over 5 V when the sensor is not triggered, and lowers to around 2.5 V when the sensor triggers. I get the feeling it should be closer to 0 V.

Thank you very much for any help.

**Tags:** electronics

---

## 1 answers

### Answer by username_1 on 2017-08-24. Score: 3 | Accepted answer

Perhaps the culprit is a pull-up resistor on the board. Normally, endstops on 3D printers use the microcontroller's internal pullups. These have a resistance of around 50kΩ, which is far too high to be a problem. However, if lower value pull up resistors are used on your main board, this could cause a problem.

The resistor of your voltage divider form, when the output of the sensor is low, a parallel pair of resistors to ground, with an effective resistance equal to `1/(1/10+1/15) = 6kΩ`. If there was (let's say) a 4.7k pull-up resistor on the board, you'd expect to see around 2.8V on the output (because the pull-up resistor, together with the two resistors of your voltage divider, forms another voltage divider).

I don't have the Anet A8 main board myself, but on pictures I do see a set of 6 resistors suspiciously close to the thermistor and endstop connectors.

You could verify my suspicions by unplugging the endstop, powering down the electronics and then measuring the resistance between the endstop signal and 5V pins.

Possible solutions:

* Desolder the offending resistor. This is pretty easy with SMD parts: you just alternate between heating up both sides until it slides off.
* Use a diode in place of a voltage divider. Anode goes to the endstop connector, cathode to the signal of the probe. This prevents the high voltage of the probe from being seen by the electronics, while allowing the probe to drain the current from the pull-up resistor.

With this last solution, make sure the reverse leakage current of the diode is not too high. If it has a reverse current of (let's say) 50uA, then 50uA flowing through the (supposed 4.7k) pull-up to ground would raise the voltage at the signal pin to 5.002V. This is unlikely to be a problem, but with higher value resistors or higher leakage you'd see the voltage raise higher above 5V (which the microcontroller won't like).

> **Comments:**
> **username_0**: Thank you very much. I will try to verify if it is in fact due to the pull-up resistor. If that is indeed the culprit I will try to install the diode as you suggested. If not, I will try an optocoupler. Thank you very much. Also very nice to see a fellow puzzle designer answer my question ;)  

---

