Page 1 of 1
Fixing false Positives with Geeetech Filament Sensor Switch
Posted: Sun Sep 22, 2019 11:04 am
by macca448
So silly me thinking I could fit the Geeetech Filament Run-Out Switch as a passive device and that would be it. After fitting the Geeetech Filament Switch the first few prints were fine but then it started to give false positives which is real annoying and time wasting.
THE SOLUTION: I like the Switch so hunting round I found this nice simple circuit

- Opto_endpoint.jpg (25.19 KiB) Viewed 42095 times
The mod to add +5v to the X-MAX endpoint is here
http://www.geeetech.com/forum/viewtopic ... 66&t=60915&
In a previous post I uploaded Marlin 1.1.9 with "Advanced Pause" enabled fir this feature to work.
viewtopic.php?f=20&t=68977 (NOTE:In pins_GT2560_REV_A.h, PIN 24 is re-defined from X_MAX_PIN to FIL_RUNOUT_PIN for this)
The LED is optional. Figured a bit more bling doesn't hurt, aye!
I used shielded balanced audio hook-up wire (2 core plus ground/shield)
Made up the circuit and tested as these pics show

- DSCF0539.JPG (332.26 KiB) Viewed 42095 times

- DSCF0538.JPG (342.25 KiB) Viewed 42095 times
All working fine so then I installed it like so

- 2019_09220007.JPG (167.61 KiB) Viewed 42095 times
Hope this helps
Cheers
Re: Fixing false Positives with Geeetech Filament Sensor Switch
Posted: Sun Sep 22, 2019 6:31 pm
by _kaktus_
HI.
Nice work.
I can also suggest a blocking capacitor for the input of the optocoupler diode. This will improve reliability.
Re: Fixing false Positives with Geeetech Filament Sensor Switch
Posted: Mon Sep 23, 2019 3:16 am
by macca448
Thank you _kaktus_!
Is this what you are suggesting? A 100nf ceramic cap between the diode input and ground?

- Opto_endpoint_v2.jpg (24.93 KiB) Viewed 42066 times
Its a mission working on the electronics now its in a housing to tidy things up but next time I'm doing some work in there I will take your advice
Cheers
Re: Fixing false Positives with Geeetech Filament Sensor Switch
Posted: Mon Sep 23, 2019 7:13 am
by Jarda3d
The capacitor itself is enough at CPU side of course. You definitelly did not need optocoupler.
If you get still problems, then add one more parallel to the switch too. If still, then add resistor about 100-220 Ohms in series with switch NEAR connector of CPU board. Or if you are paranoid, use these ceramic caps in parallel: 1nF, 100nF, 1uF and schottky BAT54S if you know what to do with all.
If you buy 0805 SMD version, it could be add at bottom side of board to connector leads.
Really, this EMC problem did not need any optocoupler!
Re: Fixing false Positives with Geeetech Filament Sensor Switch
Posted: Tue Sep 24, 2019 5:58 am
by macca448
I appreciate your comments Jarda3d but for what its worth I'm not an engineer, just a hobbyist. I wanted a guaranteed solution and your ideas are not what I found to be the best solution. Because my 3D printing is to make a CNC engraver I chose to go with the GRBL groups "Best" solution as it has many benefits. Maybe you should read this thread about how they came to this way of noise filtering.
https://github.com/gnea/grbl/wiki/Wiring-Limit-Switches
The components were cheap and readily available and easy to make a retrofit cable. My i3ProX was printing for 16 hours yesterday without fault so I'm now very happy chappy having solved the problem with a very simple easy to make circuit.
Re: Fixing false Positives with Geeetech Filament Sensor Switch
Posted: Wed Sep 25, 2019 1:18 am
by _kaktus_
Hi.
It's more like that:

- Opto_endpoint_A.jpg (13.39 KiB) Viewed 41983 times
The capacitor at this point is designed to mitigate the effects of contact bouncing during switching.
I greet all hobbyists and electronics enthusiasts.

Re: Fixing false Positives with Geeetech Filament Sensor Switch
Posted: Wed Sep 25, 2019 3:33 am
by macca448
Thank you kaktus, I understand. It's a good day when you learn something new and today I learn something new!!

Re: Fixing false Positives with Geeetech Filament Sensor Switch
Posted: Thu Sep 26, 2019 12:11 am
by _kaktus_
Hi.
Oh, no problem.
The resistance limiting the short circuit current of the tact switch is also important.
It is already present in your circuit diagram because you have an LED.

Re: Fixing false Positives with Geeetech Filament Sensor Switch
Posted: Tue Oct 01, 2019 5:31 am
by Jarda3d

- EMC.png (15.53 KiB) Viewed 41770 times
Re: Fixing false Positives with Geeetech Filament Sensor Switch
Posted: Wed Oct 02, 2019 2:04 am
by _kaktus_
Hi.
Excellent. That's what I was talking about.
