RS232 with Opto-Isolation

I had to once interface an high voltage circuit to PC, The uC had to communicate thru RS232–Comm port–Serial Port.

Part of the 80C31 8051 SBC

Even though i had isolation at the sensors and actuators to make doubly sure the PC also has been isolated. There are chips that are available for this purpose, The circuit above is built with discrete and passive components except for the opto 4N35. You can use MCT2E and CNY17-3 Optos too. For MCT2E some tweak may be needed as current transfer ratio is 20, for the other two CTR is 100 so above design will work.
RS232 with Opto-Isolation

The circuit derives power from PC but does not load the PC supply. Any voltage above 5V applied to the PC connectors may lead to damage of motherboard in PC. Old PCs were more vulnerable but PCs today maybe a bit rugged at the Ports. Due to internal current limits and clamping.

The VCC, VDD and Agnd are derived from PC no other power needs to be applied on PC side of opto. On uC side of opto the uC power supply lines +5 and gnd has to be used. There is no copper link between the two sides and depending on opto a 1KV isolation is possible if PCB is well designed. The PCB should show the visual isolation above and components should be laid on separate areas of PCB to prevent creepage.

The LEDs are to indicate the port activity Rx and Tx, they are not required once testing is over. The circuit can be simpler, but this worked for me and it is not tested at very-high buad rates.

The levels of RS232 are not TTL like 0-5 we have both polarities +10 and -10. The circuit has to change that to drive the Opto Leds.

RS232 software. Understanding RS232 Serial Port Communication.

  • Digital to Analog Converter with uC WatchdogDigital to Analog Converter with uC Watchdog
    This is the continuation of the earlier post. Part of 80C39 based Process Controller. In this schematic you can see the Watchdog and D/A Converter. [...]
  • Interface ICL7135 Voltmeter to PC
    A PC based Analog Voltmeter. The Printer Port or Parallel Port Interface is used to acquire high resolution analog data using ICL7135. This is a [...]
  • Stabilizer Step up 110V AC to 230V AC 500VAStabilizer Step up 110V AC to 230V AC 500VA
    It can Stabilize Mains voltage to around +/- 10% . It can be used for both 110V AC or 220V AC inputs with modifications. The [...]
  • Li-Ion Battery ChargerLi-Ion Battery Charger
    This circuit is built around LM3647 an Universal Battery Charger, This Circuit is an untested design. It is based on application hints and was provided [...]
  • 555 based Reset Generator
    You must have read all the circuits and explanation on the other pages at delabs to understand this, as i cannot repeat the same thing [...]
  • Differential Amplifier – Op-Amp Circuits
    This amplifies the difference between two inputs Vp and Vn the low impedance of this configuration is a drawback, but can be used in analog [...]
  • Connection Diagram of AC Control SSR
    SSR or Solid State Relay or Electronic Relay Connection Method. This is a Thyristor Based Normally Open 230V Switch that can be turned on / [...]
  • Running Lights with CD4017
    The 555 Astable generates a clock for this circuit, an oscillator giving a square wave output at pin 3 which is counted by 4017 to [...]
About delabs 160 Articles
Product Design - Industrial Automation and Instrumentation. -