Hi,
I need a temperature sensor for my project with a resolution of 0.1°C (actually I only need it between 0-80 Degrees, to be honest even less, but it should cover this area) and found this 1-Wire Digital Sensors and decided to try out the DS18S20.
Im using it with the DallasTemperature library and I installed it for testing on a breadboard with an LCD display to see if it works like I want it to, thats the Code Im using (The board is an Arduino UNO):
#include <OneWire.h>
#include <DallasTemperature.h>
#include <LiquidCrystal.h>
#define ONE_WIRE_BUS 10
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
float Temp = 0;
void setup(void)
{
Serial.begin(9600);
sensors.begin();
lcd.begin(16, 2);
}
void loop(void)
{
sensors.requestTemperatures();
delay(1000);
Temp = sensors.getTempCByIndex(0);
lcd.setCursor(0, 0);
lcd.print(Temp);
}
The problem I have now is the sensors giving to much temperature, my results I got in 3 longer runs were between 2-6 degrees celsius more then it actually was - Tested 3 different sensors, which are always do the same. In the first attempt I was using the OneWire Sample and all 3 Sensors were giving about the same value.
Yes, Im using the 4k7 Resistor between signal and 5V, and I tried to let it run for longer times. The sensor itself feels cold, so nothing getting warm there... But its still showing about 24.5 celsius while its at most 20-22, probably less... In the cellar (18-19 celsius) I got measurements of 21-22. The worst result was 28 for room temperature...
And when using digital sensors just subtract something from the temperature feels somehow wrong...
Im thinking of just ordering some DS18B20, but I cannot imagine all my DS18S20 are defective... So I hope you can help me: Either with a fix for my problem, or alternatives I can use...