How to Design a USB to UART Bridge with CP2102

Поделиться
HTML-код
  • Опубликовано: 5 авг 2024
  • Tech Consultant Zach Peterson is in the lab, detailing how to design a USB to UART bridge converter, specifically the CP2102 chip from Silicon Labs. If you're getting tired of purchasing these converters, this is the perfect place to learn how to design one yourself.
    0:00 Intro
    0:51 Voltage Measurements
    3:24 Datasheet Guidance
    7:16 Getting Started in Altium Designer
    9:53 PCB Layout
    13:07 PCB Routing
    20:45 Wrapping Up
    For more PCB Layout videos, click here: • PCB Layout
    For more PCB Design for Intermediate Users videos, click here: • PCB Design for Interme...
    For more Tech Consultant Zach Peterson videos, click here: • Technical Consultant Z...
    👉 PCB Design Guidelines for Using TVS Diode for Transient Protection: resources.altium.com/p/pcb-de...
    👉 High-Speed Routing on a Two-Layer Board: • High-Speed Routing on ...
    👉 15 Days Free Altium Designer Access: altium.com/yt/altium-academy
    Don't forget to follow us on social to stay up-to-date on the latest Altium Academy content.
    👉 Follow Altium on Twitter: / altium
    👉 Follow Altium on Linkedin: / altium
    👉 Follow Altium on Facebook: / altiumofficial
    👉 Ready to try the industry's best-in-class design experience yourself? Download it today and get started! www.altium.com/downloads?utm_...
    The Altium Academy is an online experience created to bring modern education to PCB Designers and Engineers all across the world. Here you can access a vast library of free training and educational content covering everything from basic design to advanced principles and step-by-step walkthroughs. Join industry legends as they share their career knowledge, review real-life design projects, or learn how to leverage one of Altium's leading design tools. No matter your level of experience, the Altium Academy can help you become a better Designer and Engineer!
    About Altium LLC
    Altium LLC (ASX:ALU), a global software company based in San Diego, California, is accelerating the pace of innovation through electronics. From individual inventors to multinational corporations, more PCB designers and engineers choose Altium software to design and realize electronics-based products.
    #Altium #PCBdesign #ElectronicsDesign
  • НаукаНаука

Комментарии • 65

  • @ThermalWorld_
    @ThermalWorld_ Год назад +4

    Awesome.. thanks to these videos we have learned a lot and the most important thing we have seen that Altium is a versatile and advanced tool but at the same time easy to learn and use for beginners but also those who ask for more from a software...
    Beginners need little projects like this one you showed. Thanks again

  • @saeidesekhavati1518
    @saeidesekhavati1518 Год назад +2

    Thanks for making such a good video. Please do a lot more things like this kind of tutorial!

  • @귤까모
    @귤까모 Год назад +1

    Thank you so much for the nice contents! This is exactly one of stuffs I have been working on. It helped a lot especially on placing differential pairs and ESD protection components.

  • @myetis1990
    @myetis1990 Год назад +4

    neat! you teach a lot of things even if the circuit is simple, thanks Zach.

  • @dmitry.shpakov
    @dmitry.shpakov Год назад +3

    Awesome series! Thanks Zach!

  • @leeslevin7602
    @leeslevin7602 Год назад

    Brilliant, Thank you. Your approach and explanations are second to none! It just goes to show that no matter how simple one may think a design is; there is always something to consider :)

  • @roadkisserful
    @roadkisserful Год назад +1

    Perfect training session as usual 🙂

  • @59Hertz
    @59Hertz Год назад

    Thanks Zack! I love these videos My knowledge refreshed

  • @pcbworks
    @pcbworks Год назад

    Thank you Zach

  • @yuxuanhuang3523
    @yuxuanhuang3523 Год назад +1

    Good news: I need this as part of a design
    Bad news: the PCB and parts are all delivered and I just saw this video

    • @lolsypussy
      @lolsypussy Год назад

      Better luck in the next life 😅

  • @mitjasitar6751
    @mitjasitar6751 Год назад

    Great video! This is very useful as Im trying to do a custom made PCB with STM32 and I had already failed once because I couldnt get it to be seen on my USB port :D

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад

      I know there are Windows drivers for CP2102-based devices so that they can be accessed over a COM port on TeraTerm. That would make it a lot easier to get to your STM32 over a UART connection.

  • @Morphee99
    @Morphee99 Год назад

    Hey thanks ! I was just designing it ! JLC does not have the N version in stock so I was searching if it is not a big deal using the old 2102 (it is marked NRDN on Mouser). One thing, I think you should connect RST to a pull up or/and a MCU pin

    • @AltiumAcademy
      @AltiumAcademy  Год назад

      👍

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад +1

      In the CP2102/CP2109 datasheet, you'll see that the reset pin and its pullup are optional. There are several parts of the subsystem that are option and would normally be used with GPIOs in an MCU to read/set the state of the chip, and one of these is a system reset pin.

  • @eMCeeToo
    @eMCeeToo Год назад +1

    A minor comment - probably more for others who may not be super familiar with Altium: When you centered the USB connector position vertically in the board, you went to a calculator outside Altium and then manually entered the calculated value in Altium. You can do the math in the coordinate entry box in the properties panel inside Altium. IE, you could have just entered "625/2" mil in the Y dimension entry box for the component. You can do simple math functions directly. I'm not certain about more complicated expressions.
    ALSO, and this seems to be not widely known; If you want to move a group of items - let's say the ref designators for those 3 transient suppression diodes at the USB connector. They might have a common X value, but they do not have a common Y value. If you want them all moved up 50 mils you can move them all individually, or select the 3 ref designators and then enter "!+50" (without the quotes) in the coordinate entry box in the properties panel for the Y value - and voilà, they are all moved in one action. I find this handy with reference designators because the "move>move selection by X:Y" command does not work on ref des (probably because they are elements of a component).

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад +2

      NIce! I had no idea about these coordinate features, thanks!

    • @maxg.9786
      @maxg.9786 Год назад

      Wow, that is a really good tipp! Thank you!

  • @carlosgarcialalicata
    @carlosgarcialalicata Год назад

    Great video! Lot of learnings for me :) - I'm wondering why he assumes that shield is connected to ground in that schematic.

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад

      Not sure where else it would be connected, we generally do not leave shields floatiing or connected to power.

    • @carlosgarcialalicata
      @carlosgarcialalicata Год назад

      @@Zachariah-Peterson thanks for the reply! And good to know :). Most places on the internet I read say it should be connected to the hub's gnd, so "floating" at the device side.

  • @BMM66666
    @BMM66666 Год назад +1

    Hi Zach, great video!
    Some USB applications doesn't connect the USB connector chassis or shell to the system ground, but some does.
    Could you please explain why are there different design?

    • @lolsypussy
      @lolsypussy Год назад +1

      This has been discussed a couple of times. If your product is an end device, better not connect the shell. But since this is a bridge that connects in between the host and device, it has the option to tie the two system grounds of the host and device.

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад

      In some devices, there is no chassis ground, so you have no choice but to tie it to the system ground. Sometimes, you might be connecting a USB device with no chassis to another device that does have chassis, if you connect the connector shield to the system ground on the USB module then you have bridged the host's chassis ground and your module's system ground.

  • @davidhbrown0us
    @davidhbrown0us Год назад

    One suggestion for making hobbyist/experimenter boards: please silkscreen the pinout on *both* sides of the board... this makes it so much easier to make the correct connections when plugged into a solderless breadboard. Wasn't the point of this video of course, and maybe the files include that. Also do include my +1 to the general acclaim for Zach's videos. They're excellent!

  • @viktorgorbunov
    @viktorgorbunov Год назад

    Was amazing, Silabs moves the 2102 and 2103 to available, few years ago they was NRND.
    Good, stable chips, even if faked.
    More than USB ESD, need to have isolation between USB and UART sides, like speed optic.
    And sure, didnt forget about datalines impendance matching (but it works anyway on such distances).

  • @blanchehermine
    @blanchehermine Год назад +1

    CP2102-GM is an old chip with the maximum baud rate of only 921600. Is it really that important to route the data lines as dif pair at such short distances... CP2102N though is capable of 3 Mbaud.

  • @josephsanchez08
    @josephsanchez08 Год назад +3

    Not gonna lie.. My OCD was triggered on the vbus tvs diode not being aligned with the data line TVS Diodes 😂

    • @lolsypussy
      @lolsypussy Год назад

      Aesthetics 😅

    • @eMCeeToo
      @eMCeeToo Год назад +1

      Agreed - Better for manufacturing. Or all aligned horizontally with + on the right.😁

  • @shashankks1962
    @shashankks1962 Год назад

    Hey Zach, great video content as always. Recently I was working on Arduino test setup that is used to validate Battery Management ICs. I was validating the communication between the chips and Arduino via UART and boom my laptop shuts down.
    Turns out, the surge voltage on the VBUS line killed my laptop motherboard.
    It would be great if you could make some videos on surge protectors and isolators for USB.

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад +1

      Great idea, looks like I will have to add this to our project list. If you go to Google and search the Altium blog for USB isolator, you'll see an older project from Mark Harris, I'll start working on a video project as well.

    • @shashankks1962
      @shashankks1962 Год назад

      @@Zachariah-Peterson surely, I will do that.
      So after doing some research, I have 2 design variants
      1) USB Isolator + Host Power supply isolator
      2) USB Isolator + External power supply
      Which do you think is good? I'm leaning towards the second one, as I usually have a bench power source in my work area. (Also would like to sink higher currents)
      Also, could the common ground between external power supply and host computer induce noise/surges on the gnd rail?

  • @michaelmounts1269
    @michaelmounts1269 Год назад +1

    I’ve used a lot of these…on every FTDI of mine..there is always a switch or bridge connector to choose voltage…either 5v or 3v…not both.

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад

      Do they also blow up from time to time? I've used an FTDI one and it didn't last long, so I switched to another one that came in 3-packs.

  • @kadirozdinc6065
    @kadirozdinc6065 Год назад

    It was great tutorial for me. When you started placement, I thought you would place the chip close to USB port in order to keep under critical length for convenience but you didn't :) I am curious about if there are any reason not to do so ?

    • @AltiumAcademy
      @AltiumAcademy  Год назад

      Glad it helped

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад

      Two things:
      I think we all need to stop using the idea of "critical length" as a design rule. I never use this in design except on very long SPI buses. The reason is that the actual critical length is arbitrary and depends on multiple factors, so if you think you are designing to a 25% rise time value for critical length you might actually need 10% value. I show why in a different video and it should be released soon. The other reason is that there is not a requirement for the placement like that, I wanted to route the lines by following an impedance profile and ground clearance to illustrate how easy it is to route coplanar lines correctly. Many designers will design something like differential micostrips, but then they put the ground pour on the top layer, and if they put the pour too close to the lines it creates a reduction in impedance.

  • @daveachuk
    @daveachuk Год назад +1

    Might be a dumb question, but at 16:20, 5v and 3.3v output pins were swapped. Is the idea you'd update all the UART socket pinouts on the target devices to match? Or why are you able to swap the output voltages without concern?

    • @thomassorensen7907
      @thomassorensen7907 Год назад +1

      Hi
      Since it is the output connector, you can place it, in which ever order you like. You are right that they have to match the receiving end as well.

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад +1

      These devices are normally used with flying leads coming off the pins and connecting to a target device, so you have freedom to set them how you like.

    • @daveachuk
      @daveachuk Год назад +1

      @@Zachariah-Peterson Thanks, makes sense! For some reason in my head I had it that you were shoving this thing directly into a PCB-mounted female socket. Flying leads much better idea hah

  • @jimjjewett
    @jimjjewett Год назад

    You added some space for the TVS diodes, then decided it was more than needed, but didn't take the extra back out, even though that would have allowed shrinking the differential pair. Was this just a "not worth the bother" decision, or did you want a longer module or more spacing for reasons you didn't go into, or ..?

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад +1

      At the end of it the module was finished and it's not worth the bother to cut out the extra space, it only ends up being about 0.25" longer than some of the other modules I have, but it's shorter than a different FTDI module I have that broke. So based on that I'm in a comfortable range someone would expect to see for the size of the module. Cutting out the extra space is easy though, if you wanted you could turn on auto retrace and drag the components back towards the USB connector.

  • @noithugian494
    @noithugian494 9 месяцев назад +1

    Can you tell me if the circuit needs programming and loading code? please?

    • @Zachariah-Peterson
      @Zachariah-Peterson 8 месяцев назад

      No it does not require loading code. I think the CP2102 and newer part number drivers should be included in the newer versions of Windows. The drivers can be downloaded from the Silicon Labs website, just do a search on Google.

    • @noithugian494
      @noithugian494 8 месяцев назад

      thanks@@Zachariah-Peterson

  • @saqlainkhantrex4273
    @saqlainkhantrex4273 Год назад

    Can i connect the UART lines to a RS232/RS422 transceivers??

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад

      UART lines can be connected to RS232/RS422 transceivers. RS232 and RS422 are serial standards that are similar to UART. RS232 and RS422 only specify the physical characteristics of the communication medium. You might need to use level translation when connecting to the RS transceiver.

  • @nikosant03
    @nikosant03 Год назад

    The CP2102 is compliant with USB specification 2.0 full-speed (12 Mbps), so you cannot design high-speed USB 2 with the CP2102 right?

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад +1

      When I mention "high-speed" anywhere in the video, I am not referring to the high-speed USB 2 spec, I am referring to high-speed PCB design practices generally.

  • @selva81652
    @selva81652 Год назад

    Hi,
    Why we are not using esd protection for uart connection

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад

      If you look at the finalized board at about 21:14, you will see that TVS diodes are present on the UART lines leading to the pin header (D4 and D5). I also added some additional protection to the VBUS rail on the pin header side. Finally, there were a couple minor routing modifications made to the design, you can download the most recent project files from the link in the description and take a look.

    • @selva81652
      @selva81652 Год назад

      @@Zachariah-Peterson thanks

  • @lutfijd
    @lutfijd Год назад

    Why didn't you show adding the components part for newbies?

    • @Zachariah-Peterson
      @Zachariah-Peterson Год назад

      I've shown it in many of the other videos. You can also find some examples in the quickstart guide by Phil.

    • @lutfijd
      @lutfijd Год назад

      @@Zachariah-Peterson yup, watched Phil's video a while ago. Thanks