Temp Probe (DS18B20) – results without pull-up resistor May 8, 2011Posted by rik94566 in aquaponic automation, aquaponics, arduino, DIY aquaponics, DS18B20, indoor gardens, indoor growing, Stainless Steel Temp Probe, Temperature Probe.
Tags: aquaponic automation, aquaponics, arduino, arduino sketch, automation, DIY aquaponics, DS18B20, electronics, indoors aquaponics, microcontroller, Miles Burton, rik kretzinger, sensor, Temp Probe, Temperature Probe
Here are the results that are returned from my testing code of probes. I now know what reading I will get if the 4.7K ohm pull-up resistor is not present or connected wrong or a connection has broken. I have provided the sketch for download or you can copy it from below.
SKETCH – TO TEST PROBES
Testing Sketch to test construction of temp probes using DS18B20 IC for Stainless Steel probes.
Sketch was created by Miles Burton and changed to display both C and F temperatures using the serial
monitor for display.
created on 11/20/10
by rik kretzinger version 1.3
// Data wire is plugged into pin 8 on the Arduino
#define ONE_WIRE_BUS 8
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
// Pass our oneWire reference to Dallas Temperature.
// start serial port
Serial.println(“Dallas Temperature IC Control Library Demo”);
// Start up the library
// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus
sensors.requestTemperatures(); // Send the command to get temperatures
Serial.print(“Temperature for Device 1 is: “);
Serial.print(sensors.getTempCByIndex(0)); // Why “byIndex”? You can have more than one IC on the same bus.
// 0 refers to the first IC on the wire.
Serial.print(“FAHRENHEIT CONVERSION “);
Serial.print(((sensors.getTempCByIndex(0)*1.8)+32)); // test this line