Interface between Mesa 7i77 and Granite Devices VSD-E servo amplifier

More
17 Dec 2017 06:09 #103188 by DeckelHead
This is a somewhat generic request for information on how people interfaced their 7i77 Mesa card with a Granite Devices VSD-E servo amplifier. The specific area of interest is in the I/O, aka the COMMAND port, area.

Let me set the stage a bit... I'm bringing up a system that has been sitting for several years and I'm finally getting back to it. Most everything is done, but when I mothballed the project, I was working on the interfacing of two signals of interest: ENABLE and FAULT. The Mesa card has a Field voltage of 24VDC and the VSD-E generally has I/O of 5VDC

The ENABLE signal is connected to an OUTPUT port on the 7i77 and to the HSIN2 port (pin #5) of the VSD-E. That is an opto-isolated port using an HCPL2631. My thought there is to drive the port with a supplemental series 10K resistor. Unless I'm missing something, that should be sufficient.

The FAULT line is a bit more problematic. The output port on the VSD-E (pin #11) is an HCPL2531. Granite Devices' documentation indicates that IO-Vcc for this is 5VDC. Reading the documentation for the Mesa card, it seems like the only way to get the INPUT pin there to read TRUE is to drive the pin to the field voltage, or 24VDC. To perform this action, it seems like I will need to use a small opto-isolator board such as the GeeTech G213 (www.geeetech.com/d213-optoisolator-break...jau1i5b1274026i6sm97), a few of which I have laying around.

Is this consistent with your design? I really don't want to blow up my VSD-E drives!

Any thoughts or ideas are always welcomed. If you have a question, please feel free to ask.

Thanks
Alan

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

More
17 Dec 2017 12:41 #103207 by andypugh
You don't have to use 24V, but it does seem that you need to use at least 8V, so a lower Field Voltage supply isn't the perfect answer.

The VSD-E manual does suggest an external resistor for widening the input voltage range of the opto-isolated inputs.
They are shown with an internal 220R resistor. The manual also says that the current threshold for activation is 6.3mA. Rather helpfully they also specify the input device used. (uk.rs-online.com/web/p/products/1241346/ ) At 5V the current through the opto (1.4V fwd voltage from the datasheet) is (5V - 1.4V) / 220R = 16mA. To keep the same current at 24V you would need a total resistance of (24V - 1.4V) / 17mA = 1400R.
There is already a 220R in circuit, and the working current of the inputs is actually at the top end of the recommended range, so I think I would choose a 1.5k additional series resistor for a working current of 13mA.
Also, to be cautious, I would first activate the inputs through a multimeter in mA mode to make sure that the input current through the opto was >6.3mA and <20mA.



If you set the card to Mode 3 then four of the inputs (16, 17, 18, 19) have their logic threshold set to 2.5V. If you are not using MPGs on those pins then this seems like one answer.
Alternatively you could use the analogue inputs (in modes 1, 2 or 3) to read the fault output voltage and convert to true/false in HAL.

Or add a TTL logic expander board on the smart-serial expansion connector: store.mesanet.com/index.php?route=product/category&path=83_88
The 7i73 is cheapest, but the 7i69 might suit better.

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

More
17 Dec 2017 14:43 - 17 Dec 2017 15:01 #103211 by PCW
You can use 5V field voltage on a 7I77 (VIN must be separately powered by a 8 to 32 VDC supply in this case)


You cannot use the MPG input to get 2.5V thresholds with 12V or 24V VField because these have 2.5v thresholds for the MPG encoder logic only, not the digital inputs.

Also if you need lot of TTL level I/O a 7I90HD is probably a better choice than a 7i69 (72 I/O vs 48 and $59 vs $69)
Last edit: 17 Dec 2017 15:01 by PCW.

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

More
17 Dec 2017 15:13 #103215 by andypugh

You cannot use the MPG input to get 2.5V thresholds with 12V or 24V VField because these have 2.5v thresholds for the MPG encoder logic only, not the digital inputs.


I was hoping you would pop in with a definitive answer on that one.

Also if you need lot of TTL level I/O a 7I90HD is probably a better choice than a 7i69 (72 I/O vs 48 and $59 vs $69)


It looks like he might only need 3 x 5V inputs, so maybe the 4 x analog inputs will be enough?

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

More
17 Dec 2017 15:16 #103216 by PCW
Sure, if you don't need the analog inputs for other uses.

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

More
17 Dec 2017 17:29 #103226 by DeckelHead
Ah! Just the dialog I was hoping to spark! Thank you Andy and PCW.

You guys have jogged my memory in a few areas, and that is great.... One thing I can't really do is change the output side of the Mesa because it is driving 24VDC relays. And, yes, my napkin math was wrong. I meant 1K not 10K, along with the the 220 series resistor already present. Your idea about validating an in circuit representation with a DVM is something I would have done but it is also good of you to suggest the same for someone else reading this thread later on; so, thank you for bringing that up.

An area that I had totally forgotten about is and that I believe you are driving towards is splitting off the input and output voltages used for I/O (sorry, I am intentionally avoiding Vin and Field because I don't have the documentation in front of me right this second). I vaguely recollect that this is possible and it may be the best solution for me. Ironically, I inserted an opto-isolator board into the limit switch area that takes the native Hurco 5VDC output and made it compatible with the Mesa 24VDC input. But, I could easily change the output target for that opto board to 5VDC if I want.

My next task, then, is to re-read the section regarding Vin and Field. If I can make the input side compatible with 5VDC while keeping the output at 24VDC then I think I'm set. I'll change the existing output side of my isolators for the limit switches to 5VDC and then wire up the Granite Devices' output (FAULT) opto isolators directly to the Mesa inputs. If it works the way I think it will, then that would be the easiest solution (still keep the 1K resistor in the ENABLE output as that would be limiting the current from the Mesa 24VDC).

One final note, although it sounds academic at this point... I do want to stay away from using the MPG Mesa I/O. I expect that I will be using those for the stated purpose.

Cool. You guys gave me some great ideas to research. The help is appreciated.... Have a great holiday season.

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

More
17 Dec 2017 18:08 #103229 by PCW
You cannot separate the output voltage from the input threshold on a 7I77
I suspect the easiest way to sense 5V is what Andy suggested, use the analog inputs for 5V sensing
and run the outputs at 24V for your relays

We do have some experimental firmware for the 7I84 which could be ported to the 7I77
that separates the input thresholds from the output voltage by making the input thresholds
settable from LinuxCNC but we don't have a time frame for porting this yet

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

More
17 Dec 2017 19:58 - 17 Dec 2017 20:36 #103238 by DeckelHead
Good thing I ran out of time and hadn't started to research the separating input from output thing.

The analog input idea is something I was never even aware I could do. I glossed over that part of the manual because it (at the time) didn't seem relevant to what I was trying to accomplish. As I really only need 3 inputs, I am happy to dedicate IN0, IN1, IN2 to my X, Y and Z fault inbound lines (7i77 perspective). If I'm reading it all correctly, I would want Mode 3 because I do want to have an MPG on my control panel. I don't quite know what "field voltage analog in" means in the context of the manual's description though. Mode 2, 3 spells that out explicitly...

Somewhere in the system (HAL or LinuxCNC configuration), the 5V value from the servo drive will how to be converted to a TRUE or FALSE. I don't quite know where that is accomplished yet but it seems reasonable to assume that such an ability exists....

Your comments on the MPG have made me question whether or not I have a looming problem there though... If I have a 24V field, is that going to be a problem for me? I'm guess not, but confirmation is always a good thing
Last edit: 17 Dec 2017 20:36 by DeckelHead. Reason: added info about usage of an MPG

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

More
17 Dec 2017 21:19 - 17 Dec 2017 21:19 #103249 by andypugh

Somewhere in the system (HAL or LinuxCNC configuration), the 5V value from the servo drive will how to be converted to a TRUE or FALSE. I don't quite know where that is accomplished yet but it seems reasonable to assume that such an ability exists....


Yes, you would use something like
loadrt comp count=3
...
addf comp.0 servo-thread
addf comp.1 servo-thread
addf comp.2 servo-thread
...
net fault-0-analog hm2_5i25.0.7i77.0.0.analog0 => comp.0.in0
setp comp.0 in1 2.5
setp comp.0.hyst 0.25
net fault-0 comp.0.out => axis.0.amp-fault-in
...
linuxcnc.org/docs/2.7/html/man/man9/comp.9.html
linuxcnc.org/docs/2.7/html/man/man9/motion.9.html

Your comments on the MPG have made me question whether or not I have a looming problem there though... If I have a 24V field, is that going to be a problem for me? I'm guess not, but confirmation is always a good thing


You can power the MPG from the encoder 5V (or any other 5V sharing the same GND)
Last edit: 17 Dec 2017 21:19 by andypugh.

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

More
17 Dec 2017 21:38 #103252 by DeckelHead
Awesome...

Thank you both for all of the help. I have some reading, tinkering, and additional wiring to complete now, but I think I'm well on my way to having a viable solution.

Best regards and happy holidays,
Alan

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

Moderators: cmorley
Time to create page: 0.142 seconds
Powered by Kunena Forum