navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum February 09, 2012, 06:11:47 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5! | Lights go on in Sierra Leone
   Home   Help Search Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: 1wire ADC for monitoring thermal store temps  (Read 3937 times)
roderickw
Newbie
*
Offline Offline

Posts: 25


« on: March 17, 2008, 11:31:15 PM »

I want to automatically record tank temps, and the tank in question already has 3 sensors connected to a Resol controller.  I'm already using a 1Wire monitoring system so I'd like to collect this data using the same method.  Is it possible to use the same thermometer sensors to feed both the Resol controller and the 1Wire system via a 4 channel ADC?   If this is possible has anyone done it via OWW?

 


Logged
wyleu
Guest
« Reply #1 on: March 18, 2008, 09:37:37 PM »

There are  one wire application sheets on the maxim site on how to do this reliably.http://www.maxim-ic.com/products/1-wire/ I couldn't find it in a quick search but I'm sure it's there somewhere. It should be possible to use the same sensor but it's probably easier to just encapsulate a 1820 in epoxy and stick it adjacent to the analogue sensors. This will seperate your systems and so probablt reduce the risks of nasty digital stuff confusing the resol and also from an electrical safety point of view prevent the one-wire system becoming a possible component of your houses 240 Volt system if there's a flood near you solar controller. ( I wonder how many of these live just a little too close to a good spray from the over pressure vent or filling loop?
« Last Edit: March 18, 2008, 09:42:36 PM by wyleu » Logged
marke
Newbie
*
Offline Offline

Posts: 4


« Reply #2 on: March 26, 2008, 04:05:21 PM »

Hi, This is my first post to this really useful forum.  I just noticed this thread and thought you'd like to know what I've been doing with 1-wire temperature sensors and my archaic central heating system.  I'm in the process of moving house so all this gained knowledge will be useful for monitoring solar heating in the new place - when spec and install it.

I stumbled across an inexpensive 1-wire controller http://www.dlpdesign.com/usb/io8.shtml which cost me about £16+VAT+P&P and connects to a USB port.  I connected it to my laptop, added 4 1-wire sensors (costing about £2.50 each) to it, wrote a small perl script to control it, and pointed my web site to the results http://data.homeinbath.co.uk/old_tank.html.

It's all a bit experimental at the moment so apologies for the rough nature of the site.  If anyone wants more details on its construction then let me know.  I'll be doing a more detailed writeup when I get some time.
« Last Edit: May 22, 2008, 09:40:46 AM by marke » Logged
wyleu
Guest
« Reply #3 on: March 26, 2008, 04:57:45 PM »

Homebrewing one-wire stuff is remarkably easy, and since I haven't had a good one-wire rant in a while I thought that the world might benefit from another one. It's that or another Lord Wyleu yarn so take your pick.

Thwe ability to accurately measure parameters like temperature is a real miracle. For anyone who has spent time building analogue measuring kit and the difficulties of getting a simple op-amp to actually hold a consistent gain over 25 degrees or so, probably understands this but for the rest of us it's a problem we don't even have to deal with.

One wire is a product of Dallas/Maxim where a range of devices connect to a common couple of wires ( at least two, the one-wire stuff is marketing hype) and by joining this to a simple USB device you can read the values of temperature to half a degree or so over thirty or more metres with thirty or so devices. I've buried 28 of the chips into our underfloor heating system and I have twenty or more scattered around the solar system and the domestic heating. With these I can view temperatures at any time with just a few lines of code. Python in my case, but as marke says Perl works just as well, and there are lumps of code for Visual Basic, Java and C. in fact in this open age there probably isn't a programming language you could cludge this all onto.

All very useful, but so what?

Well there are several approaches to design, and whilst if I were designing a space probe I would be reasonably sure that thing work pretty well before the launch because the maintenance call is a beans, in the domestic environment a certain amount of redesign is normally required. With the one wire sensors connected to my solar system it was pretty obvious that the one way valve was leaky because the panel temperature tended to track the temperature at the bottom of the tank at night rather than remaining independent. A quick bit of pipe re-routing will solve that particular little issue, Wonderful initself but will the change lead to lower temperatures in the array? I'll know and can react accordingly. Quite fantastic and all without any scrabbeling round in the loft or on the roof at 2.00 in the morning to find out.

Combined with a bit of database knowledge ( Postgres via Django in my particular case)  the possibilities of comparative analysis can make a most suitable replacement for a social life, and for most it probably ends about there. But there is a bit more that can be done if several people think along the same sort of lines.
One of the most difficult aspects of resource management is predicting what will happen, so knowing that it's a cold night is of great value, because you can provide that most useful energy saving mechanism control. Here in Cheshire knowing which way the wind blows tells you a fair bit about what weather to expect so if a one-wire rig in Liverpool could tell me what the temperature and solar performance is ther then with a westerly wind I'm going to get the same thing pretty soon. Very handy if you have undrfloor because it allows you to tailor the response to be ready. If Ian in Macclesfield publishes the same sort of data then Easterly winds give me an hour or so of pre warning. Just right for shifting the emphasis from water heating to underfloor and a couple more lumps of gas saved.

A similar system used by the turbine folks would probably lead to a few less photos of bent shafts and such like which begins to become an incalculable saving. Ask the people in Gloucestershire if monitoring water level in such a fashion would be appreciated and you probably would get a pretty definite yes. Ask the likes of Windsave if they would be willing to put these devices on their teapots and publish the results would probably produce a response that would tell you far more about the devices than any number of eco jumping politicians could.

So how would this all be possible? Well technically it just means an agreed method of publishing the results that people agree on and a decent security mechanism to prevent evil individuals like myself deciding to turn your hot water pump on just for the hell of it. The way to do this is actually incredibly simple, you don't let it happen. You measure temperatures, voltage, wind speed, depth of water, volume of kids, litres of weasel liquid effluent, or whatever but you provide no mechanism to control devices. Your hot water pump is controlled by separate software ( separate in a operating system safe fashion rather than mechanical seperation, althou' that is probably preferable) which reads the published data of your measurements in exactly the same way as anyone else on the system would view it.
No hideous security model to protect equipment required because there is no actual way of controlling devices. Slightly more expensive to implement, but as with most community special interest networks, the more join the more powerful it becomes. Monitor internet bandwidth across the Navitorn community? just a couple of software modules away, Gas usage of the community? not difficult even if it involves pointing a camera at the gas meter and using character recognition. Resolving the great plate versus tube debate, well actually lot's more info but probably no definite answer Cheesy.
Such a system in flood and storm situations would be of great value just to see who was still on-line, and for a installer putting just a few one-wire sensors into a system allows remote monitoring of customers site. Excuse me sir but I think your solar system has boiled dry< would you like me to come round and fix it for you?.

There is one other aspect of community that is required and that is the social aspect. Would you really be willing to reveal to the world that your solar installation might not be optimal? Would you like everyone to know your electricity usage? ( and hence whether or not you are at home). The rogues wouldn't but we are really talking about trust here and comparative methods would quickly expose the devious types who were adding values to fake results and would suffer the loss of trust that would defeat any benefit of their devious ways? Ideal pie in the sky dreaming? Not really. I've done this sort of thing before in the film and video industry, building a collaborative network between competing video companies and the result was incredible in that we discovered how much we had in common on a technical standpoint. BT hated it and spent some considerable time trying to destroy it and control it, but the model was so simple and so beneficial that they gave up. It's still  transfered a massive amount of data around and it's still based around the same collaborative approach. It started with seven companies sticking about 10 grand in the pot it's now quite big www.sohonet.co.uk. Strangely the bandwidth we used then is now available for next to nothing as most of us have it already.

Care to give it a try?
« Last Edit: March 26, 2008, 05:10:33 PM by wyleu » Logged
djh
Hero Member
*****
Offline Offline

Posts: 1167


« Reply #4 on: March 27, 2008, 10:39:14 PM »

OK, yesterday I ordered a weather station with PC interface and today I read this thread  Grin

Marke, those are very interesting links. I'm not clear about one aspect, though. Am I right in thinking that 1-wire is a bus system, where you can connect many sensors on one 'wire'? Does the DLP Design board let me do that or do I need to connect each sensor to a separate port? If each sensor needs a separate channel, does anybody know of some similar board that allows connection of strings of sensors? Or have I misunderstood.

Wyleu, I'm with you! I saw a story today about accelerometers in laptops; apparently they're now fitted routinely to prevent damage to disks in falls. A professor wants to network them all together into the world's biggest earthquake prediction system. This http://qcn.ucr.edu/ may be it - I've lost the original story  Sad

Cheers, Dave
Logged

Cheers, Dave
wyleu
Guest
« Reply #5 on: March 28, 2008, 06:26:59 AM »

The one-wire concept is exactly as you describe. The devices have three wires. one which is Ground (Ov) this is connected together on all devices. There is also a data pin which is also connected together, and similarly a power pin.
So to build a network you connect three wires to each device in the chain and the end ( not a good idea to join in the middle cos of reflections) is connected into a one wire USB hub or a device like Mark describes. There is also a mechanism to power it from what' called parasitic power; where the device gets it's power from the data port and does'nt need the power wire which you would connect to ground at the device in this powering mode. This is ok for a couple of devices but if you want to drive more than four devices I've found it becomes unreliable.

The connector technology is a bit pants, devices are either three pin transitor like beasts, which require soldering, whilst the USB devices have an RJ12 telephone connector on the end. Most people use RJ-45 computer network connectors ( using the blue/white pair for data and ov and one other for power, there is a standard out there somewhere) These are porbably the worst connectors they could have chosen but American homes have a lot of that sort of stuff and that's probably why.

Each device , because it's on a daisy chain actually has 6 wires connected to it   Data in and out, Ov in and out and power in and out so if you are using RJ45, because you want flexibility you'd do this with two sockets, you end up using something the size of a single gang mains plug to contain a transistor. Not entirely sensible.

Heat shrink and silicone are probably a more viable alternative and I use spring clips from farnell to make up pipe clips which I then pot with high heat conductive silicone) I also use flat ribbon cable and solder the chips to four pin connectors for the same. It's not particularly but it works.
Logged
marke
Newbie
*
Offline Offline

Posts: 4


« Reply #6 on: March 28, 2008, 10:02:05 PM »

Hi djh,

I think wyleu said it all really.  The sensors are designed to work as a bus but work equally well on their own.  The board I mentioned only works with one sensor per channel which is a shame, but it is really easy to use, cheap and you get 8 channels on it.  There must be boards out there that let you string sensors but this increases complexity and therefore cost (probably).

The main reason for mentioning the DLP board is that I've not seen anything so cheap and requiring next to no electronic or programming experience.  If you want more sensors, just add more USB devices.

Hope you feel you've not wasted your money on the weather station.

wyley, You mentioned high heat conductive silicone - where do you get this stuff from?
« Last Edit: March 28, 2008, 10:05:56 PM by marke » Logged
wyleu
Guest
« Reply #7 on: March 29, 2008, 11:14:35 AM »

Farnell www.farnell.co.uk is a good source of the sometimes, weird and wacky.
Logged
betwixt
Newbie
*
Offline Offline

Posts: 17


« Reply #8 on: March 29, 2008, 11:27:26 PM »

If anyone's interested, I'm building a one-wire temperature monitoring system right now and I'm more than happy to share the design/programming code with anyone that can make use of it. It doesn't use a one-wire bus as the distribution of my DS18B20 sensors is too distant to allow reliable communication so what I've done is this:

Each DS18B20 is connected to a PIC10F202 microcontroller which reads the temperature, converts it to text hexadecimal characters, adds a status character for diagnostic purposes then sends it on a bi-phase 1200 baud serial link. I use bi-phase because it allows cheap unscreened cable to be used without risk of radio interference, in or out of the system. This is particularly important here, especially as some of the cable runs are longer than 30 metres and I have some very sensitive radio equipment here.

At the 'host' end of the cable, I use a PIC16F628A micro to gather the signals from eight sensors, convert from the original hex to degrees Celsius and store the readings in memory. It sequentially scans all the sensors to keep it's list of last readings as up to date as possible. When requested, it returns a list of the eight temperatures and a note of any sensors that didn't respond properly over another serial link (currently to a PC).

It's still a work in progress, an only a small part of a much bigger system but it 99% works. The last 1% is a bug in reporting any sensors that failed to send data in their allotted time window but I should be able to fix that without too much trouble.

Brian.
Logged
marke
Newbie
*
Offline Offline

Posts: 4


« Reply #9 on: March 30, 2008, 09:07:07 PM »

As I mentioned earlier, the system I'm monitoring at http://data.homeinbath.co.uk is an originally installed 120l copper tank now with three jackets and powered by central heating  Cry.  If you look at the graphs overnight you'll see that the top temperature is dropping by 0.5C per hour.  What overnight temperature drops do you guys get on properly lagged tanks and are my losses to be expected on this type of installation?  All this info will be really useful on the new solar install in the new house.

With 8 sensors on the DLP-IO8, how many should I have on the tank?  I currently have 2 (top and middle).  Is 3 the realistic minimum?.  Where else should I put sensors?
Logged
djh
Hero Member
*****
Offline Offline

Posts: 1167


« Reply #10 on: March 31, 2008, 12:37:03 PM »

... an originally installed 120l copper tank now with three jackets and powered by central heating  Cry.  If you look at the graphs overnight you'll see that the top temperature is dropping by 0.5C per hour.  What overnight temperature drops do you guys get on properly lagged tanks and are my losses to be expected on this type of installation?

I can't be accurate about temperature drops because I haven't built a monitoring system yet Smiley

But I did discover one thing. My water heating comes on once for an hour in the early evening. That's normally enough unless I have a bath, in which case I switch the water heating on again. I had set the timer so that the water came on for one minute late at night, in case I forget to switch it off. I found I was losing a lot of heat overnight, so I moved the one minute period a bit earlier to a time when the central heating is still on. Now the water is much hotter in the morning.

I guess it all depends what position the Y-valve (is that the right name?) is left in overnight. It'd be nice to have a system where I could guarantee that, even when the central heating is switched off.

YMMV, Dave
Logged

Cheers, Dave
djh
Hero Member
*****
Offline Offline

Posts: 1167


« Reply #11 on: March 31, 2008, 12:45:34 PM »

I think wyleu said it all really.  The sensors are designed to work as a bus but work equally well on their own.  The board I mentioned only works with one sensor per channel which is a shame, but it is really easy to use, cheap and you get 8 channels on it.

That's a shame. Can anybody (wyleu?) recommend an interface that works with strings? I think one sensor per string will rapidly get old, with having to run separate cables to every sensor. One cable to each location and then string all the sensors together sounds better.

Quote
Hope you feel you've not wasted your money on the weather station.

No, I think it will do that part of the project very well. I've seen some individual sensors - some even with 1-wire - but they're just as expensive as the integrated unit, which is a lot easier and prettier.

Cheers, Dave
Logged

Cheers, Dave
wyleu
Guest
« Reply #12 on: March 31, 2008, 02:53:51 PM »

The DS9490R-A from http://www.hobby-boards.com/catalog/index.php?cPath=23 seems to work for me. I also use the http://www.hobby-boards.com/catalog/product_info.php?products_id=57 Humidity temperature solar to drive more than three sensors. It has the shottky ( unpleasant man by most accounts, could someone tell me why that particular type of device is particularly applicable) diodes that drive the line nicely and I've had over 35 sensors on it without problems and that over 50 or so metres of 4 core ribbon cable.

You can buy the board as a kit if your that way inclined.


I use owfs to link it all together. It's linux based and does wonderful things ( except respond to select calls Sad ) , they have a windows version that I can't get to recognize the one-wire USB dongle (windows XP SP2) , but you may fair better, indeed please give it a try because I'm sure it's doable, just not by me at the moment.
 The big advantage of owfs is it allows you to run a string on one machine and then inquire over TC/PIP for devices in a common way. There is also a HTTPD server owhttpd which publishes a webpage of your one_wire sensors connected to that machine.  www.owfs.org

There are Java based solutions which seems to be the preferred way of going if memory handling floats your boat and indeed that's the way Dallas/Maxim would steer you. http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm, but the networked solution will allow a much more sophisticated application. the java one-wire viewer will get you going and is a good check to see functionality ( I can get it to work on windows for instance Sad ), but owfs is really the way to go IMHO. If you want to try it there is a copy of DSL ( damn small linux) http://owfs.sourceforge.net/index_old.html... About half way down the page,that you can download to a CD and run from there, thus not affecting your window machine.
It's always just run like that for me, and it makes a good CD to carry around with you.

From the data I've collected I'd say tank temperature fall off is observable by the kinks in the graph. As the temperature in the primary drops the monitored temperature at the top of the coil fall quickly until it reaches the tank temperature at that particular level when it then falls gradually. The slope of the graph from there on will give you your rate of heat loss. It is however a logarithmic fall off as the losses are appreciably bigger at higher temperatures. I've got figure for a Navitron 259 litre triple insulated and a bog standard 80 litre single insulated ex-hot water tank somewhere so when I've got that server fired up I'll see if I can ferret something out in terms of a graph.
« Last Edit: March 31, 2008, 03:22:16 PM by wyleu » Logged
dhaslam
Hero Member
*****
Offline Offline

Posts: 4379



« Reply #13 on: March 31, 2008, 03:14:54 PM »

The electronics side of  these  sensors and AD converters  is a bit tricky.   I have bought an IO unit form Pandavilla and it isn't helped by having no instructions.  It has a lot of configurable inputs and outputs.   I don't think the cable problem is too serious.  I have a lot of old RS232 cable with up to eight cores plus ground One thing I should be able to do is write the software.   The job I have in mind is to monitor two tanks and  to switch an immersion using a relay.   
Logged
wyleu
Guest
« Reply #14 on: March 31, 2008, 03:20:54 PM »

One wire will drive a relay board but I wouldn't trust it without some form  of confirmation of functionality. You can be sure that just as you send out the command some bloody great zap will crush the critical package, thereby leaving you totally unsure as to weather or not it actually did the actual job.
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!