What's wrong when I move from breadboard to PCB?

yangff
Posts: 11
Joined: Thu Jun 22, 2017 2:11 pm

What's wrong when I move from breadboard to PCB?

Postby yangff » Thu Jun 22, 2017 2:41 pm

I'm getting "A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header" when I'm flashing the PCB.

From breadboard to PCB, I added a ch340 serial chip (which seems to work, but I'm using FT232 with breadboard), a RT9013 (in theory it should capable for 500mA current) for 3.3v (instead of AMS1117-3.3 which is used by breadboard), bypass caps (1.0uF for both RT9013 VIN, ESP32 VIN and ch340 VIN).

Beside, I added a Li-on manage chip (which can delivery enough energy I guess, but I don't have a oscilloscope so I cannot verify it) but I've not add Li-on battery yet so I should just connect VUSB & SYS. And I added a opamp... Both them work well when standalone.

And I added some trans & mosfet which I connect manually when I'm using breadboard and I think have nothing to do with this.

I'm assuming if these is some problem with USB Power Delivery so I changed to a 20AWG Usb charging cable but it still not working.

And after few tries, it burned by RT9013 so I think it must have something to do with my power supply. But at this stage I temporarily have nothing can do...

I'm wondering if there is any problem with my PCB design or connection since I'm newbie on PCB...

And, most components on the board are soldered by SMT process, I just soldered usb connector, ESP32 module and inductor.

I've attached sch & pcb layout. I cannot upgrade eagle project directly because it contains some privacy info but the images should show everything that required...
snipaste20170622_223409.png
snipaste20170622_223409.png (155.94 KiB) Viewed 16247 times
snipaste20170622_223330.png
snipaste20170622_223330.png (115.38 KiB) Viewed 16247 times
snipaste20170622_223139.png
snipaste20170622_223139.png (53.21 KiB) Viewed 16247 times

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: What's wrong when I move from breadboard to PCB?

Postby loboris » Thu Jun 22, 2017 4:36 pm

There are so many ESP32 boards schematics, haven't you noticed the reset circuit needed to put ESP32 into bootloader mode, it looks like you are missing one...
Image

yangff
Posts: 11
Joined: Thu Jun 22, 2017 2:11 pm

Re: What's wrong when I move from breadboard to PCB?

Postby yangff » Thu Jun 22, 2017 5:33 pm

Thanks a lot. I didn't notice this...

I've seen this schematic for ESP8266 in some boards, and when I was drawing them, I read https://github.com/espressif/esptool/wi ... bootloader and it says
Make the following connections for esptool.py to automatically enter the bootloader
ESP32 Pin Serial Pin
EN RTS
GPIO0 DTR
Note that some serial terminal programs (not esptool.py) will assert both RTS and DTR when opening the serial port, pulling them low together and holding the ESP32 in reset. If you've wired RTS to the ESP32 then you should disable RTS/CTS "hardware flow control" in the program. Development boards like NodeMCU use additional circuitry to avoid this problem - if both RTS and DTR are asserted together, this doesn't reset the chip.
So I think I only need to connect EN to RTS and GPIO0 to DTR and ignored them ...

I use miniterm --rts 1 --dtr 1 COM4 115200 and I was not able to get boot log (according to the doc). (I thought it should reset ESP32 or I'm wrong...)

I'm a little confusing now..

I'll try to trigger reset and boot mode manually to see if this matter, after I replaced the broken LDO....

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: What's wrong when I move from breadboard to PCB?

Postby ESP_Angus » Fri Jun 23, 2017 5:15 am

yangff wrote: So I think I only need to connect EN to RTS and GPIO0 to DTR and ignored them ...
This is correct. With this config normal serial programs won't work without some tweaking for RTS/DTR, but esptool.py, "make monitor" in IDF, miniterm (with correct args) and some other tools will work fine.
yangff wrote: I use miniterm --rts 1 --dtr 1 COM4 115200 and I was not able to get boot log (according to the doc). (I thought it should reset ESP32 or I'm wrong...)
Both RTS/DTR are active low, so to keep them high (ie EN pin high, ESP32 enabled) you will need "miniterm.py --dtr 0 --rts 0 /dev/ttyUSB0 115200"

(If you saw the --rts 1 --drt 1 in our docs somewhere, can you please tell me where? Will fix.)

That will hopefully get you some serial output. (You may want to try toggling RTS if you can. You can do this via miniterm as well.)

Other than that, I'd suggest checking with a multimeter that the VCC and ENs pin both have correct voltages. And check for bad soldering, etc.

yangff
Posts: 11
Joined: Thu Jun 22, 2017 2:11 pm

Re: What's wrong when I move from breadboard to PCB?

Postby yangff » Fri Jun 23, 2017 5:58 am

Both RTS/DTR are active low, so to keep them high (ie EN pin high, ESP32 enabled) you will need "miniterm.py --dtr 0 --rts 0 /dev/ttyUSB0 115200"
I will try this argument after I get my new LDO.
(If you saw the --rts 1 --drt 1 in our docs somewhere, can you please tell me where? Will fix.)
It's not in the document. I use "--dtr 1 --rts 1" because I read "GPIO0" should be high to for ESP32 to running its program
The ESP32 will enter the serial bootloader when GPIO0 is held low on reset. Otherwise it will run the program in flash.
and I've no idea whether it's 1 or 0 for "miniterm" ...

yangff
Posts: 11
Joined: Thu Jun 22, 2017 2:11 pm

Re: What's wrong when I move from breadboard to PCB?

Postby yangff » Fri Jun 23, 2017 8:38 am

I removed the Li-on chip, shorted USB-VCC to LDO and I can feed ESP-32 is a lot more hot(40°C at least I feel). But still having no output in the terminal...

Code: Select all

Administrator@WIN-F5GR238P6RA MINGW32 ~
$ python -m serial.tools.miniterm --dtr 0 --rts 0 COM4 115200
--- Miniterm on COM4  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
If it's the problem of power supply, how much current should I feed to the module. Or do I need a larger cap?

yangff
Posts: 11
Joined: Thu Jun 22, 2017 2:11 pm

Re: What's wrong when I move from breadboard to PCB?

Postby yangff » Fri Jun 23, 2017 9:18 am

OK... After carefully inspected my breadboard, I found the problem...
First, I replaced the LDO to AMS1117-3.3 by some ugly wire...
Second, I miss connected RX to RX and TX to TX in the pcb.. after some dirty cut and reconnect it finally works... I'm wondering what I'm thinking at that time... :oops: maybe they have the same name so I didn't manually wire them..

Thank you.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: What's wrong when I move from breadboard to PCB?

Postby ESP_Angus » Mon Jun 26, 2017 1:58 am

yangff wrote:after some dirty cut and reconnect it finally works...
Glad you got it sorted out. :)

Who is online

Users browsing this forum: No registered users and 204 guests