I recently designed, had manufactured, and populated my first PCB. As context for the schematic and PCB, the requirements were as follows:
- Independent control of seven LEDs
- The ability to program into memory specific patterns for the LEDs to turn on/off in
- The ability to do this all over wireless (WiFi/BLE)
I am using an ESP8266 as my MCU. For several days I have been investigating a problem: I cannot establish serial communication to the UART. When I run esptool, I get the following error message:
$ esptool chip_id esptool.py v2.8 Found 1 serial ports Serial port /dev/ttyUSB0 Connecting........_____....._____....._____....._____....._____....._____....._____ /dev/ttyUSB0 failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header A fatal error occurred: Could not connect to an Espressif device on any of the 1 available serial ports.
I feel as if I have tried everything I can think of. At this point I am left wondering if I have some massive design flaw in the PCB -- afterall, this is my first.
For your convenience, here are the datasheets for some of the critical components:
What I've tried:
- Flashing software: esptool, the Arduino IDE w/ community ESP8266, Espressif's firmware downloader, nodeMCU-flasher, etc. (I think these are all wrappers of esptool anyway).
- Host machine: A desktop and a laptop w/ Arch Linux x64, another laptop w/ Windows 10.
- USB: Three different USB cables (including one only a few cm long), several different ports across the three different machines
- Power: 12 W USB 5 V to the linear regulator input; 3.3 V rail from a 500 W ATX PSU, bypassing the regulator; adding buffering capacitors to both the input and output sides of the regulator, ranging from 100 nF to 100 uF; power over USB via FTDI USB/tty converter
- Serial: FT232 chip; CH340 chip. Added a 510 ohm resistor in series with the ESP_TX line, as per a recommendation (499R) in the datasheet. Different symbolrates (115.2 kBd, ~54 kBd, ~74 kBd, 9.6 kBd, ~250 kBd). Different combinations of bits/symbol (5/6/7/8), parity (none/odd/even/mark/space), stop bits (1/2).
- Flash: DIO/DOUT/QIO/QOUT. Tried without a flash chip even populated. Even desoldered an 8 MB chip from an old board and put that in-circuit in place of the 256 kB in my schematic. Also tried telling esptool to use different frequencies (20/40/80 MHz).
- Bootstrapping: Tried every combination of MTDO/GPIO0/GPIO2
Additionally, I've monitored the ESP_RX and ESP_TX lines with an oscilloscope. No matter what I do, ESP_TX remains idle (HIGH). However, when esptool displays the dots part of the connecting message I can decode this on ESP_RX:
c0 00 08 24 00 00 00 00 00 07 07 12 20 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 c0
Here are photos are the schematics and renders of the PCB:
I apologize if they aren't the greatest quality -- this is my first time doing this.
Does anyone see a glaring issue? Obvious problem in the schematic or PCB? Something I should try in software that I haven't thought of? I'm just at a total loss here. Thanks for your help.