Introduction: RS232 to TTL UART Converter

Picture of RS232 to TTL UART Converter

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.

Step 1: Things You Need

Picture of Things You Need
  • 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)

Step 2: Voltage Convertor Capacitors

Picture of Voltage Convertor Capacitors

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)

Step 3: Supply Regulator

Picture of Supply Regulator

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)

Step 4: Supply Capacitors

Picture of Supply Capacitors

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)

Step 5: Supply Diodes

Picture of Supply Diodes

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

Step 6: Wire Far Pins

Picture of Wire Far Pins

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

Step 7: DB9 Connector

Picture of DB9 Connector

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)

Step 8: Cable

Picture of Cable

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.

Step 9: Insulation

Picture of Insulation

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

Step 10: Final Step

Picture of Final Step

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.

Comments

UtkarshVerma (author)2017-06-23

I tried loopback test on it and it was successful. However my bluetooth audio module XS3868 doesn't work with it.(It works with Arduino UART). What is the cause?

vahidyou (author)UtkarshVerma2017-06-23

As it mentioned on the last step "this device supplies from PC (RTS and DTR), so to power this device you must set (make high) serial port RTS and/or DTR", so if the terminal software you use does not set DTR or RTS there will be no power for this device to work.

UtkarshVerma (author)vahidyou2017-06-23

I used a Voltmeter and was successfully receiving 5V through the voltage regulator. So I assure you that it is not a voltage problem. Instead it might be something else. Also, when I interconnected Rx and Tx of the UART, I was successfully receiving what I was typing. This is all I know. You happen to know anything?

P.S. My module requires a baudrate of 115200bps.

vahidyou (author)UtkarshVerma2017-06-24

I have no idea.

UtkarshVerma (author)vahidyou2017-06-24

ok

kvs0 (author)2016-08-19

Hi, thank you for this

Can you advise how to set RTS and DTR to high?

Regards

Nick

vahidyou (author)kvs02016-08-19

You must set RTS or DTR by the program that uses the serial port.

kvs0 (author)vahidyou2016-08-19

Thank you

Mike Fury 2 (author)2016-02-01

Awesome!

About This Instructable

4,557views

19favorites

Bio: I'm a mechanical engineer, and I like computer programming, mechanics, electronics and specially the robotics.
More by vahidyou:Serial Port Over WiFiCheap Logic AnalyzerCheap STK500 AVR programmer for Atmel Studio
Add instructable to: