You are reading a single comment by @pankleks and its replies. Click here to read the full conversation.
  • Hello,
    My ESP32 (TTGO) is running hot, and I think it causes eventual reset.
    I first noticed it running complex code (sensors, WIFI, web server etc.) - it reached ~65 Celsius.
    So just to test I run simple blink sketch:

    function onInit() {
        let ledOn = false;
        setInterval(() => {
            console.log(`temp = ${(E.getTemperature() - 32) * 0.5556}`);
            digitalWrite(13, ledOn);
            ledOn = !ledOn;
        }, 1000);
    }
    

    Surprisingly even on above it reached 62 C.

    I made same test with Mircopython:

    import esp32
    from machine import Pin
    import time
    
    led = Pin(13, Pin.OUT)
    
    while True:
        led.value(not led.value())  
        print((esp32.raw_temperature() - 32) * 0.5556)
        time.sleep_ms(1000) 
    

    gave me: 51 C

    Arduino:

    void setup() {
      Serial.begin(115200);
      pinMode(13, OUTPUT);
    }
    
    bool state = false;
    
    void loop() {
      state = !state;
      digitalWrite(13, state);
      delay(1000);
      Serial.println((temprature_sens_read() - 32) * 0.5556);
    }
    

    gave: 53 C

    Any ideas?

  • I ran an ESP32 for weeks without problems (after I fixed wifi disconnect and MQTT memory leak...). 65°C shouldn't be a problem for an uC. Unless it's really hot there, and gets even warmer :)
    On my ESP projects, I send free memory with sensor data, so it's obvious if I have a memory leak. Helped to correlate wifi disconnects with memory leaks and that eventually lead to some fixes in the tinyMQTT library.

    Back on topic:

    Do you have a multimeter, or a USB power meter to check the power consumption?
    First, run ESP32.enableWifi(0), because by default wifi is enabled. (The setting is saved in flash, and resets the ESP32, so just run it once, not in your onInit!)

    And my second guess (absolutely not sure about it) would be that arduino and/or micropython disables the second core, while Espruino not. But it's just a guess. Haven't checked on either platform.

    @Robin, I think if @pankleks doesn't have some means to measure power consumption, temperature is the second best indication of power consumption.

About

Avatar for pankleks @pankleks started