jump to navigation

Completed DS18B20 Temp Probe assembly & fully tested now May 30, 2011

Posted by rik94566 in aquaponic automation, aquaponics, arduino, CAT 5 Cable, DIY aquaponics, DS18B20, Hacks, indoor aquaponics, indoor gardens, indoor growing, Rj45 connector, sensor, Standards, Temperature Probe.
Tags: , , , , , , , , , , , , , , ,
trackback

Now that I have completed the Stainless Steel (DS18B20) Temp Probe with CAT 5 cable and RJ45 jack assembly I am ready to perform the finial test.  Using the RJ45 female connector I completed in the last blog section I am ready to test.  Here is what it all looks like to perform this last test.

LAST TEST OF ALL CONNECTIONS AND COMPONENTS

Using the arduino Sketch below will determine if the connections are all working for this completed assembly.

/*
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();
}

RESULTS (if all connections are working – fig 1.1 below)

1.1 -- Connections working correctly

Should you get results like these (below – fig 1.2)  – you have a problem with your connection somewhere in the assembly.  They will need to be corrected before you can use the assembly being tested.

1.2 -- Problem with connections

Advertisements

Comments»

1. Terry King - May 31, 2011

Hi, Glad to see this all working..

If anyone has suggestions for other products that would be useful for building growing environments, monitoring, control etc. please email me with suggestions.

Regards, Terry King
terry@yourduino.com


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: