Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis
Last active October 1, 2022 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cellularmitosis/bd43f995bf8adb119ed4e945a73ddcca to your computer and use it in GitHub Desktop.
Save cellularmitosis/bd43f995bf8adb119ed4e945a73ddcca to your computer and use it in GitHub Desktop.
Creality Ender 3 End-stop Capacitors (C5, C6, C7)

Blog 2022/9/18

<- previous | index | next ->

Creality Ender 3 End-stop Capacitors (C5, C6, C7)

In late 2018, the Creality Ender 3 shipped with the Melzi 1.1.3 board:

44250286-07d08b80-a1f4-11e8-854b-6abacf649991 (1)

The end-stop microswitch inputs used 10k pull-up resistors and 4.7uF capacitors to ground (see schematic):

ScreenShot2022-09-18at5 35 41PM

The microswitches are normally-closed, so the capacitors are normally shorted to ground. When an end-stop switch is pressed, the switch opens, allowing the voltage to rise following an RC curve, implementing a simple debounce filter / noise filter.

Screen Shot 2022-09-19 at 12 26 05 AM

However, 10k and 4.7uF result in an RC constant of 47 milliseconds. This is an unusually long RC constant for switch debouncing (switch bouncing is typically no more than a couple of milliseconds).

When installing a BLTouch bed-level probe, it is typically wired to act as a Z-stop switch. This means this 47 millisecond rise-time can affect the responsiveness of the BLTouch.

In fact, the BLTouch manufacturer recommends removing C7 entirely, and also mentions that 0.1uF would be a more reasonable capacitor value.

Screen Shot 2022-09-19 at 12 45 49 AM

Screen Shot 2022-09-19 at 12 44 45 AM

Indeed, 0.1uF would create an RC constant of 1 millisecond, providing a much faster rise time:

Screen Shot 2022-09-19 at 12 27 48 AM

Experimentation + Footage

I tried removing C5, C6, and C7 and then replaced them with 0.1uF capacitors and captured some slow-motion video footage of the X-stop behavior.

X-stop behavior, C5 = 4.7uF (stock)

Slow-motion footage: https://www.youtube.com/watch?v=Esh-4DoKCpk

Screen Shot 2022-09-19 at 1 06 23 AM

The X-stop switch is triggered twice during the "home" sequence: once at high speed and again at slow speed.

If we pause the video at both of these stops and compare the switch position, it appears that the switch is slightly further depressed during the initial high-speed stop than in the subsequent slow-speed stop:

Screen Shot 2022-09-18 at 11 32 48 PM

The delay induced by the capacitor allows the servo to continue moving past when it should stop, resulting in overshoot proportional to travel speed. This is why we see a difference in switch position during the high-speed and slow-speed passes.

X-stop behavior: C5 removed

Footage: https://www.youtube.com/watch?v=vkGwe-R6jEQ

Screen Shot 2022-09-19 at 1 06 17 AM

When I removed C5, C6 and C7, I frequently experiencing errors during the "home" sequence:

IMG_1799

I do not understand why this would happen. Perhaps I accidentally created a solder bridge while removing C5, cleaning up the lead-free solder, and re-tinning the pads with leaded solder?

X-stop behavior: C5 = 0.1uF

Slow-motion footage: https://www.youtube.com/watch?v=CkghN0erIoU

Screen Shot 2022-09-19 at 1 06 12 AM

With the 0.1uF capacitor, the induced delay should be about 47 times slower. Indeed, the switch positions during the high-speed and slow-speed passes appear more similar to each other than with the 4.7uF capacitor:

Screen Shot 2022-09-18 at 11 34 43 PM

A more rigorous measurement would involve modifying the firmware to display the difference in X-position between the fast and slow-speed stops.

Reports of others using 0.1uF capacitors

Surprisingly, I was only able to find a single account of someone else replacing C5, C6 and C7 with 0.1uF capacitors: https://www.reddit.com/r/ender5/comments/hdoiwx/comment/fvn62gn/

Screen Shot 2022-09-19 at 1 36 01 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment