Monday, December 19, 2011

Mosaic End Stops for X and Y Axis

On my old McWire printer it was some what of a ritual to do prints. Assuming the hot end was warmed up, the task of moving, cleaning and priming the nozzle, putting the extuder to the middle of the build plate and then locating the perfect height off the print bed. Afterwards, I mentally went through the checklist again to make sure I didn't miss a step.

minX End-Stop
My Mosaic came as a kit and was easy to build but I was basically going through the same ritual of cleaning priming and positioning with this as well. The only thing I didn't have to do is set the Z height because it had a minZ end-stop. But just that one end-stop made a huge difference in the pre-print routine. It took some fiddling to get the bed height just right using the end-stop but once it was working I felt like things were much easier.

This end-stop inspired me to put on the minX and minY end-stop . The switches for them were in the kit but there was no way to mount them so I went browsing on Thingiverse. I grabbed these Mosaic end-stops and printed both parts out. The minX was a friction fit that straddled the wall and held the switch. The only was to fine tune the switch was to move the braket. It took a few tries but I eventually I got it where I wanted.
Old Version of  minY End-Stop
The minY end-stop would not work. The high part of the bracket was hitting the leveling plate of the heated build platform. I figured if I could move the part of the bracket that held the switch it would work. So I fired up SCAD and did some modifications. I actually made two versions. A plain one and one to hold an LED if I wanted one in the future.
When I first tested them out I had gotten the minX and minY connectors mixed up and had to cut power to the motors because they wanted to keep driving past the ends of the axis. What I should have done, and eventually did, was to hold the switch down and see if the movement worked in the direction of that end-stop using short movements. When it would not go I knew that it was doing it's job.
New minY End-Stop Design

Configuring end-stop can get confusing because there is more than one way to set them up. Here is my printers current setup:


// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool ENDSTOPS_INVERTING = true; //set to true to invert the logic of the endstops

const bool min_software_endstops = false; //If true, axis won't move to coordinates less than zero.
const bool max_software_endstops = true;  //If true, axis won't move to coordinates greater than the defined lengths below.
const int X_MAX_LENGTH = 135;
const int Y_MAX_LENGTH = 135;
const int Z_MAX_LENGTH = 135;

 As can be seen in the code the end-stop are setup as inverting. That means they are active low. The signal is pulled up by RAMPS and when the end-stop is triggered, the switch pulls the signal down to ground. This means the only lines that need to be routed to the switch are the end-stop signal and ground. However I decided to +5V to the switch  as well encase I wanted to turn on an LED when the end-stop activates. For now though the S and  - are the only ones hooked up.

No comments: