How to Design a USB to UART Bridge with CP2102

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ต.ค. 2024

ความคิดเห็น • 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

  • @yuxuanhuang3523
    @yuxuanhuang3523 ปีที่แล้ว +2

    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 😅

  • @davidhbrown0us
    @davidhbrown0us ปีที่แล้ว +1

    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!

  • @saeidesekhavati1518
    @saeidesekhavati1518 ปีที่แล้ว +2

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

  • @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!

  • @귤까모
    @귤까모 ปีที่แล้ว +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.

  • @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 🙂

  • @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!

  • @59Hertz
    @59Hertz ปีที่แล้ว

    Thanks Zack! I love these videos My knowledge refreshed

  • @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.

  • @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.😁

  • @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).

  • @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.

  • @pcbworks
    @pcbworks ปีที่แล้ว

    Thank you Zach

  • @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.

  • @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.

  • @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.

  • @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.

  • @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.

  • @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

  • @noithugian494
    @noithugian494 11 หลายเดือนก่อน +1

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

    • @Zachariah-Peterson
      @Zachariah-Peterson 10 หลายเดือนก่อน

      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 10 หลายเดือนก่อน

      thanks@@Zachariah-Peterson

  • @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?

  • @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

  • @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.

  • @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.

  • @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.

  • @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