{"id":19144,"date":"2023-02-14T15:58:45","date_gmt":"2023-02-14T08:58:45","guid":{"rendered":"https:\/\/www.makeriot2020.com\/?p=19144"},"modified":"2023-02-14T15:58:51","modified_gmt":"2023-02-14T08:58:51","slug":"multipurpose-usb-uart-module","status":"publish","type":"post","link":"https:\/\/www.makeriot2020.com\/index.php\/2023\/02\/14\/multipurpose-usb-uart-module\/","title":{"rendered":"Multipurpose USB UART Module"},"content":{"rendered":"\n<p>USB-to-Serial converters are some of the most used modules on my bench. I have quite a few of them, most of them are the cheap online type that can be had for a few dollars. <\/p>\n\n\n\n<p>As part of my new project, where I am seriously looking for an alternative chip to replace the ATMEGA328, which has become almost impossible to get, and super expensive when you do get it, I needed to get hold of a UPDI programmer.<br><br>There are many available online, from cheap to more expensive, but I wanted to build my own, as it did not seem too difficult to do.<\/p>\n\n\n\n<p>As another part of my daily tasks, I also use a lot of ESP-type chips, which have a particular procedure to upload code via an external serial adapter. <\/p>\n\n\n\n<p>The idea was thus to design a USB UART module that has multiple purposes, as well as being easy and cheap to assemble.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Be able to program ATMEGA328 Chips via Serial<\/li>\n\n\n\n<li>Be able to be used as a standard USB-to-UART adapter<\/li>\n\n\n\n<li>Be a UPDI programmer<\/li>\n\n\n\n<li>Have a selectable target voltage between 3.3v and 5v<\/li>\n\n\n\n<li>Have all modem signals (RTS, CTS, DSR, DTR) broken out.<\/li>\n\n\n\n<li>Be able to auto-flash and reset an ESP32 or ESP8266 device, or similar<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"576\" data-src=\"http:\/\/makeriot2020.com\/wp-content\/uploads\/2023\/02\/Breadboard-Prototype-1024x576.jpg\" alt=\"\" class=\"wp-image-19149 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Breadboard-Prototype-1024x576.jpg 1024w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Breadboard-Prototype-300x169.jpg 300w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Breadboard-Prototype-768x432.jpg 768w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Breadboard-Prototype-1536x864.jpg 1536w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Breadboard-Prototype-2048x1152.jpg 2048w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Breadboard-Prototype-1200x675.jpg 1200w\" data-sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/576;\" \/><figcaption class=\"wp-element-caption\">Breadboard Prototype Multipurpose USB-to-UART\/UPDI Programmer<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">What is on the PCB?<\/h3>\n\n\n\n<p>The PCB is powered by the PC USB port. The target device voltage is selectable between 3.3v and 5v. The device mode can be changed from UART to UPDI mode with a jumper. An additional header specifically for ESP32\/ESP8266 devices is provided, giving access to the FLASH and reset signals for the ESP device.<\/p>\n\n\n\n<p>The USB to serial conversion is taken care of by a CH340G Chip, which provides all the relevant modem signals as well.<\/p>\n\n\n\n<p>All signals, with the exception of the &#8220;RING&#8221; signal, are broken out onto the main header. <\/p>\n\n\n\n<p>Note that there are NO status or POWER LEDs on the board. This was on purpose, as these sometimes interfere with the UPDI programming mode.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"576\" data-src=\"http:\/\/makeriot2020.com\/wp-content\/uploads\/2023\/02\/assembled-1024x576.jpg\" alt=\"\" class=\"wp-image-19148 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/assembled-1024x576.jpg 1024w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/assembled-300x169.jpg 300w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/assembled-768x432.jpg 768w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/assembled-1536x864.jpg 1536w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/assembled-2048x1152.jpg 2048w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/assembled-1200x675.jpg 1200w\" data-sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/576;\" \/><\/figure>\n\n\n\n<p>Prototype PCB &#8211; Assembled<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"576\" height=\"1024\" data-src=\"http:\/\/makeriot2020.com\/wp-content\/uploads\/2023\/02\/Front-576x1024.jpg\" alt=\"\" class=\"wp-image-19146 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Front-576x1024.jpg 576w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Front-169x300.jpg 169w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Front-768x1365.jpg 768w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Front-864x1536.jpg 864w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Front-1152x2048.jpg 1152w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Front-1200x2133.jpg 1200w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Front-scaled.jpg 1440w\" data-sizes=\"(max-width: 576px) 85vw, 576px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 576px; --smush-placeholder-aspect-ratio: 576\/1024;\" \/><figcaption class=\"wp-element-caption\">PCB &#8211; Top<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"576\" height=\"1024\" data-src=\"http:\/\/makeriot2020.com\/wp-content\/uploads\/2023\/02\/Back-576x1024.jpg\" alt=\"\" class=\"wp-image-19147 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Back-576x1024.jpg 576w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Back-169x300.jpg 169w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Back-768x1365.jpg 768w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Back-864x1536.jpg 864w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Back-1152x2048.jpg 1152w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Back-1200x2133.jpg 1200w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2023\/02\/Back-scaled.jpg 1440w\" data-sizes=\"(max-width: 576px) 85vw, 576px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 576px; --smush-placeholder-aspect-ratio: 576\/1024;\" \/><figcaption class=\"wp-element-caption\">PCB &#8211; Bottom<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Connecting to different devices<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">ESP32 or ESP8266 Devices<\/h4>\n\n\n\n<p>When in UART mode, the device can be used to upload code to an ESP32\/ESP8266 automatically, similar to a standard dev board, without requiring you to press and flash and reset buttons.<\/p>\n\n\n\n<p>This is achieved by connecting the device as follows:<br><br>UART MODULE SET to 3v<br>UART VCC to ESP 3v<br>UART GND to ESP GND<br>UART RX to ESP TX<br>UART TX to ESP RX<br><br>(Connections for Auto Upload\/Reset)<br>UART RST ( on ESP-Flash Header) to ESP RST<br>UART GPIO0 ( on ESP-Flash Header) to ESP GPIO0 <br><br>It will now be possible to flash and auto reset the connected ESP device from the Arduino IDE, and possibly others as well&#8230;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Arduino (Atmega 328P)<\/h4>\n\n\n\n<p>In the current version of the prototype, you have to connect it as follows:<br><br>UART Target voltage set to 3v or 5v depending on what type of board you are uploading<br><br>UART Tx to Arduino Rx<br>UART Rx to Arduino Tx<br>UART VCC to Arduino 3v or 5v ( depending on the target voltage required by the board you are flashing)<br>UART GND to Arduino GND<br><br>To allow for auto flash\/reset on the Arduino, a 100nf capacitor is required between the UART DTR line and the Arduino Reset pin. This capacitor has NOT yet been fitted onto the PCB, as I usually use ICSP to upload these. Future versions of the PCB shall have this included.<br><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">ATMEGA4808\/4809 and or ATTiny with UPDI Interface<\/h4>\n\n\n\n<p>This device is currently an LV-only UPDI programmer. Connections are as follows:<br><br>Set Target voltage on J1 of the UART\/UPDI programmer.<br>Set The Device mode on J2 to UPDI mode<\/p>\n\n\n\n<p>Connect VCC and GND from the Programmer to the target chip\/board<br>Connect Programmer UPDI pin( shared with RxD) to Target UPDI pin.<br><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">General use UART for use as Serial monitor\/Terminal<\/h4>\n\n\n\n<p>Set target voltage on J1<br>Set device mode to UART on J2<\/p>\n\n\n\n<p>Connect VCC, GND from UART to the target device,<br>UART Tx to Target Rx<br>Uart Rx to Target Tx<br><br>Optionally connect required modem signals, RTS, CTS, DTR, and DSR as needed<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Manufacturing<\/h3>\n\n\n\n<p>The PCB for this project has been manufactured at <a href=\"https:\/\/www.pcbway.com\/?from=makeriot2022\" target=\"_blank\" rel=\"noreferrer noopener\">PCBWay.<\/a><br>Please consider supporting them if you would like your own copy of this PCB, or if you have any PCB of your own that you need to have manufactured.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.pcbway.com\/?from=makeriot2022\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"728\" height=\"280\" data-src=\"http:\/\/makeriot2020.com\/wp-content\/uploads\/2022\/03\/728x280.jpg\" alt=\"PCBWay\" class=\"wp-image-16555 lazyload\" data-srcset=\"https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/03\/728x280.jpg 728w, https:\/\/www.makeriot2020.com\/wp-content\/uploads\/2022\/03\/728x280-300x115.jpg 300w\" data-sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 728px; --smush-placeholder-aspect-ratio: 728\/280;\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Some Links to things used in the project<\/h3>\n\n\n\n<p><a href=\"https:\/\/www.pcbway.com\/project\/shareproject\/SMD_Prortyping_Breadboard_cb796192.html\" target=\"_blank\" rel=\"noopener\" title=\"\">MakerIoT SMD Prototyping Breadboard<\/a><br><a href=\"https:\/\/www.pcbway.com\/project\/shareproject\/Multipurpose_UART_UPDI_Programmer_with_ESP_Autoflash_Reset_Capability_32600de2.html\" target=\"_blank\" rel=\"noopener\" title=\"\">Order this PCB from PCBWay<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>USB-to-Serial converters are some of the most used modules on my bench. I have quite a few of them, most of them are the cheap online type that can be had for a few dollars. As part of my new project, where I am seriously looking for an alternative chip to replace the ATMEGA328, which &hellip; <a href=\"https:\/\/www.makeriot2020.com\/index.php\/2023\/02\/14\/multipurpose-usb-uart-module\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Multipurpose USB UART Module&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":19148,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[150,89,44],"tags":[6,45,42,81,43],"class_list":["post-19144","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-breakout-board-modules","category-custom-pcb-design","category-electronics","tag-arduino","tag-electronics","tag-esp32","tag-esp8266","tag-stm32"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts\/19144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/comments?post=19144"}],"version-history":[{"count":0,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/posts\/19144\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/media\/19148"}],"wp:attachment":[{"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/media?parent=19144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/categories?post=19144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.makeriot2020.com\/index.php\/wp-json\/wp\/v2\/tags?post=19144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}