Closed ameisso closed 3 years ago
Sounds like something isn't hooked up correctly. Grbl uses interrupts to determine if a limit switch has tripped. With everything connected, connect a voltage meter (DMM) up to the limit switch pins... if the voltage is ~5 volts in one limit switch position and ~0 volts in the other, then Grbl will see that state change. If you don't see that voltage swing when tripping the limit switches, then something isn't hooked up correctly.
#define LIMIT_DDR DDRB
#define LIMIT_PIN PINB
#define LIMIT_PORT PORTB
#define X_LIMIT_BIT 1 // Uno Digital Pin 9
#define Y_LIMIT_BIT 2 // Uno Digital Pin 10
#ifdef VARIABLE_SPINDLE // Z Limit pin and spindle enabled swapped to access hardware PWM on Pin 11.
#define Z_LIMIT_BIT 3 // Uno Digital Pin 12
#else
#define Z_LIMIT_BIT 3 // Uno Digital Pin 11
#endif
#define LIMIT_MASK ((0 << X_LIMIT_BIT) | (0 << Y_LIMIT_BIT) | (0 << Z_LIMIT_BIT)) // All limit bits
#define LIMIT_INT PCIE0 // Pin change interrupt enable pin
#define LIMIT_INT_vect PCINT0_vect
#define LIMIT_PCMSK PCMSK0 // Pin change interrupt register
Maybe try this? since u use "PINB" the number u used can't be 9,10.....
Hello everyone
I try to add limit switch to my plotter.
I use a laserAxe controller with only two axis
On this board, limits are wired to pin 9, 10 and 12 so I changed changed cpu_map.h like this :
I've also changed config.h so it dont try to move Z :
#define HOMING_CYCLE_0 ((1 << Y_AXIS) | (1 << X_AXIS))
when I boot up the card with cncjs, I got an alarm. So I hit $H and the axes moves in the right direction. When I close both limit switch, nothing happens, the axis continue to move and never stop.
Note that for now, my switchs are 10cm wires that I shortcut with GND to close them. So I don't think that could be noise related
Here is my $$ output :
I'll be really grateful for any insight !
Best