Custom ESP32-C3 not connecting via Bluetooth

okw123
Posts: 8
Joined: Sat Aug 24, 2024 1:08 pm

Custom ESP32-C3 not connecting via Bluetooth

Postby okw123 » Sat Aug 24, 2024 2:27 pm

I've made a custom board with ESP32-C3 (bare chip, not finished module), 2 layers PCB-A. I've followed the schematic recommendations in the hardware design document to the letter, but did not duplicate the routing (although I have made good efforts and have lot of routing experience, not so much with RF routing). So far most seems to work fine, except connecting via Bluetooth (tried both to an iPhone and Macbook - both latest OS). Wifi sometimes connect, Bluetooth never connects. Scanning and listing bluetooth clients and wifi networks always works.

I chose a 40MHz 9pF ±10ppm crystal and 12pF load capacitors (based on the trace lengths, I calculated the load capacitors to 13.7pF (maybe I should have chosen 15pF)). I ran the XTAL_N trace under the crystal (same layer) but have a solid GND pour (opposite side), no other traces. Crystal is a bit close to the chip (1.9mm distance, forgot to place it far away). If my oscilloscope is accurate, i see XTAL_P (40.02MHz 540mV) and XTAL_N (40.01MHz 804mV).
There are no signal traces under the RF path. The chip layer (top) GND pour is cutout around the chip, and a solid bottom GND pour. RF path has a CLC (pi) -> SAW filter -> CLC (pi) -> SWRA117D PCB antenna from TI AN043 application note. Antenna is in a corner, and has no GND pour on top or bottom, but via stitching around with good distance.

I'm using Arduino IDE for testing. I tried both scan examples. It finds quite a lot of Wifi networks and bluetooth clients around me. I then tried the Bluetooth "Write" example and downloaded BLE scanner app. "MyESP32" shows up in the client list in the BLE scanner app, but when I try to connect, it times out. I then tried the "WiFiClient" example, and sometimes it connects to my router, other times it's stuck:

Code: Select all

[STA.cpp:135] _onStaArduinoEvent(): Reason: 2 - AUTH_EXPIRE
[STA.cpp:537] disconnect(): STA already disconnected.
(lot of these, until finally):
[STA.cpp:135] _onStaArduinoEvent(): Reason: 39 - TIMEOUT
I'm only interested in Bluetooth for this project, but since BT/wifi share most resources it can shed light on what works/not works.

What could cause this problem?

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

Re: Custom ESP32-C3 not connecting via Bluetooth

Postby ESP_Sprite » Sun Aug 25, 2024 5:11 am

Hard to tell. The specific instruction for putting an ESP32 chip on a board includes finetuning the crystal and antenna path using a VNA; I'm not sure what we can advise if you can't do that. If you can share (the relevant bits of) your PCB layout, maybe we can spot something obvious, but there's no guarantee.

okw123
Posts: 8
Joined: Sat Aug 24, 2024 1:08 pm

Re: Custom ESP32-C3 not connecting via Bluetooth

Postby okw123 » Sun Aug 25, 2024 2:01 pm

I just discovered a huge ripple (500-800mV) on the esp32 VDD. It's only present when BT is active.
Hopefully that takes care of it.

okw123
Posts: 8
Joined: Sat Aug 24, 2024 1:08 pm

Re: Custom ESP32-C3 not connecting via Bluetooth

Postby okw123 » Sat Aug 31, 2024 12:51 pm

No luck. I disconnected the 3.3V onboard voltage regulator and I tried to inject directly with a stable power supply. Still 600mV ripple when BT is active. Any obvious problems with the routing?
(PS. two antennas (trace and chip), but only trace is connected.)
Attachments
Screenshot 2024-08-31 at 14.49.55.png
Screenshot 2024-08-31 at 14.49.55.png (111.71 KiB) Viewed 901 times
Screenshot 2024-08-31 at 14.49.45.png
Screenshot 2024-08-31 at 14.49.45.png (182.73 KiB) Viewed 901 times
Screenshot 2024-08-31 at 14.46.43.png
Screenshot 2024-08-31 at 14.46.43.png (198.85 KiB) Viewed 901 times

Who is online

Users browsing this forum: No registered users and 117 guests