I’m wondering if anybody has this working on their printer.

I have an Ender 3 Pro (v1.5) with the Creality v4.2.2 board. It’s mostly stock. I’m looking to add the BigTreeTech Smart Filament Runout Sensor (v1.0). It’s installed (plugged into the main board, not LCD), but will trigger a runout after a few minutes of a test print and then it seems to go into a loop where it triggers a runout after a few seconds of restarting. I’ve recompiled the firmware (Marlin) from these instructions. I saw a post on Amazon indicating that the cable needs rewiring, but can’t find it anymore.

Before I go rewiring anything, I was wondering if anybody has this working in their setup and if they did anything different than the instructions.

I’m using the Marlin 2.1.2.5 config and updated the following config items:
FILAMENT_RUNOUT_SENSOR
FILAMENT_RUNOUT_DISTANCE_MM 7
FILAMENT_MOTION_SENSOR
NOZZLE_PARK_FEATURE
ADVANCED_PAUSE_FEATURE

  • @j4k3M
    link
    English
    25 days ago

    Have you checked your hardware with a simple multimeter? Most runout sensors are just a switch to ground. There is either a pull up resistor on the board or a built in pull up resistor is used in the microcontroller. This is what creates the logic high condition. The trigger is then a switch that is wired to be normally open. When the switch is triggered it pulls the pin low because the pull up resistor is a very small value. This creates the logic element required. Even if the pull up resistor is done in software, you can measure the logic high voltage with a meter. All current microcontrollers are CMOS logic levels. Look up CMOS logic on Wikipedia if you need a refresher on what this means and the respective levels and uncertainty thresholds for logic high and logic low; they are not rail to rail 0v-5v0 (or 3v3).

    If you are having issues after triggering, I would look at whether the pull up resistor is in hardware or if you are using the software pull up. You may find that there are multiple pull up resistors in hardware, the module, and software all combining to create an issue (unlikely edge case). It sounds more like an issue where the only pull up resistor is in software and it is likely getting turned off after the sensor is read, or there is no pull up resistor at all and the trace and wiring are left floating. When a wire is left floating like this without a pull up or a pull down resistor, it always becomes a radio antenna that picks up all kinds of noise. This radio noise on a floating line/trace/wire/pin will create most typical sporadic behaviors like you have described. It could also be a poor connection.

    If you are not familiar with digital logic and multimeters, meters are slow and cannot generally measure signals like serial communication. That is not what is happening with these kinds of sensors in most cases. I’m not at all familiar with the hardware in question, but the last time I messed with Marlin most sensors are just simple pin interrupts with pull ups. Those can be checked with a meter. I apologize if my laziness in not looking up your specific hardware has missed some advanced sensor that is using I2C or SPI. I’m just a user like you here and trying to help. That mod tag means nothing. This is just general electronics and microcontrollers advice.

    • @r0ertelOP
      link
      English
      35 days ago

      Thanks for the reply, it’s good advice to try looking at the sensor as a unit by itself. I did take it apart because in some of the reviews, people said that the mechanism inside of the vase jiggles as the filament is pulled in and out during retraction. I ended up wedging some plastic from a raspberry clamshell container (cleaned). Inside, there are two bearing wheels, one fixed and one that compresses the switch. The lower wheel turns another wheel with slots like a wagon wheel with a light sensor on the spokes to detect movement. It seems to work like a mouse scroll wheel.

      There are 3 wires. From what I read, one is ground, one is +5v and one is SPI (from memory, I could be wrong). I can definitely check the switch part.

      I was originally hoping to hear from a fellow Ender user with a simple, “yes it works without modifications” or, “I followed different instructions to make it work”. In thinking through your post, however, I may flip off the motion detection portion of the firmware code and run it as a simple switch to see if that works as expected.

      • @j4k3M
        link
        English
        24 days ago

        I just didn’t want you to get no answer at all. It doesn’t matter, but any sensor would need to be 4 wires for I2C (Serial Data, Serial Clock, Power, and Ground). If it was SPI it would take 5 or 6 wires, (Serial Data In, Serial Data Out, Clock, [Chip Select], Power, Ground).

        It is true that there are some one wire serial protocols for a few peripheral devices but these are not super common and the main ones I am aware of are a temperature sensor, and I think I have a memory chip in my drawers somewhere. I’ve actually used the temp sensor in projects a half dozen times.

        Anyways, many sensor modules on printers have both pull up and pull down configurations on the board or they will have a LED, or some other reason to include the extra wire.

        Typically, the interrupt signal for end stops and runout sensors is configured to be triggered on low signal, but it is just a single flag in a register to make it trigger on high signal too. It just depends on the hardware used and total configuration stuff. Pull up resistors and triggering the interrupt on low is the most likely configuration. GL