MEMS thermal sensor to arduino Uno

Guys im trying to start a project on Omron MEMS thermal sensor(human detector) , Im suppose to detect humans in vehicles(babies specifically) and this is just a single part of a bigger system. im expecting the sensor in a few days, wondering if there is anyone out there who have tried this so u can teach me a thing or two;

  1. can this sensor differentiate human temperature during hot weather? temperature inside a car would be much higher than the outside so was wondering if this sensor is capable of detecting humans insided the vehicle?

  2. Regarding the terminal arrangement, is this correct, the SDA Serial data I/O line is connected to the desired analog pin in the arduino? and where does the the SCL Serial clock input go in the arduino? here is the datasheet : http://www.omron.com/ecb/products/pdf/en-d6t.pdf

  3. If anyone has tried this before, would it work if i just write a code where it detects a certain range of temperature like;

example :
temp = analogRead(tempPin)
if ( temp > 35 ) //35 degree celcius
{
DigitalWrite ( LED,HIGH )
}

Thank you, this is specifically for people who have tried MEMS thermal sensor. If anyone can point me to a tutorial or an example it would be great, cause still havent found out any yet.

Datasheet says it talks I2C (will be easy to connect to Arduino - pin A4 and A5)
Da- says nothing about how to talt to the sensor (commands to give)
If you are luck, it sends it data (two tempreratues) repeatedly.
Temps are the 'overall temp' = reference and object temperature.

I guess it takes commands to 'set focus' at different spots in its view.

..and then I found this:
get this one onto your disc.. NOW ! (You'll need it)
http://www.mouser.com/pdfdocs/D6T01_ThermalIRSensorWhitepaper.pdf

knut_ny:
Datasheet says it talks I2C (will be easy to connect to Arduino - pin A4 and A5)
Da- says nothing about how to talt to the sensor (commands to give)
If you are luck, it sends it data (two tempreratues) repeatedly.
Temps are the 'overall temp' = reference and object temperature.

I guess it takes commands to 'set focus' at different spots in its view.

get this one onto your disc.. NOW ! (You'll need it)
http://www.mouser.com/pdfdocs/D6T01_ThermalIRSensorWhitepaper.pdf

First of all thanks for that site, haha i will check it out .. when you say
"says nothing about how to talt to the sensor (commands to give)
If you are luck, it sends it data (two tempreratues) repeatedly."

what do u mean by nothing about how to talk to the sensor? so im unable to give commands?
sorry if it bothers you , haha , everytime im in a new project, im always a bit slow on the details

depending on sensor (1x8 or 4x4) send a command - request for data. (19 og 35 bytes ?)
Then read the data received into an array. You will find that each temp (deg C) refers to a given area.
I believe you can do this..

  1. can this sensor differentiate human temperature during hot weather? temperature inside a car would be much higher than the outside so was wondering if this sensor is capable of detecting humans insided the vehicle?

The White Paper linked in Reply #1 specifically comments on this issue. When the background temperature is high, the detector could fail to distinguish humans from background.

see whitepaper, OMROM page 7 for info on pull-up resistors.
page 8 (picture)
may this mean that the communication should be like:
--> Wire.beginTransmission(address); Wire.write(0x4C); Wire.endTransmission();
then
--> Wire.requestFrom(address,19); ..now read 19 bytes
If this is the case, the program I sent you must be modified.. A LOT!

Hey Guys! Did any of you actually got the sensor to work with the Arduino? I am working with this sensor right now and the i2c scanner program Arduino Playground - I2cScanner fails to detect any sensor at all. Also do any of you have an actual working code? I am using the one I came across this Japanese website MEMS温度センサを使おう – スイッチサイエンス マガジン

I am a newbie with the Uno so please excuse the dumb questions

see
http://forum.arduino.cc/index.php?topic=231173.msg1698828#msg1698828

remember the pullups. (3k3..10k)

I am guessing the resistors are already mounted on the board but I am not too sure on that.
Would try to put the resistors on to see if there is any difference.

yes.. the sensor (1x8) works..
I belive the key was reading it slowly.. in a for loop, waiting for each byte to be present

#include <Wire.h>
#define D6T_addr 0x0A
#define D6T_cmd 0x4C
byte rbuf[19]; 
float temp[9]; // amb + 8 temp_readings
void setup()
{
  Wire.begin();
  Serial.begin(9600); // 
}
void loop()
{
  int i;
  Wire.beginTransmission(D6T_addr);
  Wire.write(D6T_cmd);
  Wire.endTransmission();
  Wire.requestFrom(D6T_addr,19);
  delay(100); // < ------- 100MS DELAY
  for (i = 0; i < 19; i++) 
  {
    while(!Wire.available()); // <------- ADDED
    rbuf[i] = Wire.read(); 
  }
  for (i=0; i<9; i++)
  {
    temp[i]=(rbuf[(i*2)]+(rbuf[(i*2+1)]<<8))*0.1;
  }
  if (temp[0]>0) // <------- ADDED
  {
    for (i=0; i<9; i++)
    {
      Serial.print (temp[i]) ;
      if ( i < 8 ) {
        Serial .print ( "," ) ;
      } 
      else {
        Serial . println ( ) ;
      } 
    }
  }
}

@knut_ny

Looking at your code, you have a line saying:

Wire.requestFrom(D6T_addr,19);

As you are taking in only 19 bytes, it is safely under the limit of 32 bytes for the internal buffer.

From my discussion in Thermal infrared camera for an alarm? - #6 by knut_ny - Sensors - Arduino Forum, I am taking in 35 bytes which is 3 bytes more than the limit. Thus I would not be able to use your code.

Using robtillaart suggestion of reading 7 groups of 5 did not help much. I still get the results shown in my post at the link.
Possibly my thermal sensor is acting up or the connection is wrong.

Will post any update.

the code can be used.. There is no buffer involved, just one char at a time.
Adjust some constants for the 4x4 variant (to get all 35 bytes)

As I am connecting it to a Due instead of a Uno, I am using a level converter board from Sparkfun (PCA9306).
I followed the hookup guide on sparkfun to connect the board up.
With the high Voltage on the '2' side and Due on the '1' side.

Putting on the oscilloscope, the SCL from Arduino did not show the square wave as expected on the 3.3V side.
It seems that the breakout board is causing communication errors between the sensor and arduino. I am at wit's end trying to get the sensor to work. Any successful stories out there?

check datasheet to get hi/low side correct http://www.ti.com/lit/ds/symlink/pca9306.pdf
..ensure that 5V is present..

The connections are as follows:

Arduino Due- PCA9306 - D6T-44L
3.3V - VREF1 VREF2 - 5V
SCL - SCL1 SCL2 - SCL
SDA - SDA1 SDA2 -SDA
GND - GND - GND

All three components share the common GND from Arduino.
5V and 3.3V from Arduino board.

Using 10k Resistor as pull up on thermal side and 3.3k resistor on arduino due side. Although I don't think I would need the pull-up resistor on Arduino as my other sensors that run on 3.3V can connect directly onto Due without need of the resistors.

Update: I borrowed a friend's UNO and connected the thermal sensor to it directly. Managed to get some readings from the sensor. Not running continuously though. Using knut_ny code at the moment.

connections and pullups seems correct.
The scope told you something odd..... Q: is the converter working as it should ?

After putting off the project for some time, I have decided to get a Mega 2560 to test out the sensor.

Result: The sensor works.
Conclusion: Problems with connection

Problems: It could be that the current is not sufficient enough. After all the Translator device and D6T are all connected directly to the Arduino Due board. Would try it with external power supply to check this theory.

@knut_ny: I have used your code with a D6T-8L sensor. Every time I run it, an average of 2 lines of data would appear and then all transmission would stop. Did you encounter such a problem? This is test with the Mega board.

..can't tell. I've never used that sensor. (I wrote the example code for another user)
Only thing I can think of is that you dont allow a pause between readings

I commented out
while(!Wire.available()); // <------- ADDED
in the

for (i = 0; i < 19; i++) 
  {
    //while(!Wire.available()); // <------- ADDED
    rbuf[i] = Wire.read();
    
  }

and it worked perfectly now. I noticed a few rounds that the sensor wasn't giving any reading.

Output of the sensor

Start
Sensor reading finished
End
Start
Sensor reading finished
23.80,22.40,21.60,22.20,22.30,22.30,22.20,22.20,21.90
End
Start
Sensor reading finished
End
Start
Sensor reading finished
23.80,22.50,21.60,22.20,22.30,22.30,22.30,22.20,21.90
End
Start
Sensor reading finished
23.80,22.50,21.60,22.20,22.30,22.30,22.30,22.20,21.90
End
Start
Sensor reading finished
End
Start
Sensor reading finished
End
Start
Sensor reading finished
End
Start
Sensor reading finished
23.80,22.40,21.60,22.10,22.30,22.20,22.20,22.20,21.90
End

Possibly the sensor is not made to be at 9600 baud?

Did anyone tried with the same logic in wireless??