Creality Filament Runout Sensor - custom firmware?

Hi,

I’m trying to get an official creality filament runout sensor working on my Ender 3 Pro (MB 4.2.2) and am having trouble. I had no trouble installing it but the printer seems to be interpreting the sensor opposite to what it should be. If I run the filament through the sensor and then to the extruder, the printer starts the “change filament” process when I start a print. If I bypass the sensor but leave it connected to the printer, it prints fine. It seems as if the printer thinks there is filament present when there isn’t and vice-versa.

I’m using firmware that I downloaded from the Creality website that supports my BL-Touch and seems to support the filament runout sensor.

I think that I need to build my own firmware to get it working correctly. Is this correct? Am I missing something?

Thanks for your help
Scott

I’m not sure what you mean by “bypass the sensor”. The sensor is most likely just a switch. Do you mean you are putting a jumper across the switch?

Like most switches, the switch will likely have a common (C) connection and a Normally Open (NO) and Normally Closed (NC) connection.

I don’t have a runout sensor at all, much less the Creality one to look at as a reference, but looking at the photos on 3DPCs web site, I see it has a 3-wire connector. Use an ohmmeter to see which pair of wires are connected when no filament is present and which pair are connected when a filament is there. Whichever wire they have in common is (C). You can now swap the other two wires to reverse the functionality of the filament detector.

Having said all that, when I see a 3 wire system, I’m also mindful that it could be a powered sensor with a data line. Black would be ground, Red would be 5V and Yellow would be the data output. If that’s the case, then the ohmmeter test won’t be conclusive. If that’s the case, then you’ll have to change the behaviour in firmware.

The only reason I try to avoid changing settings in firmware is that if you update the firmware at any point, you’ll have to remember to re-implement all your manual changes, whereas a hardware fix is permanent.

let me chime in on this one as well, the creality sensors are not digital which means they do have an NC/NO circuit system. This being said the easiest way by far to reverse the functionality of the sensor is to repin the wire.

Sorry - by “bypass the sensor”, I meant that I didn’t route the filament through the sensor.

And yes, the sensor is just a switch, with an LED to show the status of the switch.

Here is a wiring diagram - xxxxxxxxxxxxxxxxxxx (link removed because of possible damage to MB if used)

I will test out the sensor with my ohm meter to verify how it operates.

Thanks for your response.

1 Like

Actually, in the photo you linked to, it expressly states:
“These switches can vary.
GND (ground, common) will be the center pin (black wire).
–>> Swap the outer two if the signal is incorrect <<–”

I saw that note, but wasn’t confident that it was reliable info. I will give it a try after a bit more fiddling around with my multimeter.

Thanks for your help.
Scott

Nope - that didn’t work. Swapping the yellow and red wires caused my printer to reboot everytime the filament sensor transitioned from having filament to not having filament.

I’m going to open up the printer to check that the motherboard matches the diagram I included above.

I had a whole write-up in progress that I was fact-checking as I went along and I’ve just deleted it all because I discovered this: (It’s not the firmware discussion that’s interesting - it’s the board photo toward the bottom of the page)

Note the diagram on this page from Creality showing the wiring of the runout sensor. Note that the wiring is exactly backward from what is shown in the diagram you posted earlier. If THIS diagram is correct, it would mean your sensor is shorting V+ to Ground when it’s being triggered - which would reset the board.

Wow. So not only is the first diagram wrong re: wiring (red and yellow wires swapped), it is also wrong in suggesting that a swap of the red and yellow wires might “fix” the problem if the signal is wrong.

I’m glad that I didn’t fry my board when I swapped the 2 wires!

I guess my options are:

  1. update firmware for inverse switch behaviour (i.e., low <-> high)
  2. (somehow) hack the sensor so that its behaviour is reversed
  3. build a new filament sensor using a different switch (one that I can easily get access to the correct pins for the desired NO/NC behaviour)
  4. buy a smart filament sensor like the BigTreeTech one.

So I know this is an old thread but I just found it. I installed the official Creality runoff sensor on my Ender 3 v2 and used the Jyers custom firmware. Never had an issue with it, so maybe try loading that instead of the Creality firmware?

Hi @leafsfanatic Welcome to the forum, thanks for your post. I have never used the creality sensor with Jyers but good to know it also works.

I had the same problem with a new Creality runout sensor that I purchased and installed on my Ender 3. I am running F1rstlayer firmware and the sensor is behaving exactly opposite the way it should - goes about printing when no filament is run through the sensor, and parks the nozzle when filament is installed. Eventually I found a fix from F1rstlayer that was buried deep inside their google share folder where their firmware is stored for public download. It has the M codes to reverse the signal. I just placed the Mcode in with the machine code using Cura slicer. I know that’s not the best way to do it, but I am not a software/firmware guy so I just do what I can. But it works. Of course, it will only work if you slice each model with this Cura slicer, but that’s OK with me - as long as it works : )
If anyone out there is using F1rstlayer firmware, here is the Word document they provided to fix the runout sensor signal problem:

How to reverse filament runout state

Due to the method of manufacture, sometimes a filament runout sensor will work in reverse. Thanks to the work of Marlin developers, this firmware setting can now be edited without needing to re-compile the firmware with a simple Gcode command. One way to send this Gcode command to your control board is by using a free software called Pronterface. Pronterface can connect your PC to your printer directly, and allow you to send Gcode commands or control your machine without using the screen. There is a link below, in this guide to a YouTube video of how to install and connect Pronterface as well as send Gcode commands to the printer. After you have successfully connected Pronterface, you will simply need to send the Gcode M591E0S1P1 (OR) M591E0S1P2 to your machine depending on the filament sensor you are configuring for. It may not be possible to know, so trial and error testing is the currently recommended way to troubleshoot this issue. After you have sent one of those two Gcode commands to your control board, you will also need to send an M500 command to save these settings to EEPROM. Once you have saved the settings, you can try to test your runout sensor by running a print. You do not need to feed filament into the hotend, but you will need to put it into the runout sensor, and remove the filament after the second or third layer. It should trigger the runout warning and stop the print. You can put the filament back into the sensor and select to resume the print, and if everything goes to plan, you have successfully configured your runout sensor, and you will not need to do this again unless you flash a new .bin file to your control board. If the runout sensor did not function correctly in this test, you will need to run the other Gcode and save it with an M500 and test again, this second time it should work correctly. If you have any issues after trying both runout state Gcode commands, please feel free to contact us directly at our Facebook, on Amazon, or our email address and we will be happy to provide support. Thank you for your support and happy printing.

F1RSTLAYER@outlook.com