Limit Switch Logic
milesmiles902 opened this issue · 4 comments
I purchased used components for a 5th axes.
- X-and-Y axes: Suruga Seiki - KXS18300
- Z axis: Suruga Seiki - KXS18200
- Controller: Arduino
- Driver: CSD5807N2-P
The steps/unit, acceleration, and velocity correctly function.
Now, I need to configure my wiring (or grbl-Mega-5x package) to fit the limit switches.
Microsensor [EESX674] Setup:
Limit Switch Power: 24 V from stepper supply
Limit Switch Ground: Stepper driver
Pin Min: D14
Pin Max: D15
Observations:
- Light-On requires an enabled [config.h > #define DISABLE_LIMIT_PIN_PULL_UP] for the stage to move.
- When Pin Min/Max [D14/D15] are supplied voltage, and a corresponding limit is optically blocked, the other pin receives no power.
Shouldn't the optical switches regulate an output signal to the Arduino?
If no luck, I may try a logic table of the five wires (three sensors) to find a transistor formatting for grbl-Mega-5x.
Not optically blocked:
Wire #1 | Wire #2 | Wire #3 | Wire #4 | Wire #5 |
---|---|---|---|---|
Power | Ground | Test Output | Test Output | Test Output |
Power | Test Output | Ground | Test Output | Test Output |
Power | Test Output | Test Output | Ground | Test Output |
Power | Test Output | Test Output | Test Output | Ground |
... | ... | ... | ... | ... |
Optically blocked:
Wire #1 | Wire #2 | Wire #3 | Wire #4 | Wire #5 |
---|---|---|---|---|
Power | Ground | Test Output | Test Output | Test Output |
Power | Test Output | Ground | Test Output | Test Output |
Power | Test Output | Test Output | Ground | Test Output |
Power | Test Output | Test Output | Test Output | Ground |
... | ... | ... | ... | ... |
Hi @milesmiles902,
Unfortunately for you, I'm really not an electronics expert...
Warning ! The Arduino board works at 5 volts and connecting the limit switches to 24 volts will certainly destroy it.
It would be wiser to disconnect the limit switches from the 24v motor driver supply and plug them into the 5v of the Arduino.
According to the Microsensor schematic, #define DISABLE_LIMIT_PIN_PULL_UP
should do the trick by connecting the "L" output to the signal pin of the Arduino. But be careful to add a pull-down resistor so as not to destroy the Arduino board.
Another good solution should be to add a transistor or an optocoupler between the microsensor and the Arduino board. But in this case, I don't know enough about electronics to help you...
Asking Google will surely be a better option :-)
@++;
Gauthier.
I bought an 8-channel 24v relay board and use my switches with 24v volt.
(since I had to many interferences on the limit pins using 5v).
Works like a charm...
Cheers
Raphael
Warning ! The Arduino board works at 5 volts and connecting the limit switches to 24 volts will certainly destroy it. It would be wiser to disconnect the limit switches from the 24v motor driver supply and plug them into the 5v of the Arduino.
@++; Gauthier.
The crossed wiring did reset my Arduino's EEPROM.
Thank you.