Chip running hot on blink sketch #7156
Replies: 1 comment
-
Posted at 2019-08-14 by Robin Wed 2019.08.14 Was the disclaimer read? Posted at 2019-08-14 by AkosLukacs 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 :) Back on topic: Do you have a multimeter, or a USB power meter to check the power consumption? 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. Posted at 2019-08-14 by AkosLukacs Oh, but I do have a power meter :) And no LED on pin 13, so the LED doesn't interfere with power measurement :)
142mA / 127mA is 11.8% difference, but that's probably not enough difference to get the temperature differences you reported... After 8 minutes the ESP32 reports 38°C with 23°C ambient. What is your ambient temperature? Is it stable during the measurements?
Yepp, that's a significant difference! I guess python goes to sleep while Espruino on the ESP32 doesn't. It's getting late to check arduino but if you don't have a power meter & upload the compiled sketch, I will try that tomorrow. Posted at 2019-08-14 by pankleks @AkosLukacs thanks, ambient is around 25 C. @robin all 3 measurements were done during same time / same board - so absolute value is not important, more difference between measurements. Posted at 2019-08-14 by pankleks @AkosLukacs Made test with WiFi disabled, temp is 59 C - but ambient is also lower (few hours later than first test) so not sure if it's due to WiFi or ambient. Posted at 2019-08-14 by pankleks
Looks like significant problem for power consumption - how can we raise this issue? sorry still new here :) Posted at 2019-08-15 by @allObjects (EDITED) A hot MOS device means it is very busy... surprised that Espruino is not sleeping, since it is core to its design. Something w/ the port is off... or open / noisy inputs may drive it nuts... I guess you are aware of @jumjum, would you have some insights to share about this ESP32 Climate Crisis? Posted at 2019-08-15 by Wilberforce Try disabling BLE. I noticed it ran hotter when this was added to the firmware Posted at 2019-08-15 by pankleks @wilberforce I did all my original tests with BLE disabled, then for later test (based on @AkosLukacs sugestion) I also disabled Wifi - but no significant change in temp. Posted at 2019-08-15 by Frida Have you tried putting all unused pins to output? Posted at 2019-08-15 by maze1980 The ESP8266 gets warm as well - I didn't try it with NodeMCU but I'm pretty sure it would be cooler, too: The ESP8266 and ESP32 support multiple sleep modes, on Espruino only deepsleep() is implemented (deepsleep stops the processor, WLAN etc. and reboots it to wake up). The other sleep options are not available, and as such the processor is always active. In Micropython you used the sleep() function, no wonder it's using less energy and keeps cooler. If you would implement the Micropython version without sleep() the power consumption and temperature should be equal to the Espruino. Posted at 2019-08-15 by @allObjects Power consumption is one aspect of the whole package... JavaScript has the benefit for the application not to have to deal with concurrency on the low(er)-level API of the underlaying infrastructure... a core goal of @gfwilliams's design and implementation of Espruino. @gfwilliams went even further and also picked something that is by nature low power, and consistently, otherwise he would not have chosen MDBT42Q to be the heart of puck.js and pixl.js... and in addition to it: miniaturization... bot not so much claimable by ESP32... considering predecessor ESP8266. In order to not loose out on many things and very importantly communication, @gfwilliams has picked the best options and integrated them - Espruino-Wifi - or made them easy to use w/ the libs for ESP8266 hiding its AT protocol. You can do even certs / https - something that ESP8266 is able to do (doing lower level programming than Javascript / Espruino, but with all loaded runs out memory to do... (see Andreas Spiess' youtube clip #232 How to secure our devices using SSL (ESP8266, ESP32, Tutorial) very well explained what's about w/ SSL). In real world, @pankleks ' code example for measuring power is not representative at all... especially when thinking of doing a lot of things well organized and not just sleep and once in a while switch a LED on or off. To achieve this low power, @pankleks has to use low level programming of multiple tasks and synchronization there of,... something that for sure is not a makers goal. Not everyone wants to dive int to into the challenges and practices faced in an 'RTOS'. @gfwilliams has picked the Javascript paradigm of being physically single threaded and added the logical - perceived - multi-threading to support event-driven-ness that is not supported by any of the other implementations, except you go for it (sleeping in the - Arduino / C - main loop is just not an option for a real application...) nor is synchronizing multiple multiple tasks (in micro-python). As much as the power of ESP32 is desirable and convenient, it requires the absence of low(est)-power requirement under the presumption to be simple in programming. Posted at 2019-08-16 by AkosLukacs @allObjects regarding Micropython power consumption & sleep: Maybe you missed, but EPS32 Micropython idling in it's repl did consume less power than the code with sleep (48mA vs 50mA). So it's not the In Espruino ESP32 as far as I can tell, all tasks are pinned to the first core. You can make it run single core by setting Moving forward: both Espruino (on other boards) and Micropython does like a dozen checks before going to sleep. That was the point when I quit :) Oh, and there is this issue in MicroPython that shows a bug with multi-core ISRs, so it's far from trivial... Posted at 2019-08-16 by JumJum Depends, on how you create firmware. Otherwise you have to setup a local platform, run through make sdkconfig, etc. AFAIK, ESP-IDF uses 2nd core for wireless tasks. Posted at 2019-08-19 by pankleks Well @maze1980 and @allObjects I do understand Still I don't understand why following code in micropython:
produces same 51 C I clearly I'm not putting ESP to sleep, and in a sense it's more or less what main event loop + Posted at 2019-08-20 by @allObjects @pankleks, to understand what you are stating: Both micro python codes of post #1 and post #16 produce the same temperature of 51 C? If so, is a mystery to me too, because as you say: you go not to sleep, you just check time over and over until satisfied. This makes me conclude 2..3 things:
Posted at 2019-08-20 by pankleks @allObjects - just tested code from #1 and #16 again:
I did not ground all the pins - so there might be noise, but conditions were the same for all tests. I also ordered USB power meter - so when it arrives I will check real power usage. Posted at 2019-08-20 by @allObjects Usually one core takes care of the app, the other of some stack components... even though both BLE and WiFi are off - to be assumed on the other core - I think there is still something on and going on on that core when Espruino is going. Putting the input pins on input_pullup or input_pulldown - what ever is available - could make a difference. But thank you fort the measuring again and confirming. Posted at 2019-08-20 by AkosLukacs I don't have any boards right now with me, but in #4 I measured the "idle" and "blink" power consumption of ESP32 & MicroPython board. Looked at Espruino's ESP32 code, and as far as I can tell, Espruino does not go to sleep mode with the ESP32 port at all. In ESP32 jshardware.c Not sure what MicroPython does so far, and don't have a real micropython board to check their power consumption. But reading the docs, it looks like it doesn't go to sleep by default as much as an nRF Espruino, you have to explicitly send to sleep if you want to achieve really low power. "Just idles". But what is not right: According to the ESP32 datasheet, the power consumption in "modem sleep" with dual cores running at 240MHz should be 30-68mA. (the highest without radio). MicroPython is in this range. But in my measurements Espruino by default is well over this range. Ok, I must admit, I can't reliably switch off BLE and Wifi the same time. Goes into an endless reboot loop, and only reflashing helps. (I will post the console output later). Posted at 2019-09-09 by pankleks Any updates on this? Can I help somehow? I'm still waiting for USB power meter so I can provide more precise data. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-08-14 by pankleks
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:
Surprisingly even on above it reached 62 C.
I made same test with Mircopython:
gave me: 51 C
Arduino:
gave: 53 C
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions