Protecting My Mesa 7i76EU: Wiring Questions for Home Sensors and Touch Probe

  • npostma
  • npostma's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
23 May 2025 15:13 #328986 by npostma
Hi All,I’d like your input on my planned setup.
As I mentioned in my previous post, the latency on my new machine was so high that I had to switch from the parallel port to a Mesa card. Earlier this week, I received a Mesa 7i76EU board. It looks awesome—if a bit overwhelming at first glance!My plan:
  • Motors:
    I’m using 3x Longs DM542A stepper drivers, which I plan to connect to Stepper 0/1/2 outputs on the Mesa board, using what I believe is called a “single-ended” wiring configuration. My plan is to connect +5V to the ENA+, DIR+, and STEP+ on each driver, and wire the ENA (5V), DIR-, and STEP- of each driver directly to the corresponding outputs on the Mesa card.
  • Spindle:
    I have a Huanyang VFD 1.5KW for spindle control. For now, I’ll keep my Modbus-over-USB setup, which seems to work well enough. I’ve read that getting Modbus running directly on the Mesa board requires a bit more advanced configuration, so I’ll save that for later.
  • Homing Sensors (Capacitive, 3x):
    My plan is to connect the +24V supply to the positive (brown) wire, and field ground to the negative (blue) wire of each sensor. I intend to connect the sensor output (black) wires to Input 1, 2, and 3 on the Mesa card.
Questions:
  1. Current-limiting resistor for home sensors:
    For the capacitive homing sensors, do I need to add a resistor between the output pin of the sensor and the Mesa input to protect against overcurrent? In the past, I’ve blown a few sensors and started using resistors to protect them, but those were cheap sensors—the Mesa card isn’t!
  2. 2-wire touch probe:
    For my two-wire touch-off probe, I plan to connect one side to +24V field power and the signal wire to Input 4. Here too, should I add a resistor to avoid potential shorts or overcurrent situations?
Bonus questions:
  • Any recommendations for best practices when wiring sensors and stepper drivers to the Mesa 7i76EU?
  • Are there things I should definitely avoid to protect my Mesa card or improve reliability?
  • For those who have set up Modbus on the Mesa board, how steep is the learning curve compared to using Modbus over USB?
Thanks for your advice and experiences!

Please Log in or Create an account to join the conversation.

More
23 May 2025 15:28 #328989 by PCW
That looks basically OK

If you have PNP type sensors, you do not need any additional interface components
that is the sensor output goes directly to the 7I76EU input.

7I76XX inputs are quite rugged, they need no additional protection.

 

Please Log in or Create an account to join the conversation.

  • npostma
  • npostma's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
23 May 2025 15:34 #328990 by npostma
Thanks. Yes mine are of the PNP type. And same goes then for the input of the Touch sensor? This is not a PNP. This acts more like a mechanical switch.

Please Log in or Create an account to join the conversation.

More
23 May 2025 17:00 #328993 by PCW
Yes, the touch probe should be fine as long as it can be wired this way.

Note that many touch probes have a contact closure to ground, so be careful...
 

Please Log in or Create an account to join the conversation.

  • npostma
  • npostma's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
23 May 2025 18:18 - 23 May 2025 18:23 #328996 by npostma
Now i think of it, you're probably right. Maybe this is the case. What does imply for my setup / what should i look up so that i don't mess up the connection.

[EDIT]

I think i then have to connect it to GND and input right? (This is more safe, so i can test it first in this setup). I have this simple probe:

www.makerstore.com.au/wp-content/uploads...OOL-TP-V1-6a-NWM.png
Last edit: 23 May 2025 18:23 by npostma.

Please Log in or Create an account to join the conversation.

More
23 May 2025 19:49 #329007 by andypugh
One way to use a sinking input with a switch-to-ground sensor is to put a resitstor (I would probably try a 10k, choose something that can handle the current that flows when connected between 24V and gnd, anything over 2.5k @ 1/4 W size will be OK). Put one leg of the resistor in the 7i76 input, and connect the other to 24V, The connect the leg of the resistor that is in the input terminal to your switch-to-gnd.
With the switch closed the voltage at the input will be zero, with it open the resistor will pull-up the input and set it true in HAL.

You can invert the sense of the input in the HAL layer to get the right polarity,

Please Log in or Create an account to join the conversation.

More
23 May 2025 20:29 - 23 May 2025 20:30 #329015 by PCW
Yes, if the touch probe uses a contact to ground you can use a pull-up
resistor as Andy suggested.

For 7I76XX inputs this needs to be fairly stiff, say 2.2K 1/2W

This is because the 7I76XX input resistance is 11K and needs an input > 14.4V
for a high level at 24V Vfield, and a 10K resistor will not do this.
Last edit: 23 May 2025 20:30 by PCW.

Please Log in or Create an account to join the conversation.

  • npostma
  • npostma's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
26 May 2025 17:14 #329172 by npostma
Hi all,

Thanks for all your input—everything is working fine again! There’s still some tweaking to do, but I’m getting there.

For the inputs, I made a small PCB breakout with terminal blocks, each protected by a pair of 0.5W resistors (2x 3K in parallel, so 1.5K total) to protect the Mesa card inputs. This limits the input current to a maximum of 0.016A (16mA) and 0.384W per pair.

I do have one last question. When testing my axis with the PNCconf wizard, I was able to achieve insane speeds—acceleration around 2500 and a max velocity of 15,000 (even higher values just made it wait or go slower). This seemed very promising. However, those values didn’t end up in the generated .ini file.

In reality, I had to limit my velocity to 200 to avoid errors in LinuxCNC, specifically:

hm2_7i76e: 0.stepgen.00.maxvel is too big for current step timings & position-scale, clipping max possible.
hm2_7i76e: 0.stepgen.01.maxvel is too big for current step timings & position-scale, clipping max possible.
hm2_7i76e: 0.stepgen.02.maxvel is too big for current step timings & position-scale, clipping max possible.

By lowering the timing values like this:

DIRSETUP = 6000
DIRHOLD = 6000
STEPLEN = 3000
STEPSPACE = 3000

(from the original 10,000 / 10,000 / 5,000 / 5,000), I could push the velocity up to 250, but then I started getting joint following errors.

So, I think I must be missing something fundamental, because the speeds I got in the wizard are nowhere near what I see in actual LinuxCNC. I don’t need crazy speeds for milling, but jogging 20cm takes a bit too long right now. Is there a way to make it faster, or can someone explain why the wizard speeds were so much higher than what’s actually possible in LinuxCNC?

Thanks!

Please Log in or Create an account to join the conversation.

More
26 May 2025 17:48 #329174 by PCW
hm2_7i76e: 0.stepgen.00.maxvel is too big for current step timings & position-scale, clipping max possible.
hm2_7i76e: 0.stepgen.01.maxvel is too big for current step timings & position-scale, clipping max possible.
hm2_7i76e: 0.stepgen.02.maxvel is too big for current step timings & position-scale, clipping max possible.


These warnings are because its not physically  possible to generate the required step rate because
the rate cannot be faster than 1/(steplength+stepspace). You can increase the maximum step rate
by reducing steplength and stepspace or using a lower micro-step ratio in the drives.

Following errors during installlation/setup are often because the stepgen maxaccel and maxvel
values do not leave enough headroom from LinuxCNCs joint/axis maxvel and maxaccel values, so check
that the stepgen maxaccel and maxvel values are at least 25% greater than LinuxCNCs joint/axis values

Please Log in or Create an account to join the conversation.

  • npostma
  • npostma's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
26 May 2025 17:58 - 26 May 2025 17:59 #329175 by npostma
Yes that is what i thought. I find it so strange that i can have ludicrous speeds in the wizard. Not sure what kind of magic is happening there :laugh:

I have stepgen's maxaccel and maxvel 25% bigger than the linuxcnc maxaccel
and maxvel settings. Also i have to figure out what i can set of DIRSETUP, DIRHOLD, STEPLEN, STEPSPACE realistically for my stepper-driver. A Longs DM542A driver is probably not the best driver in the world. 

This is the max i can do without getting errors:

#******************************************
[AXIS_X]
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -0.01
MAX_LIMIT = 750.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 200.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 250.00
STEPGEN_MAXACCEL = 250.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP   = 10000
DIRHOLD    = 10000
STEPLEN    = 5000
STEPSPACE  = 5000
STEP_SCALE = -400.0
MIN_LIMIT = -0.01
MAX_LIMIT = 750.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -30.000000
HOME_LATCH_VEL = -2.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 2
Last edit: 26 May 2025 17:59 by npostma.

Please Log in or Create an account to join the conversation.

Time to create page: 0.204 seconds
Powered by Kunena Forum