I am using gSender, grbl and Arduino Uno to build a CNC machine. So far all three axes are moving. I have started putting in the limit switches. I am using NPN proximity sensors and have only one installed so far for the left side of the X axis. The sensor has three wires. Brown for +V, Blue for GND, Black for signal. I have wired it as in the sketch below.
The problem is that gSender shows an Alarm when I connect the the Arduino controller and says that a hard limit was triggered and I cannot clear the alarm. The proximity sensor is not near any metal and I do not know why it was triggered and why I cannot clear the alarm. I am at a loss at the moment. Can anyone point me in the right direction?
To my understanding The alarm on gSender at startup is normal behavior, especially after connecting to the CNC controller, because the machine’s position is unknown until it is “homed”. The alarm serves as a safety mechanism to prevent unexpected movement. If you are building from scratch on the Uno you might have to build a “clearing and homing” circuit. But I am taking a stab in the dark about that.
I also had the wiring like below, but I also could not clear the alarm here. Before I built the frame of the CNC I had all the components (motors, drivers, PSU, and one proximity sensor) wired to test and then I could clear the alarm.
Like I said I’m not strong in this area but I read up on it a little when I was thinking about getting a 3D probe. I haven’t got one yet so I haven’t done the wiring for PNP or NPN myself.
EDIT: I found another article that shows the same diagrams but does a better job explaining things IMHO.
One source of my confusion was that I thought the sensor ‘sent power’ to the board when tripped but it was explained to me that the the board uses a ‘pull up resistor’ to stay high and when the sensor is tripped it pulls the voltage down. This is to reduce the chance of EMI interference because if the board was at 0v then EMI would bring the voltage up but if it’s held up EMI wont bring it down. I think I’m remembering that correctly.