Marlin 1.1.9 and Endstop noise filter

Need help troubleshooting hardware issues... talk here

Marlin 1.1.9 and Endstop noise filter

Postby coastline » 2019-Dec-Tue-05-Dec

I have a PB SM with a Rev D printrboard and E3d V6 Hotend.

I am upgrading to Marlin 1.1.9 which has been an interesting experience.

Marlin 1.1.9 has software noise filter off by default which causes my Y homing to throw kill errors. I can of course switch it back on and this prevents the errors but I'd like to try the hardware fix suggested in the Marlin Docs of adding a 100nf cap to the endstop switch.

Before I dismantle everything to get at the endstops I would like to try it out to see if it solves the problem and thought of putting the caps in at the connector end as in the picture below as it's easier to get to:

PBSM_endstop_cap.jpg


(I know that is the X endstop it's just to show what I'm thinking of doing).

So a few questions:

1. Does the postion of the Cap (ie at the switch or at the connector) make a difference?
2. Can I/should I add a Cap for the Z probe?
3. If I do add a Cap for the Z probe do I need a different Cap?
4. I have a Rev F4 printrboard which I never got around to installing. Does this have any advantages in this area (ie endstop caps on the board)?
5. Any Gotchas with regard to installing a Rev F4 board other than stepper direction changes?

Thanks.
  • 0

You do not have the required permissions to view the files attached to this post.
coastline
Levelling print bed...
 
Posts: 26
Joined: 2015-Mar-Sun-10-Mar
Reputation: 2

Marlin 1.1.9 and Endstop noise filter

Sponsor

Sponsor
 

Re: Marlin 1.1.9 and Endstop noise filter

Postby RetireeJay » 2019-Dec-Tue-09-Dec

1. Does the postion of the Cap (ie at the switch or at the connector) make a difference?
2. Can I/should I add a Cap for the Z probe?
3. If I do add a Cap for the Z probe do I need a different Cap?
4. I have a Rev F4 printrboard which I never got around to installing. Does this have any advantages in this area (ie endstop caps on the board)?
5. Any Gotchas with regard to installing a Rev F4 board other than stepper direction changes?


1. For what you are doing here, the placement is not critical.
2/3. If you need a cap for the Z probe, the same value should work
4. Yes, the Rev F board has "digital pots" for setting stepper current, and a few other small enhancements. For some people talking to the board with a Mac computer, the Rev F board solves a problem with a conflict between the Y stop switch and something else (I don't remember which).
5. The firmware between Rev D and Rev F is not compatible; you must use firmware that's configured for the board. When you do that, the stepper direction should be fine.

Basically, speaking as someone who has experience in both hardware and software, I'd say that the capacitor "cure" is a kludge, and that implementing the "software filter" should be your first line of defense. It's safer (no possibility of accidentally shorting or breaking something) and is done absolutely all the time when interfacing electronics with mechanical switches (think keyboards, for example).
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
"My next printer is..." Prusa i3 MK3, upgraded to MK3S
User avatar
RetireeJay
My next printer is...
 
Posts: 5007
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 498

Re: Marlin 1.1.9 and Endstop noise filter

Postby coastline » 2019-Dec-Tue-09-Dec

Thanks for the reply Jay.

I was happily unaware of the software vs hardware filter situation until my venture down the rabbit hole of Marlin 1.1.9 breaking my Y endstop.

I would have been happy to leave the Software Filter in place as it is what I have been using (unknowingly) since I got the printer except for the notes in the firmware:

* Endstop Noise Filter
*
* Enable this option if endstops falsely trigger due to noise.
* NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
* will end up at a slightly different position on each G28. This will also
* reduce accuracy of some bed probes.
* For mechanical switches, the better approach to reduce noise is to install
* a 100 nanofarads ceramic capacitor in parallel with the switch, making it
* essentially noise-proof without sacrificing accuracy.
* This option also increases MCU load when endstops or the probe are enabled.
* So this is not recommended. USE AT YOUR OWN RISK.
* (This feature is not required for common micro-switches mounted on PCBs
* based on the Makerbot design, since they already include the 100nF capacitor.)
*/


I was specifically concerned with the homing error mentioned in relation to the Z probe.

The inference in the firmware note is that the hardware filter would introduce less inaccuracy.

I was also unsure how many changes might have been made in the software filter between the original 1403 Printrbot Firmware and Marlin 1.1.9 (possibly not all positive!) - especially as the authors appear not to trust it!!

One other question while I'm on a roll - Am I right in thinking that the Printrbot Z probe is 12v powered? Does it also give a 12v signal that the Printrboard handles somehow?
  • 0

coastline
Levelling print bed...
 
Posts: 26
Joined: 2015-Mar-Sun-10-Mar
Reputation: 2

Re: Marlin 1.1.9 and Endstop noise filter

Postby Mooselake » 2019-Dec-Tue-12-Dec

Small boards with onboard RC filtering are pretty common, although I have no idea of how hard these would be to attach to a SM. As an added benefit you get the LEDs, and we all know the more LEDs the better. I have a set for my small CNC machine (where they're a slight convenience, not a necessity like 3D printers) but haven't gotten around to installing them.

I think jamming caps into connectors is a pretty common hobbyist bodge, I've done it myself :)

Kirk
  • 0

Modified KickStarter Classic Plus 7/2012
KS Thingybot Delta Pro 10/31/16
Creality Ender 3 Pro 12/2019
User avatar
Mooselake
My next printer is...
 
Posts: 3623
Joined: 2011-Dec-Tue-23-Dec
Location: Moose Swamp, Upper Michigan, USA
Reputation: 177

Re: Marlin 1.1.9 and Endstop noise filter

Postby RetireeJay » 2019-Dec-Tue-21-Dec

Ok, I yield. It might help you to read this article. https://www.allaboutcircuits.com/technical-articles/switch-bounce-how-to-deal-with-it/
If you were experiencing noise and unexpected triggering when NOT at the Y stop position, that's a different issue, not switch bounce, and you need to check for defects in the circuit, either open or short circuit.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
"My next printer is..." Prusa i3 MK3, upgraded to MK3S
User avatar
RetireeJay
My next printer is...
 
Posts: 5007
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 498


Return to Troubleshooting talk

Who is online

Users browsing this forum: Google [Bot] and 1 guest