UART connection for firmware upload not working


I recently built one of my first PCBs following general guidelines on datasheets for an ESP32 ESP32 datasheet and a few other sources. Here is a diagram of the micro-USB to UART portion:

bridge chip datasheet

I want to use the board to read sensors and send data, pretty standard stuff. But I have to be able to upload the firmware to it and that's where the above circuitry comes into play.

So I plug in my micro-USB to my windows computer and immediately get a message saying that windows does not recognized the device and it may have malfunctioned. I continued despite this message to the Arduino IDE to try to find the device put the port option under the tools tab was greyed out. So clearly there is a problem here, I have inspected my soldering and verified that I am seeing 3.3V on the RXD and TXD lines and 3.3V on the ESP power. What could be the issue here?

You need the CP201x drivers installed before anything shows up in the port menu of the Arduino IDE.
But if it says that the device may have malfunctioned, it is probably something wrong with the schematic (or the chip itself).
Open the device properties in Device Manager and check the hardware IDs.
If it is a proper one, it just needs a driver.
If it is something like USB\UNKNOWN or VID_0000&PID_0000, then check your connections. Maybe you switched the places of D+ and D- ? Or there is a problem with the power?

Thanks for the reply. I've checked my device manager and do see a USB device:
windows devices
I don't have the ID pin of the micro-USB connected at all to my board so is this the problem? Also I don't think it is a power problem I am seeing 5V on the Vdd 3.3V on logic lines.

I was talking about the device IDs, not the ID pin on the USB port - the thing Windows failed to get as seen on your screenshot.
When it works, it should be something like this:

Since it doesn't get that far, you should check the hardware.
First veriy that your USB cable works fine.
Then connect only the CP2102 part without the ESP32 or any other non-essential parts. If it is a bare chip, check that you haven't reversed the USB data lines.
If you still can't get it to work, maybe the CP2102 chip got damaged.

Ah I see.. Do you happen to have one of these chips too or something?

I tried another USB cable and did get the same problem.

Because I have this on a pcb I cannot easily test the connection to the bridge chip. But here is the PCB picture and I'm pretty sure I have the DP and DN connections right I mean I connect DP of the microUSB to the DP of the bridge chip right? Also I have the RXD of the bridge chip connected to the TXD of my ESP.

Also I went ahead and verified the connections on the board with my multimeter and things are connected as shown here.

Check the short circuit between DP and DM, and between them and 5V, and GND. Your device failed to produce descriptor so there won't be anything @rainyshadow wanted to see.

Post some good closeup photos.

Your DP and DM have way too many twists and turns and vias and are not routed as a differential pair of signals. It's a good way to screw up if you prioritize other traces over the DP/DM. You should turn your IC 90 degrees to have its DP/DM pins face the USB port. Allow at most one pair of vias because your connector's DP/DM and IC's DP/DM are crossed.

No short between DP and DN. No short from Vdd to ground. One strange observation I've had though is that DN is reading 0V when I plug in my USB but DP is reading 3V.

I used a reflow oven to solder these components expect for the micro-usb port. This is why it looks so sloppy haha.

Also I think when I placed the ESD diodes on the board I did not assume any polarity I think I was correct. But here is datasheet just in case: datasheet


Close-up of DP and DN pin side of bridge chip

Micro-USB Soldering

Overview of bridge chip

I have this:

Seems normal, same readings here.

Can you desolder that CP2102 chip? You can try to solder 4 thin wires directly to its pins and connect it to the USB port of your PC to see what happens. Just make sure you got the correct wiring before you plug it.

I had a spare chip that I tried this on. It didn't go so well the chip is too small for this. I think that if I needed to go this route I would just reflow the chip and micro usb onto the board to see what happens

Do you have tacky flux to clean up the mess around the microusb port?

I did some rework as suggested here. Did notice some fractures in the joints prior to rework.

Then I stripped a micro-usb and tested connections between micro-usb wires and board. All is good here and I can easily test for shorts on adjacent pins with this set-up and there aren't any shorts between adjacent micro-usb pins. After all of the rework though I am still getting this windows error.

A few really stupid questions I would feel stupid if I didn't ask:

Orientation of the QFN chip is correct?
Were you using a stencil when applying solder pastes?

Could you hot air reflow the IC, like someone else suggested, take it off, and reflow it back on?
Here is a trick for doing that: hot air remove the IC, flip it over and zoom in to the pads. If any pad has no solder it would appear flat. That pad then didn't actually connect to the board and needs some solder on it. Then you add some tacky flux on the board and hot air reflow it back on. I've fixed these no-pin chips this way when some of the pads didn't reflow the first time around.

I am using a stencil and have gone through and checked every pin on the IC for a short and to ensure that it was connected properly to the board. And I am confident with what I see. No shorts to adjacent pins or shorts to the large ground pad.


In the process of double checking the bridge chip I may have found the issue. But would you mind taking a look to confirm?

One can see that if I rotate the QFN chip 90 degrees CCW the DP and DN will be in the correct position on the PCB footprint. But I don't think that TXD and RXD will be?

Yeah, if you read my earlier response, the IC should have been rotated 90 degrees. The TX RX have no consequences as they are extremely slow. DP and DM have to operate at 12MHz. They are, again, NOT routed as differential pairs that they should have been. These decisions are more consequential.

This is not what I was saying. The IC was in fact rotated 90 degrees but the footprint is wrong. For example the TXD should be 4th from the bottom but the footprint has it 3rd from the bottom. I should fix the footprint correct?

A closer look at your schematic reveals some errors. I've only used FT series USB UART ICs so I'm only comparing the cp210x spec sheet with what you have, no practical experience on actually using the IC.

You have a voltage divider on VBUS but the spec sheet asks for direct connection. I've used a number of USB device-class ICs and none of them want a voltage divider. They all want direct connection to bus power for sensing. It may be in the standard maybe not. Here is what cp210x spec sheet says what you should do, direct connection. VREGIN is also 5V. Please check the spec sheet. Someone else with actual experience could chime in.

OK so you're saying your library footprint was wrong? Compare your footprint with the schematic that has the SAME amount of pins! Your footprint has 28 pins and you're comparing with a 24 pin package diagram. Get a grip!

1 Like

Not sure what this "get a grip" comment is about. I will ignore it as it was just a mistake! If you don't make mistakes you aren't learning.

Now moving on the 28 pin IC looks like this rotated 90 degrees CCW:

and the footprint

Looks like fortunately there is no error in orientation then.

You may be onto something with the voltage divider comment though.. I am not sure what reference circuit I used to make the Vdd, Vregin, Vbus connection set up but here is one from the datasheet:

It does have a voltage divider for Vbus but Vregin has a direct connection in contrast with my set up. Shown below.

Also from the datasheet is the voltage ratings for the relevant pins...

I still think you should test the chip standalone as is on that Figure 2.5 you posted. Skip the diodes too, keep it simple.
Do you have a spare unpopulated PCB? Or another suitable piece of a PCB you could use, since you said soldering directly to the chip is too much of a challenge?

You can also compare your circuit to this other adapter i have here, hopefully the pictures got clear enough:

I just noticed that my VBUS and RESET pins are directly shorted, while your RESET is fed from the VDD. Maybe try connecting it to VBUS instead (lift R306 first!)?
Does VDD even start outputting 3.3V when you plug in the USB?

Looking more into this, your circuit seems like some mix between Fig. 2.2 where VDD is an output, and Fig. 2.3 where VDD is an input. :stuck_out_tongue:
So, which one is it?

1 Like