ESP32 Internal Sensors

Clearly marks you as Northern English… :slight_smile: Rare to hear such words. Keep it coming, @Costas.

@mohan_sundaram Derbyshire / South Yorkshire border with elocution lessons as a youngster as school had me down as a future newsreader :slight_smile:

Ignoramus Mohan wants to know how you tested the touch sensor. What additional hardware did you use? How many pins are touch sensor enabled?

No extra hardware required :slight_smile: or just a jumper wire off a pin perhaps…

I believe there are 10 pins capable for the touch sensor routine.

You can see that and more in this video

1 Like

After watching this

No additional hardware, I just soldered wires to the edges of two beer bottle tops and used them as touch pads. :beers:

1 Like

I’m sure it’s nothing new to all you, Blynkers, but an old Arduino (Atmega) has it too :wink:

True… but required more pins and a voltage divider for a single touch sensor.

@Shadeyman here you can find some sketches to play with.

Isn’t 61.7 ºC a bit high when running idle?

1 Like

Room temp is 22ºC so its about 40ºC above ambient.
60ºC is hot to touch, even though it says 61.7ºC it doesn’t feel hot, so the temp sensor must be deep inside the cores.
Plus its not exactly at idle, its running a simple code and sending the resulting data over WiFi.

At least his is probably closer to reality… mine runs around 45-51°C but the value I get is about 91-97. So after confirming with an external temp probe, I ‘calibrate’ it by subtracting 46 from the sensor reading. Now every time I use the external probe to double check… it is spot on.

So it seems accurate in variance, just not in the value of the reading… albeit consistently inaccurate, so fixable :slight_smile:

Now the little voltage regulator beside it… that can get very hot… too hot to touch even with a little heatsink… mind you I am using it to power an ESP-01 on the same breadboard as well :stuck_out_tongue: Going to switch that duty to a seperate regulator soon.

1 Like

Ok, I asked because I’m getting the same temp w/o using WiFi…


#include <time.h>
#include <sys/time.h>

#ifdef __cplusplus
extern "C" {

uint8_t temprature_sens_read();
//uint8_t g_phyFuns;

#ifdef __cplusplus

uint8_t temp_farenheit;
float temp_celsius;
char strftime_buf[64];
time_t now = 0;
struct tm timeinfo;
char buf[256];

void setup()
  // Debug console

void loop()
  localtime_r(&now, &timeinfo);
  strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo);
  sprintf(buf, "scan start %02d:%02d:%02d ", timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec);
  Serial.print (buf);

  temp_farenheit = temprature_sens_read();
  temp_celsius = ( temp_farenheit - 32 ) / 1.8;
  Serial.print("Temp onBoard ");
  Serial.print("°F ");

You sure are taking that 5$ board to its extreme :grin:

Give it something to do, see is it increases?

Yeh, even at 51 year old I’m still “living life on the edge”. :sweat_smile:

Celcius calculation looks the same in your code.

  temp_farenheit = temprature_sens_read();
  temp_celsius = ( temp_farenheit - 32 ) / 1.8;

as in mine. :thinking:

  Blynk.virtualWrite(V6, (temprature_sens_read() - 32) / 1.8);

The ESP32 is a powerful chip compared to Arduino so perhaps our small code is not enough to get it any hotter?

61.7C ? Are you inside a volcano?

1 Like

I’ve compared all 4 x Wemos ESP-WROOM-32’s using the same code and they all vary a lot, from 40C to 65C …

afaik those internal sensors are crap, they should be used for trend monitoring, not for measuring absolute values.

you can try to “calibrate” them with an external sensor, but i’m not sure how linear the offset will remain…

So far, last few months, every time I check it is tracking spot on for me with ‘calibration’ of -46

100C … :joy:

Messed with the code and managed to re-calibrate the temp sensors so they’re a bit more realistic.

I think(was tired) I read last night that this is a factory calibration issue which Espressif plan to solve later this year, something to do with internal voltages. I’ll try and link to it if I can find it again.

And have a read of HubbyGitter posts here