France
Asked — Edited
Resolved Resolved by Steve G!

Mpu9150 - Temperature Sensor

Hi,

I have bought the MPU9150 sensor and try to use the temperature sensor. But the sensor always displays 22 Celcius, whatever the condition...

I have followed the tutorial, and Gyro and compass seem to work just fine. I think it is just me who do not know how to use it, so any help is welcome... Thanks.


ARC Pro

Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.

#1  

I can report the same here. Temp stuck on 22c. Compass and gyro working.

United Kingdom
#2  

I'll throw my hat in the ring too and say I'm having the same issue. Accel, Gyro, compass are all running fine and updating no problem with the example script. But like the others, the temp stays at 22 C and does not change when exposed to subtle but different heat, even using a simple "run once" "Say("The temp is " +$TempC ) script.

United Kingdom
#3  

@fredebec and @olegodo.

Can I ask you guys, what does it say on the back of your sensors? I ask because the MPU9150, 4 in 1 sensor I ordered says this on the back...

User-inserted image

I'm curious to know why it doesn't say "Temprature" on the back as well, as it is meant to be a 4 in 1 sensor (unless I as sent the wrong one), and might go to answer why the temperature is not updating.

#4  

That is correct the MPU9150 does not do temperature if you look on the spec sheet from Sparkfun.

United Kingdom
#5  

Interesting. That's not what the store description says...

User-inserted image

confused

#6  

Yep, ez robot states it's a 4 in 1.... I guess we only get a 3 in 1?

#7  

The MPU9150 does provide temperature but I have not seen this well documented on any datasheets or from any vendors. I have an MPU9150 I got from ebay (Non-EZ-Robot) and it will provide temperature data, but I don't believe it was meant to provide room temp or weather type temp. I think of it as more like an "operating" system temp, like CPU temp sensor in a PC. In my experiments I used a heat gun to blow on the device the temperature would climb. Once the heat source was removed it slowly dropped back down.

#8  

here is the spec info on MPU9150 Features:

Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-scale range of ±250, ±500, ±1000, and ±2000dps
Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and ±16g
Tri-axis compass with a full scale range of ±1200µT
Reduced settling effects and sensor drift by elimination of board-level cross-axis alignment errors between accelerometer, gyroscope, and compass
VDD Supply voltage range of 2.4V3.46V; VLOGIC of 1.8V±5% or VDD
Gyro operating current: 3.6mA (full power, gyro at all rates)
Gyro + Accel operating current: 3.8mA (full power, gyro at all rates, accel at 1kHz sample rate)
Gyro + Accel + Compass + DMP operating current: 4.25mA (full power, gyro at all rates, accel at 1kHz sample rate, compass at 8Hz rate)
Accel low power mode operating current: 10uA at 1Hz, 20uA at 5Hz, 70uA at 20Hz, 140uA at 40Hz
Full Chip Idle Mode Supply Current: 8µA
400kHz Fast Mode I²C serial host interface
On-chip timing generator with ±1% frequency variation over full temperature range
10,000g shock tolerant
I2C Pullup Resistors populated on board.
All Pins Broken Out to Standard 0.1" Spaced Headers
Solder Jumper for Switching LSB of I2C Address
  

Datasheet (MPU-9150)
#9  

4 in one sensor.........Gyro + Accel + Compass + DMP.. dont know what the DMP stands for?

United Kingdom
#10  

I just hooked it up again to have another play, and for a moment (about 2 seconds) it read at 21 C, then when to 22 and stayed there. I compaired this the the EZ-B CPU temp and they are not the same (EZ-B reading 24.87 C).

United Kingdom
#12  

@rb550f

DMP... Digital Motion processing

#13  

Here is more info. Temperature sensor is for the MPU die. Not room temperature sensor.

chip temperature sensor and ADC are used to measure the MPU

9150 die tempera ture. The readings from the ADC can be read from the FIFO or the Sensor Data regist

United Kingdom
#14  

Okay, it might time here in the UK so I have put my EZ-B outside with the 4 in 1'connected. 5 mins later at the temp has dropped to 20 C...

User-inserted image

Weird thing, I put it in the palm of my hand for a few seconds and it dropped straight to 3 within a few seconds. Removed it and it shot straight back up to 22.

United Kingdom
#15  

So I just bought my EZ-B back inside (no room in the fridge Richard, too much booze lol), and a couple of minutes later and the temp display has come back up 22 C...

User-inserted image

And putting the sensor on a bottle of warm water, about 40'seconds later it drops to 3 C...

User-inserted image

So as Justin and rb550f have said, I dont think this is reading ambient temperature at all, and is reading the sensor temp. Very irregular results, but it seems to be working. This kinda sucks as I (and others) thought it was going to read ambient room temp and I think it should be made clear in the description. But there is something going on with the results I'm getting.

United Kingdom
#16  

@fredebec and anyone else.

So in answer to your question, you're not doing anything wrong by the sounds of it. You can run the example script found by clicking the ? In the MPU9150 control, copy and paste the code in to a script, and run it.

Then put the sensor on a bottle of warm water or in the palm of your hand, or in something cold like a can of drink from the fridge, wait a few seconds and the temprerure display should change. The readings seem irregular, but they do change.

For anyone interested, the sample script can be found here

#17  

Ok, I have tried to rise the temp by putting the sensor on my 3d printer heated bed (at 40°C), and it also changed to... 3. Then get back to 22 at room temperature. I am not sure to fully understand what is the purpose of this "temperature" sensor, but it is clearly not an ambient temperature sensor. I am really disappointed because I have bought it only for that function :(

United Kingdom
#18  

@fredebec.

Same here. I was really hoping this would read room temp as well and was one of the reasons for me getting one. At least you got it working... Although not the way you want. eyeroll

#19  

In any case, thank you all for your help in solving this mystery (especially @Steve G):)

I think I will contact EZ Robot and suggest them to change the description as it is really misleading...

United Kingdom
#20  

Your welcome, and good idea.;)

#21  

I notice the description says it can "tell hot from cold". It may be a very nonlinear sensor and only reads temp points as opposed to linear changes for changes in temp. This may be a function of the software more than the sensor, but I think even the sensor is probably not very linear. Therefore the jumps in readings. It appears it simply reads cold, warm, and hot. At least with any reliability. Like, is your CPU running cool, normal, or hot? That's all you really get. It's misleading in it's title, but the description does not say it will measure temperature range with a linear voltage output through that range. This is probably a cost saving "feature." To give a truly linear output over a given range each unit would have to be calibrated through a range of temperatures. To do this would require a custom set of temperature vs voltage correction factors be entered into every unit or one or more tiny resistors burned by a laser to modify the resistance based on those same sort of correction factors. Either way, a time consuming effort, even if it is automated. Where production is concerned, time really is money.

#22  

@fredebec You could probably put in a temp. sensor and an amplifier and do the correction in Script Software to make the readings linear over a certain range of output readings vs temperature. There may even be some thermoresistive sensors (RTD - Resistance Temperature Detector) that would give you enough voltage change vs temp. output (using the existing voltage on the DAC port) to do the job without an amplifier. I don't know off hand. The more correction points you put in the more accurate it will be. Should be able to do this in Script using an array. OTOH, there are more expensive units already calibrated via the burning of resistor(s) by a laser. The usual tradeoff, cost vs accuracy. RTDs tend to be quite stable over time. Easy to hookup using a simple voltage divider.