Made a mistake with my CP2102 DTR/RTS wiring. Anyway to save it?

LostZimbo
Posts: 4
Joined: Sat May 04, 2024 9:11 am

Made a mistake with my CP2102 DTR/RTS wiring. Anyway to save it?

Postby LostZimbo » Sat May 04, 2024 9:20 am

Hi all,

I have a few years of coding arduino, esp8266, esp32 as a hobbyist and decided to build my first custom board based on the esp32-wroom-32e, I thought the best way to make it accessible was through a cp2102n-a02 for the usb to serial conversion. There begins the problems.

The boards arrived, but I cannot get any serial connection to it. After some time I realised I screwed up- I did not flip one of the transistors that connects the DTR/RTS signals to the IO0 and EN pins of the esp32. Ooops.

I attached pictures from my schematic of the wiring to the cp2102n, the logic where my mistake was made and the reset button which I included to show I did include a capacitor and pull up resistor to IO0.

Is there anyway to save these boards? When I plug them into the PC they do not even register on "dmesg" or "lsusb" as if nothing is there but the power LED is lit and power is reaching the whole board. Thanks in advance!
Attachments
CP2102N.PNG
CP2102N.PNG (38.18 KiB) Viewed 1405 times
Serial Communication Logic.PNG
Serial Communication Logic.PNG (19.48 KiB) Viewed 1405 times
ResetButton.PNG
ResetButton.PNG (7.17 KiB) Viewed 1405 times

ESP_Sprite
Posts: 9583
Joined: Thu Nov 26, 2015 4:08 am

Re: Made a mistake with my CP2102 DTR/RTS wiring. Anyway to save it?

Postby ESP_Sprite » Sun May 05, 2024 1:47 am

Well, the obvious way to fix it would be to rework the board: desolder the transistor, and assuming it's a SOT-23 one, bend all the pins upwards and solder it upside down and rotated by 1/3 turn on the board so the pinout matches the intended pinout.

The thing is that this is not the only mistake on the board: this would stop you from being able to program it, but it would still show up as a serial USB device. I can't immediately see any issues with how your CP2102 is connected, so I think it's either a physical issue or an issue somewhere else in your schematics.

LostZimbo
Posts: 4
Joined: Sat May 04, 2024 9:11 am

Re: Made a mistake with my CP2102 DTR/RTS wiring. Anyway to save it?

Postby LostZimbo » Sun May 05, 2024 7:57 am

Thank you for the reply! That makes sense because since posting I desoldered Q2 and "flipped" the device by soldering on wires to the correct direction but that did not help. This was meant to be a first test project with just a few sensors to create a minturised environmental monitoring system, I copied this tutorial for the vast majority of the board: https://oshwlab.com/robertferanec/esp32-tutorial

I attached the usb, power (which defintitely works) and esp32 board any help with where my mistake was I would be very grateful as I am quite lost with my mistake! Otherwise today I will be soldering jumpers and using a usb based converter to try to connect to the esp32 directly and try that.
Attachments
usb connection.PNG
usb connection.PNG (32.97 KiB) Viewed 1186 times
esp32.PNG
esp32.PNG (40.19 KiB) Viewed 1186 times
buck converter.PNG
buck converter.PNG (18.84 KiB) Viewed 1186 times

MicroController
Posts: 1552
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Made a mistake with my CP2102 DTR/RTS wiring. Anyway to save it?

Postby MicroController » Sun May 05, 2024 7:00 pm

Apparently, the VBUS pin of the CP2102 "should be connected to the VBUS signal of a USB network. A 5V signal on this pin indicates a USB network connection."

Also, where does the 3V3 power come from when USB is connected?
I think you should connect VREGIN to USB 5V to power the 2102 from USB, and you may have to add a capacitor between VREGIN and VDD to stabilize the regulator.
The regulator can also supply 100mA max on VDD, so keep that in mind if you're using it to power other circuitry.

ESP_Sprite
Posts: 9583
Joined: Thu Nov 26, 2015 4:08 am

Re: Made a mistake with my CP2102 DTR/RTS wiring. Anyway to save it?

Postby ESP_Sprite » Mon May 06, 2024 1:57 am

I don't trust the circuitry around Q3/Q4. I'd remove those, see if that clears things up. (I know they're a workaround for a CP2102 issue, but I have seen a gazillion boards without the workaround and they work just fine, so I don't expect removing Q3/Q4 leading to issues.) If anything, I think the workaround is implemented wrong by the guy you cribbed the schematic from: the errata says to route the gate to a GPIO of the *cp2102*, not the ESP32, and then use some software to configure the CP2102 to do the right thing.

LostZimbo
Posts: 4
Joined: Sat May 04, 2024 9:11 am

Re: Made a mistake with my CP2102 DTR/RTS wiring. Anyway to save it?

Postby LostZimbo » Mon May 06, 2024 7:42 am

Hi ESP_Sprite thank you for the input it helps a lot. It takes about 12 hours for my reply to be posted I find so I have tried a few things and made some progress! Still not quite there but I have definitely narrowed it down to a problem with how I setup the CP2012N:

1. On one of the boards I removed the CP2102N completely and I soldered jumper cables directly to RXD and TXD, before connecting it to an external USB to UART chip. By pressing "boot" and "reset" together voila! I have connection to the esp32 and I could upload some sample code!! Ugly yet progress because once the code is on I can just desolder the wires. Only 24 more to go!

2. I desoldered Q3 and Q4 as you mentioned. I now can connect to the CP2102N with my PC (it shows up with lsusb and dmesg) so you are completely right it was not implemented correctly and in fact is not necessary. BUT I cannot find the esp32. So now I have connection to the CP2102N but there is something wrong with the connection to the esp32.

I think my learning here is next time I will just expose the Ground, 3.3V, RX, TX, GPIO0 and EN through a header instead...

Any suggestion is very welcome I will be trying what I implemented in (1) above on board number (2) so I can rule out damage to the esp32 as a result of all my meddling.

LostZimbo
Posts: 4
Joined: Sat May 04, 2024 9:11 am

Re: Made a mistake with my CP2102 DTR/RTS wiring. Anyway to save it?

Postby LostZimbo » Mon May 06, 2024 7:58 am

IT LIIIIVES!!! Problem is solved now.

Turns out there was a second problem that meant that communication was not working. My computer. For some reason the front usb ports on my ancient work PC are not functioning correctly. So after I de soldered the "errata solution" as mentioned by ESP_Sprite (thank you again!!) I could connect to the cp2012n but not the esp32. Drove me crazy until I went and plugged it into a different computer. Hey presto connection is valid and I can upload code (holding down boot and pressing reset).

Thanks for all the help!!

ESP_Sprite
Posts: 9583
Joined: Thu Nov 26, 2015 4:08 am

Re: Made a mistake with my CP2102 DTR/RTS wiring. Anyway to save it?

Postby ESP_Sprite » Mon May 06, 2024 8:22 am

Happy to hear you got it all working! Btw, next time you may consider switching to one of the newer ESP32 models (-S3, -C3 or -C6). They have a built-in USB-serial-JTAG converter, meaning that for 99% of the situations you don't need a CP2102 anymore.

Who is online

Users browsing this forum: No registered users and 63 guests