<p>That’s a cool print for your filament runout sensor. I’m planning on doing this same mod to my Ender 3 V2 in the next week or two as well.</p>
<p>I’ve done a decent amount of research on how to implement this so hopefully I can answer some of your questions.</p>
<h2>Wiring</h2>
<p>I found this schematic of the V4.2.2 motherboard online.</p>
<p><a href="https://i.sstatic.net/l1i4P.png" rel="nofollow noreferrer" title="Schematic drawing of the Ender 3 v2 4.2.2 motherboard"><img src="https://i.sstatic.net/l1i4P.png" alt="Schematic drawing of the Ender 3 v2 4.2.2 motherboard" title="Schematic drawing of the Ender 3 v2 4.2.2 motherboard" /></a></p>
<p>Here is the pdf download link to the <a href="https://github.com/Creality3DPrinting/Ender-3/files/7626788/1623133432-Creality422-Schematic-2.pdf" rel="nofollow noreferrer">Ender 3 V2 v4.2.2 schematic</a> (clicking on the link immediately downloads the pdf).</p>
<p>It looks like for our motherboard (if you also have the V4.2.2), the pinout is:</p>
<ul>
<li>Left pin: Sensor Signal (‘S’)</li>
<li>Middle pin: Ground (’G’)</li>
<li>Right pin: Vcc (‘V’)</li>
</ul>
<p><a href="https://i.sstatic.net/TZJF7.jpg" rel="nofollow noreferrer" title="Upclose photo of the Run Out Sensor connection on a 4.2.2 motherboard with the three pins notated as S, G, and V"><img src="https://i.sstatic.net/TZJF7.jpg" alt="Upclose photo of the Run Out Sensor connection on a 4.2.2 motherboard with the three pins notated as S, G, and V" title="Upclose photo of the Run Out Sensor connection on a 4.2.2 motherboard with the three pins notated as S, G, and V" /></a></p>
<p>Based on the schematic, the Sensor Signal pin is pulled HIGH. This means to trigger the sensor, you want to connect the Sensor Signal pin to Ground.</p>
<p>The wiring for the switch is:</p>
<ul>
<li>'C' pin on switch    -&gt;   Sensor signal pin on motherboard</li>
<li>'NC' pin on switch   -&gt;   Ground pin on motherboard</li>
</ul>
<p>The 'NO' pin on the switch is left unconnected.</p>
<p>When the filament runs out, the switch opens and the ‘NC’ pin is connected to the ‘C’ pin. This pulls the Sensor Signal pin on the motherboard to LOW, which is what triggers the printer to pause.</p>
<p>Here is a diagram of how the switch should be wired to the motherboard.</p>
<p><a href="https://i.sstatic.net/GOfQl.jpg" rel="nofollow noreferrer" title="Photo of a roller micro switch with drawn wiring to the Run Out Sensor on a 4.2.2 motherboard showing the 'C' switch pin going to the 'G' sensor pin and the 'NC' switch pin going to the 'S' sensor pin"><img src="https://i.sstatic.net/GOfQl.jpg" alt="Photo of a roller micro switch with drawn wiring to the Run Out Sensor on a 4.2.2 motherboard showing the 'C' switch pin going to the 'G' sensor pin and the 'NC' switch pin going to the 'S' sensor pin" title="Photo of a roller micro switch with drawn wiring to the Run Out Sensor on a 4.2.2 motherboard showing the 'C' switch pin going to the 'G' sensor pin and the 'NC' switch pin going to the 'S' sensor pin" /></a></p>
<h2>Firmware</h2>
<p>You’ll also need to update the firmware on the motherboard. This isn’t too hard if you’ve never done it before.</p>
<p>I’d recommend installing the JyersUI firmware as detailed in the video:
<div class="youtube-embed"><div>
                <iframe width="640px" height="395px" src="https://www.youtube.com/embed/Qv_vVrnkAkI?start=0"></iframe>
            </div></div></p>
<p>Just follow along with the guide to install it. The Jyers firmware also has some really nice UI improvements. Check the video description for links to the firmware.</p>
<p>If you don’t want to go that route, or you if have the wrong kind of motherboard chip (see video), you can also download the official creality firmware to enable the filament runout sensor.</p>
<p>The link to the firmware list is here: <a href="https://www.creality.com/pages/download-ender-3-v2" rel="nofollow noreferrer">Official Ender 3 V2 firmwares</a></p>
<p>I’m pretty sure the one you’ll want is:</p>
<p><code>Marlin-2.0.1-HW-4.2.2-mainboard-V1.1.2-Compatible with BLTouch and filament detection</code></p>
<p>I didn’t use the official firmware, and there aren’t any release notes (of course), so I’m only 90% sure that's the right one .</p>
<p>At any rate, it might be wise to check your current firmware and make sure you download that too. That way you can revert your printer to its original firmware, just in case something goes wrong.</p>
<h2>JWST connectors</h2>
<p>Finally, the connectors on this board are the very common JST connectors.
Here is a link to a relatively inexpensive JST connector Kit and crimping tool:
<a href="https://rads.stackoverflow.com/amzn/click/com/B07RZSSTSJ" rel="nofollow noreferrer" rel="nofollow noreferrer">Connector kit w/ crimp tool</a></p>
<p>It’s pretty easy to crimp and install the connectors yourself. Here is a quick video on how to do it: <div class="youtube-embed"><div>
                <iframe width="640px" height="395px" src="https://www.youtube.com/embed/jHfYzrSF4pY?start=0"></iframe>
            </div></div></p>
<p>If you’re good at soldering you could also just hard solder the switch to the board if you don’t want to buy the connectors and crimper. Although I’d recommend against it.</p>
<p>Hopefully that helps. Good luck :)</p>
<p>P.S. I'll post how mine turns out once I'm finished.</p>

CC BY-SA 4.0
2024-01-09T09:46:52.333Z
Thank you for the very detailed answer .
Bob Ortiz
CC BY-SA 4.0
2024-01-09T10:28:39.327Z
We use the same board. I recommend you checkout mriscoc firmware instead of Jyers. You won't regret it. It's a huge step forward and we'll maintained, Jyers unfortunately isn't maintained for quite a while now. I move two printers from Jyers to mriscoc.
Bob Ortiz
CC BY-SA 4.0
2024-01-09T12:26:16.433Z
The Amazon URL seems to link to a non-JST connector tool. The connector in used here seems to be the JST-PH-3A.
Bob Ortiz
CC BY-SA 4.0
2024-01-09T08:53:57.177Z
2024-01-09T15:13:35.627Z
2024-01-09T15:13:35.627Z
Alex
<p>I'm building this simple DIY filament runout sensor for Ender 3 V2 based on this <a href="https://www.thingiverse.com/thing:3184729" rel="nofollow noreferrer">model from Thingiverse.com</a>. I am not sure about the wiring, it seems trivial, I probably need to use 'normally closed' (NC). Below is the result so far.</p>
<p><a href="https://i.sstatic.net/7SDdn.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/7SDdn.gif" alt="DIY runout sensor without wires" /></a></p>
<p><a href="https://i.sstatic.net/k8I3Z.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/k8I3Z.jpg" alt="DIY runout sensor with wires" /></a></p>
<p>I found this schematic from <a href="https://www.youtube.com/watch?v=neS7lB7fCww&amp;t=1128s" rel="nofollow noreferrer">a YouTube video</a> which uses a different sensor:</p>
<p><a href="https://i.sstatic.net/kj8mO.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kj8mO.jpg" alt="schematic" /></a></p>
<p>Based on the switch I used and the schematics shown, I guess I need to connect only two wires as follows:</p>
<ul>
<li>Switch NC to board Red 5V (most left pin of the connector in the schematic image)</li>
<li>Switch C to board White Signal (most right pin of the connector in the schematic image)</li>
<li>No connection to the second, black Grounding pin, as shown on the schematic image</li>
<li>No connection to the NO pin on the switch</li>
</ul>
<p>Is that wiring correct?</p>
<p>Lastly, I wonder how the connector is called that is used on the Creality v4.2.2 board, and if I need to use a transistor?</p>

<creality-ender-3><wiring><filament-sensor><sensors><runout-sensor>
How to wire a DIY filament runout sensor to a Creality v4.2.2 board?
Bob Ortiz
# How to wire a DIY filament runout sensor to a Creality v4.2.2 board?

(Asked by: username_0 on 2023-12-03)

I'm building this simple DIY filament runout sensor for Ender 3 V2 based on this [model from Thingiverse.com](https://www.thingiverse.com/thing:3184729). I am not sure about the wiring, it seems trivial, I probably need to use 'normally closed' (NC). Below is the result so far.

[![DIY runout sensor without wires](https://i.sstatic.net/7SDdn.gif)](https://i.sstatic.net/7SDdn.gif)

[![DIY runout sensor with wires](https://i.sstatic.net/k8I3Z.jpg)](https://i.sstatic.net/k8I3Z.jpg)

I found this schematic from [a YouTube video](https://www.youtube.com/watch?v=neS7lB7fCww&t=1128s) which uses a different sensor:

[![schematic](https://i.sstatic.net/kj8mO.jpg)](https://i.sstatic.net/kj8mO.jpg)

Based on the switch I used and the schematics shown, I guess I need to connect only two wires as follows:

* Switch NC to board Red 5V (most left pin of the connector in the schematic image)
* Switch C to board White Signal (most right pin of the connector in the schematic image)
* No connection to the second, black Grounding pin, as shown on the schematic image
* No connection to the NO pin on the switch

Is that wiring correct?

Lastly, I wonder how the connector is called that is used on the Creality v4.2.2 board, and if I need to use a transistor?

**Tags:** creality-ender-3, wiring, filament-sensor, sensors, runout-sensor


---

## 1 answers

### Answer by username_1 on 2024-01-09. Score: 3 | Accepted answer

That’s a cool print for your filament runout sensor. I’m planning on doing this same mod to my Ender 3 V2 in the next week or two as well.

I’ve done a decent amount of research on how to implement this so hopefully I can answer some of your questions.

## Wiring

I found this schematic of the V4.2.2 motherboard online.

[![Schematic drawing of the Ender 3 v2 4.2.2 motherboard](https://i.sstatic.net/l1i4P.png "Schematic drawing of the Ender 3 v2 4.2.2 motherboard")](https://i.sstatic.net/l1i4P.png "Schematic drawing of the Ender 3 v2 4.2.2 motherboard")

Here is the pdf download link to the [Ender 3 V2 v4.2.2 schematic](https://github.com/Creality3DPrinting/Ender-3/files/7626788/1623133432-Creality422-Schematic-2.pdf) (clicking on the link immediately downloads the pdf).

It looks like for our motherboard (if you also have the V4.2.2), the pinout is:

* Left pin: Sensor Signal (‘S’)
* Middle pin: Ground (’G’)
* Right pin: Vcc (‘V’)

[![Upclose photo of the Run Out Sensor connection on a 4.2.2 motherboard with the three pins notated as S, G, and V](https://i.sstatic.net/TZJF7.jpg "Upclose photo of the Run Out Sensor connection on a 4.2.2 motherboard with the three pins notated as S, G, and V")](https://i.sstatic.net/TZJF7.jpg "Upclose photo of the Run Out Sensor connection on a 4.2.2 motherboard with the three pins notated as S, G, and V")

Based on the schematic, the Sensor Signal pin is pulled HIGH. This means to trigger the sensor, you want to connect the Sensor Signal pin to Ground.

The wiring for the switch is:

* 'C' pin on switch -> Sensor signal pin on motherboard
* 'NC' pin on switch -> Ground pin on motherboard

The 'NO' pin on the switch is left unconnected.

When the filament runs out, the switch opens and the ‘NC’ pin is connected to the ‘C’ pin. This pulls the Sensor Signal pin on the motherboard to LOW, which is what triggers the printer to pause.

Here is a diagram of how the switch should be wired to the motherboard.

[![Photo of a roller micro switch with drawn wiring to the Run Out Sensor on a 4.2.2 motherboard showing the 'C' switch pin going to the 'G' sensor pin and the 'NC' switch pin going to the 'S' sensor pin](https://i.sstatic.net/GOfQl.jpg "Photo of a roller micro switch with drawn wiring to the Run Out Sensor on a 4.2.2 motherboard showing the 'C' switch pin going to the 'G' sensor pin and the 'NC' switch pin going to the 'S' sensor pin")](https://i.sstatic.net/GOfQl.jpg "Photo of a roller micro switch with drawn wiring to the Run Out Sensor on a 4.2.2 motherboard showing the 'C' switch pin going to the 'G' sensor pin and the 'NC' switch pin going to the 'S' sensor pin")

## Firmware

You’ll also need to update the firmware on the motherboard. This isn’t too hard if you’ve never done it before.

I’d recommend installing the JyersUI firmware as detailed in the video:

Just follow along with the guide to install it. The Jyers firmware also has some really nice UI improvements. Check the video description for links to the firmware.

If you don’t want to go that route, or you if have the wrong kind of motherboard chip (see video), you can also download the official creality firmware to enable the filament runout sensor.

The link to the firmware list is here: [Official Ender 3 V2 firmwares](https://www.creality.com/pages/download-ender-3-v2)

I’m pretty sure the one you’ll want is:

`Marlin-2.0.1-HW-4.2.2-mainboard-V1.1.2-Compatible with BLTouch and filament detection`

I didn’t use the official firmware, and there aren’t any release notes (of course), so I’m only 90% sure that's the right one .

At any rate, it might be wise to check your current firmware and make sure you download that too. That way you can revert your printer to its original firmware, just in case something goes wrong.

## JWST connectors

Finally, the connectors on this board are the very common JST connectors.
Here is a link to a relatively inexpensive JST connector Kit and crimping tool:
[Connector kit w/ crimp tool](https://rads.stackoverflow.com/amzn/click/com/B07RZSSTSJ)

It’s pretty easy to crimp and install the connectors yourself. Here is a quick video on how to do it:

If you’re good at soldering you could also just hard solder the switch to the board if you don’t want to buy the connectors and crimper. Although I’d recommend against it.

Hopefully that helps. Good luck :)

P.S. I'll post how mine turns out once I'm finished.

> **Comments:**
> **username_0**: Thank you for the very detailed answer .  
> **username_0**: We use the same board. I recommend you checkout mriscoc firmware instead of Jyers. You won't regret it. It's a huge step forward and we'll maintained, Jyers unfortunately isn't maintained for quite a while now. I move two printers from Jyers to mriscoc.  
> **username_0**: The Amazon URL seems to link to a non-JST connector tool. The connector in used here seems to be the JST-PH-3A.  

---

