jump to navigation

DS18B20 — new probe set established August 13, 2012

Posted by rik94566 in 1-wire, aquaponic automation, aquaponics, DIY aquaponics, DS18B20, HEX code.
Tags: , , , , , ,
2 comments

Next step in getting to determine if I can get 20 probes to configure correctly,  is to determine the HEX code for each probe.  Being that I had 10 left to pull of the HEX I got to work on this task.  Here are the results.

P022 — 0x28, 0x67, 0x22, 0x47, 0x03, 0x00, 0x00, 0xA1

P023 — 0x28, 0xAC, 0x30, 0x47, 0x03, 0x00, 0x00, 0x39

P024 — 0x28, 0x4A, 0x18, 0x47, 0x03, 0x00, 0x00, 0x64

P025 — 0x28, 0x1A, 0x3A, 0x47, 0x03, 0x00, 0x00, 0x31

P026 — 0x28, 0x66, 0xC1, 0x7A, 0x03, 0x00, 0x00, 0xD7

P027 — 0x28, 0xA2, 0x51, 0x47, 0x03, 0x00, 0x00, 0xF6

P028 — 0x28, 0xB5, 0x1F, 0x47, 0x03, 0x00, 0x00, 0x63

P029 — 0x28, 0x9B, 0xC0, 0x7A, 0x03, 0x00, 0x00, 0x22

P030 — 0x28, 0xBE, 0xB6, 0x7A, 0x03, 0x00, 0x00, 0x8E

P031 — 0x28, 0x20, 0x15, 0x47, 0x03, 0x00, 0x00, 0x84

Now I have the HEX code I need to enter all the information into my INDEX of probes so I can track each probe and where I have them located in my systems.  Helpful to know if I move them around in the future.  I had been using the procuct “MANYMOON” for tracking, but have since switched over to “EVERNOTE”.  This has proved to be a better platform for me as I can manage larger amount of information on a large amount of projects.  Evernote also allows me to have access to my information on any device I am using.  Great Stuff.

Here is what my index now looks like:

Probe Set Index

DS18B20 — External Power Connection — NOT WORKING February 18, 2012

Posted by rik94566 in 1-wire, aquaponic automation, aquaponics, arduino, DIY aquaponics, DS18B20, HEX code, sensor, Stainless Steel Temp Probe, Temperature Probe.
Tags: , , , , , , , ,
5 comments

Well here we go.  My first attempt to read one DS18B20 using external power.  The only place I found as a source on how to connect this up is the circuit schematic that I talked about in a earlier post.

Here is again:

Starting point for connections for external power

So, working from the circuit schematic this was my best guess at how to go real world with connecting up my hardware. At this point all I want to do is to pull off a simple HEX code read from one DS18B20 probe. I also needed to add the 4.7K resistor between Power (red wire  + ) and the Signal (yellow wire) connection.  This is what is called a “PULL-UP” resister configuration.

Here is what I came up with for my first attempt at using external power to read a probe:

First attempt to power DS18B20 with external power

Next step was to determine what sketch I was going to work with to read the probe.  I wanted to keep it very simple and easy to determine results so I went with my HEX read sketch.

Here it is for your review:

// This sketch looks for 1-wire devices and
// prints their addresses (serial number) to
// the UART, in a format that is useful in Arduino sketches
// Tutorial:
// http://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html

#include <OneWire.h>

OneWire  ds(8);  // Connect your 1-wire device to pin 8

void setup(void) {
Serial.begin(9600);
discoverOneWireDevices();
}

void discoverOneWireDevices(void) {
byte i;
byte present = 0;
byte data[12];
byte addr[8];

Serial.print(“Looking for 1-Wire devices…\n\r”);
while(ds.search(addr)) {
Serial.print(“\n\rFound \’1-Wire\’ device with address:\n\r”);
for( i = 0; i < 8; i++) {
Serial.print(“0x”);
if (addr[i] < 16) {
Serial.print(‘0’);
}
Serial.print(addr[i], HEX);
if (i < 7) {
Serial.print(“, “);
}
}
if ( OneWire::crc8( addr, 7) != addr[7]) {
Serial.print(“CRC is not valid!\n”);
return;
}
}
Serial.print(“\n\r\n\rThat’s it.\r\n”);
ds.reset_search();
return;
}

void loop(void) {
// nothing to see here
}

Now I had everything in place to determine my results.

Here is what returned:

Results when Sketch was run

The result was a blank, so no HEX code was found.  Clearly I had a problem with some aspect of how this configuration was connected.  I re-tested the HEX code sketch on a working configuration and it worked fine, so I knew the Sketch was OK.

Now the problem became why is this not working?

I needed help on how to figure this out.

DS18B20 — external power supply December 15, 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: , , , , , , , , , , , , , , , , ,
1 comment so far

Before I can connect everything up and work with my DS18B20 probes using external power supply I need to get one.  The one that I have selected is this one:

5V power supply

DS18B20 – on to external power December 7, 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: , , , , , , , , , , , , , , , , , , ,
2 comments

When you want to learn something new in electronics, you have to start at the bottom.  In my mind a circuit layout like this is the bottom for me and it is hard for me to follow.  I will be the first to admit that I am not an electrical engineer and don’t want to be one either.  I just want a simple way to hook things up and have them work when I need them too.  So this layout just gives me a general idea of where to start on hooking up a external power source for my probes.  I was at this same point when I started to learn about DS18B20’s and use with an arduino.   The good news is that I have a more clear understanding how the DS18B20 functions and how it operates than when I first started on this project.

WHY DO I NEED EXTERNAL POWER FOR MY DS18B20’S  ——-

Well that is a very good questions.  In most applications and small projects you do not need to know anything about this aspect of the DS18B20’s.  In my case as I have been working on this blog several questions have been posed as to power drains on arduino’s if you request to many sensors being driven by the unit and you have long runs to your sensors.  So I need to do some research as to how to use a external power source.  A lot of places on the internet talk about it, but I have yet to find any source that shows a person how to actually make this work.  As for the research here is the best I could find.  If you know of others please let me know and I will add it to my library and give you credit for it here.

HERE IS THE BIBLE ON THIS SUBJECT  —

http://www.arduino.cc/playground/Learning/OneWire

Normal (external supply) mode
With an external supply, three wires are required: the bus wire, ground, and power. The 4.7k pull-up resistor is still required on the bus wire. As the bus is free for data transfer, the microcontroller can continually poll the state of a device doing a conversion. This way, a conversion request can finish as soon as the device reports being done, as opposed to having to wait 750ms in “parasite” power mode.

Note on resistors: For larger networks, you can try something smaller. The ATmega328/168 datasheet indicates starting at 1k6 and a number of users have found smaller to work better on larger networks.

THAT IS ALL THERE IS — in this bible.  Not much of a help in my mind.

HERE IS THE OTHER THING I FOUND:

http://sheepdogguides.com/dst9parasitic.htm

Choosing your 1-Wire chip power mode

Many of the chips in the 1-Wire family from Dallas Semiconductor can be powered “parasitically”… that’s Dallas’s (apt) name for the system used.

The advantage of parasitic powering is that it means you can have a two wire MicroLan. (“MicroLan” is just Dallas’s trademarked name for a bunch of 1-Wire chips “playing nicely” with each other and a “master” device, e.g. a PC or simple microcontroller, e.g. Arduino, in charge of the network of 1-Wire sensors, actuators, storage units, etc.) If you don’t use parasitic powering, then you need to run three wires from chip to chip to chip. (An aside: You should be aware that MicroLans don’t like star topographies. If you need a star, you need a hub to split it into separate, non- star, legs.)

I’ve often used parasitic powering entirely successfully. However, if you have a lot of chips on the MicroLan, or high poll rates, the time may come when supplying the chips which can be powered parasitically makes sense. It isn’t difficult… especially if you provided for the possibility that you’d like to make the change when you first set up your MicroLan.


For example…

Just as an example, let’s consider a MicroLan that is reading temperatures in various parts of a large greenhouse.

We’ll assume you’re using chips from the DS182x family, in a TO92 package, the little blob of plastic with three “legs”.

To use those chips parasitically, you just connect two of the legs to one another, and that leaves you with two connections which go to the two wires of the basic MicroLan.

Now… and this is what I meant about giving yourself options for the future… rather than doing that the “obvious” way, using either a small PCB, or simple discrete wires, connect each of the three pins to a separate track or wire, and THEN make your connections to the MicroLan. If later, you want to use non parasitic power, then all you have to do is change a link, or disconnect one of the wires, and you can then supply the chip with its independent V,cc easily, without disturbing what would be fiddly connections to the package’s pins.

Here are the details of which pin is which on the DS1820…

DS1820 pinout diagram

The DS1820’s middle leg goes to the 1-Wire data line.

The DS1820’s leg marked “See text” should be attached to the 5v, or, for parasitic power, connect this pin to ground (zero volts))

And the DS1820’s “1-Wire 0v” should be attached ground,i.e. to zero volts.

(If the above seems over-explained, please remember that this page may be accessed by people who want more than just an idea of what this “parasitic power” thing is all about.)

AND THE LAST ONE I FOUND:

http://forums.parallax.com/showthread.php?135523-ds18b20-sensor-fails-at-high-temperature

osts
117

Default Re: ds18b20 sensor fails at high temperature

I may have stumbled on a possible solution, but I am not sure how to code it. The snippet below is from the Maxim data sheet for the ds18b20. If I understand the second paragraph, correctly, I may need to Insert these commands:

Skip rom (cch)
Read power (b4h)
Then initiate a “read time slot”

I am not sure how or where to insert these commands in the one wire object.
I am using an external power supply with a 4.7k pullup

“The use of parasite power is not recommended for temperatures above +100°C since the DS18B20 may not be able to sustain communications due to the higher leakage currents that can exist at these temperatures. For applications in which such temperatures are likely, it is strongly recommended that the DS18B20 be powered by an external power supply.

In some situations the bus master may not know whether the DS18B20s on the bus are parasite powered or powered by external supplies. The master needs this information to determine if the strong bus pullup should be used during temperature conversions. To get this information, the master can issue a Skip ROM [CCh] command followed by a Read Power Supply [B4h] command followed by a “read time slot”. During the read time slot, parasite powered DS18B20s will pull the bus low, and externally powered DS18B20s will let the bus remain high. If the bus is pulled low, the master knows that it must supply the strong pullup on the 1-Wire bus during temperature conversions.

Not a lot to work with here, but I do have a lay out and now need to assemble the components I will need to pull this off.  Don’t you just love electronics and all the neat stuff you get to learn!!!!

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: , , , , , , , , , , , , , , , ,
4 comments

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:

DS18B20 HEX code – 5 probes Hooked-UP November 20, 2011

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

I am now ready to try 5 probes using HEX code:

5 probes 4.7 resistor

Here is the setup using my 4.7 ohm resistor harness setup.  I also build a 5 connector ground setup to make much easier to control the ground connections.

Here is the sketch that I used with the 5 probe configuration.  You will need to determine your HEX code for each DA18B20 and replace in the sketch for your situation.

// 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 individual temperature probes for testing out software and hub
//each probe is plugged into a wiring harness using either a 4.7K or 2.2K resistor configuration.
//will use this to test power soruce and resistor needed to read 5 temp probes.
//ver-1.01-R
// Rik Kretzinger
//    08/17/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 };

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);
}

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.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”);

}

5 PROBES WORKING:

DS18B20 – – 2 temp probe — CORRECTIONS MADE November 16, 2011

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

The corrections to the HEX code have now been made and the sketch works great.  Here are the results:

DS18B20 — 2 HEX code temp probe reading — ERROR November 9, 2011

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

Well here is my sketch that I adapted to my DS18B20 probes.  I set the sketch up to read probes 010 & 011.  I only did two probes so I could test out the sketch and make sure it was working correctly.

HERE IS THE SKETCH I STARTED WITH:


//
http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html
//Changed sketch to handle individual temperature probes for testing out software and hub
//each probe is plugged into a wiring harness using either a 4.7K or 2.2K resistor configuration.
//will use this to test power soruce and resistor needed to read 5 temp probes.
//ver-1.01-R
// Rik Kretzinger
//    11/04/2011

#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
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 Probe010 = { 0x28, 0xD4, 0x81, 0x31, 0x03, 0x00, 0x00, 0x23 };
DeviceAddress Probe011 = { 0x28, 0x4F, 0x6B, 0x31, 0x03, 0x00, 0x00, 0xF2 };

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(Probe010, 10);
sensors.setResolution(Probe011, 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.print(“Getting temperatures…\n\r”);
sensors.requestTemperatures();

Serial.print(“Probe 010 temperature is: “);
printTemperature(Probe010);
Serial.print(“\n\r”);
Serial.print(“Probe 011 temperature is: “);
printTemperature(Probe011);
Serial.print(“\n\r”);

}

HERE ARE THE RESULTS:  (error occurred)

SO WHERE IS THE ERROR:

good news is that the “ERROR CAPTURE” in the sketch is working

Here is the problem:

Moral of the story —  make sure you check everything 2 or 3 times.    HEX code will more than likely where your problem maybe.  Also test your connections as they will give you the same error result.

DS18B20 HEX code — move it to the sketch October 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: , , , , , , , , , , , , , , , , , ,
2 comments

Now that I have the HEX code for each temp probe it is time to move it to the working sketch.  I will be pulling the sketch from the one used at the hacktronics site.

http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html

Here is the code I pulled.  I will work through it to make the changes I will need to make it fit my application.

Areas to be changed

Here is how I will change the HEX code part of the sketch:

DeviceAddress P-011 = { 0x28, 0xF4, 0x6B, 0x31, 0x03, 0x00, 0x00, 0xF2 };
DeviceAddress P-012 = { 0x28, 0xD8, 0x79, 0x31, 0x03, 0x00, 0x00, 0xC6 };
//DeviceAddress P-0XX = { 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX };

I will only start by testing out 2 probes

I will make these changes as well:

  // start serial port
Serial.begin(9600);
// Start up the library
sensors.begin();
// set the resolution to 10 bit (good enough?)
sensors.setResolution(P-011, 10);
sensors.setResolution(P-012, 10);
//sensors.setResolution(P-0XX, 10);

and change here also:

Serial.print(“Probe 011 temperature is: “);
printTemperature(P-o11);
Serial.print(“\n\r”);
Serial.print(“Probe 012 temperature is: “);
printTemperature(P-012);
Serial.print(“\n\r”);
// Serial.print(“Probe 0XXtemperature is: “);
//printTemperature(P-0XX);
// Serial.print(“\n\r\n\r”);
}

DS18B20 HEX code — where to keep it all October 18, 2011

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

At the present time I am working with over 35 temp probes and that number will be growing as I add more aquaponic systems.  Since I have been engraving each probe with a specific probe number it was easy to associate the HEX code with the probe number.  The question became  —  where to keep this information.  I established an index of all my probe information.  When I first started I kept the index in google notebook and that gave me a lot of flexibility in looking at the index and interacting with it.  I could get to the index from just about any number of devises.  Since google has determined that they will no longer support notebook and will move all the information contained in google notebook to google doc format, that was not going to work for me any longer.  I had to find a different format for my probe index.  I had read about and started using a new product called Manymoon ( they have a free version).  It is a simple task management cloud product with a lot of functionality.  I needed a product like this any way as I needed away to help me track and stay on task with the projects that I have underway presently.

Here is what my index looks like:

Probe Index

I can expand the individual probe information and add any amount of additional information about the probe in the detail section and attatch links – documents – files to the reference.  Great stuff.

Here is what it looks like:

Probe Detail Section

This solution works great for me.  If you are only working with a small number of probes, you might not need this level of detail.  But if you are going to work with a lot of probes you will need to address this issue and find a solution that will be easy to use and find probe information quickly.