The only reason is that I cannot find the opto sensor that Hood recommended, it seems to be discontinued.
The hall sensors I bought were really cheap, about $1.5 a piece plus shipping, so I spent about $5 on them and I could use the for other applications if I don't use them for this.
Right now I am debugging a problem I just cannot figure out, this one is bizarre.
My mocked up opto sensor using ir and an arduino is working absolutely perfectly when not hooked up to the G540 board. I get 0 volts when my ir detects black, and 4.8v when it detects white, very consistently and very fast switching.
for some reason I just cannot understand, when I take the exact same wires that I have coming out of my arduino that I am measuring with my multimeter, and plug them into the G540, the voltage is only getting up to 1.1V when it sees white, and 0 v on black.
I don't believe that is going to be enough to trigger the index switch, but I have not tried it actually plugged in to Mach3 right now since I am doing the electronics in my house.
At first I thought maybe there was some resistor in the pin, so I took a battery pack that I have that delivers 6v and set that up in the same pins, and the G540 pin is measuring 5.8v accurately, so it's not the G540 pin.
My G540 is not plugged in right now, just trying to hook up all the electronics and get it working before hooking it up to my lathe again.
I tried different wires, same thing. I am at a complete loss on this.