logo elektroda
logo elektroda
X
logo elektroda

Convenient dual USB to UART converter - CH342 - USB-2TTL

p.kaczmarek2 864 14
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • USB-C to dual UART converter board with CH342 chip on a purple PCB
    Here's something I've needed for a long time - a dual USB to UART converter, i.e. one USB connector and two serial ports on the output, and this together with the DTR/RTS flow control signals brought out, which can be used, for example, to reset and control the bootloader mode of external devices. The whole thing can be bought for about a dozen zloty, the price depends on the quantity imported and the online shop chosen.
    CH342 USB-C to dual UART modules with DTR/RTS pins and 3.3 V/5 V support
    Like the well-known CH340, this chip gives us a choice between 3.3 V and 5 V logic levels. Also in an analogous way, it has one rather serious shortcoming, namely that it cannot provide a sufficiently large current from its 3.3 V pins for many applications, so if we want to run some Wi-Fi modules with it such as the ESP8266, ESP32 or there BK7231, we need to arm ourselves with an external chip with a 3.3 V LDO, such as the AMS1117-3.3 for example.
    The CH342 itself is available in tiny housings such as QFN24 (CH342F) and ESSOP-10 (CH342K). The CH342 requires minimal external components to operate.
    Block diagram of the CH342 chip showing USB to dual UART conversion Pin diagrams of CH342F and CH342K chips with detailed pin definition table Block diagram of CH342F with USB interface, dual UART, and filtering capacitors

    The main motivation and 'battle test' for this module was to use it to work with BK7231 , as this chip has two UART ports that are both actively used during firmware development - one is used to display the device activity log and the other for programming. Here are the pictures from colleague @DeDaMrAz :
    Electronic module with 3V3, RX1, TX1, RX2 pins and soldered colored wires
    Unfortunately, however, it was not possible to make the absolute minimum connection, as the Beken would not start without an external 3.3 V supply:
    CH342 USB-C module with wires connected to a peripheral device on a blue mat
    USB-2TTL CH342 module connected to device using multicolored wires
    Looks like we're in for an additional 3.3 V LDO hand-soldering to the underside of the board shown. How about finding a module with CH342 and AMS1117-3.3? That would be the best option.
    In any case, the UART works fine - the computer immediately sees the COM ports, here for example COM4 and COM7 and we can operate them via Realterm:
    Two PuTTY windows showing active communication on COM4 and COM7 ports

    In summary , I liked the CH342-based USB-2TTL module very much. Its only downside is the lack of a good LDO on board, which complicates things in some tasks and, for example, makes it difficult to connect the whole thing to a programmable Wi-Fi module. On the other hand, I consider the presence of DTR and RTS lines to be a plus - many cheaper adapters lack this.
    Finally, it is worth mentioning that the module is equipped with a modern USB C-type connector, so there is no problem with the orientation of the plug.
    Have you used the CH342? What applications do you see for this chip?

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 13239 posts with rating 11048, helped 612 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21747900
    irekhq
    Level 13  
    Do you have the possibility to check the operation on some Linux ?
    My CH341 often had problems working when connected to faster usb ports.
    Connecting via a hub at a lower speed helped.
  • ADVERTISEMENT
  • #3 21747932
    TechEkspert
    Editor
    I like it! Seemingly a trivial idea but in many cases using 2 UART two converters are less convenient than a single one.
    @gulson maybe there is a chance for such dual converters with CH342 to appear in the electroda.pl shop?

    I generally trust cp210x more than UART<->USB converters with CH34x however in this case they showed something new, clever and useful.
  • ADVERTISEMENT
  • #4 21748354
    gulson
    System Administrator
    TechEkspert wrote:
    @gulson maybe there is a chance for such dual converters with CH342 to appear in the elektroda.pl shop?

    Unfortunately I do not have access to them.
  • #5 21748364
    ElektroMuzyk
    Level 17  
    I have a question. Do we see 2 com ports in the system? E.g. com5 and com6?
  • #6 21748404
    piotr_go
    DIY electronics designer
    There are still modules on the CP2105.
  • #8 21748800
    Jogesh
    Level 28  
    Of the dual ones, there's also the XR21V1412IL32TR-F. I used the single version and it worked well with a wide baudrate range.
  • #9 21749113
    Karol966
    Level 31  
    IS wrote:
    There is also the FTDI4232

    About this toto. I was just about to write about it - majfriends also have a ready-made one, e.g:
    https://pl.aliexpress.com/item/1005003624740507.html

    The chip itself is sitting on my desk, the FE1.1S expander is still waiting for it - the idea was rather interesting - to make a compatible PCB under Atmel ICE + just FT4232 (I have one of the devices that requires as many as 3 UART ports for full operation).

    At a quick glance I see quite a few ready-made, multi-UART (4-8 channels) devices on Ali:
    https://pl.aliexpress.com/item/1005005750870625.html
    https://pl.aliexpress.com/item/1005007928356683.html
  • ADVERTISEMENT
  • #10 21749553
    ostrytomasz
    Level 24  
    Question: does it not stretch the stop bit for speeds above 500 kbaud like CH340 and CH341 (https://github.com/nospam2000/ch341-baudrate-calculation)?
  • #11 21750330
    p.kaczmarek2
    Moderator Smart Home
    I will try to check what you have written about.

    @ElektroMusician - then there are two COM ports visible, as in the subject content and in the screenshots.
    I think this LDO from the board is an XC6206.
    Extract of Torex XC6206 voltage regulator datasheet
    Loaded with 250 mA (just over specifications) after about 15 seconds:
    Thermal image of a PCB showing 76.0°C in the lower area under load
    Helpful post? Buy me a coffee.
  • #13 21752643
    MarekS6
    Level 17  
    As others have mentioned here there are also 4 channel adapters for the FT4232.

    I was recently building a reader for my own use and was looking for some usb <-> 4x serial port adapter and bought one like the one in the picture from a Chinese guy. It has as many signals out for each port 😊

    USB to 4x UART module with FT4232 chip and micro USB connector
  • #14 21752685
    E8600
    Level 41  
    Somewhere I flashed some programmer on a CH347 that read/programmed SPI even expressly relative to the well-known CH341.
  • #15 21752781
    ElektroMuzyk
    Level 17  
    p.kaczmarek2
    Thank you very much for your reply.

    Overall a very cool topic. I have found a lot of helpful posts here regarding what has been bogging down my mind. Although the project has bogged down, sometimes you need patience in reaching your own goal.
    Greetings to all :)
📢 Listen (AI):
ADVERTISEMENT