Sometimes when you work on low-budget projects or don’t want to go shopping for max232 or similar IC, you can save your time and money by using other TTL to RS232 converter. We usually used to use a MAX232 chip like this:
Max232 IC is a specialized circuit that makes standard voltages as required by RS232 standards. This IC provides the best noise rejection and very reliable against discharges and short circuits. If your project is more advanced and has to reliable you must use specialized RS232 to TTL converter IC’s. As I said Specialized is more expensive than other solutions.
One of such solution is Transistor based interface:
Transistors can be any general-purpose transistors. This circuit is elementary and works without problems. It is the cheapest solution as it requires a couple of transistors and four resistors. Two transistors do the trick to get a negative voltage as required by some PCs. When the PC does not transmit data, its TX pin is stuck to a negative voltage. The negative voltage is picked up from the TX pin and brought back – through resistor R3 – to the PC’s RD pin.
RS232 alternatively can be interfaced using Logic gates. This is handy when your application uses logic elements, and there are a couple of gates left on some IC. As almost every PC can work with positive-only signals, logic gates can provide necessary inversions. For instance, using CD4066B CMOS IC:
And of course NAND and NOR circuits:
And don’t forget to Power the logic IC’s with 5V.