HOW TO MAKE USB to TTL CONVERTER (CH340)
by EDISON SCIENCE CORNER in Circuits > Electronics
5706 Views, 4 Favorites, 0 Comments
HOW TO MAKE USB to TTL CONVERTER (CH340)
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
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
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
- 1*CH340G
- 1*12MHZ crystal
- 3*1k Resistors
- 4*.1uf capacitors
- 3*0805 SMD LEDs
- 2*22pf capacitor
- 1*micro USB port
PCB FABRICATION FROM JLCPCB.COM
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
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
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.