Low voltage on all pins, even 5v and 3.3v [RESOLVED]

wiserorb
Posts: 6
Joined: Sun Apr 14, 2019 3:39 pm

Low voltage on all pins, even 5v and 3.3v [RESOLVED]

Postby wiserorb » Sun Apr 14, 2019 3:54 pm

Hi,
I was trying to power a simple led, but when I set the output high it flickered. So i measured the voltage whit an external multimeter and it said 0.3v! So I tested the voltage on 5v and it was 1.8, on 3.3v was 0.3.

Despite this the board was in softAP mode and communicating with the computer.

P.S. Sorry for my bad english

Edit:
The bad measurement were caused by an error on the serygraphy of the board. The pin that I was thinking was ground is instead the CMD pin.



Here is the code, but I don't this is important

#include <WiFi.h>
#include "FS.h"
#include "SPIFFS.h"

#define CORE 1
#define LED_BUILTIN 26


const char *ssid = "esp32";
WiFiServer server(80);
File icon;

void setup() {
pinMode(LED_BUILTIN,INPUT_PULLUP);
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println();
if(!SPIFFS.begin(true)){
Serial.println("SPIFFS failed");
}

WiFi.softAP(ssid);
IPAddress myIP = WiFi.softAPIP();
Serial.println("ESP32 IP:");
Serial.println(myIP);
server.begin();

Serial.println("Server started");

xTaskCreatePinnedToCore(
TaskRespondeToClient
, "Responde Task"
, 4096
, NULL
, 2
, NULL
, CORE);
}

void loop() {
// put your main code here, to run repeatedly:
delay(1);

}


void TaskRespondeToClient(void *par) {
while (true) {
WiFiClient client = server.available(); // listen for incoming clients

if (client) { // if you get a client,
Serial.println("New Client."); // print a message out the serial port
String currentLine = "";
while (client.connected()) {
if (client.available()) {
char c = client.read();
if (c != '\n' && c != '\r') {
currentLine += c;
}
if (c == '\n') {
if (currentLine.length() == 0) {
sendResponse(client);
break;
}
Serial.println("----fromClient: " + currentLine);
currentLine = "";
}
}
readLine(currentLine, client);
}
client.stop();
Serial.println("Client Disconnected.");
}
}
}

void sendResponse(WiFiClient client) {
client.println("HTTP/1.1 200 OK");
client.println("Content-type:text/html");
client.println();

// the content of the HTTP response follows the header:
client.print("<font size=\"32\">");
client.print("Click <a href=\"/H\">here</a> to turn ON the LED.<br>");
client.print("Click <a href=\"/L\">here</a> to turn OFF the LED.<br>");
client.print("</font>");

// The HTTP response ends with another blank line:
client.println();
}

void readLine(String inputLine, WiFiClient client) {
// Check to see if the client request was "GET /H" or "GET /L":
if (inputLine.endsWith("GET /H")) {
Serial.println("Led on");
digitalWrite(LED_BUILTIN, HIGH); // GET /H turns the LED on

}
if (inputLine.endsWith("GET /L")) {
Serial.println("Led off");
digitalWrite(LED_BUILTIN, LOW); // GET /L turns the LED off
}

if (inputLine.endsWith("GET /favicon.ico")) {
Serial.println("Sending icon");
client.println(F("HTTP/1.1 200 OK\n"
"Content-Type: image/x-icon\n"
"Connection: keep-alive\n"));
icon=SPIFFS.open("/favicon.ico");
if(icon.isDirectory()){
Serial.println("icon opened");
}
while(icon.available()){
client.write(icon.read());
}
icon.close();
client.println();
}
}
Last edited by wiserorb on Thu May 02, 2019 7:18 pm, edited 1 time in total.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Low voltage on all pins, even 5v and 3.3v

Postby ESP_Angus » Mon Apr 15, 2019 5:34 am

wiserorb wrote:
Sun Apr 14, 2019 3:54 pm
pinMode(LED_BUILTIN,INPUT_PULLUP);
I don't know why you're not able to read voltages correctly, but the pin mode should probably be OUTPUT not INPUT_PULLUP.

wiserorb
Posts: 6
Joined: Sun Apr 14, 2019 3:39 pm

Re: Low voltage on all pins, even 5v and 3.3v

Postby wiserorb » Tue Apr 16, 2019 6:41 pm

OH yes, that was an experimental change to find a solution . If I put the gpio as OUTPUT i get the same results

commando_j
Posts: 27
Joined: Tue Feb 05, 2019 5:26 pm

Re: Low voltage on all pins, even 5v and 3.3v

Postby commando_j » Wed Apr 17, 2019 3:22 am

Check with scope if you can. Your meter would average out the reading if its fluctuating continuously quickly enough.

What is your power supply? Make sure it is not current limiting.

Do you have anything on the console? Do you see any reset? It also seems like it gets a short or current limit every time the code executes and resets. This would explain the LED flickering (turning on for a short time, then a short or over-current occurs, resetting the unit. The reset removes the short but when the code tries to turn on the LED again, you fall into the same loop.)

If you erase the ESP32, do you see normal voltage with the meter?

wiserorb
Posts: 6
Joined: Sun Apr 14, 2019 3:39 pm

Re: Low voltage on all pins, even 5v and 3.3v

Postby wiserorb » Thu Apr 18, 2019 12:12 pm

Ok, I both erased and flashed idf hello_word in the board, but I get the same results. In the console there isn't any reboot.
I tried to power the esp32 with a PC port and a wall adapter with 2 ampere, but nothing changed. However programs run flawlessly.

commando_j
Posts: 27
Joined: Tue Feb 05, 2019 5:26 pm

Re: Low voltage on all pins, even 5v and 3.3v

Postby commando_j » Thu Apr 18, 2019 3:29 pm

When you mean it runs flawlessly, I assume you mean it compiled and downloaded without error?
You are still seeing the power fluctuations with the hello world?
When the board is erased, do you still see the power fluctuations?
If so, check if the AMS1117 regulator is getting hot. It may be blown, causing a short internally and going to thermal shutdown loop.

wiserorb
Posts: 6
Joined: Sun Apr 14, 2019 3:39 pm

Re: Low voltage on all pins, even 5v and 3.3v

Postby wiserorb » Fri Apr 19, 2019 11:14 am

I mean that it doesn't restart, it prints out the things that it has to print, it has no problem except that low voltage thing.
I get the same lectures (1.8v on 5v pin and 0.4v on 3.3v pin) whit hello word and after i erased the board.
Now i'm going to buy a new one, and check if the problem is limited to my board.

commando_j
Posts: 27
Joined: Tue Feb 05, 2019 5:26 pm

Re: Low voltage on all pins, even 5v and 3.3v

Postby commando_j » Sun Apr 21, 2019 6:13 am

Just to be sure, do you have something else you can read with your meter? A separate source, like a desktop power supply with 12V output, with nothing connected to it. Just to ensure your meter is set right. It's not set to AC voltage is it? Some meters default every time you turn them on to AC.
Can you get your hands on a scope?
I'm questioning your instrument because at 0.4V the ESP32 would not run at all.

wiserorb
Posts: 6
Joined: Sun Apr 14, 2019 3:39 pm

Re: Low voltage on all pins, even 5v and 3.3v

Postby wiserorb » Wed May 01, 2019 5:09 pm

Ok, after some serious headache I got it.
If I take the ground on the GND-pin near 5v I get all those strange measurement, but if I take it in the other side of the board i get the full volts I'm expecting.
Do you have some explanation of this behavior?
P.S this happens on both board I have

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Low voltage on all pins, even 5v and 3.3v

Postby WiFive » Wed May 01, 2019 11:40 pm

Are you sure that's not the CMD pin?

Who is online

Users browsing this forum: No registered users and 177 guests