TTL to RS485 with isolation and auto switching link direction

Discussion in 'The Projects Forum' started by alyeomans, Nov 4, 2015.

  1. alyeomans

    Thread Starter Member

    Sep 13, 2010
    29
    2
    Hi All

    I have been working on the following circuit which as per the title is a 5v TTL serial to RS485 converter. It features opto signal & ~150mA 12V power isolation and auto direction switching.

    isolate 485.png

    This is used at the end of a long cable and interfaces to a device emitting TTL serial on a command and response basis. The baud 9600.

    While this device works in that it sends and receives - my problem is that when the device outputs a serial signal this converter returns a couple of characters of hash which triggers the device to emit an error message which is a continuous loop of error messages. i.e the error message then triggers more hash and another error message.

    I believe the issue to be related to the auto direction switching around Q1. When there is a signal on the TX line this switches the MAX485 chip from RX to TX. My thoughts are that any serial string which consists of 0 and 5V is banging TX RX on and off. I can improve/rectify this by reducing the baud rate from 9600 to 4800 but this is not ideal due to the device sampling at specific rates. Also I need to confirm this is a MAX manufacture chip.

    I thought about adding an RC timer for about 0.3 seconds using R2 at 100K and adding a 1-10uF cap to ground between R2 and Q1.

    Anyone have any thoughts?

    Cheers
    Alex
     
  2. alyeomans

    Thread Starter Member

    Sep 13, 2010
    29
    2
    Bump

    it is a MAX483 chip -
    * data rate 0.25Mbps
    * slew rate limited: yes

    Max485 has-
    * data rate 2.5Mbps
    * slew rate limited: no
     
  3. john hauton

    New Member

    Dec 19, 2009
    8
    3
    Is it possible that you are getting feedback of some kind?
     
  4. Picbuster

    Member

    Dec 2, 2013
    373
    50
    facts:
    RS485 is full or 1/2 duplex your circuit is 1/2 duplex ( send or receive)
    RS485 operate in 'point to point' or Multi drop mode. (the last one needs address to identify unit)
    RS485 1/2 duplex Always start in listen mode and switch over to xmit when free for (N) milliseconds called turnaround time.

    your circuit is not having than mechanism as far as I can see.
    advice ad a cheep pic 12f675 and you problem is solved.
    (few lines of programming)
    look at the rs receiver and data to transmit. But data could get lost due to missing handshake with your sensor. ( while transmitting during turnaroud time).
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,137
    1,786
    What is the purpose of Q1?
    What is the delay through the opto?
    If you want to do line turnaround the correct way you need adequate time between disabling the receiver and the start of transmission. Then you need adequate time between the end of transmisssion and the beginning of reception. I have no idea if the MOSFET has an appropriate delay or switching time.
     
    Last edited: Nov 6, 2015
Loading...