How to home the machine using endstops?

Hi everyone.
im new to smoothie and cnc and it i know this is a stupid question but i don’t know how to tell my axis that when you trigger the endstop, define it as home. i enabled the endstops and test them using M119 command in pronterface. i actually read the community and the end-stops page but i don’t get it right.
can you guys help me pls?
best regards
here is my config.

endstops_enable                              true             # The endstop module is enabled by default and can be disabled here
#corexy_homing                               false            # Set to true if homing on a hbot or corexy
alpha_min_endstop                            1.24^            # Pin to read min endstop, add a ! to invert if endstop is NO connected to ground
alpha_max_endstop                            nc            # Pin to read max endstop, uncomment this and comment the above if using max endstops
alpha_homing_direction                       home_to_min      # Or set to home_to_max and set alpha_max and uncomment the alpha_max_endstop
alpha_min                                    0                # This gets loaded as the current position after homing when home_to_min is set
#alpha_max                                    20              # This gets loaded as the current position after homing when home_to_max is set
#beta_min_endstop                             1.26^            # Pin to read min endstop, add a ! to invert if endstop is NO connected to ground
#beta_max_endstop                            1.27^            # Pin to read max endstop, uncomment this and comment the above if using max endstops
#beta_homing_direction                        home_to_min      # Or set to home_to_max and set alpha_max and uncomment the alpha_max_endstop
#beta_min                                     0                # This gets loaded as the current position after homing when home_to_min is set
#beta_max                                     200              # This gets loaded as the current position after homing when home_to_max is set
#gamma_min_endstop                            1.28^            # Pin to read min endstop, add a ! to invert if endstop is NO connected to ground
#gamma_max_endstop                           1.29^            # Pin to read max endstop, uncomment this and comment the above if using max endstops
#gamma_homing_direction                       home_to_min      # Or set to home_to_max and set alpha_max and uncomment the alpha_max_endstop
#gamma_min                                    0                # This gets loaded as the current position after homing when home_to_min is set
#gamma_max                                    200              # This gets loaded as the current position after homing when home_to_max is set
# optional order in which axis will home, default is they all home at the same time,
# if this is set it will force each axis to home one at a time in the specified order
#homing_order                                 XYZ              # x axis followed by y then z last
#move_to_origin_after_home                    false            # move XY to 0,0 after homing

# optional enable limit switches, actions will stop if any enabled limit switch is triggered
#alpha_limit_enable                          false            # set to true to enable X min and max limit switches
#beta_limit_enable                           false            # set to true to enable Y min and max limit switches
#gamma_limit_enable                          false            # set to true to enable Z min and max limit switches

#alpha_fast_homing_rate_mm_s                  50               # feedrates in mm/second
#beta_fast_homing_rate_mm_s                   50               # "
#gamma_fast_homing_rate_mm_s                  4                # "
#alpha_slow_homing_rate_mm_s                  25               # "
#beta_slow_homing_rate_mm_s                   25               # "
#gamma_slow_homing_rate_mm_s                  2                # "

#alpha_homing_retract_mm                      5                # distance in mm
#beta_homing_retract_mm                       5                # "
#gamma_homing_retract_mm                      1                # "

#endstop_debounce_count                       100              # uncomment if you get noise on your endstops, default is 100

try uncommenting the following lines:

#alpha_limit_enable false # set to true to enable X min and max limit switches
#beta_limit_enable false # set to true to enable Y min and max limit switches
#gamma_limit_enable false # set to true to enable Z min and max limit switches

#alpha_fast_homing_rate_mm_s 50 # feedrates in mm/second
#beta_fast_homing_rate_mm_s 50 # "
#gamma_fast_homing_rate_mm_s 4 # "
#alpha_slow_homing_rate_mm_s 25 # "
#beta_slow_homing_rate_mm_s 25 # "
#gamma_slow_homing_rate_mm_s 2 # "

#alpha_homing_retract_mm 5 # distance in mm
#beta_homing_retract_mm 5 # "
#gamma_homing_retract_mm 1 # "
I would also uncomment the lines for beta and gamma above those. see if that works. BTW “uncommenting” is removing the hashtag at the beginning. When its there the machine ignores that line :slight_smile:

many tnx my dear Domm. i check and report
best regards :slight_smile:

i do uncomment that lines but no joy. can you tell me step by step how to do homing using x-min endstop pls?
tnx

so when you run the home function does it move to the endstops? does it stop? what kind of endstops are they, and what are they hooked up as(normally open or normally closed)? also post a copy of your entire config.txt so I can see the other settings, that might help. Oh and homing is normally done with a G32 or G32.1 command.

ok. here is my full config:

# NOTE Lines must not exceed 132 characters
## Robot module configurations : general handling of movement G-codes and slicing into moves
default_feed_rate                            200             # Default rate ( mm/minute ) for G1/G2/G3 moves
default_seek_rate                            200             # Default rate ( mm/minute ) for G0 moves
mm_per_arc_segment                           0.5              # Arcs are cut into segments ( lines ), this is the length for
                                                              # these segments.  Smaller values mean more resolution,
                                                              # higher values mean faster computation
mm_per_line_segment                          1                # Lines can be cut into segments ( not usefull with cartesian
                                                              # coordinates robots ).

# Arm solution configuration : Cartesian robot. Translates mm positions into stepper positions
alpha_steps_per_mm                           1280               # Steps per mm for alpha stepper
beta_steps_per_mm                            1280               # Steps per mm for beta stepper
gamma_steps_per_mm                           6400               # Steps per mm for gamma stepper

# Planner module configuration : Look-ahead and acceleration configuration
planner_queue_size                           32               # DO NOT CHANGE THIS UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING
acceleration                                 50               # Acceleration in mm/second/second.
#z_acceleration                              2              # Acceleration for Z only moves in mm/s^2, 0 uses acceleration which is the default. DO NOT SET ON A DELTA
acceleration_ticks_per_second                1000             # Number of times per second the speed is updated
junction_deviation                           0.05             # Similar to the old "max_jerk", in millimeters,
                                                              # see https://github.com/grbl/grbl/blob/master/planner.c
                                                              # and https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.8
                                                              # Lower values mean being more careful, higher values means being
                                                              # faster and have more jerk
#z_junction_deviation                        0.0              # for Z only moves, -1 uses junction_deviation, zero disables junction_deviation on z moves DO NOT SET ON A DELTA
#minimum_planner_speed                       0.0              # sets the minimum planner speed in mm/sec

# Stepper module configuration
microseconds_per_step_pulse                  1                # Duration of step pulses to stepper drivers, in microseconds
base_stepping_frequency                      200000           # Base frequency for stepping

# Cartesian axis speed limits
x_axis_max_speed                             30000            # mm/min
y_axis_max_speed                             30000            # mm/min
z_axis_max_speed                             30000            # mm/min

# Stepper module pins ( ports, and pin numbers, appending "!" to the number will invert a pin )
alpha_step_pin                               2.0o!              # Pin for alpha stepper step signal
alpha_dir_pin                                0.5o!              # Pin for alpha stepper direction
alpha_en_pin                                 0.4o!              # Pin for alpha enable pin
alpha_current                                3.0              # X stepper motor current
alpha_max_rate                               30000.0          # mm/min

beta_step_pin                                2.1              # Pin for beta stepper step signal
beta_dir_pin                                 0.11             # Pin for beta stepper direction
beta_en_pin                                  0.10             # Pin for beta enable
beta_current                                 1.5              # Y stepper motor current
beta_max_rate                                30000.0          # mm/min

gamma_step_pin                               2.2              # Pin for gamma stepper step signal
gamma_dir_pin                                0.20             # Pin for gamma stepper direction
gamma_en_pin                                 0.19             # Pin for gamma enable
gamma_current                                1.5              # Z stepper motor current
gamma_max_rate                               30000.0            # mm/min

## System configuration
# Serial communications configuration ( baud rate defaults to 9600 if undefined )
uart0.baud_rate                              115200           # Baud rate for the default hardware serial port
second_usb_serial_enable                     false            # This enables a second usb serial port (to have both pronterface

## On boot G-code Preparation
#on_boot_gcode                                /sd/onboot.txt
#on_boot_gcode_enable                         true



                                                              # and a terminal connected)
#leds_disable                                true             # disable using leds after config loaded
#play_led_disable                            true             # disable the play led

# Kill button (used to be called pause) maybe assigned to a different pin, set to the onboard pin by default
kill_button_enable                           true             # set to true to enable a kill button
kill_button_pin                              2.12             # kill button pin. default is same as pause button 2.12 (2.11 is another good choice)

#msd_disable                                 false            # disable the MSD (USB SDCARD) when set to true (needs special binary)
#dfu_enable                                  false            # for linux developers, set to true to enable DFU
#watchdog_timeout                            10               # watchdog timeout in seconds, default is 10, set to 0 to disable the watchdog

# Only needed on a smoothieboard
currentcontrol_module_enable                 true             #

#delta_current                                1.5              # First extruder stepper motor current


##preparing drain glue pump
switch.misc1.enable                           true             # Drain glue
switch.misc1.input_on_command                 M40              # sending this command will enable the drain pump
switch.misc1.input_off_command                M41              # sending this command will disable the drain pump
switch.misc1.output_pin                       2.4              # small mosfet Q8 output
switch.misc1.output_type                      digital          # just an on or off pin

##preparing injection pump
switch.misc2.enable                           true             # Injection
switch.misc2.input_on_command                 M42              # sending this command will cause syringe inject the glue
switch.misc2.input_off_command                M43              # sending this command will stop syringe inject
switch.misc2.output_pin                       2.6              # small mosfet Q9 output
switch.misc2.output_type                      digital          # just an on or off pin

##preparing two state jack / lowering part
switch.misc3.enable                           true             # Lower Jack
switch.misc3.input_on_command                 M44              # sending this command will lower the jack
switch.misc3.input_off_command                M45              # sending this command will disable lowering the jack
switch.misc3.output_pin                       2.5              # big mosfet Q6 output
switch.misc3.output_type                      digital          # just an on or off pin

##preparing two state jack / uplift part
switch.misc4.enable                           true             # Uplift Jack
switch.misc4.input_on_command                 M46              # sending this command will uplift jack
switch.misc4.input_off_command                M47              # sending this command will disable uplift jack
switch.misc4.output_pin                       2.7              # big mosfet Q7 output
switch.misc4.output_type                      digital          # just an on or off pin

##preparing a start button for execute main program
switch.misc5.enable                           true             # do you want to enable this module for connecting a push_button to it? yes i do
switch.misc5.input_pin                        2.11             # my push_button connected to this pin
switch.misc5.input_pin_behavior               momentary        # execute program till i pressed the button
switch.misc5.output_on_command                M32_main.txt     # execute main gcode directly by grounding pin 2.11

##preparing abort button
#switch.misc6.enable                  true                        # enable this module
#switch.misc6.input_pin               3.25                        # connect abort button to this pin
#switch.misc6.pin_behavior            momentary                   # abort the operation when i push the button
#switch.misc6.output_on_command       M26                         # execute this command when i press the button


##preparing suspend/resume button
switch.pause.enable                true                     # Enable this module
switch.pause.input_pin             3.26                     # Pin where pause button is connected
switch.pause.output_on_command     M600                     # Suspend command
switch.pause.output_off_command    M601                     # Resume command
switch.pause.input_pin_behavior    momentary                   # This pin toggles between it's on and off states each time it is pressed and released

#after_suspend_gcode                  M47_M44_M43                      # Gcode to run after suspend, retract then get head out of way
#before_resume_gcode                  M46_M45                          # Gcode to run after temp is reached but before resume - do a prime

after_suspend_gcode                  Z10                      # Gcode to run after suspend, retract then get head out of way
before_resume_gcode                  Z0                       # Gcode to run after temp is reached but before resume - do a prime 

## Endstops
# See http://smoothieware.org/endstops
endstops_enable                              true             # The endstop module is enabled by default and can be disabled here
#corexy_homing                               false            # Set to true if homing on a hbot or corexy
alpha_min_endstop                            1.24^            # Pin to read min endstop, add a ! to invert if endstop is NO connected to ground
alpha_max_endstop                            nc            # Pin to read max endstop, uncomment this and comment the above if using max endstops
alpha_homing_direction                       home_to_min      # Or set to home_to_max and set alpha_max and uncomment the alpha_max_endstop
alpha_min                                    0                # This gets loaded as the current position after homing when home_to_min is set
#alpha_max                                    20              # This gets loaded as the current position after homing when home_to_max is set
#beta_min_endstop                             1.26^            # Pin to read min endstop, add a ! to invert if endstop is NO connected to ground
#beta_max_endstop                            1.27^            # Pin to read max endstop, uncomment this and comment the above if using max endstops
#beta_homing_direction                        home_to_min      # Or set to home_to_max and set alpha_max and uncomment the alpha_max_endstop
#beta_min                                     0                # This gets loaded as the current position after homing when home_to_min is set
#beta_max                                     200              # This gets loaded as the current position after homing when home_to_max is set
#gamma_min_endstop                            1.28^            # Pin to read min endstop, add a ! to invert if endstop is NO connected to ground
#gamma_max_endstop                           1.29^            # Pin to read max endstop, uncomment this and comment the above if using max endstops
#gamma_homing_direction                       home_to_min      # Or set to home_to_max and set alpha_max and uncomment the alpha_max_endstop
#gamma_min                                    0                # This gets loaded as the current position after homing when home_to_min is set
#gamma_max                                    200              # This gets loaded as the current position after homing when home_to_max is set
# optional order in which axis will home, default is they all home at the same time,
# if this is set it will force each axis to home one at a time in the specified order
#homing_order                                 XYZ              # x axis followed by y then z last
#move_to_origin_after_home                    false            # move XY to 0,0 after homing

# optional enable limit switches, actions will stop if any enabled limit switch is triggered
alpha_limit_enable                          false            # set to true to enable X min and max limit switches
beta_limit_enable                           false            # set to true to enable Y min and max limit switches
gamma_limit_enable                          false            # set to true to enable Z min and max limit switches

alpha_fast_homing_rate_mm_s                  50               # feedrates in mm/second
beta_fast_homing_rate_mm_s                   50               # "
gamma_fast_homing_rate_mm_s                  4                # "
alpha_slow_homing_rate_mm_s                  25               # "
beta_slow_homing_rate_mm_s                   25               # "
gamma_slow_homing_rate_mm_s                  2                # "

alpha_homing_retract_mm                      5                # distance in mm
beta_homing_retract_mm                       5                # "
gamma_homing_retract_mm                      1                # "

endstop_debounce_count                       100              # uncomment if you get noise on your endstops, default is 100

## Z-probe
zprobe.enable                                false           # set to true to enable a zprobe
zprobe.probe_pin                             1.28!^          # pin probe is attached to if NC remove the !
zprobe.slow_feedrate                         5               # mm/sec probe feed rate
#zprobe.debounce_count                       100             # set if noisy
zprobe.fast_feedrate                         100             # move feedrate mm/sec
zprobe.probe_height                          5               # how much above bed to start probe
#gamma_min_endstop                           nc              # normally 1.28. Change to nc to prevent conflict,

# associated with zprobe the leveling strategy to use
#leveling-strategy.three-point-leveling.enable         true        # a leveling strategy that probes three points to define a plane and keeps the Z parallel to that plane
#leveling-strategy.three-point-leveling.point1         100.0,0.0   # the first probe point (x,y) optional may be defined with M557
#leveling-strategy.three-point-leveling.point2         200.0,200.0 # the second probe point (x,y)
#leveling-strategy.three-point-leveling.point3         0.0,200.0   # the third probe point (x,y)
#leveling-strategy.three-point-leveling.home_first     true        # home the XY axis before probing
#leveling-strategy.three-point-leveling.tolerance      0.03        # the probe tolerance in mm, anything less that this will be ignored, default is 0.03mm
#leveling-strategy.three-point-leveling.probe_offsets  0,0,0       # the probe offsets from nozzle, must be x,y,z, default is no offset
#leveling-strategy.three-point-leveling.save_plane     false       # set to true to allow the bed plane to be saved with M500 default is false

## Panel
#panel.enable                                 false             # set to true to enable the panel code

# Example for reprap discount GLCD
# on glcd EXP1 is to left and EXP2 is to right, pin 1 is bottom left, pin 2 is top left etc.
# +5v is EXP1 pin 10, Gnd is EXP1 pin 9
#panel.lcd                                   reprap_discount_glcd     #
#panel.spi_channel                           0                 # spi channel to use  ; GLCD EXP1 Pins 3,5 (MOSI, SCLK)
#panel.spi_cs_pin                            0.16              # spi chip select     ; GLCD EXP1 Pin 4
#panel.encoder_a_pin                         3.25!^            # encoder pin         ; GLCD EXP2 Pin 3
#panel.encoder_b_pin                         3.26!^            # encoder pin         ; GLCD EXP2 Pin 5
#panel.click_button_pin                      1.30!^            # click button        ; GLCD EXP1 Pin 2
#panel.buzz_pin                              1.31              # pin for buzzer      ; GLCD EXP1 Pin 1
#panel.back_button_pin                       2.11!^            # back button         ; GLCD EXP2 Pin 8

# pins used with other panels
#panel.up_button_pin                         0.1!              # up button if used
#panel.down_button_pin                       0.0!              # down button if used
#panel.click_button_pin                      0.18!             # click button if used

#panel.menu_offset                            0                 # some panels will need 1 here

#panel.alpha_jog_feedrate                     6000              # x jogging feedrate in mm/min
#panel.beta_jog_feedrate                      6000              # y jogging feedrate in mm/min
#panel.gamma_jog_feedrate                     200               # z jogging feedrate in mm/min

#panel.hotend_temperature                     185               # temp to set hotend when preheat is selected
#panel.bed_temperature                        60                # temp to set bed when preheat is selected

## Custom menus : Example of a custom menu entry, which will show up in the Custom entry.
# NOTE _ gets converted to space in the menu and commands, | is used to separate multiple commands
#custom_menu.power_on.enable                true              #
#custom_menu.power_on.name                  Power_on          #
#custom_menu.power_on.command               M80               #

#custom_menu.power_off.enable               true              #
#custom_menu.power_off.name                 Power_off         #
#custom_menu.power_off.command              M81               #


## Network settings
#network.enable                               false            # enable the ethernet network services
#network.webserver.enable                     true             # enable the webserver
#network.telnet.enable                        true             # enable the telnet server
#network.ip_address                           auto             # use dhcp to get ip address
# uncomment the 3 below to manually setup ip address
#network.ip_address                           192.168.3.222    # the IP address
#network.ip_mask                              255.255.255.0    # the ip mask
#network.ip_gateway                           192.168.3.1      # the gateway address
#network.mac_override                         xx.xx.xx.xx.xx.xx  # override the mac address, only do this if you have a conflict

i use the pusg button between GND and SIGNAL pin of X-min and push that by hand because i still couldn’t install it on my X axes. when i click on X home icon on pronterface software and it going to move after a sec i push that button to simulate home for smoothie but it didn’t stop or didn’t any react to show me that is set the home

and also i tried to build a 3 axe CNC machine with smoothie that i still set configuration for only X axis and when it’s done, i will go to set other parameters for other axes.

sorry dear domm, is there a way for us to communicate together quicker than this forum?
do you have insta account or something?

I would try removing the “^” from the alpha_min_endstop and try that, also try changing it to a “!” to invert it. The ideal way of hooking up endstops is NC connected to ground so if a wire breaks then it triggers a stop. And change alpha_limit_enable to true to enable it, same with beta and gamma to enable those axes. I don’t usually use messengers stuff and im watching my newborn but i check these forums almost constantly. I will help as I can with my limited knowledge of smoothie(i have a 4xc in my laser cutter)

tnx a lot dear domm. as i say before, i use pushbutton as a end-stop and push it by hand to simulate pressed end-stop for the smoothie and of course when i push it, the signal will connect to ground and m119 return me a 1.24 = 0
looks like i don’t know much info about CNC but i tried to figure out what i must do in smoothieware.org.
in this case i still couldn’t reach my purpose and use end stops to define home for smoothie.

if i enable the alpha_limit_enable parameter, it define a end-stop as limit switch and when this switch pressed, it halt the system. i don’t want to halt system. i want to define a home every time i turn the machine on using end-stops

ok with m199 does it return a 0 when pressed AND when not pressed? or unpressed is it a 1? I have limit enable on but I can also home and the homing itself wont halt the system, but if the head hits during a job when it shouldn’t be there it would.

exactly. when i press the button it return 0 and when i release it return 1.

ok then it probably needs inverting. try changing the alpha_min_endstop to “1.24!” instead. that should invert the pin. then test if the 0 and 1 are reversed. if that doesnt work try “1.24^!”. dont include the quotes of course :slight_smile:

many tnx dear domm. i will test and reply the result.
:slight_smile:

dear domm. sorry but i test it and it worked but as i say it halt the system.

k try again with limit disabled.

sorry. nothing happend. i press the X home icon in pronterface and after a seconds the axe start to moving, i press the button and nothing happend.

then im at a loss, sorry i couldn’t help :confused: