<p>Not knowing the type of inductive sensor you are using, the most common, an NPN type sensor (like the LJ18A3-8-Z/BX) is assumed (in relation to your <a href="/q/14649">previous question</a>). NPN type sensors imply that the signal is held high at a certain voltage (the supply voltage ranges from 6 V-36 V, but are reported to work on 5 V also) and is actively switched down to 0 V when triggered.</p>
<p>Basically the sensor always produces a high signal until triggered. Why is this the preferred option? If somehow the wires break or some issue occurs that triggers the sensor, movement is stopped to prevent damage to occur.</p>
<p>The signal from the sensor needs to be &quot;high&quot; and the switch needs to cut the power by opening the circuit. So make sure what your sensor signal is outputting in the first place. The depicted switch is a powered switch as it uses an LED, but the switching component on the circuit board itself has three pins, COM (COMmon), NO (Normally Open) and NC (Normally Closed). You need to put +5 V on the white wire to power the right side of the optocoupler and connect the switch as such that the COM and the NC are connected (most probably S and U in the depicted switch).</p>

CC BY-SA 4.0
2020-11-17T09:42:09.973Z
2020-11-17T09:42:09.973Z
0scar
<p>Optocoupler used in conjuction with an inductive sensor on a stock Ender 3, wired like this:</p>
<p><a href="https://i.sstatic.net/Wdlks.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Wdlks.jpg" alt="diagram" /></a></p>
<p>Except I also wired a switch to the Z endstop signal and ground.</p>
<p>I don't know the switch pin layout so I had to guess.</p>
<p><a href="https://i.sstatic.net/wa85w.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wa85w.jpg" alt="switch pins?" /></a></p>
<p>I guess <code>S</code> stands for signal, but I don't know why the other pin isn't <code>G</code>, but rather <code>V</code>. So we have signal and voltage? that doesn't make sense so I guess its the reason for the problem.</p>
<p>When I do auto home all axes, it completely ignores signal from the optocoupler. It only stops when hitting the switch.</p>
<p>The optocoupler is connected to an inductive sensor. When the sensor detects metal, it sends a signal to the optocoupler, the optocoupler to Z limit pins on the mainboard (or so it should).</p>
<p>Video of whats happening is found <a href="https://streamable.com/ibx21n" rel="nofollow noreferrer">here</a>.</p>
<p>Should I connect optocoupler VCC to switch V (keep switch S to optocoupler OUT)?</p>
<hr />
<p>U (not V) is +5V, so should I connect the optocoupler VCC to it?</p>

CC BY-SA 4.0
2020-10-24T19:20:36.960Z
S is signal, U(not V) is +5V, G is Gnd.
Trish
<creality-ender-3><bed-leveling><electronics><wiring><inductive-sensor>
Ender 3 ignores signal from optocoupler
super autismo
# Ender 3 ignores signal from optocoupler

(Asked by: username_0 on 2020-10-24)

Optocoupler used in conjuction with an inductive sensor on a stock Ender 3, wired like this:

[![diagram](https://i.sstatic.net/Wdlks.jpg)](https://i.sstatic.net/Wdlks.jpg)

Except I also wired a switch to the Z endstop signal and ground.

I don't know the switch pin layout so I had to guess.

[![switch pins?](https://i.sstatic.net/wa85w.jpg)](https://i.sstatic.net/wa85w.jpg)

I guess `S` stands for signal, but I don't know why the other pin isn't `G`, but rather `V`. So we have signal and voltage? that doesn't make sense so I guess its the reason for the problem.

When I do auto home all axes, it completely ignores signal from the optocoupler. It only stops when hitting the switch.

The optocoupler is connected to an inductive sensor. When the sensor detects metal, it sends a signal to the optocoupler, the optocoupler to Z limit pins on the mainboard (or so it should).

Video of whats happening is found [here](https://streamable.com/ibx21n).

Should I connect optocoupler VCC to switch V (keep switch S to optocoupler OUT)?

---

U (not V) is +5V, so should I connect the optocoupler VCC to it?

**Tags:** creality-ender-3, bed-leveling, electronics, wiring, inductive-sensor

> **Comments:**
> **username_1**: S is signal, U(not V) is +5V, G is Gnd.  

---

## 1 answers

### Answer by username_2 on 2020-11-17. Score: 1

Not knowing the type of inductive sensor you are using, the most common, an NPN type sensor (like the LJ18A3-8-Z/BX) is assumed (in relation to your [previous question](/q/14649)). NPN type sensors imply that the signal is held high at a certain voltage (the supply voltage ranges from 6 V-36 V, but are reported to work on 5 V also) and is actively switched down to 0 V when triggered.

Basically the sensor always produces a high signal until triggered. Why is this the preferred option? If somehow the wires break or some issue occurs that triggers the sensor, movement is stopped to prevent damage to occur.

The signal from the sensor needs to be "high" and the switch needs to cut the power by opening the circuit. So make sure what your sensor signal is outputting in the first place. The depicted switch is a powered switch as it uses an LED, but the switching component on the circuit board itself has three pins, COM (COMmon), NO (Normally Open) and NC (Normally Closed). You need to put +5 V on the white wire to power the right side of the optocoupler and connect the switch as such that the COM and the NC are connected (most probably S and U in the depicted switch).


---

