What Kind Of Temperature Sensor Would be best

Hello I'm wondering if someone can recommend a temperature sensor for the Arduino Uno that can send data to Unity 3D
The temperature sensor will need to be able to read the temperature inside of a car in all kinds of weather.

All analog sensors (like TMP36) are not accurate, because the temperature depends on a good voltage reference.
The digital DS18B20 is a good temperature sensor.

Koepel:
All analog sensors (like TMP36) are not accurate, because the temperature depends on a good voltage reference.
The digital DS18B20 is a good temperature sensor.

Thanks Koepel,
Like this one?One-Wire Ambient Temperature Sensor - MAX31820 - SEN-14049 - SparkFun Electronics

There's also the AD22100, an accurate analog temperature sensor that doesn't rely on a precision voltage reference.

From the datasheet: "Due to its ratiometric nature, the AD22100 offers a cost-effective solution when interfacing to an analog-to-digital converter. This is accomplished by using the ADC’s +5 V power supply as a reference to both the ADC and the AD22100, eliminating the need for and cost of a precision reference."

It's a bit spendy at about $6 US a pop, but if you only need one, who cares?

Super easy to code for, too.

But, there might be other issues that would make a digital sensor better for your application.

Knightriderguy:
Thanks Koepel,
Like this one?One-Wire Ambient Temperature Sensor - MAX31820 - SEN-14049 - SparkFun Electronics

Yes, that one.

It is a little cheaper at Adafruit : DS18B20 Digital temperature sensor + extras : ID 374 : $3.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Or one dollar on Ebay : http://www.ebay.com/sch/i.html?LH_BIN=1&_nkw=ds18b20&_sop=15

You need at least the OneWire library, and many use also the DallesTemperature library.
In the menu of the Arduino IDE is the "Library Manager". Use that to install the OneWire and the DallesTemperature library.

It's temperature range is -55°C to +125°C. That should be good for inside a car.

Koepel:
Yes, that one.

It is a little cheaper at Adafruit : DS18B20 Digital temperature sensor + extras : ID 374 : $3.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Or one dollar on Ebay : http://www.ebay.com/sch/i.html?LH_BIN=1&_nkw=ds18b20&_sop=15

You need at least the OneWire library, and many use also the DallesTemperature library.
In the menu of the Arduino IDE is the "Library Manager". Use that to install the OneWire and the DallesTemperature library.

It's temperature range is -55°C to +125°C. That should be good for inside a car.

Thanks Koepel,
Wow those are so cheap :slight_smile: Gota love that. I found this little module, what are your shouts on this one:
http://www.ebay.com/itm/170934799468?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Most of the Arduino users here don't like such modules.
They often have a led, but not everyone wants that.
With many DS18B20 on the same 1-Wire, a single resistor is needed. With those modules each have a resistor, so it is not possible to combine many of them on the same 1-Wire.
With a seperate DS18B20 plus a resistor, it can be tested on a breadboard, and the final version can be soldered.

However, there is nothing "wrong" with such modules :wink:

Koepel:
Most of the Arduino users here don't like such modules.
They often have a led, but not everyone wants that.
With many DS18B20 on the same 1-Wire, a single resistor is needed. With those modules each have a resistor, so it is not possible to combine many of them on the same 1-Wire.
With a seperate DS18B20 plus a resistor, it can be tested on a breadboard, and the final version can be soldered.

However, there is nothing "wrong" with such modules :wink:

OK good to know man thanks. I should just need the one temperature sensor to read the temperature inside of the car and then I hopefully should be able to read that out on my unity 3D display. I have a LDR sensor as well, I hear sometime that having more than one sensor can cause issues but I think they are fixable issues... I think?

More than one is not an issue. If you want 10 or 20 sensors, that is no problem.

There are a few situations that might cause an issue. For some sensors, the interrupts are temporary disabled. Some I2C sensors have the same I2c address. The number of analog inputs is limited. And so on.

An LDR is not for direct sunlight. They also contain Cadmiun so they are not RoHS complient.
Adafruit has a good replacement for an LDR : Adafruit ALS-PT19 Analog Light Sensor Breakout : ID 2748 : $2.50 : Adafruit Industries, Unique & fun DIY electronics and kits
There are also lux sensors like this one : Adafruit TSL2561 Digital Luminosity/Lux/Light Sensor Breakout : ID 439 : $5.95 : Adafruit Industries, Unique & fun DIY electronics and kits
None of those are for direct sunlight.

An LDR has a very large range from very dark to very light. That range can not be captured with a single resistor to 5V. I use two output pins, one with 1k to the LDR and one with 100k to the LDR. I power those pins one after the other and average the result. That gives me a far more larger range.

The DS18B20 sensors are also no good in sunlight.

The black surface absorbs well and they heat up quite rapidly, so they must be shaded and placed where air can circulate freely around the sensor.

jremington:
The DS18B20 sensors are also no good in sunlight. The black surface absorbs well and they heat up quite rapidly

I have never seen a black DS18B20. All mine are in shiny stainless steel enclosures, so I guess it really depends on which DS18B20 is chosen

All of my DS18B20s are black plastic.

Koepel:
More than one is not an issue. If you want 10 or 20 sensors, that is no problem.

There are a few situations that might cause an issue. For some sensors, the interrupts are temporary disabled. Some I2C sensors have the same I2c address. The number of analog inputs is limited. And so on.

An LDR is not for direct sunlight. They also contain Cadmiun so they are not RoHS complient.
Adafruit has a good replacement for an LDR : Adafruit ALS-PT19 Analog Light Sensor Breakout : ID 2748 : $2.50 : Adafruit Industries, Unique & fun DIY electronics and kits
There are also lux sensors like this one : Adafruit TSL2561 Digital Luminosity/Lux/Light Sensor Breakout : ID 439 : $5.95 : Adafruit Industries, Unique & fun DIY electronics and kits
None of those are for direct sunlight.

An LDR has a very large range from very dark to very light. That range can not be captured with a single resistor to 5V. I use two output pins, one with 1k to the LDR and one with 100k to the LDR. I power those pins one after the other and average the result. That gives me a far more larger range.

Well, I currently have just the one LDR sensor, its just one of those small typical ones that come in electronics starter kits or sometimes come with Arduino stater kits.
It was mentioned though that the LDR is not really great for direct sunlight. Not sure if It will be in direct sunlight as I have not really figured out the best place to put it inside of the car when the software is all done. Maybe the upper console pointing towards the windshield... not sure.
I ordered a couple of those temperature sensors that are mounted on PCB with the LED for breadboard testing. But as a final for the car would you say to not use one of those?

Here is a short video of what I'm going for.

You can use those temperature modules, as long as you make sure that the wires stay connected at all times.

A question about LDR is a typical beginners questions, but you have already a number of things. Nice.

Keep the LDR out of sunlight and don't let it get too hot. Perhaps a semi-transparent cover will help.
Once a LDR reaches 75 degrees Celsius, it is gone. As in gone, finito, electronic waste.

Even a LDR of 5 cents from Ebay can determine if the moon is shining or not during the night. So don't worry that it might not get enough light.

Koepel:
You can use those temperature modules, as long as you make sure that the wires stay connected at all times.

A question about LDR is a typical beginners questions, but you have already a number of things. Nice.

Keep the LDR out of sunlight and don't let it get too hot. Perhaps a semi-transparent cover will help.
Once a LDR reaches 75 degrees Celsius, it is gone. As in gone, finito, electronic waste.

Even a LDR of 5 cents from Ebay can determine if the moon is shining or not during the night. So don't worry that it might not get enough light.

Thanks Koepel,
Would it be best fro the LDR to be pointed down wards? I know it can get quite hot in a car if it's parked in direct sunlight, I guess that's where that temperature sensor would come in handy. :wink:

This is a video of the upper console, it fits in the T-Top of my 82 TA if you look at the video on that fat part that sticks out from the main body, that part faces the windshield, I was thinking of mounting the LDR in there somewhere, do you think it would get too hot in there?

I don't know, just try it. Using a semi-transparent cover and an air gap between the body and ldr might help.

These are also cheap, and up to 100 degrees Celsius : Miniature Solar Cell - BPW34 - PRT-09541 - SparkFun Electronics

Koepel:
I don't know, just try it. Using a semi-transparent cover and an air gap between the body and ldr might help.

These are also cheap, and up to 100 degrees Celsius : Miniature Solar Cell - BPW34 - PRT-09541 - SparkFun Electronics

I finally got the DS18B20 Temperature sensor module. I know you are not a fan of the modules but I think they are probably more than good enough for testing, I would think anyways.
Now all I need to do is figure out what the best code is to use with it that will communicate the data into a format I can use in Unity 3D.
I got that LDR sensor working pretty cool. I put it inside of a small plexiglass enclosure like you had said and it still reads the light very well.

Check out the video demo.

For the DS18B20, open the Library Manager (It is in the menu of the Arduino IDE), install OneWire and DallasTemperature. The OneWire has already examples for the DS18B20, but the DallasTemperature makes it easier.

Koepel:
For the DS18B20, open the Library Manager (It is in the menu of the Arduino IDE), install OneWire and DallasTemperature. The OneWire has already examples for the DS18B20, but the DallasTemperature makes it easier.

Oh hey, awesome, I'll have to check that out Koepel. I was looking at the shift registers tutorial and that just blows me away that each one of those shift registers gets you 8 more ports out of just one.... Now that is Way cool :smiley:

Koepel:
For the DS18B20, open the Library Manager (It is in the menu of the Arduino IDE), install OneWire and DallasTemperature. The OneWire has already examples for the DS18B20, but the DallasTemperature makes it easier.

Hi Koepel,
Is this the sketch I would need to draw information from for the DS18B20?

//
// FILE: TwoPin_DS18B20.ino
// AUTHOR: Rob Tillaart
// VERSION: 0.1.00
// PURPOSE: two pins for two sensors demo
// DATE: 2014-06-13
// URL: http://forum.arduino.cc/index.php?topic=216835.msg1764333#msg1764333
//
// Released to the public domain
//

#include <OneWire.h>
#include <DallasTemperature.h>

#define ONE_WIRE_BUS_1 2
#define ONE_WIRE_BUS_2 4

OneWire oneWire_in(ONE_WIRE_BUS_1);
OneWire oneWire_out(ONE_WIRE_BUS_2);

DallasTemperature sensor_inhouse(&oneWire_in);
DallasTemperature sensor_outhouse(&oneWire_out);

void setup(void)
{
    Serial.begin(9600);
    Serial.println("Dallas Temperature Control Library Demo - TwoPin_DS18B20");

    sensor_inhouse.begin();
    sensor_outhouse.begin();
}

void loop(void)
{
    Serial.print("Requesting temperatures...");
    sensor_inhouse.requestTemperatures();
    sensor_outhouse.requestTemperatures();
    Serial.println(" done");

    Serial.print("Inhouse: ");
    Serial.println(sensor_inhouse.getTempCByIndex(0));

    Serial.print("Outhouse: ");
    Serial.println(sensor_outhouse.getTempCByIndex(0));
}