Using external power with CP2104

I am learning PCB design by myself via the internet, I am using KiCad 8, I am trying to make a dev kit using:

  1. USB (Type C)
  2. An external power supply from 7VDC → 40VDC
  3. CP2104
  4. ESP32-WROOM-32E

In the current technical drawing I have not included ESP32 because I still have questions about the power, I have looked at the datasheet of the devices and other people’s online tutorials then drew the schematic diagram. My goal is to use the VBUS of Type C to signal to CP2104 that I have plugged in USB, then use the 5V power generated from LM2576HVS to transmit to the REGIN pin to power the CP2104 instead of using the VBUS power like that, is it stable? According to the principle I read that after supplying +5V to REGIN, VDD of CP2104 will supply +3.3V, but AMS1117 is also supplying +3.3V from 5V source of LM2576HVS, so can I combine these two +3.3V sources into the power source of the whole system? Or do I need to isolate them?

This forum is about supporting KiCad users with KiCad questions/issues not general Electronics questions, there are much better sources out there for that.

2 Likes

Understood, sorry my bad

1 Like

Welcome to the kicad forum!

So you only plan to power the system from the DC-in jack (and not the usb)? If so, I think your 5V connections are fine the way they are. I would definitely NOT tie the main 3.3V from the 1117 reg to the 3.3V pin on the cp2104. The 2104 has an internal reg to power its 3.3V interface – in small systems you can likely tap that to power a couple of things, but not needed if you already have a main 3.3V.

The esp32 is the same way (if you are using a dip dev module) – it has a 5V input and a 3.3V reg which you can tap to pull a few 10s of milliamps, but best to leave that 3.3V pin unconnected.

Since the esp module also has a usb prog/monitor port, which powers up the module, you generally don’t want to allow the module 5V pin to power up your external system power, and a schottky diode will isolate that, like this:

Note that I used the esp module’s 3.3V reg to power the sd card, but nothing else. Some bulk capacitance (10 to 100uF – I used 47) on the 5V pin is a good idea.

Now, if you actually want to power your entire system from either the DC barrel jack connector OR the system USB port connected to the cp2104, you can easily do that with a couple of schottky diodes:

Always a good idea to breadboard stuff like this before spinning up a pcb, but not easy unless you have a breakout for the cp2104.

EDIT – in re-reading your post I see that you don’t want to use an esp module, but are creating your own – in that case the 5V isolation stuff above does not apply, and you will simply power your esp-wroom from your 1117 3.3V system power.

Hi, thanks for your comment,
I mean the above image does not include ESP32, because I am still analyzing the power supply, I still use ESP32 later. Based on your comment, I just thought that I will use the USB 5V power to start CP2104 and USBLC6-2P6 for data transfer or debugging purposes, when not needed both will be turned off. Here is my new schematic:

My main purpose is to use external power because:

  1. The VCC of the external power supply can be flexible for me to power directly to the Relay later
  2. I still use 3.3V power from 1117 to power the ESP32
  3. I still use 5V power from LM2576 to power some modules when needed
  4. I will unplug the USB for almost 90% of the circuit’s operating time
1 Like

OK, but don’t use the cp2104 3.3 out for anything (just leave the bypass caps and rst/ pullup).

Also, the ESD clamp gizmo should go directly to the connector vbus pin – it is clamping transients from the cable and clamping after the ferrite bead and fuse is less effective. Here I have a second vbus clamp as well as the dataline clamp gizmo:

You can just short where JP9 is (I have an esd ring on board perimeter).

If you are going to leave part of the circuit un-powered, you need to ensure it will look like a high-impedance to the active circuitry. The goofy logic performed by those two npns should be fine. The TX out line from the cp2104 is going to high-z input on the esp, and should be fine. However, the RX-in on the cp2104, if driven high by the esp, may partially power-up the cp2104 though its internal esd diodes. Depends on the part and I have not used the cp2104. If you see a volt or two on the cp2104 3.3 pin when it is unpowered, that is the reason.

1 Like

Not " Your Bad " this page is pretty ambiguous sometimes hard to tell what qualifies and what dosent ! and welcome :grinning:
:mouse:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.