1

I currently have some problems getting the cp2102 and esp8266 to work together on my board and was wondering if some of you can spot the problem or have some hints for me.

The issue is, that I'm not able to upload anything to the esp8266 ( timeout cant detect flash config ), but the cp2102 is being recognized by my pc and the esp8266 modules are also working (tested with a spare nodemcu board, switched the cp2102 around aswell). The voltage on the pins seems to be fine aswell, except for gpio0, which hovers around 2V (while it is at 3.3V on the nodemcu board).

I suspect it has something to do with the cp2102 being used in USB Bus-Powered mode, since I can measure 2V on gpio0 and 0.9V on VCC while the tps61021 is powered off, but I'm not sure.


Edit:

  • The tps61021 is powered by two aaa batteries and outputs 3.3V.
  • The board is a 2 layer design.
  • I used an external FT232RL programmer (connections: rst->RTS, dtr->DTR, rx-TX, tx->RX and gnd->gnd) on a working previous iteration (without the onboard cp2102)

This is my current schematic : enter image description here

Patrick B
  • 11
  • 2
  • 1
    Please edit your question to clarify the fact that you are testing this board with 2 AA batteries, which are being boost-converted by the TPS61021. – Ocanath May 25 '21 at 15:16
  • 1
    also, following questions: 1. is the board 2 or 4 layer 2. image of layout? 3. how are you connecting your programmer (image of setup) – Ocanath May 25 '21 at 15:21

2 Answers2

0

At the very least, you nead a different 3.3V source. If it tries transmitting anything, just the ESP8266 will draw over 100 mA, which is the maximum the LDO in CP2102N can provide.

Also, you cannot just short two voltage sources and call it a day - you need to protect those outputs against reverse current. CP2102N is fine, since it handles both directions on VDD, but you probably need a series diode on the output of that boost converter.

Lastly, I'm not entirely sure that boost will work like you intend - it probably won't work with input voltage higher than output.

jaskij
  • 1,223
  • 8
  • 13
  • looks like he's not powering anything with the CP2102 LDO – Ocanath May 25 '21 at 15:03
  • The tps is not connected with usb anymore ( should have removed that in my schematic) Its only powered via battery, the CP2012 is not supposed to power anything. The previous interation without the CP2102N was working fine that's why I am suspecting a problem there. – Patrick B May 25 '21 at 15:04
  • @PatrickB where is your 3.3V coming from? – Ocanath May 25 '21 at 15:06
  • @Ocanath in the whole schematic there are only two 3.3V sources, that boost and CP2102. If the TPS can be off, it leaves only the CP. – jaskij May 25 '21 at 15:08
  • 'only powered via battery' does this mean you are connecting an unregulated battery to your 3.3V input @PatrickB – Ocanath May 25 '21 at 15:12
  • @Ocanath I use 2 AAA batteries (~2.8V) as input for the TPS61021, which provides power for the whole board. The CP2012 is only active while plugged in via usb (if i followed the datasheet correctly) – Patrick B May 25 '21 at 15:12
  • so your 3.3V output is stable? you measured with oscilloscope or multimeter? – Ocanath May 25 '21 at 15:15
  • @Ocanath I measured 3.3V with my multimeter at the moment but the previous iteration was stable at 3.3V while I looked at it with an oscilloscope. The only thing that changed is the addition of the usbport + cp2102. I was using an external programmer previously. – Patrick B May 25 '21 at 15:20
  • are there significant layout changes that come with the addition of the cp2102? is this board 2 layer or 4 layer? – Ocanath May 25 '21 at 15:21
  • @Ocanath Not really. I shifted some tracks but I didnt change anything else, since I had some room left. Its a 2 layer board. – Patrick B May 25 '21 at 15:23
  • it's possible you pinched the ground pour going to the ESP when you added the CP2102. High impedance ground connection will interfere with JTAG/SWD programmers operation and can cause errors. Does this new revision flash if you remove the CP2102? – Ocanath May 25 '21 at 15:50
  • @Ocanath ESP can be programmed via JTAG, but usually it's UART. Lookat at Q1 and Q2, together with RX and TX on CP2102 they are the programming interface. In fact there is no JTAG or SWD on this board, the labels on the ATmega programming header are in error. – jaskij May 25 '21 at 18:34
  • @PatrickB why do you have split ground here? – jaskij May 25 '21 at 18:38
  • @JanDorniak The ATmega is programmed via the isp-header on the right and it's working fine ( Rx and Tx are only connected to a testpad ). I2C between the atmega and mpu6050/cap1203 is working aswell. Only problem is the cp1202 and the inability to program the esp via uart. – Patrick B May 25 '21 at 18:44
  • @JanDorniak Do you mean gnd and gndpwr? It was suggest that way in the tps61021 datasheet. – Patrick B May 25 '21 at 18:45
0

I fixed it. The value for R3 at 10kOhm on the RX-line was wrong in my schematic and I didnt bother to check while putting the board together. Everything is working as intended now.

Thanks for your input!

Patrick B
  • 11
  • 2