Mesa 7i92T pullups cause outputs (Spindle) to enable on reset or disconnect

More
12 Sep 2023 19:04 #280573 by dvsing1177
I'm in the process of migrating an Avid benchtop CNC machine from GRBL to LinuxCNC with a Mesa 7i92TF. The stepper driver in use is a MX4660, which has 4 stepper drivers for XYYZ, as well as several isolated inputs and outputs.

I'd like to keep backwards compatibility with the GRBL controller, such that all I have to do is swap whether the GRBL board or the Mesa 7i92 is connected to the DB25 port on the MX4660.  This is to allow me time to configure and get comfortable with LinuxCNC and still be able to revert back to GRBL if i need to use the machine before I'm ready to use it with LinuxCNC.

The 7i92TF has a DB25 IDC26 ports that can connect directly to the same ports on the MX4660, and there's a firmware for the 7i92TF that complements this arrangement.

So far, bringup and validation is going well - limit/homing switches are working, steppers are working, and as a result, homing is working, including gantry squaring.  The information available on these forums has been very helpful through this process!

I'm running into a problem with the output that controls Spindle Enable, however.  See attached MX4660 output diagram (dashed box on the left represents the "PC Parallel Port", or the Mesa 7i92TF in my case).

So, for both the PWM and the outputs (one of which I use for Spindle Enable), the optoisolators in the MX4660 need to be driven by whatever is connected to the DB25 port, and the circuit diagram suggests this can be done with pullups on the control card, which are gated to ground - this is essentially what the MX4660 does, however when the 7i92 is powered on (or, when LinuxCNC isn't running, or, when the ethernet cable is disconnected inadvertently causing a reset), the 7i92's pins all go to input mode, and the pullups take over and drive the signals high, which drives the LEDs in the optoisolators and turns ON whatever load they are controlling - in my case, the Spindle turns ON if I do any of the following:
- Disconnect the ethernet cable from the Mesa card
- Shut down LinuxCNC, including turning it off, unplugging it, or crashing it

This is obviously not a good failure mode.  The right electrical solution here is that for the MX4660, these signals shouldn't be pulled high by the control card (grbl, mesa, etc) on reset.  I designed my GRBL control board to work this way, but with the 7i92 I have two choices with the pull resistors on the ports: pull everything up, or pull everything down.  At first I thought switching to pull down would fix the problem, and it does as far as the output problem w/ spindle enable, however it also breaks all of the inputs (limit switches, probe)... See MX4660 input diagram.

So, for the limit signals, they are pulled high in the MX4660, and when the optoisolator is activated by the sensor, the signal is driven low.  When the optoisolator is not active, having the 7i92 in pull-down mode puts those pull-downs against the pull ups in the MX4660, and through experimentation, the 7i92 wins, and the inputs can never been seen as high - they always read low regardless of the sensor state.

Ideally, the controller used with the MX4660 should not pull all of the pins high OR low if it's in a reset state- it should leave all of them HiZ for the MX4660 to be in a safe state.  Unfortunately this isn't an option on the 7i92, right?

I've thought of two potential solutions here, and I wanted to ask for opinions on how to handle this:
1. Since I can select pull-up/pull-down based on the port on the 7i92, I could leave the DB25 port as pull-up, and set the IDC26 port to pull-down, and then move my spindle enable (and any other outputs) to the IDC26 port.  The problem with this solution is that it's not 100% backwards compatible with my GRBL controller pinout, which only uses the DB25 port on the 4660, however it's a simple cable swap to move back and forth.  The down-side to this is that it makes the 4 additional inputs available on the IDC26 port unusable (in the same way that using Mesa pulldowns on the DB25 port makes the limit switch inputs unusable).  Right now, I'm not using the 4 additional inputs on the IDC26 port, but I'm trying to make future expansion easier.
2. Use two outputs, and require one to be high (spindle enable) and one to be low (spindle inhibit) for the spindle to turn on.  This way the spindle wouldn't turn on in any case except when the mesa board was active and LinuxCNC was driving the enable pin high and the inhibit pin low.  This would be backwards compatible with the GRBL setup since the output I would use for spindle inhibit is unused, and already driven low. Downside to this is that it takes an extra output away, and it doesn't scale well as far as future expansion.
3. I haven't looked too far into this, but if I could selectively cut the traces to the pull up resistors for the output pins on the 79i2, that would also solve the problem. I'm not sure they are even accessible, and even if they are, I'm not sure I want to make that kind of a semi-permanent change to the board if I don't have to.
4. I could get one of the daughter boards (7i76, etc) and put my own circuitry between the Mesa boards and the MX4660, but I'm trying to keep things simple by connecting the 7i92 directly to the MX4660.

None of these solutions above are perfect.  Thoughts?

Thanks,
Dan
Attachments:

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

More
12 Sep 2023 19:08 - 12 Sep 2023 19:11 #280574 by PCW
Leaving them7I92T pull-ups enabled and adding a say 470 Ohm
external pull-down resistor to the Spindle enable pin should work.
Last edit: 12 Sep 2023 19:11 by PCW.
The following user(s) said Thank You: dvsing1177

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

More
12 Sep 2023 19:19 - 12 Sep 2023 19:20 #280575 by dvsing1177
I'm connecting the 7i92TF directly to the MX4660 with a DB25 cable, so there's nowhere to easily add this pull-down resistor.

Your suggestion otherwise makes sense- the 470 pull down would be 10x stronger than the 4.7k pull up and should prevent the opto from activating.

Hmm.. maybe I could solder it on to the back of the 7i92 board where the DB25 connector pins are exposed (I don't have the card in front of me but I'm assuming the connectors are through-hole). The only other way to do it would be to add a breakout on the cable so I can get at the pins I need to pull down.

Thanks for the guidance, PCW.

Dan
Last edit: 12 Sep 2023 19:20 by dvsing1177.

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

More
13 Sep 2023 19:07 #280667 by dvsing1177
A quick follow-up: this worked =)

I added 470 ohm resistors on the back side of the 7i92 board between DB25 pins 17 (spindle enable) and 18 (ground) and between pins 1 (coolant enable) and a nearby ground pin on the back side of the pullup/down jumper pins. This worked great to prevent these outputs from being seen as enabled by the MX4660 when the 7i92 was in reset or otherwise disconnected from ethernet.

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

More
13 Sep 2023 21:04 #280675 by PCW
The MX4660 has a charge pump, does this work on the  isolated outputs?
( If so it would eliminate any need for resistors )
 

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

More
14 Sep 2023 02:20 #280694 by dvsing1177
Unfortunately, the charge pump on the MX4660 only inhibits movement on the stepper drivers (They stay on, and hold position). It has no effect on the outputs.

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

Moderators: PCWjmelson
Time to create page: 0.786 seconds
Powered by Kunena Forum