jump to navigation

DS18B20 — 10 probes – GOING FOR IT November 27, 2011

Posted by rik94566 in 1-wire, aquaponic automation, aquaponics, arduino, CEA, Controlled Environment Agriculture, DIY aquaponics, DS18B20, HEX code, indoor aquaponics, indoor gardens, indoor growing, One-wire, probe index, sensor, Sensor Hub, Stainless Steel Temp Probe, Temperature Probe.
Tags: , , , , , , , , , , , , , , , ,
trackback

Well – I have the components assembled now so it  is the time to “GO FOR 10 PROBES’ connected up.  I will be using 4.7K ohm resistors with power supplied by my arduino.

HERE IS THE CONFIGURATION:

BUS AND 10 PROBES

HERE IS THE SKETCH USING 10 PROBES:

// This Arduino sketch reads DS18B20 “1-Wire” digital
// temperature sensors.
// Tutorial:
// http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html
//Changed sketch to handle 10 individual temperature probes for testing out software and 2 hub
//configuration – each probe is plugged into a wiring harness using either a 4.7K or 2.2K resistor.
//will use this to test power source and resistor needed to read 10 temp probes.
//ver-1.01-R
// Rik Kretzinger
//    11/26/2011

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

// Data wire is plugged into pin 3 on the Arduino
#define ONE_WIRE_BUS 8

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

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

// Assign the addresses of your 1-Wire temp sensors.
// See the tutorial on how to obtain these addresses:
// http://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html

DeviceAddress Probe007 = { 0x28, 0x34, 0x6F, 0x22, 0x03, 0x00, 0x00, 0xC2 };
DeviceAddress Probe008 = { 0x28, 0x56, 0x52, 0x31, 0x03, 0x00, 0x00, 0xB7 };
DeviceAddress Probe009 = { 0x28, 0x2F, 0x5C, 0x31, 0x03, 0x00, 0x00, 0x1B };
DeviceAddress Probe010 = { 0x28, 0xD4, 0x81, 0x31, 0x03, 0x00, 0x00, 0x23 };
DeviceAddress Probe011 = { 0x28, 0xF4, 0x6B, 0x31, 0x03, 0x00, 0x00, 0xF2 };
DeviceAddress Probe012 = { 0x28, 0xD8, 0x79, 0x31, 0x03, 0x00, 0x00, 0xC6 };
DeviceAddress Probe013 = { 0x28, 0x43, 0x77, 0x22, 0x03, 0x00, 0x00, 0x9D };
DeviceAddress Probe014 = { 0x28, 0x30, 0x65, 0x31, 0x03, 0x00, 0x00, 0x13 };
DeviceAddress Probe015 = { 0x28, 0xDE, 0x9D, 0x31, 0x03, 0x00, 0x00, 0xB1 };
DeviceAddress Probe016 = { 0x28, 0x7E, 0x8A, 0x31, 0x03, 0x00, 0x00, 0xC0 };

void setup(void)
{
// start serial port
Serial.begin(9600);
// Start up the library
sensors.begin();
// set the resolution to 10 bit (good enough?)
sensors.setResolution(Probe007, 10);
sensors.setResolution(Probe008, 10);
sensors.setResolution(Probe009, 10);
sensors.setResolution(Probe010, 10);
sensors.setResolution(Probe011, 10);
sensors.setResolution(Probe012, 10);
sensors.setResolution(Probe013, 10);
sensors.setResolution(Probe014, 10);
sensors.setResolution(Probe015, 10);
sensors.setResolution(Probe016, 10);
}

void printTemperature(DeviceAddress deviceAddress)
{
float tempC = sensors.getTempC(deviceAddress);
if (tempC == -127.00) {
Serial.print(“Error getting temperature”);
} else {
Serial.print(“C: “);
Serial.print(tempC);
Serial.print(” F: “);
Serial.print(DallasTemperature::toFahrenheit(tempC));
}
}

void loop(void)
{
delay(2000);
Serial.println();
Serial.println();
Serial.print(“Getting temperatures…\n\r”);
sensors.requestTemperatures();

Serial.print(“Probe 007 temperature is: “);
printTemperature(Probe007);
Serial.print(“\n\r”);
Serial.print(“Probe 008 temperature is: “);
printTemperature(Probe008);
Serial.print(“\n\r”);
Serial.print(“Probe 009 temperature is: “);
printTemperature(Probe009);
Serial.print(“\n\r”);
Serial.print(“Probe 010 temperature is: “);
printTemperature(Probe010);
Serial.print(“\n\r”);
Serial.print(“Probe 011 temperature is: “);
printTemperature(Probe011);
Serial.print(“\n\r”);
Serial.print(“Probe 012 temperature is: “);
printTemperature(Probe012);
Serial.print(“\n\r”);
Serial.print(“Probe 013 temperature is: “);
printTemperature(Probe013);
Serial.print(“\n\r”);
Serial.print(“Probe 014 temperature is: “);
printTemperature(Probe014);
Serial.print(“\n\r”);
Serial.print(“Probe 015 temperature is: “);
printTemperature(Probe015);
Serial.print(“\n\r”);
Serial.print(“Probe 016 temperature is: “);
printTemperature(Probe016);
Serial.print(“\n\r”);

}

HERE ARE THE RESULTS:

Advertisements

Comments»

1. DS18B20 — 10 probes – GOING FOR IT « Aquaponic DIY … | Free Aquaponics Tips - November 27, 2011

[…] reading here: DS18B20 — 10 probes – GOING FOR IT « Aquaponic DIY … ← NEW INVENTION: Salmon Aquaponics for Personal or Commercial […]

2. Elektrische Zahnbuerste - November 29, 2011

Wow Da weiss man, wo es hingehen muss Viele Grsse Mirta

3. vimax - December 5, 2011

Informative post, Im now one of your feed followers

4. Giannis - September 2, 2012

i really like your posts. They are very informative. Could you please post a drawing of your network and also some details regarding the cables ( length etc).

Cheers


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: