Hi Everyone
I need to update my MPCNC, I want to add endstop switch to help stepper motor and belt to protect from damage over running without limit.
I want to know how many endstop switch do I need to add for MPCNC, 3 or 5 switchs?
Regard
Chris
Hi Everyone
I need to update my MPCNC, I want to add endstop switch to help stepper motor and belt to protect from damage over running without limit.
I want to know how many endstop switch do I need to add for MPCNC, 3 or 5 switchs?
Regard
Chris
Hi,
Iâm interested in this also, Iâve got a bigtreetech 1.1 pro board updated firmware for dual end-stops so do I need to fit six?
Matt
Typically endstops are used for squaring the machine and to a lesser extent getting back to a known position between runs. They donât protect the machine and in fact using negative values after homing against the endstops can wipe out the endstops or the endstop brackets. The typical setup is four switchesâŚtwo for X and two for Y. The steppers are rewired so that they are driven independently. A fifth endstop plugin in the control board can be used for a touch probe.
I think I should get 5 switches, 2 switches for X, another 2 switches for Y, and another one switch for Z.
my CNC shields V3 have X,Y,Z pins for endstop switches so can two switches wiring together plug in single X pins?
From what I know, this can be done, but it will require you to change a setting in the firmware. The dual endstop firmware Ryan maintains expects the switches to be normally closed. This configuration is safer with respect to damaging the endstops or the endstop brackets. When the endstop switches are wired normally open, if a wire gets knocked off of a endstop, homing will continue past the endstop. If wired normally closed, homing will just stop one stepper. So in order to wire two switches to the same endstop, you will have to wire the switches as normally open and then change a setting in the firmware to expect the switch(es) in this configuration. Also two switches to the same endstop defeats a main purpose of having endstops (squaring the machine)âŚat least a main purpose for me.
I was curious about the CNC Shield and found that you only have 3 endstop pins total. According to other posts on this forum, it is not possible to wire the typical endstop setup with a CNC ShieldâŚthere is just not enough pins on the Arduino board. I also found at least one reference to someone using endstops in other ways, so you might do some searching and reading in the forum with the terms âendstopsâ, âend stopsâ and âCNC Shieldâ.
I have four end switches, one for each of the X axis and Y axis. I also have wired up a touch plate to the Z min socket on my SKR motherboard. Technicallyl four end switches and five connections.
I thought that the end switches need to be wired separately as Marlin works out each end stop for ech part of the Axis. I could be wrong through.
Rob
I found link https://cobcnc.com/adding-limit-switches/ 5 switches can connection into CNC shields V3
The specification I read for a one version of the CNC Shield described the end stops as:
2 x End stops for each axis (6 in total - each axis pair shared by the same IO pin)
Since the shield only uses one pin on the Arduino for each pair, the switches must be wired as normally open, the pin will trigger when either switch is triggered, and this configuration cannot be used to drive pairs of stepper motors independently. It could be used to create a zero point to find positions repeatedlyâŚlike if you wanted a center position relative to some fixture to make multiple items. Or if had a multi-day run and needed to find the zero position again after the electronics were turned off.
Running over the limit will ruin your coordinates, and it sounds like crunching gears, but it is all electrical and nothing is wearing out. You wonât hurt the machine that way. But it is unpleasant.
So the noise I hear is not the pulley slipping against the belt? Good to know. I cringe each time I heard this sound.
The motor has 4 steps, ABCD, it goes from A to B⌠If you skip a step, its because you go from A to B to C to D and then instead of going to the next A, you go to the previous A. It goes those 4 steps really fast, and in the wrong direction so it sounds like crunchy gears, but it is really just popping back 4 steps.
Iâve just recently got my Burly running, using the CNC Shield v3.00 with grbl and Iâm currently working on getting endstops working reliably. @CVG doesnât mention what firmware theyâre using, and that is a big element in getting good advice since there are a lot of viable options depending on the particular situation.
Unlike Marlin (which is the basis for @vicious1âs dual endstop firmware), grbl firmware does support âhardâ limits ($21=1) that stop motion and put the machine in an alert state if any limit switch gets tripped. In its default configuration, Marlin ignores endstops except during homing.
Given that the CNC shield canât support 5 drivers, the option of dual endstop auto-squaring is off the table (pardon the pun). You can do 2 switches per axis, but the min and max stops for each axis share a single Arduino pin. You can either do 2 normally open (NO) switches in parallel (one on each CNC shield pin), or 2 normally closed (NC) switches wired in series on a single CNC shield endstop pin. There are firmware adjustments needed for this to work properly, and the grbl config.h comments actually recommend against using 2 stops per axis. Iâll let you read why in the comments and you can decide which way you want to go.
The grbl firmware does support dual endstops and auto-squaring. It is a hardware limitation of the CNC shield and Arduino Uno, that limits it to 4 stepper drivers (3 ârealâ axes and 1 cloned driver).
If youâre running grbl, you should be able to achieve the goal of not running into the mechanical limits of the machine with a combination of 1 endstop per axis and enabling both hard ($21=1) and soft limits ($20=1). Youâll need to program the max travel ($130, $131, $132 for X, Y, and Z respectively) for soft limits to be effective. Thatâs the route Iâm taking. This also gives you the option of wiring the switch as NO or NC.
The grbl defaults expect NO switches and homing to the positive ends of each axis (Z up, X right, Y to the rear of the table), but these can be adjusted with configuration settings ($5 to invert limit pins, $23 to change homing direction) that are stored in eeprom. Iâm starting with the defaults, as that means the gantry will move out of the way for installing work pieces. The CNC shield and grbl also support a tool probe separate from the Z limit switch, which Iâve also got wired in. Now I just need to find a place on the Z axis to put the switch to trigger at Z max.
What Iâm finding is that my endstops and probe connections are very noisy, so theyâre showing a lot of false triggers. This could be because Iâm using a single 6-conductor cable for both motor and endstop conductors, or because Iâve got all the control circuitry shoe-horned into an enclosure thatâs big enough to hold it all, but just barely. If youâre running separate wires to your switches you may not have this problem. Iâm hoping to get the noise filtered out by connecting a capacitor between the limit switch signal line and a separate ground connection back at the board, but I had to order caps and am waiting for them to arrive.
The good news is that endstops are completely optional. Iâm continuing to use the machine and tune other elements of my workflow while waiting on the parts.
I wish you good luck. Let us know how it goes for you.
(edited to clarify NO vs NC wiring options)
A lot of great information here @ttraband. Iâm confused about wiring the switches as normally closed (NC). This means that both switches need to be triggered before the end stop pin is triggered. Wonât work for min/max, and will cause the first stepper to drive against the end stop until the second switch is flipped in a min/min configuration.
The opposite. If either one opens, it will trigger.
How are they wired? You might have more luck with a smaller pullup resistor. Since the triggering is voltage, a floating wire will pick up emi and report a change in voltage with very little current. But if you put a 1kOhm resistor to 5V, it will sink that noise right away, and still be able to be pulled to ground when the switch closes.
Iâm missing something. If the end stops are wired in parallel as mentioned, and they are both NC, then wouldnât both end stops have to be triggered? Trigger one end stop, and the pin will still be grounded. You would need both end stops to be triggered/open for the pin to go high and the end stop to be triggered in the firmware.
Oh, I assumed they were wired NC and in series.
If youâre doing 2 NC limit switches on a single axis, youâd only use 1 of the CNC shield pins and have the two NC switches wired in series, and use $5=1. Tripping either switch opens the circuit. Iâll go back and edit my post to make this clearer.
This also explains why, with 2 switches on a single axis, a firmware change is needed, and why the comments suggest against it. Since the controller canât tell which switch got tripped (whether NC in series or NO in parallel), it has to have logic added to infer which switch was triggered depending on the direction of the move that was commanded. If the homing offset ($27) doesnât move the axis enough to reset the switch (and give the controller time to recognize the state change), the machine gets left in an alarm state and you have to de-energize the motors and manually move off the switch before (increasing $27 and) trying again.
I thought the Arduino Uno (that the cnc shield rides on) already had the pull-up resistors in place.
â104â ceramic caps did the trick. I just slipped them down into the JST endstop connectors at the board end of the wires as a quick test and I havenât seen a false endstop or probe trigger since. Iâll probably do something a little more permanent eventually, but the control box isnât connected to the machine, itâs hanging on the wall next to it. Since it wonât be subject to vibration this temporary solution may hang around for a while. At least until I need to go back into the box for some other tweak.