It's essentially just a switch
End-stops are small interrupters that you put at the end of each of your axes. When you boot your machine up, Smoothie has no way of knowing the position of each axis. When it starts a print, Smoothie moves the axis until it touches that interrupter, and when it is hit, it declares that that is position 0 for that axis. And does so for all axes.
This allows Smoothie to then precisely know where everything is relative to that initial position. It is quite convenient as it saves you the hassle of actually moving the machine into that position when you want to start a print. Automation is great.
However, end-stops are not necessary, you could do without them. They are just so convenient that most machines use them.
End-stops can also be used as Limit Switches which prevent the machine from attempting to move beyond the physical limits of the axis (by pausing/stopping movement when triggered), see the Endstops page for details about configuring Smoothie to use End Stops as limit switches.
NoteSmoothie does not allow you to use a zprobe as an endstop. An endstops must be dedicated to being an endstop and cannot be used as a zprobe and vice versa.
Endstop inputs on a Smoothieboard v1
There are 6 of them, two for each axis
Mechanical endstop wiring
This will concentrate on the most common type of end-stops : the mechanical ones. Other types exist like optical or hall-o sensors.
Fancy SmancyThere are plenty of fun and futuristic endstop types around : optical, laser, magnetic, force-sensitive, infrared, inductive, etc…
However, please note that the general feedback from the community, is that most of those are either less precise, less repeatable, or much more difficult to get to “work right”, compared to the classical “mechanical” endstop.
The mechanical endstop is actually likely the most precise, repeatable and easy to get to work option you have at your disposal. Just because these other options exist and have been explored by the community, does not mean they are better.
You might happen have a good reason to use a fancy endstop, but if you don't, it's likely a good idea to stick with a mechanical one.
Mechanical end-stops are simple interrupters : when not pressed, they do not let the current pass, when pressed, they let the current pass. By connecting a digital input pin on the Smoothieboard to the interrupter, and connecting the other side of the interrupter to Ground, the Smoothieboard can read whether or not it is connected to Ground, and therefore whether or not the end-stop is pressed.
Most mechanical end-stops have 3 connection points, to which you have to attach your wires :
- C : Common
- NO : Normally Open, meaning it is not connected to C when the interrupter is not pressed, and connected to C when the interrupter is pressed.
- NC : Normally Closed, meaning it is connected to C when the interrupter is not pressed, and connected not to C when the interrupter is pressed.
Wiring a basic NC endstop
You want to connect the **Signal** ( green in the schematic ) and **Ground** ( blue in the schematic ) pins for the end-stop on the Smoothieboard, to the **C** and **NC** connection points on the end-stop.
Normally ClosedFor each endstop, we connect C to Signal and NC to Ground because this means the digital input pin ( endstop connector ) will be connected to Ground in it's normal state and cut from Ground when the button is pressed. This approach is less prone to noise than the reverse. See here for more information.
Another positive effect of this approach is, that if a wire breaks for some reason you get the same signal as if the endstop is pressed. That makes sure that even with a damaged wire you are not able to overrun the endstop.
Order is not important as polarity is not important here.
Don't!Make absolutely sure that you do not connect VCC ( red ) and GND ( blue ) to a mechanical (microswitch) endstop! Depending on your wiring that may fries your smoothieboard instantly or when the switch gets pressed. There is a wiring where this not happens and you switch the signal between VCC and GND, but if you're not careful enough you damage your board.
You want to connect your X end-stop to the X min pins, Y end-stop to the Y min pins, and Z end-stop to the Z min pins.
Powered endstops wiring
Mechanical endstops are simple switches, they simply let a signal pass through, or not, allowing us to detect their status with an endstop input. It has no intelligence of it's own.
There are more sophisticated endstops. Those are “powered endstops”, for example : Hall-O ( magnetic ) or optical endstops.
The only difference between a mechanical endstop and those powered endstops is that they require being provided with 5V power.
This means that where for a mechanical endstop you connect the Signal and GND pins, for a powered endstop, you connect the Signal, GND and 5V pins.
Other than this, it works exactly the same as a mechanical endstop : The Signal pin receives something different depending on whether the endstop is triggered or not.
Different powered endstops have different behaviors :
Some connect Signal to Ground when triggered, and Signal to 5V when not triggered.
Others connect Signal to 5V when triggered, and Signal to Ground when not triggered.
To know exactly what your endstop does, see it's documentation.
If once wired, your endstop reports the opposite of what it should via the M119 command ( 1 when not triggered, and 0 when triggered ), see the “Testing” section.
Some endstops might require removing their “pull-up” configuration, in this case, change :Â
And if you need it to be a pull-down, change it to
In some very rare cases, the endstop reading circuit on the Smoothieboard will not be adequate for your endstop type. In this case, you should use a “free” GPIOÂ pin on the Smoothieboard that nothing else uses to connect your endstop to.
See Pinout to find adequate pins.
The default configuration most probably already has everything you need : the pins are already correct and the default speeds are reasonable.
Once they are wired, you can test your end-stops.
Now connect to your Smoothieboard over the serial interface. Power your machine on by plugging the PSU into the wall.
Now in Pronterface, home one axis by clicking the small “home” icon for that axis. Begin with X, then Y, then Z.
If your axis moves until it hits the end-stop, then stops when it hits it, moves a small distance back, then goes a bit slower back to the end-stop and stops, that end-stop is working fine.
On the other hand, if the axis moves a small distance in the wrong direction, then stops, you have a problem : your Smoothieboard always reads the end-stop as being pressed. So when you ask it to move until the end-stop is hit, it reads it immediately as pressed and stops there.
Another problem can be that the axis moves and never stops, even after the end-stop is physically hit. This means your Smoothieboard actually never reads the end-stop as being pressed.
There is a command that allows you to debug this kind of situation : in Pronterface, enter the “M119” G-code.
Smoothie will answer with the status of each endstop like this :
X min:1 Y min:0 Z min:0
This means : X endstop is pressed, Y and Z endstops are not pressed.
Use a combination of this command, and manually pressing end-stop, to determine what is going on.
If an end-stop is read as always pressed, or never pressed, even when you press or release it, then you probably have a wiring problem, check everything.
If an endstop is read as pressed when it is not, and not pressed when it is, then your end-stop is inverted.
You can fix that situation by inverting the digital input pin in your configuration file. For example if your X min endstop pin is inverted, change :
Here is the exact mapping of pin names to inputs on the Smoothieboard :
|Endstop||X MIN||X MAX||Y MIN||Y MAX||Z MIN||Z MAX|
More information can be found here. http://smoothieware.org/endstops
The config settings for Endstops are as follows :
|~ Option||~ Example value||~ Explanation|
You can use the M119 command to show the status of the configured endstops.
M119 answers this way :Â
min_x:0 min_y:0 min_z:0 max_x:0 max_y:0 max_z:0 ok
If an endstop is not connected the pin should be set to Â«ncÂ» ( meaning “not connected” ), and it's value will not be reported.
This is in particular useful when setting up your machine : you can issue the M119 command with your endstops unpressed, check that the values are 0 ( which would be correct ), and issue the command again with your endstops pressed, check that the values are all 1 ( which is correct for pressed endstops ).
If an endstop always reports 0, it probably means that it is not wired correctly.
If an endstop's values are inverted, it probably means you wired the pin as NO when it is NC, or the opposite.
You can reverse a pin in the configuration file by adding or removing a Â«!Â» character after the pin number ( see Pin Configuration ).
For example if the beta min endstop is inverted in your diagnostics, change :
InvertedIf, when homing, your endstop moves a few millimeters, and stops, it most probably means it's inverted ( it thinks it's already hitting the endstop, and moves back from it ). Just invert it in config and see if that helps.
You use the G28 command to home your machine.
For example :Â
will home the Z axis.
will home all axes which have endstops enabled (all three by default).
CNC mode/GRBL modeThe firmware-cnc.bin is in CNC mode and by default uses grbl compatibility mode in this mode G28 does not home, it goes to a predefined park position (defined with G28.1). To home in CNC/GRBL mode you issue $H, (or G28.2).
NotesCurrently only min or max endstops can be used for homing.
Do not set endstops for axes that shall not be homed.
Note for Deltas using M666 to set soft trimWhen you home a delta that has non zero trim values, you will find that X and Y are not 0 after homing. This is normal.
If you want X0 Y0 after homing yo can set ```move_to_origin_after_home true``` in the config, this will move the effector to 0,0 after it homes and sets the trim. However note this may crash into your endstops, so make sure you enable limit switches, as this will force the carriages off the endstops after homing but before moving to 0,0.
Endstops may be configured to act as limit switches, during normal operations if any enabled limit switch is triggered the system will halt and all operations will stop, it will send a !! command to the host to stop it sending any more data (a recent dev octoprint and recent Pronterface support this).
A reset will be required to continue, or sending M999, make sure you move away from the endstop though before trying to move.
To enable enstops as limit switches the following config options can be used, they are disabled by default.
alpha_limit_enable true # set to true to enable X min and max limit switches beta_limit_enable true # set to true to enable Y min and max limit switches gamma_limit_enable true # set to true to enable Z min and max limit switches
When one axis is enabled both min and max endstops will be enabled as limit switches, setting an endstop pin to nc will disable it.
RetractAfter homing the axis is usually left triggering the endstop, this would prevent that axis from moving, so when limit switches are enabled after homing the axis will back off the endstop by the *.homing_retract_mm amount.
The downside is if you home to 0 and at 0 the endstop is triggered going to 0,0 will cause a limit switch to fire. The workaround is to set homing offset to -5 or enough to back off the endstop so when you go to 0,0 it does not trigger the endstop.
That way you can home, and safely go to 0 without triggering a limit switch event. An alternativve is to set min/max X/Y to -5 rather than 0.
Boards with few endstopsOn some boards you have only 3 endstop connectors, which is not enough to have one connector for each end of each axis, but you can still connect two endstops for each end of each axis by connecting the two endstops on a single connector :
- In series and each connected as normally-closed
- Or in parallel and each connected as normally-open
This will allow for min and max limit switches to still work.
Usage example with home offsets
Here is a common sequence that you may do to set bed height, this need not be repeated unless the bed changes.
; Home G28 ; move to 5mm above bed G0 Z5 ; then manually jog down until nozzle is on bed or just traps a sheet of thin paper ; sets the Z homing offset based on current position M306 Z0 G28 G0 Z0 ; check nozzle still captures thin sheet of paper M500 ; saves the results in EEPROM equivalent
Changing the origin
The homing position, or origin, is the 0,0 position relative to which the machine moves.
On a delta, the homing position (origin) is automatically the center of the bed.
On a cartesian, however, the homing position (origin) is the point at which the end stops are hit, generally a corner of the machine.
You might want to have a different origin point though.
For example, if your XÂ axis is homing to the max endstop, and that endstop is 200mm away from the machine origin, you can make sure the machine knows where that endstop is relative to your origin point by setting :
If your XÂ axis is homing to the min endstop, your work area is 200mm wide, and you want the origin point to be the center of the work area, you can set the origin point to the center of the work area by doing :
General video about mechanical endstops