I'm not used with asking for help ...but today, i feel like i need it!
I put my DS18B20 in a glass of water
My sensor is attach to D3 pin from nodmcu
Voltage of sensor is 3.3V
Pull up resistance is 4.7k (I ve also tried 1k or 8k)
Here is a sample of the values I've read :
Temperature : 23.25
Temperature : 23.37
Temperature : 23.12
Temperature : 23.25
Temperature : 23.37
Temperature : 23.37
Temperature : 22.62
Temperature : 23.12
Temperature : 23.25
Temperature : 23.37
Temperature : 23.25
Temperature : 23.25
Temperature : 23.25
Temperature : 23.25
Temperature : 22.50
Temperature : 23.37
Temperature : 23.12
Temperature : 23.12
Temperature : 22.62
Temperature : 22.62
Temperature : 23.25
Temperature : 23.25
Temperature : 23.25
Temperature : 23.37
Temperature : 23.25
Temperature : 22.62
Temperature : 23.25
Temperature : 23.25
Temperature : 23.25
Temperature : 23.12
Temperature : 23.25
Temperature : 22.62
Temperature : 22.62
Temperature : 23.25
Temperature : 23.25
Temperature : 22.62
Temperature : 23.12
Minimum is 22.50
Maximum is 23.37
within 1min, in a simple glass of water ...i really think that is not acceptable
How can i have value more stable ?
Thanks a lot !
here is my code
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS D3
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
void setup(void)
{
Serial.begin(9600);
sensors.begin();
}
void loop(void)
{
sensors.requestTemperatures();
Serial.print("Temperature : ");
Serial.println(sensors.getTempCByIndex(0));
delay(1000);
}
note :
- Hardware: [ESP-12e module]
- Core Version: [packages\esp8266\hardware\esp8266\2.4.1]
- Development Env: [Arduino IDE 1.8.5]
- Operating System: [Windows]