How this transistor is used to control TX, RX? Please help

Discussion in 'General Electronics Chat' started by anhnha, Jul 12, 2012.

  1. anhnha

    Thread Starter Active Member

    Apr 19, 2012
    773
    45
    Hi,
    I have just found a RS232 - RS485 Converter with Automatic RX - TX Control.
    The converter is available at http://www.radiolocman.com/shem/schematics.html?di=64700
    but they only give the schematic without any explain how it work.
    Could anyone help me expalain theory behind this circuit?
    How transistor is used to control the "Receive" and "Transmit" modes automatically?
    Thanks.
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
    When the PC begins transmitting TXD on DE9 connector pin-3, TXD RS-232 goes from LOW-to-HIGH.
    Serial data is inverted and routed to R2OUT U1-9 (MAX232 TTL output) to U2-4 (MAX485 TD).

    At the same time R3 and R11 drive the base of Q1 LOW which turns on PNP Q1. Collector of Q1 goes HI in turn setting U2- 2 (RE') and U2-3 (DE) both high.

    The result is U2 (MAX485) receiver is disabled while the transmitter is enabled.

    It does this on a TXD pulse by pulse basis when TXD RS-232 is HIGH.
     
    Last edited: Jul 12, 2012
    anhnha likes this.
  3. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,127
    266
    The transistor just acts as a logical inverter to drive the TX enable when the TX input is active. I would not use this device- it does not properly control the TX output driver, it leaves it floating when the TX goes to the idle state. It *might* work at low data rates, short cables, with very few nodes.

    A good RS485 converter keeps the TX enable active during the entire byte transmission, so the driver actively asserts both high and low states, rather than just driving one state and hoping the idle bias resistors take care of the rest.

    The trick is you need to know the baud rate so you can time the TX enable pulse correctly, and that is way beyond this simple device.
     
    anhnha likes this.
  4. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
  5. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,127
    266
    Neat! I wonder, it must have a little micro inside that looks at the pulse width and computes the ENABLE pulse time? or just a one-shot that is set to "long enough"??

    Details, details...
     
  6. anhnha

    Thread Starter Active Member

    Apr 19, 2012
    773
    45
    Thanks for all the useful help!

    Could you please help me figure out why R3, R11 is used to drive the base of Q1 LOW and the transistor just acts as a logical inverter to drive the TX enable when the TX input is active?

    As I see, when TX is active or -12V is tied to R1IN and R2IN of MAX232 so R1OUT and R2OUT pin will have 5V (TTL high logic).Because both R1OUT and R2OUT are same voltage therefore there is no change if I connect R1 OUT and R2OUT and then R3 will parallel with R11.I get stuck here I can not to analyse the role of R3,R4 and R11, why we need all of them?
    I am starting out with electronics, so sorry if I am asking wrong questions and please do tell me.
     
Loading...