How to read TTL input of a displacement transducer - Page 2


+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    Junior Member Dave Purola's Avatar
    Join Date
    Jul 2004
    Posts
    73
    Thumbs Up
    Received: 5
    Given: 0
    Total Downloaded
    223.72 MB

    0 Not allowed!

    Default Re: How to read TTL input of a displacement transducer

    It is called Quadrature encoding. 2 digital signals that are 90 degrees out of phase. One leading the other means forward and 1 trailing the other means reverse. A standard protocol used for displacement sensors and rotary encoders. Be aware that from what you mentioned earlier yours is RS422 level comparable.

Attention
×

This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

The advertisements we display are relevant to this web site and your browsing history

Please consider supporting us by disabling your ad blocker.


Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

If you can, please report issues in the forum area WebSite / Forum Issues


Thank you for your attention.

  • #17
    Member amod's Avatar
    Join Date
    Mar 2018
    Posts
    128
    Thumbs Up
    Received: 38
    Given: 5
    Total Downloaded
    17.00 MB

    0 Not allowed!

    Default Re: How to read TTL input of a displacement transducer

    Please guide me with a code.I tried many codes but only I can get forward ( increasing) readings.

  • Attention
    ×

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #18
    Senior Member Stephen Moss's Avatar
    Join Date
    Jan 2006
    Posts
    528
    Thumbs Up
    Received: 31
    Given: 7
    Total Downloaded
    3.87 GB

    0 Not allowed!

    Default Re: How to read TTL input of a displacement transducer

    Quote Originally Posted by amod View Post
    My displacement sensor has 90° shift.
    How do you know that as it is not in the data specifications you provided?
    I could find no other specifications from a quick internet search and neither the data you provided or any I found actually indicate which signals are connected to which pins or that it actually outputs a direction rather then just a position relative to one end. Are you sure that you do not have to calculate distance and direction of travel by comparing the current and previous reading of that it the type of output you want?

    Regardless of that the specifications indicate the output is RS422, 11uA and 1V P-P, so...
    1. Being a serial ouput it would be logial to expect the data output (if signed) is either two or three Bytes ( sign byte & magnitude) or a signed Byte/Word value.
    2. Assuming all three specs relating to the RS244 output and not three different output formats I do not think you can read it directly and reliably with a TTL input as the voltage level is too low.

    Therefore, I think the reason you are having trouble reading it is that you are treating the output as a single ended signal when RS422 appears to be a differential signal (the differential Amplifier/TTL links at the bottom of the page may also be helpful).
    If that is the case then possible methods of converting to a TTL compatible signal are...
    1. Purchase a RS422 to RS232 converter chip, probably the best option if you can find one or
    2. Differential amplifer with a gain of 5 or

  • Attention
    ×

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #19
    Member amod's Avatar
    Join Date
    Mar 2018
    Posts
    128
    Thumbs Up
    Received: 38
    Given: 5
    Total Downloaded
    17.00 MB

    0 Not allowed!

    Default Re: How to read TTL input of a displacement transducer

    Stephen Moss,I confirmed with the seller from which I purchased encoder it has TTL output with 90°shift .The same output as rotory encoder has.I have written a code that works but it only increases reading.

  • Attention
    ×

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #20
    Member flosigud's Avatar
    Join Date
    Oct 2013
    Posts
    160
    Thumbs Up
    Received: 8
    Given: 13
    Total Downloaded
    3.14 GB

    0 Not allowed!

    Default Re: How to read TTL input of a displacement transducer

    Hi Amod,

    Here is a link to a program that I posted that reads rotary encoder and sends the result serially. IOC interrupt is used to read the pins and most of the work is done in the interrupt handler:

    http://www.protonbasic.co.uk/showthr...566#post509566http://www.protonbasic.co.uk/showthread.php/77483-Lathe-DRO-for-use-with-TouchDRO?p=509566#post509566

    T
    o count up and down and below zero I use signed integers. Note also that it has X4 count, which means that it counts all changes of both channels.
    Flosi Guğmundsson
    Reykjavík

  • Attention
    ×

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #21
    Member amod's Avatar
    Join Date
    Mar 2018
    Posts
    128
    Thumbs Up
    Received: 38
    Given: 5
    Total Downloaded
    17.00 MB

    0 Not allowed!

    Default Re: How to read TTL input of a displacement transducer

    Thanks Flosigud.

  • Attention
    ×

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

    Thread Information

    Users Browsing this Thread

    There are currently 1 users browsing this thread. (0 members and 1 guests)

       

    Similar Threads

    1. PIC18F46K20 Can't read digital input on port D
      By normnet in forum Proton Plus Compiler v3
      Replies: 9
      Last Post: 20th May 2011, 20:20
    2. 18F26K22 Can't read Analog input on AN0
      By arifcan in forum Proton Plus Compiler v3
      Replies: 1
      Last Post: 14th May 2011, 13:45
    3. [SOLVED !] MultiTask? Read input while performing output
      By t0pP8uZz in forum Proton Plus Compiler v3
      Replies: 9
      Last Post: 2nd November 2009, 13:51
    4. Torque transducer
      By [email protected] in forum The Lounge
      Replies: 12
      Last Post: 28th September 2007, 21:06
    5. [SOLVED !] 2 TTL outputs to 1 PIC input?
      By ChrisB in forum Proton Plus Compiler v3
      Replies: 22
      Last Post: 5th January 2006, 07:37

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts