ESP32-C3FN4 - Custom board, no WiFi

Aeronautic
Posts: 15
Joined: Thu Jan 02, 2020 12:07 am

ESP32-C3FN4 - Custom board, no WiFi

Postby Aeronautic » Mon Sep 11, 2023 2:57 pm

Hi everyone,

I'm working on a custom PCB board based on ESP32-C3FH4 chip.
HF part doesn't seem to work correctly: softAP is not created until I reduce the TX power to 28 or less (WiFi.setTxPower(WIFI_POWER_7dBm)).

It appears that there is a critical problem with the impedance of the antenna path.

It is 2-layers board (1.6mm thickness, 1oz copper weight) from JLC PCB.
I used typical PIFA antenna (TRACE_ANTENNA_2.4GHZ_15.2MM from SparkFun-RF) and general matching PI filter 2pF - 2.7nH - 2.7pF in 0402 packages. Trace is as short as possible, 16millis and 10millis at chip pin.

When designing I knew that these values are for 4 layer board, but I didn't thought it would be so much critical.

All 5 boards that I have, have the same issue.

I looking for ideas to fix this issue. I could have access to network analyzers but I have no idea how to connect network analyzer to such a small traces.

Best regards,
Michal
Zrzut ekranu 2023-09-11 o 16.50.14.png
Schematic
Zrzut ekranu 2023-09-11 o 16.50.14.png (215.88 KiB) Viewed 11292 times
Zrzut ekranu 2023-09-11 o 16.51.29.png
PCB
Zrzut ekranu 2023-09-11 o 16.51.29.png (728.57 KiB) Viewed 11292 times
Last edited by Aeronautic on Mon Sep 11, 2023 6:20 pm, edited 2 times in total.

Aeronautic
Posts: 15
Joined: Thu Jan 02, 2020 12:07 am

Re: ESP32-C3FN4 - Custom board, no WiFi

Postby Aeronautic » Mon Sep 11, 2023 5:39 pm

I created an arduino sketch for changing channel and TX power.
I fixed position of a board and fixed position of my USB dongle used as receiver.

I am attaching the measured RSSI for various TX power and channel:
Zrzut ekranu 2023-09-11 o 19.38.42.png
Zrzut ekranu 2023-09-11 o 19.38.42.png (75.44 KiB) Viewed 11266 times
Zrzut ekranu 2023-09-11 o 19.38.32.png
Zrzut ekranu 2023-09-11 o 19.38.32.png (47.68 KiB) Viewed 11266 times

Code: Select all

#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiAP.h>
#include <iostream>
#include <string>

const char *ssid = "TEST";
const char *password = "TESTTEST";
int channel = -1;

void setup() {
  Serial.begin(115200);
  while (!Serial);
  
  WiFi.mode(WIFI_AP);
  //WiFi.setTxPower(WIFI_POWER_7dBm);
  WiFi.setTxPower(WIFI_POWER_5dBm);
  updateAccessPoint();
}

void loop() {
  static String inputBuffer = "";
  
  if (Serial.available() > 0) {
    char c = Serial.read();
    if (c == '\n' || c == '\r') {
      processInput(inputBuffer);
      inputBuffer = "";
    } else {
      inputBuffer += c;
    }
  }
}

void processInput(String input) {
  if (input[0] < 0x20) return;
  if (input[0] == 'C' || input[0] == 'c') { // Change channel
    int value = input.substring(1).toInt();
    if (value < 1 || value > 13) {
      Serial.println("Invalid channel number. Please enter a value between 1 and 13.");
      return;
    }
    channel = value;
    
  } else if (input[0] == 'P' || input[0] == 'p') { // Change power
    int value = input.substring(1).toInt();
    WiFi.setTxPower((wifi_power_t)value);
    
  } else {
    Serial.println("Invalid input format. Use C[0-13], P[0-99]");
    return;
  }
  
  updateAccessPoint();
  return;
}

void updateAccessPoint() {
  if (WiFi.softAPdisconnect(true)) {
    Serial.println("Access Point disconnected");
    delay(100);
  }

  WiFi.softAP(ssid, password, channel);
  
  int txPower = WiFi.getTxPower();
  Serial.print("TX power: ");
  Serial.print(txPower);
  Serial.print(", channel: ");
  Serial.println(channel);
}

Aeronautic
Posts: 15
Joined: Thu Jan 02, 2020 12:07 am

Re: ESP32-C3FN4 - Custom board, no WiFi

Postby Aeronautic » Mon Sep 11, 2023 7:35 pm

I removed whole PI filter and it started working fairly good. Still looking for approach to match it correctly

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

Re: ESP32-C3FN4 - Custom board, no WiFi

Postby ESP_Sprite » Tue Sep 12, 2023 3:59 am

Wrt VNA matching etc: you'd generally use the ESP RF Test Tool for that, iirc it comes with documentation as well. https://www.espressif.com/en/support/do ... ther-tools . From looking at the RF teams desks here, connecting the VNA to the PCB comes down to very thin coax pigtails and good soldering skills, I'm afraid.

Who is online

Users browsing this forum: No registered users and 46 guests