If finally gotten the tool length sensor function to work. However when I try to get the z axis sensor to work, it triggers randomly. I know there were suggestions on adding a capacitor and resistor. I am not an electrician. Does anyone have a dumbed down diagram on how to wire these in?
How do you have it wired so far?
I have a small metal plate mounted to the spoilboard. It is connected to the sensor pin on the ramps board. My spindle is already grounded so I don’t have a ground wire hooked up
You need a ground wire going from the spindle to the sensor pin of the board.
Try that first, if it still doesn’t work try looking at “pulldown resistor” on google
The tool length sensor works fine without a ground wire on the spindle, since the spindle is grounded. I’ll try an extra ground wire to see if it makes a difference. I know it is suggested to add a capacitor and resistor into the setup to avoid the ghost sensor connections. I have also seen schematics for it. But I have no idea how to read schematics. As hoping for a simple wiring diagram. Those I can read. Lol
If you wire a reasonably big resistor (> 1kOhm, 10kOhm would be about perfect) between the sensor pin and 5V, then when the sensor isn’t touching anything, it’s voltage will be 5V. That is a pullup resistor, not a pulldown, but same concept.
You can configure arduino to use an internal pullup resistor, I thought.
You still have to be very careful to avoid touching the plate, or touching it with anything that will ground it. I would definitely disconnect it when you start milling.
If you want to add a capacitor, then you’ll have to add it between the sensor pin and ground. That won’t replace the pullup resistor. What that will do is reduce the “speed” at which the arduino can sense the connection. So if there are very small momentary connections, they will be ignored. You’ll get a slight delay the connection on the sensor, but unless you get a very big capacitor, that shouldn’t be a problem. Sorry, I have no idea what size or type you should use for this. You’d just connect one end to the sensor and one end to ground, and leave everything else connected as is.
Is the +5v in your diagram the sensor pin or do I just connect it to 5v?
There is a + and - near the sensor pin, right? The + is 5V, I think.
I just checked the firmware, and the arduino should be using the endstop pullups by default:
// coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
I have been dealing with this same issue. Has anyone found a solid solution and if so how did you do it? It works fine most of the time, but randomly it will act as if it has touched the touch plate without actually touching it. This is not too big of a deal at the beginning of a job but when doing a tool change with built in g code its a major problem, because i cant do anything but resume the program where it left off and now the z axis is no longer at the right height. Any help would be greatly appreciated. If the above