RS232 to TTL UART Converter

by vahidyou in Circuits > Microcontrollers

24946 Views, 31 Favorites, 0 Comments

RS232 to TTL UART Converter

i-1 & f-2.jpg
i-2 & f-1.jpg

In many microcontroller-based projects, you may need to communicate with PC. There are several ways to do this like RS232 COM port, USB port, parallel port, WIFI, Bluetooth, etc. You cannot directly connect computer to your microprocessor, you need wireless modules for WIFI and Bluetooth, voltage convertors for RS232 and parallel port and a protocol engine for USB. Here I am going to show you how to make a simple and compact RS232 voltage convertor for your projects that gets its power from the PC. If you are interested in making one yourself follow me.

Things You Need

1-1.jpg
1-2.png
  • 1x Female DB9 connector
  • 1x 3.5mm stereo audio male connector
  • 1x MAX232 IC
  • 1x 7805 regulator
  • 2x 1N4148 diodes
  • 1x 47uF electrolyte capacitor
  • 1x 100uF electrolyte capacitor
  • 4x 4.7uF electrolyte capacitors
  • About 1-5 meters 4-wire cable
  • Some small pieces of wire
  • Soldering tools (iron, wire and oil)
  • Circuit diagram (you can find it in the pictures)

Voltage Convertor Capacitors

2-1.jpg
2-2.jpg
2-3.jpg
2-4.jpg

I have chosen dead spider instead of PCB to have a more compact device. Solder four 4.7uF capacitors to the MAX232 IC according to the circuit diagram like the photos.

  1. C6: Pin+ to Pin2(MAX232), Pin- to Pin16(MAX232)
  2. C3: Pin+ to Pin1(MAX232), Pin- to Pin3(MAX232)
  3. C4: Pin+ to Pin4(MAX232), Pin- to Pin5(MAX232)
  4. C5: Pin- to Pin6(MAX232)

Supply Regulator

3-1.jpg
3-2.jpg
3-3.jpg

Solder 7805 regulator to the MAX232 IC according to the circuit diagram like the photos.

  1. Pin2(7805) to Pin15(MAX232)
  2. Pin3(7805) to Pin16(MAX232)

Supply Capacitors

4-1.jpg
4-2.jpg
4-4.jpg
4-3.jpg

Solder other capacitors to the MAX232 IC and 7805 regulator according to the circuit diagram like the photos.

  1. C2 (47uF): Pin+ to Pin16(MAX232), Pin- to Pin15(MAX232)
  2. C1 (100uF): Pin+ to Pin1(7805), Pin- to Pin2(7805)

Supply Diodes

5.jpg

Solder negative pin of 1N4148 diodes to first pin of 7805 regulator.

Wire Far Pins

6-1.jpg
6-2.jpg
6-3.jpg

Connect positive pin of C5 to second pin of 7805 regulator with a small piece of wire.

DB9 Connector

7-1.jpg
7-2.jpg
7-3.jpg

Solder DB9 connector pins to the circuit using small pieces of wires according to the circuit diagram like the photos.

  1. Pin4(DB9) to Pin+(D1)
  2. Pin7(DB9) to Pin+(D2)
  3. Pin5(DB9) to Pin+(C5)
  4. Pin2(DB9) to Pin7(MAX232)
  5. Pin3(DB9) to Pin8(MAX232)

Cable

8-1.jpg
8-2.jpg
8-3.jpg
8-4.jpg

Solder cable to 3.5mm audio connector, second pin of 7805 regulator and Pins 9 and 10 of MAX232 IC according to the circuit diagram. You can also use your own arrangement.

Insulation

9-1.jpg
9-2.jpg
9-3.jpg
9-4.jpg

Put some pieces of paper among the pins that can connect together accidentally as insulator.

Final Step

i-2 & f-1.jpg
i-1 & f-2.jpg

Now close the cover of DB9 connector and test what you made. Note that this device supplies from PC (RTS and DTR), so to power this device you must set (make high) serial port RTS and/or DTR.

I also made an adapter for USB port you can find here.