08M2 and 3 x DS18B20 temp sensors

SAborn

Senior Member
With the DS18B20 temp sensors and using a 08m2 chip, can 3 x DS18B20 sensors be used, with one on each of C.1, C.2, C.4.

From what i understand from the manual this is doable, in the past i have only needed or use 1 sensor on a picaxe.

Application.............

I have some solar hotwater panels i intend to add to the present HW system, and need to monitor water temp from the panel, and water temp to the panels, for a circulating pump control.
A 3rd temp sensor might be used to monitor storage cylinder (tank) temp.

I do have I2C temp sensors that would allow up to 24 sensors on the same bus, and no harder to code, but the I2C sensors are SMD and harder to attach to locations.

Before the thread turns into a Caution of controlling mains power with a picaxe, i am more than able to safely do that control, and not harm any picaxe or person in the making or operation.
 

BeanieBots

Moderator
You can use ReadTemp/12 on any BIDIRECTIONAL pin.
X2 parts support one-wire commands which will allow any number (up to bus limit) of devices on just ONE bidirectional pin.
 

SAborn

Senior Member
Thanks BB,

I try to be cheap and like to squeeze the most out of a smaller chip where i can (08m2), all i need is 2 or 3 temp sensor inputs and 1 output.

Gee the copper pipe is costing enough without an upgrade to a X2 chip. :D:D

Then it should result in a saving of around $70.00 per 90 days in power, so perhaps i can afford the X2 chip, but dont think its needed.
 

SAborn

Senior Member
IWP,

Thats good news, as if a 08m will do it a 08m2 should also do it with ease, if i hunt hard enough i could find a few redundant 08m's here if i need.
 

BeanieBots

Moderator
Gee the copper pipe is costing enough without an upgrade to a X2 chip. :D:D
How long is your cable to the sensors?
If you upgrade to an X2 you could run all the sensors on a daisy chained 3-core instead of seperate runs (or cores).
That should save enough to cover the X2;)
 

westaust55

Moderator
Since you don't mind using an older model of PICAXE chip, if you have one in the parts box, then a 28X1 also has the same 1-wire capabilities BeanieBots has mentioned.
 

SAborn

Senior Member
BB,

Ok in the spirit of Christmas i may well stretch the purse strings and lash out to a X2 chip and do as you suggest, but this comes at a price of beer to added cost for this time of year. (joking)

A 08m2 has enough pins of I/O to do as needed if able to run 3 sensors without conflict of either sensor (remember cheap)
Cable length may well be 3 meters, and im not sure on the operational length of cable for the DS18B20, i do know the I2C sensors i can go to 15+ meters (tested)
 

SAborn

Senior Member
Westy,

The 28x1 dont live in my parts box (almost everything else do) so thats out of the question.
As i stated im "cheap" and like a basic chip solution, with 2-3 sensor inputs and 1 output, that is all i require.
Im not a person that uses a easy way and leave unused pins if i dont need to.
 

BeanieBots

Moderator
3m should be fine, I've run longer with no issues.
If you do have problems, as with I2C lines, dropping the resistor value will help but whatch out for self heating.
 

Captain Haddock

Senior Member
Idealy you will be needing a temp sensor on the panel itself (hot outlet pipe) which at times may exceed the 125degrees C that ds18b20's are up to, you may need to consider thermocouples for the job instead, have a search for Matherp's thread on making thermocouples realy easy, uses an i2c eeprom and i2c adc chip and makes 4 channels (or more)very easy to use, this is what I am planning on using for the same thermal solar project.
 

westaust55

Moderator
For the 1-wire cabling a few metres will be no problem.
I have done tests with five Ds18B20's at the end of a 40 metre length of screened stereo audio type cable which is far from an ideal cable and likewise with 100 metres of CAT5E unscreened twisted pair cable and had success with both.
You will need to reduce the value of the pull-up resistor if the cable length gets very long - I went down to 2.2 kOhms.
 

SAborn

Senior Member
I think if the water gets to 125C i will have bigger problems than the sensor.

Do anyone know what happens to the sensors if they exceed 125C, i would expect they can with stand temps above that but not readable.
 

Paix

Senior Member
PH Anderson from 2004 had this code using readtemp12 from 3 DS18B20 chips, but displayed the data rather than storing it for comparisons.

I'm sure that you are capable of that minor difference though.
http://www.phanderson.com/picaxe/ds18b20_08m.html

I'm surprised that no one has ever mentioned over temping a DS18B20 on the forum to the best of my knowledge. it seems to be a gap in Westaust55's experience, unless he is keeping quiet about such an event? Don't be coy fellas, SAborn would rather drink the price of a DS18B20 than cook a real one into an early grave.
= = =
Our fodder farmer must have had an attack of reality on the weighing side of things :) Shame really as the remainder of the project seemed quite doable.
 
Last edited:

westaust55

Moderator
I think if the water gets to 125C i will have bigger problems than the sensor.

Do anyone know what happens to the sensors if they exceed 125C, i would expect they can with stand temps above that but not readable.
Often storage of ICs has a wider range than for operation, however from the DS18B20 datasheet, The absolute max operating and storage temperature is 125 degC.
This suggests failure of the electronics is possible if 125 degC is exceeded under any circumstances. Thereafter maybe faulty operation or no operation immediately or a later time.
 

SAborn

Senior Member
I did read the data sheet and it also quoted a solder re-flow temp of 220C and some other higher temp values with a warning of not for extended time.

We are working with water here, and if its 125C then it might well be steam not water, although its a closed loop pressure system so this might raise the boiling point.

My intentions are to work between 40C and 70C for circulation, as i dont require water hotter than 70C.

The other option would be a thermistor, just this takes a little more to calibrate in program, i think i will try the DS18B20 and if it cooks then look to plan "B", nothing ventured nothing gained.
 

MPep

Senior Member
We are working with water here, and if its 125C then it might well be steam not water, although its a closed loop pressure system so this might raise the boiling point.
In fact, because it is a closed loop system, and if the temp goes higher than 125C, then you'll also have to worry about over-pressure!!! Burst pipes with superheated water....hhmmmmm, me thinks can't end well. :)
 

Svejk

Senior Member
You might consider MCP9700 as temperature sensors. Those are about ¢50 at RS and a resolution of 0.2 degrees is easily achieved with an 08M2.
 

SAborn

Senior Member
There is a temp/pressure relief valve as standard on ALL mains pressure HW systems here, that has storage pressure tanks.

The worst that can happen is it dribbles a little water from the relief valve on super hot days, no tears and bad language expected.

I can buy a cheap commercial system to run the pump, but it seems a perfect application for a lazy picaxe and DS18B20 sensors sitting around here.
 

SAborn

Senior Member
For those who have followed this thread and may be curious to what im intending to do and why.

My average power bill for hot water only, is $70.00 or greater per 90 days, not a lot but still a added cost i wish to reduce.

Now the solar HW panels were free from a friend, and all i need to do is retrofit them to the present system.

Doing the math................
If i run the circulating pump for 8 hours a day ( a guess) and the pump draws 54 watts (heating element 3600 watts).

8 x 54 = 0.432 Kwh a day ( or less then half a killowatt for 1 hour)

Now if i purchased power from the grid at the present average price of $0.30 per Kwh to run the pump 8 hours a day, it would cost me $11.60 for a 90 day period.

This is a far reduced cost than $70.00 a quarter year, when its free energy from the sky.

To make this even more cost effective i have a solar / battery system that supplies most of my energy needs, so to run the pump is cost free for myself, But the load requirement to supply a 3600 watt HW element and the rest of the house is above my renewable energy supply ability. (hence using mains power from the grid for current hot water)

To put this in prospective a 08M2 and a few DS18B20 sensors, will save me in round figures, allowing for current power price increases here about $400.00 a year

Now that is value for the cost of a Picaxe and some effort i think.

Not to mention the reduced impact one person with a picaxe can make on our energy resources for the future.
 

BeanieBots

Moderator
I've been looking at a similar project myself for some time now.
I worked out that it would take about 12 years to pay back but let's be honest, it's not about the savings or being green. It's about the fun of doing it.
If you already have PV energy available but not enough to run a heating element, have you considered a lower wattage element or running your existing one at a lower power level?
 

SAborn

Senior Member
have you considered a lower wattage element or running your existing one at a lower power level?
Yes i have and was about to go that way due to the fact on a sunny day my solar system backs off by around lunch time, then i was given 4M2 of HW solar collectors, in reality i only need 1 of the 2 solar collectors for my needs (perhaps i can email you a panel BB not sure how Google will handle that.) so it makes more sense to use the solar collectors for heating water than solar electricity, in actual fact its far more energy efficent this way.

One method i considered to reduce the current to the heating element with something like this device.

http://www.ebay.com.au/itm/110723383030?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1438.l2649

Then there is also SSR that will also allow current adjustment.

As my main off grid inverter controls the solar slave inverters by adjusting the frequency from 50Hz to 52Hz to get the solar inverter to back off, i had considered using a picaxe to monitor the frequency and switching the excess power to hot water heating, and perhaps using the device listed above coupled to a stepper motor so it could dial in the wattage to suit the excess power avalible.

Then got given the solar collectors and now given up on the idea of diverting power for HW.
 

BeanieBots

Moderator
Not sure my ISP could cope with a solar collector. They struggle enough with text! but the thought is appreciated.
Besides, all my useful roof space is occupied with PV.

That dimmer was a good find. Stuggled to find anything over 1kW when initially looking.
My plan now (it's more about the technical challenge) is to use a PICAXE and whole bunch of op-amps to measure power generated and power consumed, then divert exess to immersion heater. Power control of the heater is one of the challenges. The issue is how the utility meater will respond. Even using something like a dimmer is not as straightforward as it might appear. Even when using phase fire, there will be short periods of time when supply to heater is greater than excess power although the AVERAGE power may well be less. I've yet to experiment with this problem.
At the moment, I simply switch in 1kW when there is enough to do so.

A simple way to reduce power to the heater is to use a 240v-110v transformer but only if you already have one. They're not cheap.

Stratification is my enemy at the moment. I can only get 3kWhrs into the immersion before it trips at about 65C.
If I had a pump to circulate the tank, I could get about 7kWhrs into it. The expense of pump+pipes would not be worthwhile but if I can get the PICAXE to control power without clocking up counts on the meter then I'll probably do it for the hell of it.

I wish you the best with your project and promise to post details of mine when I get round to it. Maybe mid next year.
 

Captain Haddock

Senior Member
If the collectors are any good 125C is very possible and I seem to recall the bits over 127 and the values given out by the DS18B20 will be minus signs and the like, a good system should have an expansion vessel in it, don't rely on the water cylinders pressure releif valve as the solar will probably be on a different closed circuit.
 

SAborn

Senior Member
don't rely on the water cylinders pressure releif valve as the solar will probably be on a different closed circuit.
No the cylinder is within the solar loop, simply the water is taken from the bottom of the cylinder and pumped through the solar collector and returns back into the top of the cylinder.

The picaxe is needed to control the pump so to maintain a water temp high enough, so not to pump cooler water back into the top of the cylinder.

Now the solar collector might reach 125C but do you think the circulating water will reach 125C, as its the water temp being monitored not the solar collector.
I just had a look at the relief valve and its rated to 1000kpa and 99C before either will trip a relief, and have not seen one relief on a solar system very often, so would expect over 99C is not common.
Besides that is just pure dangerously hot to have water in a tap, to the point i would not want it. (i would paint half the panel if thats the case)

A standard solar HW system here uses thermo syphon, with the cylinder higher than the collector, so no pump required, in my case the cylinder is at ground level and the collector on the roof so a pump is required to circulate the water.
 

inglewoodpete

Senior Member
You don't have to go high tech to reduce the heat collection in summer. A piece of garden shadecloth tied across half the solar collector for 4-6 months of the year will reduce your overheating problems.

Or you could go high tech if you are adventurous. Get an auto sunroof mechanism from the motor wreckers! Just kidding:):)
 

Captain Haddock

Senior Member
Sorry I was assuming you were using a heating coil in the tank rather than direct heating, yes the prv should work just fine in that case which removes the need for expansion vessels and header tanks, in UK most solar themal setups use seperate circuit and a glycol mix through the collector.
In case of overcast weather for prolonged periods is there a way of keeping the likes of legionella (and other nasties) at bay in a lukewarm tank of water? (I know you are more blessed with your weather than us :( )
I guess if the collector is hot and water cylinder is up to temp you could always use a mid port valve and keep pumping the hot water through a radiator outside to dump excess heat, you don't want 95C water through your taps do you.
 

inglewoodpete

Senior Member
Sorry I was assuming you were using a heating coil in the tank rather than direct heating, yes the prv should work just fine in that case which removes the need for expansion vessels and header tanks, in UK most solar themal setups use seperate circuit and a glycol mix through the collector.
In case of overcast weather for prolonged periods is there a way of keeping the likes of legionella (and other nasties) at bay in a lukewarm tank of water? (I know you are more blessed with your weather than us :( )
I guess if the collector is hot and water cylinder is up to temp you could always use a mid port valve and keep pumping the hot water through a radiator outside to dump excess heat, you don't want 95C water through your taps do you.
Glycol? Is that antifreeze? Freezing water in Australia is not really a problem!! I have heard of using a separate circuit of solar heated (liquid) to heat the hot water tank but its rare in Oz.

Lukewarm water is a pretty rare thing. Using a gas or electric booster on a solar HWS is usually limited to a few days of the year. I've not heard a bacteria buildup in HWSs but I guess it's possible.

For several years, by law all new installations to bathrooms in Australia require an temperature control valve fitted to the hot water line. These valves have hot and cold inlets and a temparature-controlled outlet of (typically) 40-48C (105-115F).
 

Captain Haddock

Senior Member
I'm in UK with crap weather and an old installation, if my cylinder overheats it will come out the tap at that temp, when you don't know the setup it never hurts to point out possibilities, it is recommended to run a hot water cylinder at over 60C which as you say is rarely a problem there, I have an immersion heater controller run from solar PV and I have put an extra routine in to heat it fully once a week if it hasn't hit full temp for a week( I have a strange setup that goes from cylinder to combi boiler if not up to temp and straight to tap if up to temp)
I think part of the job of glycol is also to inhibit corrosion, as you say freezing isn't goin to happen in Oz, and yes I am incredibly jealous of your climate.:) (my boat currently has anti-freeze in the toilet as well as the engines :( )
 

inglewoodpete

Senior Member
No need to be jealous of our climate. We're expecting a shade temperature of 40C for Christmas day in Perth. That's too hot! We yearn for a cooler day so that we can have a more traditional (northern) Christmas dinner.

I hope that antifreeze is fairly inert. Splashback on the toilet might bring tears to the eyes.:eek:
 

SAborn

Senior Member
Iwp,

There is systems here that use glycol, a good example is in your car coolant system (that green stuff, glycol works both ways, below and above zero, it also has a higher thermal carrying capacity, with a higher boiling point than water.

A wood oven with water heating ability, is known as a "wet back" this uses the fire to heat the glycol which runs through a closed loop to the HW system which has a coil of pipe inside to transfer the glycol heat to the water, the glycol just thermo syphon aroubd the closed loop.

Bacteria can be an issue here to if the storage vessel (HW system) dont reach above 65C, which is said to kill off the nasties, go below that for a period and you can bred the nasties.
 
Top