I am upgrading my old 3 axis Mach3/C10 based controller to an ESS with a C25 BOB and Mach4. All the outputs, including the motors and spindle relay run perfectly. But I am having trouble with the home switches. They appear to be latching in Mach4 and not clearing when the switch is released.
Can someone please tell me the best way to wire the home switches to the C25 BOB? I currently have them connected to Port 2, pins 2, 3 and 4. Should I be connecting the other side of the switch to GND or to 5V? Do I need a pull up/down resistor? Should I have them configured as active on high or low?
I just wired up my 3 axis machine with similar hardware. While doing so I ran across a wiring diagram that may help. Here is a link:
https://cnc4pc.com/c25-smooth-stepper-terminal-board.html#dom-tab
You may have to login to see the info but the drawing they have listed as an example provide good reference on wiring your switches. Also remember there are two location to change your I/O setting. One in mach 4 and the other in the ESS plugin. Some changes should only be made in the plugin, maybe that's the issue your having if your wiring is on point. Hope that helps.
if you look at the C25 input diagrams in the manual
you will see a 4700 ohm pull down resistor plus a LED with a 220 ohm current limiting resistor
the resistors shown in post 3 are a good idea as they will limit the fault current if a home switch wire is shorted to ground
the downside is the reduction in voltage at the C25 input when the switch is closed
assuming the volt drop across the LED is 2V about 1.2V will be dropped across the two paralleled 330 ohm resistors
reducing the C25 input to 3.8V
while this should be enough to be a valid logic high it may make the system more susceptible to noise
if that is the case reduce the resistors from 165 (330//330 = 165)
try 47 to 100 ohms
the compromise being having the resistance low enough to bring the C25 input near to +5V
without needing a high power resistor to dissipate the heat under short circuit conditions
for example
a 47 ohm resistor 0.106 A will pass through the resistor when connected across the 5V supply
and would dissipate 0.53 W
I would use a 47 ohm 1W resistor
when a 47 ohm resistor connects a C25 input to +5V
about 0.5V will be dropped across the 47 ohm resistor
so the C25 input will be +4.5V