jump to navigation

Temp Probe (DS18B20) – results without pull-up resistor May 8, 2011

Posted by rik94566 in aquaponic automation, aquaponics, arduino, DIY aquaponics, DS18B20, indoor gardens, indoor growing, Stainless Steel Temp Probe, Temperature Probe.
Tags: , , , , , , , , , , , , , ,
trackback

Testing Probe without pull-up resistor

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.

Lacking 4.7K resistor

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
*/

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

// 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)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

void setup(void)
{
// start serial port
Serial.begin(9600);
Serial.println(“Dallas Temperature IC Control Library Demo”);

// Start up the library
sensors.begin();
}

void loop(void)
{
// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus
Serial.print(“Requesting temperatures…”);
delay(1000);
sensors.requestTemperatures(); // Send the command to get temperatures
Serial.println(“DONE”);
delay(1000);

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.println(”  C”);
Serial.print(“FAHRENHEIT CONVERSION                     “);
Serial.print(((sensors.getTempCByIndex(0)*1.8)+32));  // test this line
Serial.println(”  F”);
Serial.println();
}

DOWNLOAD HERE:

https://docs.google.com/leaf?id=0ByHnXQwp03BXZGU2NTc4YjktMTMyOS00MTY1LWFiOGQtOTY1NzI5NDM0OWNk&hl=en&authkey=CNWPmuUM

Comments»

1. Terry King - May 8, 2011

Thanks for documenting this. One of the biggest help in troubleshooting is knowing specific symptoms or a known failure..

2. Hanna Instruments HI 9812-5N pH, conductivity and TDS in water conditioning Reviews - May 12, 2011

[…] Temp Probe (DS18B20) – results without pull-up resistor … […]


Leave a comment