NOTE: Safety is your responsibility. While the information contained in these pages is intended to instruct in a meaningful and safe manor, the construction of any project often comes with a certain level of inherent danger. As a result, the author in no way assumes any responsibility for any damages incurred while following the steps or instructions in these pages including but not limited to property and personal injury/damage/loss of any kind. As always, please use proper safety gear when using any power tools or undertaking any construction project, AND USE COMMON SENSE!
This circuit provides an interface between a standard inverted logic +/-12V RS-232 device (e.x. a PC) and a non-inverted 0-5 volt device (e.x. a microcontroller). The circuit does not require a separate external power supply since it "steels" power from the RS-232 DTR and RTS pins. This circuit supports full bidirectional receive and transmit signals.
Many dedicated IC's already exist which are specifically designed to perform this task and which require the addition of just a few external components (the most popular of which are made by Maxim Integrated Products). The intention of designing this circuit was not to outperform these IC's, but rather to design a simple bi-directional RS-232 compatible interface which does not require an external power supply and can be produced quickly with off-the-shelf parts (which are available from Radio-Shack).
The completed and fully functional circuit is depicted in Figure 1. The design is fairly elegant in its simplicity while still including a number of features to virtually eliminate the possibility of harming any of the connected electronic devices**.
Figure 1: Bi-directional serial port interface circuit (Rx & Tx).
The PCB layout for this design is depicted in Figure 2. This layout is in no way optimized and can probably be significantly reduced in size if you move things around a bit. Nevertheless. the resulting PCB is about 1 inch square and was sufficiently small for my application at the time.
Figure 2: PCB layout and connection descriptions for the serial port interface.
The schematic for the circuit described in this page is depicted below.
Figure 3: Schematic diagram for the serial port interface (Rx & Tx).
**Disclaimer: While the circuit was engineered to minimize the possibility of harming any of the connected electronic devices, the author makes to claims or warranties to the safety of this electronic circuit and in no way assumes any responsibility for any damages incurred while building or using the device described in these pages including but not limited to property and personal injury/damage/loss of any kind. Golden rule: always be sure to test your circuits before connecting them to anything of value!