This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SN65HVD72: Schematic Review

Part Number: SN65HVD72
Other Parts Discussed in Thread: MAX3221, SN74AUP2G17, THVD1426, THVD1406

I have an rs232 communication line that I have been communicating directly to an esp32. Recently I decided to include a SN65HVD72DR for a little added protection. Since I have been communicating directly for months, I decided to leave rx and tx on all the time by holding the re low and the de high. I thought this would work. However, now that I have added this transceiver to my board I have no serial comms. Am I using this incorrectly?

Serial-/ Serial+ ties to my esp32

Serial_-/Serial_+ ties to the device I am interfacing with.



  • J3T,

    Thanks for posting this to E2E, our experts have been notified and will respond after the Thanksgiving holiday in the US.

    Regards,

    Eric Hackett 

  • RS-232 and RS-485 are quite different. Which one are you actually using?

    This schematic is incomplete. How exactly are the Serial+/- signals connected?

    The SN65HVD72 is a half-duplex, differential transceiver. Pulling DE high will make it output a signal on both A/B pins at all times, so you will not be able to receive anything.

  • I need this to work as rs232. Serial+/- are connected straight to an esp32. Previously, I just had the serial_- and serial_+ direct to esp32 with no problems. 

  • Please note that RS-232 is an electrical standard with voltages up to ±15 V; the ESP32 does not support this.

    The purpose of RS-232 transceivers like the MAX3221 or RS-485 transceivers like the SN65HVD72 is to convert between different electrical protocols. This is not what you want.

    I do not know what you want to protect against. For overvoltage, TVS diodes as shown in your schematic are OK. To isolate the ESP32 from the external pins, it would be possible to add buffers like the SN74AUP2G17.

  • Is there a way to make this sn65hvd72 actually comm over RS232 or do I need to do a max3221?

  • The SN65HVD72 works only with RS-485 signals. The MAX3221 works only with RS-232 signals. (Are you sure that you have RS-232 signals? If you actually used them, it is likely that the ESP32 would get fried by them.)

  • I went and grabbed a serial tool that works on this. It uses a SP485 transceiver. I did this schematic a while back and didn't remember why I went down this route. My signal is actually TTL. Sorry for the confusion on this. I chose the SN65HVD72 as my ic as it seemed to be a drop-in for the sp485.



    I am attaching the schematic of this transceiver in the factory setup. Would the SN65HVD72 work the same way if configured the exact same way?

  • Yes, RS-485 transceivers use this standard pinout.

  • This should work for ttl no problem correct?

  • Yes; the RO, /RE, DE, and DI pins use TTL voltage levels.

  • Hi J3T,

    As Clemen's pointed out the device you are using is an RS485 transceiver and it does not work like an RS232 transceiver does. Your current configuration will only allow you to send data through DI, you will only be able to receive the same data on RO. 

    May I ask how far you are trying to communicate? Currently you don't have a termination resistor in your schematic. This isn't always required and can be beneficial for power savings but if the distance you are communicating is quite far, then you will likely need termination to ensure the signal isn't attenuated on the receiving end.  

    -Bobby

  • I am only trying to communicate over 5 ft. Is there a way I can modify this to allow me to tx and rx with this transceiver?

  • The app note below shows how you can make an auto direction circuit which requires one additional IC.

    https://www.ti.com/lit/ug/tidubw6/tidubw6.pdf?ts=1701204863727&ref_url=https%253A%252F%252Fwww.google.com%252F

    Otherwise, you can look at an auto directional RS485 device like THVD1406 (This one supports 500kbps which looks like it meets the speed of your current SN65HVD72) or THVD1426 (12Mbps which may be too much for your set up, faster isn't always better).

    Additionally, I would probably put a 120 ohm DNP (do not populate) resistor between A and B incase you need it later. 

    -Bobby