Mesa: How to consume TTL input from Glass Scales

  • Joco
  • Joco's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
17 Sep 2018 04:46 - 17 Sep 2018 05:00 #117641 by Joco
Ok - I have been hunting about and there are topics that sort of cover this but nothing that feels like its answering the question directly. If there is a clear answer on another thread I have missed/glossed over in error then PLEASE point me in the right direction. :)

Existing H/W: Assume I have a 6i25+7i76 setup running Stepper Motors.

Target state::
I have some 5 micron glass scales which I would like to try and make use of. There might be some experimentation with a feedback loop, perhaps utilising in a homing sequence, or just using to assess following error and trigger a fault if things get to far out of whack.
The system these scales will be on will not be moving at a high pace. 1000-1500mm/min at max speeds for rapids. In all likelihood I will loose the bottle to run that fast and will cap out at about 800mm/min (31 inch/min) on rapids.

Question:
Can I connect these scales with their 5v TTL logic into the Inputs on the 7i76? From a voltage point of view I "think" I will need to create some kind of opto-isolation board that allows the scales to be given 5v power and that will allow the triggering high/low of the 7i76 inputs at field voltage (expected to be 24v) based on the TTL signals coming through.
OR is the only answer to add an extra card into the mix that has 3 proper TTL capable encoder inputs. The 7i85 for example.

Appreciate the assistance.

Cheers,
James.
Last edit: 17 Sep 2018 05:00 by Joco. Reason: setting correct topic icon

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

More
17 Sep 2018 12:56 #117651 by andypugh
I think a 7i85 is probably the easy solution.
But, you could make your own interface board to plug in to the TTL inputs of the second connector on the 6i25.
You might even be able to wire directly, though clearly with some risk of smoke.

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

  • Joco
  • Joco's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
17 Sep 2018 23:36 #117682 by Joco

I think a 7i85 is probably the easy solution.
But, you could make your own interface board to plug in to the TTL inputs of the second connector on the 6i25.
You might even be able to wire directly, though clearly with some risk of smoke.


Thanks Andy.

Agree the extra board would be fast/easy. Means another cable between PC and CNC cabinet, not the end of the world.

I was wondering if the Inputs on the 7i76 would be fast enough to cope with the frequency of signals coming from the TTL feeds. I will have a LOT of spare Inputs on the 7i76 so was keen to figure out if I could utilise those instead of spending more $$ on another card. Hence my reference to a the isolation board. In essence something that would "translate" the 5v high/low signals coming from the TTL source into High/Low field voltage that the 7i76 Input pins reference. I could then hook HAL encoders to these inputs. Or am I in la la land?

Cheers,
James.

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

More
18 Sep 2018 06:14 #117693 by Hakan
As far as I understand, the 7i76 has one encoder input port. That one will work with a glass scale encoder also in TTL mode.

There is a software hal encoder component that is able to count at somewhere 10-50 kHz according to the docs. If the output from the scale is below that it may be worth a try. Inputs are from general digital input pins, which there are plenty of.
The encoder output 200 pulses/mm so 10 kHz means 50 mm/sec maximum speed. Yeah, worth a try.

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

  • Joco
  • Joco's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
18 Sep 2018 06:55 #117697 by Joco

As far as I understand, the 7i76 has one encoder input port. That one will work with a glass scale encoder also in TTL mode.

There is a software hal encoder component that is able to count at somewhere 10-50 kHz according to the docs. If the output from the scale is below that it may be worth a try. Inputs are from general digital input pins, which there are plenty of.
The encoder output 200 pulses/mm so 10 kHz means 50 mm/sec maximum speed. Yeah, worth a try.


Thanks Hakan. Helpful math there. I should have gone through that myself. Given I plan to absolutely max out at 1500mm/min which is 25mm/sec and in all probability will run at the same speeds a mate is running on his mill of 800mm/min (13.3 mm/sec) things should be well under the 10kHz 50mm/sec mark.

Now to figure out what a suitable electronics design might look like. I'm looking hard at the following for inspiration/help:
www.anderswallin.net/2006/08/optoisolato...mesa-5i20-servocard/

If any wiser heads are able to suggest/draw the type of circuit component that should be used for each pin (which would essentially be duplicated for each input pin) where there is TTL voltage/signal on one side and field voltage (i.e. 24v) on the Mesa Digital IO side. That would be VERY helpful. I'll have a crack over the next few days after work but try to control the laughter. :S

Cheers,
J.

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

More
18 Sep 2018 08:35 #117700 by andypugh

There is a software hal encoder component that is able to count at somewhere 10-50 kHz according to the docs.


The software encoder can run at 50kHz, but the 7i76 GPIO pins are only polled at 1kHz.

But, there might be a way. If you look on page 18 here: www.mesanet.com/pdf/parallel/7i76man.pdf
On software mode 2 the 7i76 has two MPG counters. These are intended for handwheels, but could potentially be used for scales.
As a bonus, when configured as MPGs those input pins become 5V pins.
Those count pulses in software running on the 7i76, and send updated counts to the 6i25 every millisecond. I think that they can count at a few tens of kHz. (not as fast as a "proper" encoder on the Mesa cards that can count at 10MHz)

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

  • Joco
  • Joco's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
18 Sep 2018 08:58 #117701 by Joco
Thanks Andy. Didn't realise the GPIOs were only polled at 1kHz. Food for thought.

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

More
18 Sep 2018 12:45 #117712 by andypugh
Software Mode 2 is an easy config change:

linuxcnc.org/docs/2.7/html/man/man9/host...ml#config%20modparam

sserial_port_0=20xxxxxx

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

  • Joco
  • Joco's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
19 Sep 2018 09:37 #117741 by Joco

Software Mode 2 is an easy config change:
linuxcnc.org/docs/2.7/html/man/man9/host...ml#config%20modparam

sserial_port_0=20xxxxxx


Thanks for this Andy. Looking at this it feels like the limitation relates to what the firmware on the 6i25 is doing? I mean, with a custom firmware installed could some of the GPIO pins be repurposed? Or are their physical limitations on what pins on the 7i76 can be used for what?

Having said that its starting smell very strongly like a 7i85(S) is going to be the path of least resistance.

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

More
19 Sep 2018 10:43 #117743 by andypugh

Thanks for this Andy. Looking at this it feels like the limitation relates to what the firmware on the 6i25 is doing? I mean, with a custom firmware installed could some of the GPIO pins be repurposed?


No, the GPIO pins are serially addressed rather than wired direct to the 6i25. That is how the 7i76 can have so many more pins than the 17 data pins on the DB25 connector.

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

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