I am planning to use this UART-to-RS485 module :- http://www.elecrow.com/uart-ttl-to-rs485-twoway-converter-p-1545.html. This module is bidirectional and uses a single pair of differential signal to transmit/receive data. My question is how is the chip deciding whether it has to transmit data from TXD to A+ B- or from A+ B- to RXD?. Shouldn't there be 2 pair of differential signals, one pair for TX and the other pair for RX? What is happening in this module??

enter image description here

  • 4
    \$\begingroup\$ Have you looked at how rs485 works? Did you come across the term "half duplex" during your research? \$\endgroup\$ – PlasmaHH Jul 5 '16 at 10:59
  • 1
    \$\begingroup\$ @PlasmaHH - I think you may be missing the point i.e. how does the chip automatically change data direction. \$\endgroup\$ – Andy aka Jul 5 '16 at 11:03
  • \$\begingroup\$ @dim: interesting, I only ever worked with three wire rs458 (D+, D-, GND) in a bus setup where you have to deal with access collisions anyways. \$\endgroup\$ – PlasmaHH Jul 5 '16 at 11:23
  • \$\begingroup\$ I think it would be helpful if you tell which RS485 transceiver that's mounted on the board. \$\endgroup\$ – Lundin Jul 5 '16 at 14:20

More than likely it switches into transmit mode when TXD becomes active and a diode and capacitor "latch" that first transmit edge and hold that voltage "active" for longer than at least one byte.

I see a little surface mount diode on the PCB (D1) and quite possibly this is what I'm referring to. I have seen this trick done before and the only disadvantage is that when the TX session ends there might be a few milliseconds to wait before the RX direction is restored (due to the capacitor discharging).

I found this on the web as a partial circuit: -

enter image description here

When receiving, TX0 is active high thus forcing a low on DE (as expected). When TX0 goes low it rapidly discharges C0 and sets up the direction port for transmitting. When transmitting and TX data changes state, C0 remains largely discharged although ultimately R3 will slowly (relatively speaking) re-charge it but not until some time after the last transmit byte has been sent. Values shown i.e. 22k and 1000pF are dependent on baud rate.

  • \$\begingroup\$ sir could you please draw the circuit \$\endgroup\$ – Rishi Sharma Jul 5 '16 at 11:21
  • 5
    \$\begingroup\$ @RishiSharma -You have the module. Why don't you inspect the circuit, get data sheets for the parts and draw your own schematic. It is rather outlandish that you could even expect Andy to do it then even have the gall to ask in the first place. \$\endgroup\$ – Michael Karas Jul 5 '16 at 13:14
  • \$\begingroup\$ @MichaelKaras well I don't have the module actually........I was thinking of replicating it on a pcb I am designing.....I just couldn't figure out the working of this module. Plus there is no datasheet or anything that I could find on the website. \$\endgroup\$ – Rishi Sharma Jul 5 '16 at 14:25
  • 3
    \$\begingroup\$ @RishiSharma - Well your question did say "I am using this RS485...". \$\endgroup\$ – Michael Karas Jul 5 '16 at 21:32
  • \$\begingroup\$ @Andy aka I have the module with me but now I cannot identify the second chip. Could you or anyone else please suggest what that ic could be \$\endgroup\$ – Rishi Sharma Jul 30 '16 at 8:05

I reverse engineered the exact board pictured in the asker's post. The resistor and capacitor values are not what are there on the board - I selected them for my own circuit. However the schematics is almost accurate - "almost" because I have added a 120 ohms impedance matching resistor and capacitors on the A+, B- lines.

UART to RS485 Schematics


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.