vas

  • *
  • 6
Wrong Temperature readings
« on: November 17, 2015, 02:53:55 pm »
Hi all. I recently bought a Revolution board (Clone) and started using it with the latest Librepilot version. I noticed that the temperature measurement is stable but with an offset of approximately +20 C. If I place it in the freezer for 20 minutes and immediately connect it to my PC, it will give me a temperature of 17C and it will increase to 42C.
Anyone else has the same issue??
(Already tried the thermal calibration) 

Mateusz

  • *
  • 808
Re: Wrong Temperature readings
« Reply #1 on: November 17, 2015, 03:23:12 pm »
Hi all. I recently bought a Revolution board (Clone) and started using it with the latest Librepilot version. I noticed that the temperature measurement is stable but with an offset of approximately +20 C. If I place it in the freezer for 20 minutes and immediately connect it to my PC, it will give me a temperature of 17C and it will increase to 42C.
Anyone else has the same issue??
(Already tried the thermal calibration)

I wouldn’t be worried about offset, when you look at the source
Code: [Select]
librepilot/ground/gcs/src/plugins/config/calibration/thermal/thermalcalibrationhelper.cpp:
...
if (calibrationSuccessful()) {
        RevoSettings::DataFields revoSettingsData = revoSettings->getData();
        revoSettingsData.BaroTempCorrectionPolynomial[0] = m_results.baro[0];
        revoSettingsData.BaroTempCorrectionPolynomial[1] = m_results.baro[1];
        revoSettingsData.BaroTempCorrectionPolynomial[2] = m_results.baro[2];
        revoSettingsData.BaroTempCorrectionPolynomial[3] = m_results.baro[3];
        revoSettingsData.BaroTempCorrectionExtent[0]     = m_results.baroTempMin;
        revoSettingsData.BaroTempCorrectionExtent[1]     = m_results.baroTempMax;
        revoSettings->setData(revoSettingsData);
...

It is using 2nd order polynomial, you can also see that in uav objects, where the first coefficient is the offset. So the offset is included in the fit and it really does not matter, as the relation between temperature and response is preserved.

vas

  • *
  • 6
Re: Wrong Temperature readings
« Reply #2 on: November 17, 2015, 03:51:47 pm »
Thanks Mateusz,
So is it normal for Revolution users to have a wrong temperature? Also I have a wrong altitude value and the Barometer signal is a bit noisy. I though that the temperature could affect the conversion.

Re: Wrong Temperature readings
« Reply #3 on: November 17, 2015, 07:28:53 pm »
Using a recent 'next', my Real Revo CPU temp is 28 at start up.  I think that is correct.

On the other hand, my Real CC3D CPU temp is 64 (after running a while, but cool, haven't tried boot temp).  I think that is wrong.

vas

  • *
  • 6
Re: Wrong Temperature readings
« Reply #4 on: November 17, 2015, 08:44:35 pm »
Thanks TheOtherCliff,
It seems we have the same issues with our boards. Are there any settings that can fix those issues or we should look into the firmware?

f5soh

  • *****
  • 4552
    • LibrePilot
Re: Wrong Temperature readings
« Reply #5 on: November 17, 2015, 09:03:57 pm »
Temperature should be correct, it should give temp but after start it warm quickly with CPU.
The temperature reported in PFD / system panel should come from CPU... maybe buggy.

With revo you can also check temperature from Baro sensor or Accelerometer sensor. Check UAVOBrowser.

Code: [Select]
if (calibrationSuccessful()) {
        RevoSettings::DataFields revoSettingsData = revoSettings->getData();
        revoSettingsData.BaroTempCorrectionPolynomial[0] = m_results.baro[0];
        revoSettingsData.BaroTempCorrectionPolynomial[1] = m_results.baro[1];
        revoSettingsData.BaroTempCorrectionPolynomial[2] = m_results.baro[2];
        revoSettingsData.BaroTempCorrectionPolynomial[3] = m_results.baro[3];
        revoSettingsData.BaroTempCorrectionExtent[0]     = m_results.baroTempMin;
        revoSettingsData.BaroTempCorrectionExtent[1]     = m_results.baroTempMax;
        revoSettings->setData(revoSettingsData);

Polynomial is used to correct baro/gyro/acc drift using baro temperature (when temperature calibration is done), polynomial is not related to temperature readings correction.

Re: Wrong Temperature readings
« Reply #6 on: November 17, 2015, 09:07:58 pm »
@f5soh just let me know that CC3D does not have a temperature sensor, so my 64C is just random.
I get good values on my Revo though.

If board is not hot, I would probably just call it a bad temperature sensor and ignore it.  Temperature calibration should handle it correctly if it is just working with an offset.

f5soh

  • *****
  • 4552
    • LibrePilot
Re: Wrong Temperature readings
« Reply #7 on: November 17, 2015, 09:13:39 pm »
@f5soh just let me know that CC3D does not have a temperature sensor, so my 64C is just random.

CC3D has some temp sensor inside CPU but not used currently because ADC is already used for old CC (coptercontrol) board and analog gyro sensors. Same firmware is used for CC and CC3D boards.

vas

  • *
  • 6
Re: Wrong Temperature readings
« Reply #8 on: November 18, 2015, 03:44:41 pm »
@f5soh
The wrong temperature readings come from the Baro. It can sense properly temperature changes ( when I'm freezing it or warming it) but cannot register a correct value. I already ordered a MS5611 breakout board and I'll try to connect it externally to the Revolution board and check if it will have the same issue. Thermal calibration hasn't helped.

f5soh

  • *****
  • 4552
    • LibrePilot
Re: Wrong Temperature readings
« Reply #9 on: November 18, 2015, 05:57:18 pm »
There is no calibration for baro temperature... if wrong reading maybe a cheap sensor or variant. Can you take a macro picture for sensor marking ?

Attached various place where you can get temperature from revo components

vas

  • *
  • 6
Re: Wrong Temperature readings
« Reply #10 on: November 19, 2015, 02:07:24 pm »
Hi again,
I have attached a macro shot from the Baro sensor and the readings from Revo. Today I tried to take temperature measurements from the board using a laser IR thermometer and I discovered that the measurements are correct! For some (unknown yet) reason the area around the sensors gets warm, around 39C. The measurements were taken with an ambient temperature of 20C and the Revo board was powered on through USB. 
I also attached a picture from the scope with my Pressure readings, seem very noisy :(

--Correction-- It seems my CPU is warming up the pcb. I added a heatsink (simple aluminum plate) and it dropped from 48 to 36. I'm planning to get a more decent heatsink and try the measurements again.
« Last Edit: November 19, 2015, 02:45:08 pm by vas »

f5soh

  • *****
  • 4552
    • LibrePilot
Re: Wrong Temperature readings
« Reply #11 on: November 19, 2015, 02:39:02 pm »
Yes, looks like there is something wrong... a short or something.

CPU temp looks very high :)
A bad regulator (or overloaded) can also give a bad pressure readings, check how are the jumps while monitoring the altitude uavo. You need to find what component is getting wrong / hot.