3DPrinting
3DPrinting is a place where makers of all skill levels and walks of life can learn about and discuss 3D printing and development of 3D printed parts and devices.
The r/functionalprint community is now located at: or !functionalprint@fedia.io
There are CAD communities available at: !cad@lemmy.world or !freecad@lemmy.ml
Rules
-
No bigotry - including racism, sexism, ableism, homophobia, transphobia, or xenophobia. Code of Conduct.
-
Be respectful, especially when disagreeing. Everyone should feel welcome here.
-
No porn (NSFW prints are acceptable but must be marked NSFW)
-
No Ads / Spamming / Guerrilla Marketing
-
Do not create links to reddit
-
If you see an issue please flag it
-
No guns
-
No injury gore posts
If you need an easy way to host pictures, https://catbox.moe/ may be an option. Be ethical about what you post and donate if you are able or use this a lot. It is just an individual hosting content, not a company. The image embedding syntax for Lemmy is 
Moderation policy: Light, mostly invisible
view the rest of the comments
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.
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.
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