ESP32-C3 custom board, wifi/bt not working

Spilz87
Posts: 5
Joined: Mon Oct 10, 2022 9:55 am

ESP32-C3 custom board, wifi/bt not working

Postby Spilz87 » Mon Oct 10, 2022 8:37 pm

hello everyone

I'm working on a custom PCB board based on ESP32-C3FH4.

but the HF part doesn't seem to work correctly :(

according to this topic https://esp32.com/viewtopic.php?t=26106 I set the matching impedance to match with a 50ohm antenna.

I tryed to keep the antenna as far as possible from other part of the circuit.

Any function exclided from RF part, like USB, SPI, work well.

I'm not able to use WiFi or Bluetooth :(

For WiFi :
- arduino exemple code WiFiScan.ino -> it find all the SSID avalable -> ok
- arduino exemple code WiFiClient.ino -> it is not able to connect to wifi :(
- arduino exemple code WiFiAccessPoint.ino -> I'm not able to see any wifi AP from other devices :(

For Bluetooth
- arduino exemple BLEServer.ino -> I'm not able to see any server from other devices :(

All these codes work well on an ESP32C3 dev board.

so I'm thinking about a bad design of my RF part on the PCB.
(it's a 2 layers PCB)


If you have any suggestion on what I did wrong, it will be very nice :)
thanks in avance

Spilz
Attachments
ESP32_C3 schematic.JPG
ESP32_C3 schematic.JPG (397.22 KiB) Viewed 2807 times
ESP32_C3 PCB ANTENNA TOP.JPG
ESP32_C3 PCB ANTENNA TOP.JPG (150.66 KiB) Viewed 2807 times
ESP32_C3 PCB ANTENNA BOTTOM.JPG
ESP32_C3 PCB ANTENNA BOTTOM.JPG (137.79 KiB) Viewed 2807 times

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

Re: ESP32-C3 custom board, wifi/bt not working

Postby ESP_Sprite » Tue Oct 11, 2022 1:14 am

Aside from RF, also take care with the crystal: make sure the accuracy is at least 10ppm (less ppm = better) and that the caps are sized to match the crystal.

Spilz87
Posts: 5
Joined: Mon Oct 10, 2022 9:55 am

Re: ESP32-C3 custom board, wifi/bt not working

Postby Spilz87 » Tue Oct 11, 2022 7:51 pm

thanks for your reply.

I use this crystal I bought here https://fr.aliexpress.com/item/10050023 ... pt=glo2fra

It's a 40MHz SMD Quartz Resonator Crystal. they don't give the ppm value neither the right caps value.

As I found in other projects the value of 12pF I used it, but no idea if it's the good one.
I tried 12pF, 15pF and 22pF, same issue :(

can it be a very different value ?
how can I check the ppm ? (I tried on my oscilloscope but I was not able to do it)

I tried with a crystal and caps from a dev board, it doesn't solve it :(


As it's the first time I design a PCB with antenna, did you see any obvious mistake for this part ?
the impedance matching circuit looks good ? (I took the value from an other topic in this forum)

thanks in advance for your reply
regards

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

Re: ESP32-C3 custom board, wifi/bt not working

Postby ESP_Sprite » Wed Oct 12, 2022 3:46 am

Yeah, suggest you don't buy components that have specific requirements (like ppm ratings, capacitance etc) from a reseller that can't give you a datasheet. PPM is an indication of how much the frequency can drift; there's no way to conclusively measure that externally, you need to know it from the specs of the crystal.

if you want to do it right, both the crystal capacitors and the compensation network is dependent on the characteristics of your PCB (routing, material etc.) While you can get away with guesstimating the capacitance for the cryystal, for best performance you need to check your antenna infrastructure with something like a VNA. For instance, the layer thickness, PCB material, how many layers etc all affect the ideal component values in ways that aren't always predictable.

ESP_LJH
Posts: 387
Joined: Tue May 18, 2021 9:21 am

Re: ESP32-C3 custom board, wifi/bt not working

Postby ESP_LJH » Wed Oct 12, 2022 4:07 am

Besides what Sprite said, please be noted you should add a series inductor at XTAL_P line.
To summarize, to achieve a good RF performance, there are four parts to note.
RF traces on PCB should be in 50 ohm control, generally, you should calculate width and keepout depending on your stackups, then factory will modify slightly or not.
A matching circuit for ESP chip, generally a CLC is enough, but please be noted those values must be determined with RF tuning. NO calculation or values from other board could be applied directly.
A matching circuit for your antenna, it depends on you or the datasheet of antenna.
PCB layout should be well taken care of, please read hardware design guideline first then draw your layout. If you could not understand some points, refer to module designs, we have uploaded them on website.

Spilz87
Posts: 5
Joined: Mon Oct 10, 2022 9:55 am

Re: ESP32-C3 custom board, wifi/bt not working

Postby Spilz87 » Wed Oct 12, 2022 5:53 am

Thanks for all your reply

I get that I have to add an inductor on XTAL_P. According to the datasheet it should be around 20nH, right ?

For the crystal I took one from a dev board which works well (I took caps too) it didn’t solve the issue.

My antenna is 50ohm, ESP32C3 is 35+j10 ohm (if I found it well). I calculated the CLC values according to these characteristics. I don’t know how to tune them 🤷‍♂️. How do you do it ?

Sorry for the stupid question : what is a VNA ?

About schematic, do you see any obvious error ?

About pcb I’m thinking to had ground plate on top and bottom and connect them with a lot of via. (Except the antenna area of course). Can it help ? Is it a good idea ?

Thanks for your help
Regards

Who is online

Users browsing this forum: No registered users and 97 guests