ESP32-C6 dev board (Qwiic) challanges with stability... maybe

So I have a bunch (10) of SparkFun Qwiic Pocket Development Board - ESP32-C6. They “only” have a rather small web server (either: wifiserver.h or webserver.h or ESPAsyncWebServer.h - they all behave the same way) that controls 3 different GPIO (a bit like a dry contact switching if you like). It is based on a few different versions of “controlling 3 LED diods” or something like that.

Now of all 10 boards, 6 are superstable. No hickup what so ever.

Of the rest 4 boards, well 2 are always in production (together with the above mentioned 6). And from time to time, one of them fails.

At the time of failure, the behaviour becomes like this: from boot the first call to the web server is served, no problem. The 2nd and anyone after that will never complete, or maybe sometimes (unclear) very long execution time. Now the links that my web server handles are quick, it is not massiv workload at all, it just adjusts the three GPIO pins - that is a very small task.

Here is the challenge: If I just downloads the sketch from Arduino, again so to speak, it might just start to work again. And if that fails, just downloading again, and again until it starts to work. Again. Well with one board now seams lost in translation (to many downloads - if that is even possible?)…

So, any ideas what my challenge is?

I connect an ESP32 board to my Win10 PC over exact same port and cable, and port on my PC. And as I wrote, 8 (6+2) always works - so it can not be the software. Ans as I mention I have three different solutions of web server, they all behave the same way on all boards. So well I am lost.

Any ideas?

How are they powered/communicating?

During testing: USB-C from USB-A in a) Microsoft Surface Book 2 or b) Dell Ultrasharp monitor - both behave the same.

During “production”: 3.3 + ground on the board direct feed from regulated power with more than enough Amps available.

Do note that the behavior is identical no matter what power is used - from a debug perspective, if it is a challenge, it is a challenge no matter power or what WEB implementation I use.

I decided to do some more testing: Got a new USB-A to USB-C cable, and another USB-C to USB-C. Also tried different powersupplies, including one OmniCharge 20. No change.

So I decided to download something from internet, a WEB based sketch that was to control LEDs. I just did not care about the fact I had no LED attached, I was just curious if it work from a plain web view. And the same problem occurs.

And do note: There is absolutely nothing connected to my ESP32-C6 except that USB-C port that only has power attached to it (since it runs by connecting to my WiFi, and well nothing else, one can only drytest the LED or whatever - just checking response time if you like).

So my conclusion has to be: The Qwiic dev board for ESP32-C6 has a problem - and I have no way of saying what it is.

Does the default blink sketch work for the wonky ones? Arduino Example - SparkFun Qwiic Dev Board ESP32-C6

I just confirmed, and yes that one (blink sketch) works - however that is not a sketch that does any sort of communication.

And this is proven by the example “Hello Server” sketch, which behaves exactly the same way - the first call to the server works, the 2nd does not (like a refresh or something). Here is the code if anyone wonders (yes I did change the xxx for SSID and Password):

#include <WiFi.h>
#include <NetworkClient.h>
#include <WebServer.h>
#include <ESPmDNS.h>

const char *ssid = “xxx”;
const char *password = “xxx”;

WebServer server(80);

const int led = 13;

void handleRoot() {
digitalWrite(led, 1);
server.send(200, “text/plain”, “hello from esp32!”);
digitalWrite(led, 0);
}

void handleNotFound() {
digitalWrite(led, 1);
String message = “File Not Found\n\n”;
message += "URI: ";
message += server.uri();
message += "\nMethod: ";
message += (server.method() == HTTP_GET) ? “GET” : “POST”;
message += "\nArguments: ";
message += server.args();
message += “\n”;
for (uint8_t i = 0; i < server.args(); i++) {
message += " " + server.argName(i) + ": " + server.arg(i) + “\n”;
}
server.send(404, “text/plain”, message);
digitalWrite(led, 0);
}

void setup(void) {
pinMode(led, OUTPUT);
digitalWrite(led, 0);
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.println(“”);

// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(“.”);
}
Serial.println(“”);
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());

if (MDNS.begin(“esp32”)) {
Serial.println(“MDNS responder started”);
}

server.on(“/”, handleRoot);

server.on(“/inline”, {
server.send(200, “text/plain”, “this works as well”);
});

server.onNotFound(handleNotFound);

server.begin();
Serial.println(“HTTP server started”);
}

void loop(void) {
server.handleClient();
delay(2); //allow the cpu to switch to other tasks
}

Right…we are looking to confirm that the board works as expected with a basic sketch.

A delay of 2 seems really short to me

Well in my own WEB code, with that variant of includes, I have delay(5) for what it is worth. However, 2 or 5 in the delay makes no difference…

Oh by the way, when I does the tests above, I use latest and greatest Firefox. One should no assume that Firefox always is perfect. However I have done some of the tests also with MS Edge (which is Chrome under the hood) - and it still behaves the same, but maybe not that “slow” in response.

Because I do notice one thing: It seems to be waiting for something, since it soooooooooner or later actually will comply - except Firefox has by then given up waiting… Now that could of course point in the direction of the software - right? Well, it is just that, the other 6 that works with no problem, why do they work? Why can the same software behave differently between boards…?

Right…it points to something in software, I’m guessing a timing or security issue… which could be the devices, browser, network (router), etc. Is there any kind of security enabled?

if you take the other 6 offline, do the others have any change in behavior? Try setting the delay to something like 50 or 100

They also might just be hammering the 2.4GHz channels on the wifi…how many total 2.4GHz devices are connected to the router?

I’m on a weekend trip, so can not test anything.

However, the 8 prod esp32 are connected to one ssid, client isolation. No gateway (since they don’t need it). On the 2.4GHz radio on a different ssid there is one more wifi client, a Argon internet radio. Most of the time that radio is turned off. So the only traffic on the 2.4 radio is the esp32s.

The AP is a Unifi 6LR, connected to OPNsense, the ssid for esp32 is notging special. The web server uses htttp so no SSL crypto either.

Although the esp is a web server, with a small web page, the normal usage is curl from my Home Assistant PI4B box running HAOS. The HA box calls for status for all 8 esp32s once every 5 minutes, to get cover status. The esp32s are connected to Somfy Glydea 35 motors.

It is a very basic setup. And it worked originaly, but after time it started to behave not so good on a few esp32.

Hmmmm

The main thing I’d look to at this point is the power going to them…when you get a chance maybe check the power going to the good ones vs the sketchy ones and ensure they are the same

I’m not real sure what else it could be at this point :-/

Do I understand You correct, that using power over USB-C connector is not enough to run just one board? Since I have the problem no matter how I “send” power to the ESP32 board?

Not necessarily, but ‘dirty’ power supplies (that have power fluctuations) might be enough to cook a voltage regulator over time. So…comparing them, are they all powered by the same size/brand supply?

Well I guess I will see - I will get another 10 boards any day now, so I can test that theory within days…

But what speaks against that theory is the thing with the way it works:

  1. First response is direct
  2. Second response is taking a lot of time if it evens ends at all

The 2nd response says software - but as I shown that does not seem to be correct either since I can not get a simple example sketch to behave correctly.

So if it is a voltage regulator that fails over time so to speak, I need to validate that. And I guess the only way to do that is to find a ESP32 that can handle power up/down in a sufficient way. Or if Spark has a small card that does this for me?

1 Like

Right, just got my 10 new ESP32-C6 dev boards, and: I can not complie the Sketch to thoose boards, I get error 1 in the start of the compile.

So I decided to validate if I could compile the exact same sketch - no changes what so ever - to one of the old boards. Yes that works.

But NO I can not get the exact same sketch to compile to the new boards. What has changed on the new boards?

I can not even compile the sample code I posted a few posts earlier - what has changed here?

What changed was the Arduino board selection - for some reason it forgets what board I use when I attach one of the new ones to USB port. Go figure…

Also, the new boards don’t seem to fail so power is the reason after all. I can not see why though, since the installation has more than enough mA on tap… Even so, any ideas how to well get it more stable? I know there is a a Spark regulator board ( SparkFun BabyBuck Regulator Breakout - 3.3V (AP63203) - COM-18357 - SparkFun Electronics ) - would that work, for the 3.3v pin?

1 Like

Yea, that’s a good choice…or its slightly fancier brother SparkFun Buck Regulator Breakout - 3.3V (AP3429A) - COM-21337 - SparkFun Electronics

Would I be able to “save” the boards that are somewhat sporadic functioning also with Baby Buck Regulator - or are they to be considered “toasted” ?

Not usually (without replacing components; you could probably replace the voltage regulator and they might work)…but you can still test them with good supplies and if they work use 'em