What would be a simple way to convert RS-232 +/-12 V digital levels into +5/0 V respectively?

  1. I considered an optocouple, but I can't find one that can withstand -12 V reverse voltage. I considered adding a two-resistor voltage divider, but I suspect that will worsen the slew rate of the device, and I have no idea if that will be enough to become a problem (I'm aiming at the switching speed of 19 200 baud).
  2. There's this simple answer, but it requires a transistor that can withstand +/-12 V as well - I'm looking for one right now but haven't found a suitable part yet. I'm also slightly worried about not having galvanic decoupling.
  3. I considered a 5 V linear stabilizer, but I suspect it may not be fast enough to turn off/on, after all, they weren't designed for this task.

Perhaps, an optocouple with a bulky diode in series capable of withstanding -12 V?

  • 1
    \$\begingroup\$ EIA RS232 accepts both levels. Why convert? \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Oct 8 '19 at 17:32
  • \$\begingroup\$ @SunnyskyguyEE75, I have not seen that mentioned anywhere yet. Can this be expected of a personal computer's COM port? \$\endgroup\$ – Violet Giraffe Oct 8 '19 at 17:42
  • \$\begingroup\$ Yes because the Rx accepts any level in this range even down to +/-3V \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Oct 8 '19 at 17:43
  • \$\begingroup\$ @SunnyskyguyEE75: fair point, thank you, very useful info indeed! \$\endgroup\$ – Violet Giraffe Oct 8 '19 at 17:44
  • \$\begingroup\$ @SunnyskyguyEE75: But wait, where am I going to get -3 V out of a +5 V device? \$\endgroup\$ – Violet Giraffe Oct 8 '19 at 17:45

Why not a MAX232? Purpose designed for exactly this application.


| improve this answer | |
  • \$\begingroup\$ Hm, it didn't occur to me. Requires quite a few capacitors, but otherwise seems very simple to use and the price is low enough. \$\endgroup\$ – Violet Giraffe Oct 8 '19 at 17:33
  • 1
    \$\begingroup\$ Also any other 5V powered RS232 receiver (or tranceiver) will do, and compatible clones of MAX232 tend to be cheaper. MAX232A and clones work with smaller capacitors than non-A version if it matters. \$\endgroup\$ – Justme Oct 8 '19 at 17:51

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.