navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 25, 2012, 03:09:54 PM *
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: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: 1-wire Log temp - loosing reading and how to graph  (Read 2840 times)
martin W
Hero Member
*****
Offline Offline

Posts: 548


what do you mean my snoring is too loud!


WWW
« on: January 06, 2010, 02:17:00 PM »

Hi all, I've had a little search and can't quite find the info I need.


Just got 12 1-wire sensors placed all over my thermal store in the attic. And I have noticed that 2 or 3 of them are often not reading... well say I've lost between 3 and 20 readings over 557 reading s from each sensor (that have lost readings)  in around 18 hours. It was odd that 2 sensors lost around 10 readings in the same time period.

Currently using Log temp and USB blue connector RJ11 thingy, running on a laptop running windows vista. All my sensors are each hard wired into RJ45 couplers, with Cat5e cables connecting each coupler in turn. So I suppose each sensor is branching off a continuous cable by around 2 inches. It is one long line (no return back to usb port)

I have a powered 1-wire network using 5v from the blue RJ11 thingy (on pin 1 from the RJ11 if I remember). The sensors that lost the most readings happen to be the first and fourth from the USB port. About 8 sensors kept all their readings.

So the questions are..

1. is it normal to lose some readings?

2. How do you get around the missing readings when graphing the information, etc.

I am currently using the log temp created .txt files to import data from each sensor into a MS excel file. These readings I can then manipulate to create some simple graphs for now.

The big problem is obviously the missing data will put stuff out of sync. I have ready that some of you are using MySQL or xml. At this point I can do what I want with excel.. if the data was not missing.


Logged

Woodstove Newbie since Feb 2011 Tongue (yes it's finally off the pallet)
Solar Water Heating since 17th March 2009
Chicken Owner - Self sufficient in chicken c*@p, boy watch those tomatoes grow. 
Now an allotment wannabie Tongue
wyleu
Guest
« Reply #1 on: January 06, 2010, 04:06:14 PM »

If you store a datetime value with a sensor address and a value for each reading then your graph will use time as it's y axis and measurement as your x axis and then colour code our sensors with a line graph.

Logtemp will spit this out into a mysql database in the default mode which you would then use excel to look at using some form of excel SQL client.

If this sounds like martian, then start by getting the mysql bit going., and we'll work it throu' from there.

You should expect some missing data. If you rely on values all coinciding you will make for a very fragile dataset, It can be interference or dodgy connections or any one of another reasons, If sensors beyond the faulty sensor works then things are probably alright. You can try swapping them around and see if the fault follows the sensor. There is a know issue  with temperature sensors that can for no reason I know of ( others might know differently ) read 85 degrees C.
I tend to prepare more sensors than I need and revisit.

You can guarantee it will be the ones in the most inaccessible spot or the most interesting temperature.
« Last Edit: January 06, 2010, 08:12:27 PM by wyleu » Logged
martin W
Hero Member
*****
Offline Offline

Posts: 548


what do you mean my snoring is too loud!


WWW
« Reply #2 on: January 06, 2010, 05:36:09 PM »

wyleu, thanks for the reality check....

I was starting to wonder if it was something I had done wrong in the sensor department why they were missing results...

OK first daft question/querie before I go down the mysql route - well maybe, or perhaps I've got my numpty hat on...
I currently have in excel all my sensors. Each sensor in a different spreedsheet, import from logtemp for each sensor results in 3 columns. Date, Time, Temperture Value.

Now what I want to see is say several sensors on one graph (such as solar flow and return and top of store temp). Say I have 100 readings from 2 sensors and only 60 from the 3rd (its missed out 2 hours data in the middle of the data set). I have just done a trial and basically the graph is drawn with data on the one series missing at the end of the line  - not in the middle.

I have tried using the date and time as y axis, date only and time only, all with same effect. It is like excel is ignoring the y axis criteria on the other 2 series and only using the first series. I can not see a way to transpose the data so all the date/time entries line up---- does that make sense?

its excell 2007.

I just feel that it should be simple and be do-able in excell before I much about with mysql or other pixie dust Huh. I have 3 sets of data, all in data is in date, time, temperture columns for each data set seperately. Graph should see all y axis data for each data set seperatly ... I think?


eventually I probably go over to linux on my d-link serve.. but lets get the princepals sort on stuff I can currently use...
Logged

Woodstove Newbie since Feb 2011 Tongue (yes it's finally off the pallet)
Solar Water Heating since 17th March 2009
Chicken Owner - Self sufficient in chicken c*@p, boy watch those tomatoes grow. 
Now an allotment wannabie Tongue
wyleu
Guest
« Reply #3 on: January 06, 2010, 06:18:39 PM »

I'm probably the last person on earth to ask about excel. I know it does graphs and I've done a couple of simple ones but very little beyond that. I tend to draw my own in images with Python Image Library.
« Last Edit: January 06, 2010, 08:11:39 PM by wyleu » Logged
StBarnabas
Hero Member
*****
Offline Offline

Posts: 2111


St Barnabas Chapel (2009)


« Reply #4 on: January 06, 2010, 07:54:59 PM »

Hi MartinW

I have put graphing etc slightly on the back-burner as I came to the conclusion that without power consumption, flow rate and irradiance  my own data (12 temp sensors on my tank) was not of great value so am concentrating on cheap one wire sensors for other parameters at present.

Data interpolation is fairly straightforward - I tend to use piecewise cubic interpolation for the general case but given time constants etc. of the system I could do a lot better. I tend to use more professional graphing packages such as MATLAB to do graphs, I need to choose words diplomatically here but Excel graphs are amateurish to say the least. 

Would be happy to run your data through a standard interpolation mechanism if interested. Within the next six months or so I would hope for a standard forum graphing mechanism. Essentially if you can imagine what you want I can plot it!

StB 
Logged


Gestis Censere. 40x47mm DHW with TDC3. 3kW ASHP, 9kW GSHP, 3kW Navitron PV with Platinum 3100S GTI, 6.5kW WBS, 5 chickens. FMY 2009.
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« Reply #5 on: January 06, 2010, 08:20:50 PM »

Martin,

IIRC Excel expects exactly two columns of data, one for x and the other for y. If you have three colums, and the x-axis really is a "sum" of date and time, then first you'd need to re-combine these two. I can only guess, but logtemp probably produces a time format in the txt file where date and time are separeted by a tab. When you import that into excel (text-to-columns?) then date and time fall apart. Can you adjust the logtemp output format? Instead of "2010-01-06<tab>18:55:10<tab>20.16" you'd want  "2010-01-06T18:55:10<tab>20.16" or an underscore instead of T.

Your graphs now probably are not xy-scatter plots, but line plots that use the row number as their x-axis values.

----

I've been at just that same point only a few weeks ago. And I'm still not there yet. But, thanks to Wyleu et al. my data now get written into an SQL database. Since the whole setup runs on a resources-poor NAS box (NSLU2 by Linksys, aka slug, running under Debian Linux) I selected SQLite. Works just fine.
There is a script (would that be a batch file under Windows?) that calls Digitemp (in your case Logtemp), this in turn reads all the sensors, and the output is send to the database. The script is called every few minutes (5min in my case).

For the time being I then extract the data manually and copy them into OpenOffice Calc (an Excel equivalent). This is simply an intermediate step while I learn how to work with SQLite.

It turns out that for some sensor groups graphs displaying a rolling data window would be handy. So your graph always shows say one week's worth of data, and while the new data are added into one end, the older data fall out the other. Wookey or SleepyB suggested using a RoundRobin database and graphing tools, which would do just that. Sadly, the RRDtool related Munin didn't work reliably on the slug. So I'm back to manual copy and paste.
 
Whatever happened to your router, or was it an NAS box as well?

Klaus
Logged
martin W
Hero Member
*****
Offline Offline

Posts: 548


what do you mean my snoring is too loud!


WWW
« Reply #6 on: January 07, 2010, 07:16:52 AM »

KLD, my NAS (D-link DNS323) is still here. I have been so flat out with work (lucky me) since mid oct I haven't really had tiome to get my head around the Linux on it. I still need to learn how to MAKe, etc so I can get USB ports working. Been working on a factory expansion installing everything from new hot water supplies, moving machines, to installing the ktichen sink. Eventually this will dry up and I will have some time to get to gripps with things.

The reason I have a few minutes to try out the extra sensor is basically the snow. I can't get to the factory where I have been working since last 2 days it's on top of a good hill, plus I'm about a mile from a gritted road.

I've had the 20 temperture sensors for about 2 months and only had time (inclenation) to solder 10 or so of them together on new years day. Tuesday's snow called an early end to work so I took the opportunity to pull the thermal store apart and fit then sensors. I am going to make up the other 8 or so and put on gas boiler DHW in (from store) DHW out, and CHW flow and return at some point.

Due to time constraints (damn woodburner is still not in, I spent chrismas time that I managed to get off off - snow again - replacing radiators in the house which I have had for 2 0r 3 months) spending hours on PC is not going to go down well with other half  Roll Eyes. Hence I was really pleased with getting info out of logtemp and into excel (something I can use a bit). I will eventually get the NAS sorted out on linux as my laptop used about 30watts.

So until I have some time I was looking for something down and dirty to quick fix my stuff. It might just mean that I manually adjust the sensors data in the logtemp txt files. The next quiet period I will try out the mysql lite packagin. I say a good guide on here on how to install on windoze...
Logged

Woodstove Newbie since Feb 2011 Tongue (yes it's finally off the pallet)
Solar Water Heating since 17th March 2009
Chicken Owner - Self sufficient in chicken c*@p, boy watch those tomatoes grow. 
Now an allotment wannabie Tongue
paul-n
Newbie
*
Offline Offline

Posts: 16


« Reply #7 on: January 07, 2010, 08:04:16 AM »

Hi MartinW

Sorry not of much help , but can you tell me where you bought your USB adapter from ?

I am current using 6 sensors on very short wires [ maybe 8 ft at most ] using speaker cable a home made serial port/ 1 wire adapter and Digitemp software.[ mine are not powered ]

Sadly Digitemp is now only being developed for Linux and I would like to stay with Windoze [ the devil I know ] so I need to move SW and Logtemp looks good but I need a USB adapter for that ?

Could your problem be a lack of power from the USB port/adapter ? I think most user have a external power supply for the 5v ?



regards Paul
Logged
martin W
Hero Member
*****
Offline Offline

Posts: 548


what do you mean my snoring is too loud!


WWW
« Reply #8 on: January 07, 2010, 08:19:08 AM »

Hi Paul,

Link below is where I got my first temp sensor and 1-wire USB adaptor. I bought the other sensors (pack of 20) from ebay as they worked out cheaper.

http://www.homechip.com/catalog/product_info.php?cPath=22&products_id=30&osCsid=d963c82aa2e8b715807ea91c29dab5e9

I used a RJ11 connector off a phone / modem to get me going initially, but these only have 4 wires connected in the RJ11 plug and hence no 5volts supply. I got hold of a RJ11 connector and used a network crimp tool to connect al 6 wires. Pin 1 on the RJ11 plug from the DS9490R USB adaptor 'should' have 5volts on it. Well thats how I wired mine.
Logged

Woodstove Newbie since Feb 2011 Tongue (yes it's finally off the pallet)
Solar Water Heating since 17th March 2009
Chicken Owner - Self sufficient in chicken c*@p, boy watch those tomatoes grow. 
Now an allotment wannabie Tongue
KLD
Hero Member
*****
Offline Offline

Posts: 1340


« Reply #9 on: January 07, 2010, 09:48:26 AM »

Paul, Martin,

I'm also using the DS9490R USB-to-1-wire bridge. And my 20 sensors are powered from "pin1" of the 6P6C connector on the bridge. Initially I tried parasitic mode (had only a 6P2C cable, i.e. old telephone connector available.) that didn't really work.
My DS9490R came from ebay for a fiver, at the time Homechip were sold out of these. Apparently the USB bridges aren't recommended for new development anymore (by Maxim)? There are Serial-to-1-wire brigdes available, though.
Anyway, power supply to the 1-wire network through the bridge seems to work fine.

Klaus
Logged
ericw
Hero Member
*****
Offline Offline

Posts: 735


« Reply #10 on: January 07, 2010, 12:31:54 PM »

Martin,
It might be worth running the Maxim One Wire Viewer (http://www.maxim-ic.com/products/ibutton/software/1wire/OneWireViewer.cfm)  with which you can select the offending devices individually to see if they are indeed OK.
You can also change the resolution (and therefor the convert time) with it, which might indicate a timing issue.
There is an error log but it isn't very informative.

You might also like to keep an eye on this thread http://www.navitron.org.uk/forum/index.php/topic,8978.0.html The chips are designed to mimic the output of a DS18B20 so can be hung onto a 1 Wire bus enabling other variables be added to plots/datalogs with no software effort.
Logged
Pages: [1]   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!