){.nav-menu .menu-item-has-children a{padding-right:20px}.nav-menu .menu-item-has-children a:after{position:absolute;right:7px;top:10}}.vce-ad-container{margin:30px auto;display:block;clear:both;width:728px;position:relative;max-width:100%}.vce-ad-below-header{margin-bottom:0}@media only screen and (max-width:1200px) and (min-width:1024px){.vce-ad-container{width:630px}.vce-ad-below-header{width:728px}}@media only screen and (max-width:1023px){.vce-ad-below-header,.vce-ad-container{width:728px}}@media (max-width:767px){.vce-ad-container{width:375px}}@media (max-width:400px){.vce-ad-container{width:300px}}@media (max-width:320px){.vce-ad-container{width:280px;max-width:100%}}:root .main-navigation ul ul{opacity:1}@media only screen and (min-width:1024px) and (max-width:1200px){.container{max-width:1000px}.vce-main-content{width:700px}.main-navigation ul ul{display:none}.top-header{overflow:hidden}.main-navigation a{padding:15px 9px 15px}.search-header-wrap a{padding:15px}.header-3-wrapper .site-branding{max-width:300px}h1.entry-title{width:540px}.entry-title{display:block}}@media only screen and (min-width:670px) and (max-width:1023px){.header-3-wrapper .site-branding{max-width:300px}.header-3-wrapper .nav-menu>li>a{padding:0 15px}h1.entry-title{width:540px}.entry-title{display:block}}@media only screen and (max-width:1023px){.container{max-width:90%}.vce-main-content{width:100%;padding:15px 0!important}.main-navigation ul ul{display:none}.vce-res-nav{float:left;position:absolute;left:0}.header-3-wrapper{height:50px!important;padding-top:0!important;text-align:center}.header-3-wrapper .site-branding{position:relative;float:none;top:0!important;left:initial!important;text-align:center;max-width:initial;padding:3px 0 7px}.site-branding{padding:4px 0 7px;display:inline-block}.site-branding img{max-width:120px;max-height:28px}.main-header .header-3-wrapper .site-title,.main-header .header-3-wrapper .site-title a.has-logo{line-height:40px!important;font-size:26px!important}.sidebar{margin:0 auto 20px;float:none!important;display:block;clear:both;padding-top:0!important;width:100%;max-width:300px}h1.entry-title{max-width:100%}.vce-responsive-nav{display:block;margin:10px 0 9px}.nav-menu,.top-header{display:none}.main-header .site-title,.main-header .site-title a{line-height:36px!important;font-size:40px!important}li>ul{margin:0}}@media only screen and (min-width:200px) and (max-width:670px){html{margin-top:0!important;overflow-x:visible}html body,button,input,textarea{font-size:14px;line-height:22px}.container{max-width:95%}.vce-main-content{padding:0 0 10px!important}.main-box,.sidebar .widget{margin-bottom:10px}.vce-wrap-right{width:100%;max-width:100%;text-align:center}.vce-single .entry-header{margin:20px 0}.vce-wrap-right{text-align:center}body h1.entry-title{font-size:24px;line-height:30px;padding:0 20px}body p{margin-bottom:20px}body h1{font-size:24px;line-height:34px;margin-bottom:10px}body h4{font-size:18px;line-height:28px;margin-bottom:10px}.sidebar .widget-title{line-height:22px}.vce-wrap-right>ul{float:none;display:inline-block;margin:10px 0 0}}#cookie-notice *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#cookie-notice .cookie-notice-container{display:block}#cookie-notice.cookie-notice-hidden .cookie-notice-container{display:none}.cookie-notice-container{padding:15px 30px;text-align:center;width:100%;z-index:2}.cn-close-icon{position:absolute;right:15px;top:50%;margin-top:-10px;width:15px;height:15px;opacity:.5;padding:10px;outline:none}.cn-close-icon:before,.cn-close-icon:after{position:absolute;content:' ';height:15px;width:2px;top:3px;background-color:#fff}.cn-close-icon:before{transform:rotate(45deg)}.cn-close-icon:after{transform:rotate(-45deg)}#cookie-notice .cn-button{margin:0 0 0 10px}.cn-button.bootstrap{font-family:-apple-system,BlinkMacSystemFont,Arial,Roboto,"Helvetica Neue",sans-serif;font-weight:400;font-size:13px;letter-spacing:.25px;line-height:20px;margin:0;text-align:center;text-transform:none;display:inline-block;touch-action:manipulation;white-space:nowrap;outline:none;box-shadow:none;text-shadow:none;border:none;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;text-decoration:none;padding:8.5px 10px;line-height:1}.cn-button.bootstrap{color:#fff;background:#20C19E}.cn-text-container{margin:0 0 6px 0}.cn-text-container,.cn-buttons-container{display:inline-block}@media all and (max-width:900px){.cookie-notice-container #cn-notice-text{display:block}.cookie-notice-container #cn-notice-buttons{display:block}#cookie-notice .cn-button{margin:0 5px 5px 5px}}@media all and (max-width:480px){.cookie-notice-container{padding:15px 25px}}

3D Printers & Endstops

With the start of a new year, I wanted to share more thoughts on Endstops! How to construct an endstop myself? This is by far the most common question I hear from 3DP tyros. So it’s time for me to document basic information about 3D printer Endstops, especially useful for those who aren’t much familiar with the 3D printer electronics. Let’s get down to learn now.

Endstop explained

The stepper motors in a 3D printer must know when they have reached the limits of an axis. For this purpose you can use Endstops, and in principle it’s possible to connect up to 6 Endstops. However, basically you needs just 3 Endstops – Y-axis endstop, X-axis endstop, and the Z-axis endstop.

Although 3D printers are extremely accurate and precise positioning systems, note that a 3D printer does not move its print head to a location in absolute coordinates. Rather, movements are made relative to the current position of the print head. So at the beginning of every 3D print, the 3D printer must move the print head to a starting position, which the 3D printer firmware considers to be the origin (0, 0, 0) point called “home”. Starting every 3D print from the same home position allows the 3D printer to reference its movements. Therefore, one endstop switch per axis is required to tell the 3D printer when that position is reached.

Mechanical endstop

This is the simplest and widely used type of endstop, placed on each axis. The mechanical endstop is actually nothing else than a micro switch, however, to make things easier, you can buy a complete package that includes the endstop module and a connection cable for cheap. Below you can see the photograph of a “RepRap Standard Endstop v1.2”.

The mechanical endstop is actually nothing else than a bare micro switch (changing the switch state signals the electronics). The standard endstop (v1.2) pictured above (designed by Makerbot) has a 4-pin connector, marked C (common), NC (normally closed) and NO (normally opened). Besides there’s one LED, one capacitor, and two resistors soldered on the circuit board. The mechanical endstop module also provides enough holes so it’s easy to mount them on the frame.

Sadly, there’re no pin markers on the mechanical endstop module I bought from an Indian online store. Next is the schematic of that mechanical endstop module drawn by me.

As can seen in the schematic, NC terminal of the micro switch (S1) is in fact the Vcc input (red), NO is the Gnd rail (black), and the COM is the signal output (green or the like). Here, resistor R1 (1K) serves as the current limiter resistor for the status indicator (LED1) while remaining components R2 (10K) & C1 (100n) are supporting components of the signal output (active-low) line.

Perhaps it’s necessary, sometimes even important, to keep an eye on the actual performance of an endstop. Because it’s observed (by me and many others) that there’s not only significant bouncing while the mechanical switch is being operated but also some unwanted noise with high amplitudes. Switch contact bounce is a usual issue for all mechanical switches, occurs when the metal contacts of the mechanical switch are pressured together, the property of the metals used causes the contacts to bounce apart. How frequently the contacts bounce before the final latch depends on the contact type and ofcourse the property of the switch. The bouncing effect can causes multiple high frequency pulses, as opposed to a clean output transition, thus results in an undesired action especially if it’s linked with a microcontroller-based piece of circuitry. You can see a basic plot (for reference) below.

When it comes to the noise issues, it’s worthy to notice that in a 3D printer itself, there’re some substantial noise sources such as stepper motors and pulse width modulation drivers. Things will turn worse if the wires of the endstops are in the same cable where wires to stepper motors are!

The following scope trace shows the moment when the stepper motor in a RepRap-based 3D printer, which shares the cable with probed endstop input is engaged. If you like to go farther in this matter, you see the story here https://wot.lv/combating-endstop-noise-on-a-reprap.html.

It’s time for me to document how I conduct a crude test of my mechanical endstop module just to see the performance of its electronics. I simply powered the module up with a bit noisy 5VDC power supply (it’s intentional) and probed my scope on the signal output (green) wire with respect to Gnd (black). Below you can find a casual scope trace of the output transition captured while releasing (after a depression) the little lever on the endstop. I don’t have a 3D printer yet, so I’ve never felt the need to test endstops in real world (donate one to me if you want me to! Ha Ha).

See the little time lag it took for signal to complete the shift after endstop was released, not a big concern, though.

In my view, mechanical endstops are good enough as it’s by far the most common and pretty cheap type when compared with the counterparts. But quite often it’d become essential to ‘clean’ the output signal perhaps by means of a noise filter mechanism – not a tedious task indeed.

Other Endstops

The second type of endstop is the optical endstop. An advantage of using optical endstops is that optical endstops can be activated without any physical contact between the carriage and the endstop. The key component in an optical end stop is a fork-type (u-shaped) opto-interrupter (photo-interrupter) device – usually a type TCST2103 from Vishay Semiconductors.

The TCST2103 is a transmissive sensor that includes an infrared emitter and phototransistor, located face-to-face on the optical axes in a leaded package which blocks visible light. Apart from the photo-interrupter, only two resistors are needed to build a complete optical endstop.

Next type of non-contact endstop is the Hall-Effect endstop that uses a Hall-Effect sensor, which is triggered in the close proximity of a magnetic field. When the carriage mounted with a permanent magnet nears the endstop, the Hall-Effect sensor detects the magnetic field and activates the endstop. The key component in a common Hall-Effect endstop is the A1302UA Hall-Effect sensor.

The A1302 (from Allegro MicroSystems) is a continuous-time ratiometric linear Hall-Effect Sensor IC, optimized to accurately provide a voltage output that is proportional to an applied magnetic field. These devices have a quiescent output voltage that is 50% of the supply voltage. Typical sensitivity of A1302 is 1.3 mV/G. The suffix UA denotes a 3-pin SIP package while suffix LH is for SOT23W. This simply means two device package types are available: LH, a 3-pin SOT23W type for surface mount, and UA, a 3-pin ultra-mini SIP for through-hole mount.

You can find much more information about Hall-Effect endstops (including schematics) here – https://reprap.org/wiki/Hall-Θ.

A search on the internet showed me that it’s rather difficult to manually position a mechanical endstop for the Z-axis with a narrow between the nozzle of the extruder and the surface of the heated print bed. However, a Hall-Effect endstop module (with a linear sensor, like the aforesaid one) will be a good fit in such a situation as it provides a variable sensitivity adjustment for the magnet through an onboard trimpot. Quite simple, but note that a Hall-Effect endstop module centered on a Hall-Effect Switch like the A3144 is not suitable for this trick as it can deliver a logic-high (H) or logic-low (L) output only!


At bottom, an endstop with an active-high output holds the signal pin at about 0V when the switch is not triggered, and about Vcc level when triggered. Likewise, an endstop with an active-low output holds the input pin at about Vcc level when the switch is not triggered, and about 0V when triggered.

And in my opinion, the most simple and cheap endstop to use is mechanical endstop. Anyway, you can easily and quickly adjust the distance of the printbed to the nozzle if you’ve a Hall-Effect endstop, its supporting circuitry is a bit complex, though. The problem that you may have with an optical endstop is the inadvertent false triggering induced by strong external light sources.

At last, because I already had a bunch of MH183 Hall-effect sensor switch ICs, I decided to start with making one simple Hall-Effect Endstop. And, I already constructed a working proof of concept breadboard model of the ‘digital endstop’ (see below schematic).

The schematic is extremely simple and straight forward as it’s centered around the MH183 which is a CMOS unipolar Hall-Effect Sensor IC. Note that its output transistor will be switched on (BOP) in the presence of a sufficiently strong South pole magnetic field facing the marked/ branded side of the package. Similarly, the output will be switched off (BRP) in the presence of a weaker South field and remain off with “0” field. Do not apply reverse voltage to the sensor, as it may be cause irreparable damage to the sensor. For reverse voltage protection, a 100Ω resistor in series with VDD (Pin 1) of MH183 is recommended. You can also try the good old A3144 Hall-Effect sensor as a drop-in replacement. Keep note, Allegro’s A3144 is a discontinued product, but still available through some online sellers. One recommended substitution is A1104.

Okay, I’ll test my build (through a borrowed 3D printer) up over the weekend. Let’s see how well it works!

(Hall-Effect Sensor Endstop detects the proximity of a magnet – Courtesy https://toglefritz.com)

Leave a Comment X