Many makers have purchased development boards such as Arduino UNO, STM32, RPI Pico etc. If you need wireless connectivity, then you might even have bought ESP32, Arduino Nano 33 IoT and Ameba RTL8722 or BW16. Almost all of them have come with a on-board Serial to USB module that is one of the 3 ICs shown down below,
Serial to USB module is so useful because it provide a easy and stable way to interact with host PC and even upload new firmware onto microcontroller through it.
I knew very little about these ICs until I decided to design and make my own Dual-band WiFi + BLE5.0 microcontroller early this year.
The fact is, I succeeded!
It comes in 2 versions,
With DIY PCB
Though my DIY dev. board project is still ongoing, but if you are interested, you may check out this forum where I will post my progress and updates
So back to the topic,
Why still talk about Serial to USB module?
Because this to me is one of the “challenging” part of my project, as I expect the Serial to USB module to serve 2 purposes,
Provide UART interface between PC and MCU
This is a must because with that only can I read log, key in AT command, or even upload new firmware onto it
Supply power to the MCU
Since it’s important to keep the circuit simple and cost-down, I expect to use this module to supply power to the RTL8720DN IoT module.
In fact, all these 3 Serial to USB module can do what I expected, but with different specs.
Goal 1: To provide UART interface between PC and MCU
Most critical part here is which logic level can they run on and which one has the highest Baud Rate,
Model Logic level CH340 3.3V & 5V CP2102 3.3V only FT232 3.3V & 5V Model Baud Rate (bps) CH340 2,000,000 CP2102 1,000,000 FT232 3,000,000
It’s clear that FT232 is the winner
Goal 2: To supply power to the MCU
With all the ICs rated at 3.3V, the one that can draw highest current will win,
Model Output current from Vcc (mA) CH340 20 CP2102 26 FT232 50
It’s obvious that FT232 is the winner again
All these Serial to USB modules are NOT designed to supply constant and stable power to external device, thus don’t expect them to work as per normal when you hook your DIY development board with heavy loadings or using power-consuming peripherals such as WiFi, LCD or Camera.
Also, in my testings, my DIY development board would reset itself when there is a surge of current drawn. To counter this, you may use a big capacitor(220uF) across the Vcc and GND to supplement the current when the surge comes.
With the right source and timing, all these can be bought at the same price.
Therefore, to me
FT232 is my GO-TO option, and I have already used it in my project
PS: as a software engineer, I might have made mistakes I myself couldn’t notice, so please forgive my amateurishness and let me know what you think
Hope this is useful to you~
Stay healthy and happy coding