Brownout when turning on wifi

User feedbacks of the latest ESP32 based Freematics ONE+
triberraar
Posts: 6
Joined: Tue Oct 03, 2017 5:21 am

Brownout when turning on wifi

Postby triberraar » Thu Oct 05, 2017 5:44 am

I am trying to write my own control version but i am running into a problem when turning on the wifi. My code mostly looks like this:
[code]
void setupWIFI() {
#ifdef USE_WIFI
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to Wifi");
for(int attempt = 0; attempt < 5 && WiFi.status() != WL_CONNECTED; attempt ++) {
delay(1000);
Serial.print(".");
}
if(WiFi.status() == WL_CONNECTED) {
Serial.println("OK");
} else {
Serial.println("NOK");
reconnect();
}
#else
Serial.println("WIFI disabled");
#endif
}
[/code]
And then in the setup i am calling this function. I use these libraries:
#include <WiFi.h>
#include <HTTPClient.h>

However when i run the code on the unit i get the message:
Brownout detector was triggered
And it just restarts. Is there something i missed?

triberraar
Posts: 6
Joined: Tue Oct 03, 2017 5:21 am

Re: Brownout when turning on wifi

Postby triberraar » Thu Oct 05, 2017 5:51 am

Hmm switching usb cable helped.
I read somewhere that a high resistance usb cable can have this effect. So i switched to one of my fast charge usb cables, they tend to be a bit better, was using a random usb cable and that one must have been of the very cheap kind.
Sorry for the false alarm.

stanley
Site Admin
Posts: 695
Joined: Sat Mar 01, 2014 3:15 am

Re: Brownout when turning on wifi

Postby stanley » Thu Oct 26, 2017 7:56 pm

Good to know.

daniel3514
Posts: 2
Joined: Thu Apr 12, 2018 6:25 am

Re: Brownout when turning on wifi

Postby daniel3514 » Thu Apr 12, 2018 6:40 am

Greetings, I have a Freematics + with the original cable that came in the package and I have exactly the same problem, and probe with a PC and a Mac, with different USB cables, even with a Thunderbolt to USB 3 adapter, and I can not do it function

stanley
Site Admin
Posts: 695
Joined: Sat Mar 01, 2014 3:15 am

Re: Brownout when turning on wifi

Postby stanley » Wed Jul 11, 2018 10:33 pm

Either connect the unit to OBD port (so powered by DC 12V) or connect USB to a USB hub with power supply, to solve this issue.


Return to “Freematics ONE+”

Who is online

Users browsing this forum: No registered users and 1 guest