Pages: [1]   Go Down
Author Topic: Unsure results from thermistor  (Read 199 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello. I need help to determine if this reading is accurate. I am trying to measure ambient temperature with a 12k thermistor. I am using Arduino Uno. I am currently trying to build a climate regulator which will eventually drive a heater/fan from a relay/optocoupler. here is the code:
const int TEMP = 0;
const int HUMID = 1;
int val = 0;
int val2 = 1;
void setup() {
  Serial.begin(9600);}
void loop() {
  val = analogRead(TEMP);
  Serial.print("Temperature:");
  Serial.println(val/15);
Serial.print("Humidity:");
Serial.println(val2);
delay(650);}

The Serial.print is for testing purposes/calibration.
Ignore the Humidity for now but should I get problems with it I will ask. Thanks.
MrFarad3
Logged

Offline Offline
Edison Member
*
Karma: 36
Posts: 1219
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For an accurate temperature, you need an accurate 5V. When the Arduino is powered via usb, the 5V can be lower.
Your code will not work with a thermistor.
Follow this tutorial: http://learn.adafruit.com/thermistor/
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your support and for pointing me in the right direction. I will try and power up the board with a wall transformer but what is the Max current this board can take? Also should I use a DH-11 humidity sensor with built in temperature detection?

DH-11: http://www.arduinoeverything.com/archives/55
Logged

Offline Offline
Edison Member
*
Karma: 36
Posts: 1219
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The maximum current the Arduino Uno board can take ? I don't understand your question.
A power supply of 7.5V and 500mA or 1A is perfect. You can use 7 to 12V.

The DHT11 is not very accurate, but it is a digital sensor, and changes in the 5V won't change the read temperature.

For a good temperature measurement, use the DS18B20. It is a digital temperature sensor, and it is very accurate.
Logged

Pages: [1]   Go Up
Jump to: