Welcome! Log In Create A New Profile

Advanced

gen7 board mechanical endstops

Posted by dave584 
gen7 board mechanical endstops
February 19, 2013 11:25AM
Any ideas how to connect mechanical endstops on a gen7 board?
There are 3 connectors on the switch C(closed), NC(normally closed), NO(normally open).
Perhaps this is correct.. should I connect NO to ground pin and C to signal pin?
If I can at least know I have it connected right then I can know if its the firmware or wiring is misconfigured.
Re: gen7 board mechanical endstops
February 19, 2013 12:35PM
(C) should be for Common and will be what you measure the other two against. C ---> NC will read closed when the switch is not pressed. C----> NO will read open when the switch is not pressed.

Conscripted
mcp
Re: gen7 board mechanical endstops
February 19, 2013 01:42PM
Hi you need to have common to ground and then you should have either NC or NO as signal.
You can then configure repetier in configuration.h with either possibility:

/* By default all endstops are pulled up to high. You need a pullup if you
use a mechanical endstop connected with gnd. Set value to false for no pullup
on this endstop.
*/
#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_PULLUP_Z_MAX true

//set to true to invert the logic of the endstops
#define ENDSTOP_X_MIN_INVERTING true
#define ENDSTOP_Y_MIN_INVERTING true
#define ENDSTOP_Z_MIN_INVERTING true
#define ENDSTOP_X_MAX_INVERTING false
#define ENDSTOP_Y_MAX_INVERTING false
#define ENDSTOP_Z_MAX_INVERTING false

// Set the values true where you have a hardware endstop. The Pin numbe ris taken from pins.h.

#define MIN_HARDWARE_ENDSTOP_X true
#define MIN_HARDWARE_ENDSTOP_Y true
#define MIN_HARDWARE_ENDSTOP_Z true
#define MAX_HARDWARE_ENDSTOP_X false
#define MAX_HARDWARE_ENDSTOP_Y false
#define MAX_HARDWARE_ENDSTOP_Z false

//If your axes are only moving in one direction, make sure the endstops are connected properly.
//If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here
Re: gen7 board mechanical endstops
February 19, 2013 05:18PM
hi mcp,

this does not seem to be working for me I have tried all sorts of combinations of options.
I am making epromm number larger each upload so I think revisions should take to eeprom.
So.. I am connecting to ground so I need a pull up. What is this pull up?
where it says '// Set the values true where you have a hardware endstop. The Pin numbe ris taken from pins.h.'
I don't see the point in it mentioning pins here as there is nowhere in configuration.h, regarding endstops to change a pin number so dont understand why it tells it. Sorry for babble just stuck again confused smiley
mcp
Re: gen7 board mechanical endstops
February 19, 2013 05:35PM
Hi,
the pin numbers for the endstops are defined in pins.h and should be already OK for you.
The pull-ups are the internal Atmel ones. The ATMega can activate internal pull-up resistors. This is configured in configuration.h.
So the main work is to make sure you get the sitches right. This can be altered only in the configuration.h and you do not need to change the eeprom numbers or settings.
So if you have your endstops at the min positions, you just need to try if
#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_X_MIN_INVERTING false
#define ENDSTOP_Y_MIN_INVERTING false
#define ENDSTOP_Z_MIN_INVERTING false
#define MIN_HARDWARE_ENDSTOP_X true
#define MIN_HARDWARE_ENDSTOP_Y true
#define MIN_HARDWARE_ENDSTOP_Z true

or if motors only move one direction
#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_X_MIN_INVERTING true
#define ENDSTOP_Y_MIN_INVERTING true
#define ENDSTOP_Z_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_X true
#define MIN_HARDWARE_ENDSTOP_Y true
#define MIN_HARDWARE_ENDSTOP_Z true

Do not alter any other settings, just try these two set and describe what is working and what is not.
If only one axis moves to one direction and the others are ok, you need to change the MIN_INVERTING on that axis.
Re: gen7 board mechanical endstops
February 20, 2013 05:44AM
Quote

What is this pull up?

From the Mechanical Endstop wiki page:


As shown, the signal pin has a direct connection to GND and a connection to 5V over a 10k resistor. The direct connection has the lower resistance, so it "wins" and causes the signal pin to go 0V. Opening the switch removes the connection to GND, so the connection to 5V "wins", the signal pin goes 5V.

That's a "pullup" resistor: it "pulls" a otherwise unconnected signal to up; to 5V. Very often used in digital electronics, often just for giving signal a defined default state.

To get the wiring right, you can measure this signal with a simple voltage meter. On the ATmega pin or on the connector. That working, finding the corresponding firmware configuration should be less ambiguous.

And don't forget M200 or M119 (depending on firmware), which reports endstop status.


Generation 7 Electronics Teacup Firmware RepRap DIY
     

Re: gen7 board mechanical endstops
February 20, 2013 06:15AM
It seemed like I had tried every combination of connections possible I think I may have made a silly mistake though, I had thought the middle connection on the switch was the common when it was not, whoops. Silly mistakes you do when you are trying something for the first time. thanks again michael.

I connected the switch to C and NO and it worked.

Its really starting to seem like a piece of equiptment now rather than a bunch of bits. smiling bouncing smiley
For some reason when I home Z it homes faster than what the configuration.h is set.
I have slow z speed to reduce the chance of it binding. I know the speed is wrong because it is homing Z a lot faster than my Z speed for normal moves. Perhaps I don't get this eeprom so well then as it must be the problem?

Edited 1 time(s). Last edit at 02/20/2013 06:17AM by dave584.
Sorry, only registered users may post in this forum.

Click here to login