DIY CH340G USB to Serial Adapter

Looking for a solution to connecting my 6502 Badge to my PC, I came to a dead end when I discovered that my USB to Serial adapter had been lost, stolen, or worse, discovered by someone else.   What was I to do?!?!

Luckily enough, I had recently ordered several (read: 50) CH340G USB to TTL Serial adapters.  Knowing that these were supposed to be pretty much plug and play, I decided to break some out and play with them.

The first thing that I needed to do was find an adapter board.  The CH340G being in an SOIC-16 footprint, there was no way that I was going to attempt to “dead-bug” the chip onto a piece of perfboard.  My eyes are not what they used to be, and I didn’t feel like messing with it.  I had made some SOIC-14 adapter boards several years ago, and wondered if those would work with a little modification.

Looking at the board, it became apparent that the two bottom pins would need to be bent up to prevent them from shorting out on what would end up being the VCC line.  Looking at the pinout to the chip proved this would be no big issue, as the two pins that would be bent upwards were XO (Oscillator Out) and CTS.  The XO line would not be needed, since I planned on using a CAN Oscillator.  And the CTS line could always be tapped with a piece of wire-wrap wire to break it out to the board.  But in this case, it wasn’t currently needed.

Knowning that the pinout would work, I soldered the chip to the adapter board, and began laying out the USB-B connector, DIP-14 Full-size Can Oscillator, and the IC on a 5x7mm perfboard.

Once I had a suitable layout, I went to town, and within 10 minutes I was ready to test the connection between the IC and the Computer.  Plugging the device into the computer I hear the audible notes from the PC, letting me know that something had been found.  I pulled up the Device Manager, and I was greeted with the sight below.

Thats right, It worked!  Now I just needed to finish wiring it up.  I decided that since the 6502 Badge had a pin for Reset, I better include it into my design.  And I quickly found a push button.  After wiring everything up I knew I needed a way to test the device to ensure it was working properly.  I remembered that I had a ATMega16 on a 5x7mm perfboard.  I pulled up the Arduino IDE and wrote a short sketch to turn on and off an LED and do a write to serial at each state change.

After I was done, I plugged the CH340G board into the compture wired it up to the ATMega16 board, which instantly began to blink, and checked my Serial Port in TeraTerm.  The next thing I knew I began seeing text on the screen.  “LED On…LED Off”.  It was a success!

So now I knew that not only did my CH340G ICs worked, but I also knew what I needed to do to get them embedded in my projects.  And now that I knew a thing or two about them, I think maybe the CH341A Parallel Port variety may come in handy as well…  Seems like it could come in handy in many different projects….

Leave a Reply

Your email address will not be published. Required fields are marked *