element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Nate Chapman's Blog 3D Printer called "Buzz Lightyear" Part 2 Marlin Firmware Mechanical Endstops (Ramps)
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Nate1616
  • Date Created: 5 Feb 2014 7:23 PM Date Created
  • Views 1508 views
  • Likes 0 likes
  • Comments 6 comments
  • 3d
  • printing
Related
Recommended

3D Printer called "Buzz Lightyear" Part 2 Marlin Firmware Mechanical Endstops (Ramps)

Nate1616
Nate1616
5 Feb 2014

I was asked to help get a Cartesian style printer up and running and noticed that the Marlin Firmware was not set correctly for the Mechanical endstop configuration the users had selected.  This doesn't really fit into my printer setup but thought I would talk and explain how to setup the firmware for use with a mechanical endstop.  Lets first discuss if its better to use NO or NC on the endstop.  The answer is NC.  This will prevent the issue of crashing the platform into the endstop if something comes undone.  The wiring configuration will look like this:

1 = com = wire to signal on your electronics

2 = normally closed (NC) = wire to ground on your electronics

3 = normally open = not required

image

Note that most Cartesian style printers have the endstops connected to the min pins on the board.  It is best to disable the max if not used by going into the pins.h file and setting them to -1.

image

Once hookup is complete the Marlin firmware will need updating.   Open the Configuration.h file and scroll down to the line

 

#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors.

 

Note that this should NOT be commented out as the pullups need to be supplied by the Ramps board.  Now scroll down and little further to the lines:

 

bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.

bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.

bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.

bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.

bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.

bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.

 

Make sure that the min endstops are set to false.  This is because when the axis hits the switch a digital 1 will be read so no inverting is needed.  Don't worry about max as you disabled them above.  The last thing to mention is, if you hit home and you notice that the printer is moving the wrong direction check the lines:

 

#define X_HOME_DIR -1

#define Y_HOME_DIR -1

#define Z_HOME_DIR -1

Setting these to -1 will have the bed home left, back and extruder carriage down.  This would be looking at the front of the printer.  I started to add a lot of comments to a standard version of Marlin that I hope will help users get up and printing.  Here is a sample

image

Does anyone find adding detailed comments to Marlin above useful?  If so when its finished I will post it for everyone to download.

 

Nate

  • Sign in to reply

Top Comments

  • DAB
    DAB over 12 years ago +1
    Hi Nate, I came in to this post a little late. I think you are saying that you want your printer to always begin at the stops so that nothing bad happens on powerup? I agree that you should always leave…
  • DAB
    DAB over 12 years ago in reply to Nate1616 +1
    Hi Nate, Now I see it and I agree. If you go with a ground position, then you will not detect a loose or undone cable. Using a high as the default ensures you have connected limit switches when you start…
  • DAB
    DAB over 12 years ago in reply to Nate1616 +1
    Thanks for the clarification. DAB
  • DAB
    DAB over 12 years ago

    Hi Nate,

     

    I came in to this post a little late.

    I think you are saying that you want your printer to always begin at the stops so that nothing bad happens on powerup?

    I agree that you should always leave the system at some initial position before you begin operation.

    It is an easy check to make with the Boolean input from the limit switches and lets you enter the normal operation mode in safety.

     

    Thanks

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube