HOW TO MAKE USB to TTL CONVERTER (CH340)

by EDISON SCIENCE CORNER in Circuits > Electronics

5987 Views, 4 Favorites, 0 Comments

HOW TO MAKE USB to TTL CONVERTER (CH340)

1652618228293-01.jpg
DIY USB TO TTL(Serial) CONVERTER | Jlcpcb | ESC

Hello there,

To upload code to Arduino pro mini, esp12e or Atmel microcontrollers we need an external USB to serial or TTL converter. Lots of converters are available in the market for low prices like CP2102, F2232R, PL2303 and CH340. I just want to build my own converter. So I decided to make a USB to TTL converter. So in this tutorial, I am showing how I designed and made this cute USB to TTL converter. Let’s get started.

CIRCUIT DIAGRAM

Schematic_ch340g usb to ttl_2022-07-05.png

As always everything starts from the circuit and this is the circuit. So I designed the basic circuit diagram using easyeda.com I am using ch340 ic for this. I choose ch340ic because this ic is easy to solder and it has a 3.3.volt output. so we can program also with 3.3v logic ics

PCB DESIGNING

Screenshot (103).png
Screenshot (104).png
Screenshot (105).png

After designing the circuit I converted the circuit into PCB and then I arranged components and made the PCB. After designing our PCB looks like this.

COMPONENTS NEEDED

IMG_20220621_225838.jpg
  1. 1*CH340G
  2. 1*12MHZ crystal
  3. 3*1k Resistors
  4. 4*.1uf capacitors
  5. 3*0805 SMD LEDs
  6. 2*22pf capacitor
  7. 1*micro USB port

PCB FABRICATION FROM JLCPCB.COM

Screenshot (102).png
IMG_20220510_165106.jpg
IMG_20220510_164949.jpg

Next, I downloaded the Gerber files for PCB fabrication. to fabricate PCBs I went to jlcpcb.com. JLCPCB offers

only $2 for 5pcs 1-4 layer PCBs and their PCB assembly starts from 0 dollars. I uploaded the Gerber files to jlcpcb and ordered the yellow colour PCBs

Get JLCPCB $54 new user coupon: https://jlcpcb.com/ESC

After 2 weeks I received the PCBs from JLCPCB.

MAKING THE PCB

IMG_20220510_165127.jpg
1652618135893-01.jpg
IMG_20220510_165206.jpg

Now I grabbed ch340, crystal, micro USB port and other components. Here I am going with the reflow soldering method so first, I dispensed solder paste to the PCB pads after doing that I placed components. Now it’s time to reflow. So I placed the prepared PCB on my DIY hotplate and now see the process after reflow you can see the PCB cooking. Next, I placed other components and soldered them with my soldering iron. After finishing the soldering job our PCB look like this. See our new PCB is only having the half dimensions of the old PCB. Awesome right.?

TESTING

IMG_20220510_164921.jpg
IMG_20220510_164909.jpg

Now let’s connect a micro USB cable. And see the light. Now on the computer, you can see the computer detected our converter. Now let’s upload a sample code to this USB portless Arduino pro mini. So I connected wires to Arduino pro mini now I connected VCC to 5v ground to ground tx to RX RX to tx and DTR to DTR. after this connection in the Arduino IDE I opened the blynk example code and changed the blynk delay to 100 ms after that I selected the port and board and uploaded the code to pro mini now you can see the led of pro mini blinking perfectly. Our USB TO TTL CONVERTER worked without any problem.

THANK YOU