-
Notifications
You must be signed in to change notification settings - Fork 735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: use internal ESP32, NRF52, RP temperature sensor of RTC #3883
Comments
"The ESP32-S2 has a built-in sensor used to measure the chip's internal temperature." "it can measure the die temperature over the temperature range of the device. Linearity compensation can be implemented if required by the application." "The temperature sensor works by measuring the voltage of a diode in the chip itself, so straight off the bat we aren’t really measuring the ambient room temperature. We are measuring the temperature of the chip itself instead." You'll get a temperature that's (much) higher than the actual ambient temperature, and it's unknown how to compensate for it. I'm not sure how useful this really is. |
It depends ... I have already used the RTC temperature sensor in projects. With a correction value you can adjust the measurement temperature to the little heating of the chip. But with pure sensors, the MCU is almost always in sleep mode anyway and there is de facto no heating. The values are then +/-1°C and a good indicator of heat. Btw you can also use LEDs as light sensors for certain circuits. |
any measurement close to the MCU board will have to be compensated, and the formula is non-linear, because the components produce constant heat. A sensor inside the MCU is even less useful. If you want to measure ambient temperature the sensors need to be put in a special ventillated enclosure away from the processing unit. I know about these quirks because i have 2 DECT repeater plugs in my home router system that include an ambient sensor. the readings are pretty useless, even with offset configured. |
@caveman99 This is about the possibility of enabling a temperature sensor WITHOUT additional hardware. I would leave it up to the user to decide exactly what this is and for what purposes it can be used. Have you had any practical experience with the temperature sensors from RTC? What were your deviations from reality? There is the sensor device type, which hopefully does not permanently heat the MCU and where the RTC temperature should be close to or equal to the ambient temperature. |
A dirt cheap supported BMP180 or SHT temp i2c sensor can be added for little cost and effort. Trying to use problematic CPU temperatures isn't something that seems like a fruitful effort in the face of relatively easy alternatives. |
@thebentern Everything is correct, more precise measurements could be determined with an external sensor. This makes less sense for permanently radioing routers in permanent TX. And of course any experienced hobbyist can solder on a few components and developers can program them into the firmware themselves. What I particularly like about Meshtastic is that it's not just made for nerds. Without IT knowledge, users can buy one of the inexpensive devices and simply flash it via the web UI. I have the feeling that I am being misunderstood here. RTC is an posible option e.g. for Heltec V3, the most used device in the wild. |
That's indeed nice. However, if a temperature sensor is included by default, those people expect it to be accurate. You can’t really say that you shouldn’t rely on it when it’s -20 degrees outside, but if it’s +20 degrees it might be accurate, depending on how busy your mesh and thus processor and radio is, etc. |
As caveman99 says, the real temperature and the RTC temperature are not directly identical. Instead of a simple correction value, you could also determine how the RTC temperature behaves depending on the proportion of deep / light sleep. The deviation depends on how much energy the MCU consumes in heat. For the device type sensor or as an indicator for the temperature, this should be negligible. Btw, the battery voltage and the percentage of charge are also only approximated. |
Platform
NRF52, ESP32, RP2040
Description
Idea: use the internal temperature sensor of the Real Time Clock (RTC) as a temperature sensor.
RTC chips have an internal temperature sensor for ongoing calibration of the Real Time Clock. The internal sensor could be used to ( approximately) determine the temperature.
https://www.instructables.com/Temperature-Measuring-Without-Any-Sensors-in-NRF52/
https://docs.espressif.com/projects/esp-idf/en/stable/esp32s2/api-reference/peripherals/temp_sensor.html
https://learnembeddedsystems.co.uk/using-the-rp2040-on-board-temperature-sensor
The text was updated successfully, but these errors were encountered: