Sandaysoft

Support forum for Cumulus weather station software
It is currently Tue May 21, 2013 5:16 pm
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 74 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: 1-wire info and recommendations
PostPosted: Fri Nov 26, 2010 10:41 pm 
Offline

Joined: Mon Jan 04, 2010 10:01 pm
Posts: 179
Location: Stevenage, UK
Weather Station: WH1081
Operating System: Vista 32bit bus edit
I've just completed a project to maintain the temperatures in my reptile enclosures, this uses the DS18B20 one wire temperature sensor (well 4 actually as it's a multi channel device) which communicates to the PIC micro.

Image

I used PicBASIC PRO to write the code for the PIC, but there are loads of other language examples on the net. I have been looking at the more expensive temperature / humidity sensors, but they use a different protocol and have two data lines (SLC and SDA). I did however come across one page I bookmarked which uses a cheap one wire sensor and PIC micro as a data logger to record temperatures and then upload them to a PC all in a neat package

Image

Full details can be found http://www.compendiumarcana.com/datalog/

_________________
Regards

Malcolm
http://www.micro-heli.co.uk/

Image


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Fri Nov 26, 2010 10:43 pm 
Offline

Joined: Mon Jan 04, 2010 10:01 pm
Posts: 179
Location: Stevenage, UK
Weather Station: WH1081
Operating System: Vista 32bit bus edit
Synewave wrote:
Gina,

Remember your forum chums when you go to market and make £millions, won't you? ;)


Is that after it's cost nearly as much to get the thing fully tested to be able to sign off the CE declaration :(

_________________
Regards

Malcolm
http://www.micro-heli.co.uk/

Image


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Fri Nov 26, 2010 11:13 pm 
Offline

Joined: Sat Feb 21, 2009 12:41 pm
Posts: 1859
Location: Devon UK
Weather Station: FO WH1081PC (Maplin)
Operating System: OS X, Linux Mint, Win7 & XP
malc-c wrote:
I've just completed a project to maintain the temperatures in my reptile enclosures, this uses the DS18B20 one wire temperature sensor (well 4 actually as it's a multi channel device) which communicates to the PIC micro.
---
Full details can be found http://www.compendiumarcana.com/datalog/
Thanks Malcolm, that's very interesting :) I've bookmarked your link to study later.

I hope to be experimenting soon - my 1-wire stuff came today :)

_________________
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Fri Nov 26, 2010 11:37 pm 
Offline

Joined: Mon Jan 04, 2010 10:01 pm
Posts: 179
Location: Stevenage, UK
Weather Station: WH1081
Operating System: Vista 32bit bus edit
Gina,

Sounds like you're gonna have some fun... Those modules seem a good starting point... Whilst it's taken me around 9 months on and off to get my thermostat project to the stage it's at now, it's been fun taking the thing from the development board, through breadboarding, on to the stripboard prototype and finally to the stage where I designed the PCB and had half a dozen made in Hong Kong. I don't intend to retail them due to the costs and legalities of selling no CE marked items in the EU, but at least making up the remaining 5 units gives me the opportunity of recovering my costs by selling them to close friends, which according to trading standards is acceptable as it couldn't be classed as a business venture and thus doesn't need CE marking. However like all law it's open to interpretation, so if something did happen and it was one of my units at fault and I found myself before a judge, it would be dependent on what side of bed he /she got out of bed on the day :)

At the end of the day I set out to build myself a 4 channel pulse proportional thermostat with lighting controllers built into one unit -I've achieved that so I'm happy and anything more has been a bonus. I hope you get the same thrill and result with your project as I am with mine.

_________________
Regards

Malcolm
http://www.micro-heli.co.uk/

Image


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Fri Dec 17, 2010 10:59 am 
Offline

Joined: Sat Feb 21, 2009 12:41 pm
Posts: 1859
Location: Devon UK
Weather Station: FO WH1081PC (Maplin)
Operating System: OS X, Linux Mint, Win7 & XP
Another useful link for 1-wire weather station sensors :- http://www.sensorsmag.com/sensors-mag/1-wire-addressable-digital-instruments-environmental-monitor-1065

1-wire is still a secondary project after getting my current system reliable - I think my anemometer froze up in the night, it's very rare to get so little breeze that it doesn't move at all in several hours (and the vane did). I'm building a thermostatic heater circuit for the rain gauge and looking into same for the wind sensors (as mentioned elsewhere).

I'm doing odd little bits towards 1-wire and following various links on-line to get myself into it. I have OWFS (One Wire File System) installed in Linux and it recognises both the ID in the serial to 1-wire adaptor and the ID in the temperature sensor chip so the hardware is working (as far as it goes). Next step is to sort out the software so that I can read the temperature. Once I get sorted out for temperature I can start adding other sensors. The latter seems quite straight forward. OWFS is also available for Windows so I expect my software solution to be multi-platform. It might also provide an interface that Steve could use to extend Cumulus to 1-wire. I would like to contribute to Cumulus if I can as thanks to Steve for the use of these forums.

_________________
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Wed Dec 22, 2010 11:42 am 
Offline

Joined: Sat Feb 21, 2009 12:41 pm
Posts: 1859
Location: Devon UK
Weather Station: FO WH1081PC (Maplin)
Operating System: OS X, Linux Mint, Win7 & XP
I now have a very simple 1-wire setup - serial adapter(DS9097U) and temperature chip(DS18B20) connected. Running on AMD64X2 system Linux Mint. I have installed OWFS (One Wire File System) which mounts all the sensors etc. as files and allows access to all their properties through simple file system commands. These may be manual through a terminal or using any programming language. (OWFS is free multi-platform software and available from SourceForge.)

Here is an example of access from the terminal :-
Quote:
gina@AMD64-Mint-9 ~ $ sudo cat /mnt/1wire/28.0F516B020000/temperature
17.375
And here is my complete terminal run including mounting the devices, listing their IDs and properites, and finally reading the temperature.
Quote:
gina@AMD64-Mint-9 ~ $ sudo /opt/owfs/bin/owfs -d /dev/ttyS0 /mnt/1wire
[sudo] password for gina:
gina@AMD64-Mint-9 ~ $ sudo ls /mnt/1wire
09.82CD79060000 28.0F516B020000 alarm bus.0 settings simultaneous statistics structure system uncached
gina@AMD64-Mint-9 ~ $ sudo ls /mnt/1wire/09.82CD79060000
address alias crc8 family id locator memory pages r_address r_id r_locator type
gina@AMD64-Mint-9 ~ $ sudo ls /mnt/1wire/28.0F516B020000
address crc8 family id power r_id temperature temperature11 temperature9 templow
alias errata fasttemp locator r_address r_locator temperature10 temperature12 temphigh type
gina@AMD64-Mint-9 ~ $ sudo cat /mnt/1wire/28.0F516B020000/temperature
17.375
The other device ID is in the serial adapter - they're available with or without ID.

I haven't used a high level language to access it as yet.

P.S. I created the directory /mnt/1wire first.

_________________
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Wed Dec 22, 2010 12:40 pm 
Offline

Joined: Sat Feb 21, 2009 12:41 pm
Posts: 1859
Location: Devon UK
Weather Station: FO WH1081PC (Maplin)
Operating System: OS X, Linux Mint, Win7 & XP
Trying to sort out permissions now so that I can use it as gina rather than root.

_________________
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Wed Dec 22, 2010 8:13 pm 
Offline

Joined: Sat Feb 21, 2009 12:41 pm
Posts: 1859
Location: Devon UK
Weather Station: FO WH1081PC (Maplin)
Operating System: OS X, Linux Mint, Win7 & XP
Not managed to sort out permissions but I do have temperature logging set up now using Python. The script reads the temperature and logs it to a text file together with the current date/time. This may be run as a cron job at whatever interval desired. Additional temperature sensors may be added easily and other sensors by simply replacing "temperature" with the appropriate property. The system will be highly modular.

Now to link the log file to GnuPlot to produce temperature plots like my F.O. station. I'll also do processing to produce plots over various time scales etc.

_________________
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Thu Dec 23, 2010 10:14 am 
Offline

Joined: Sat Feb 21, 2009 12:41 pm
Posts: 1859
Location: Devon UK
Weather Station: FO WH1081PC (Maplin)
Operating System: OS X, Linux Mint, Win7 & XP
Here's the link to the SourceForge page for OWFS giving details :- http://sourceforge.net/projects/owfs/
and OWFS home page :- http://www.owfs.org/

For MS Windows, OWFS runs under Cygwin :- http://en.wikipedia.org/wiki/Cygwin I hope to check out this implementation on my Windows XP machine once I have things running in Linux.

I also expect to test it in Mac OS X.

_________________
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Tue Dec 28, 2010 11:11 pm 
Offline

Joined: Sat Feb 21, 2009 12:41 pm
Posts: 1859
Location: Devon UK
Weather Station: FO WH1081PC (Maplin)
Operating System: OS X, Linux Mint, Win7 & XP
Just a minor update... I have connected the DS18B20 with about 10 metres of CAT5 cable to the adapter and placed the sensor outside. (I had a bit of fun persuading two wires from the CAT5 cable - blue for data and blue/white for ground - to go into the right holes in an RJ11 plug for crimping). The sensor end was soldered and the joints separated and protected with insulation tape. A proper job would be to encapsulate the connections in a thermosetting plastic. That would make the sensor weatherproof.

I tested this with the Python logger software mentioned above. It showed a nice smooth drop in temperature as the sensor cooled from room temperature down to the outside temperature.

_________________
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Wed Dec 29, 2010 6:14 pm 
Offline

Joined: Sat Feb 21, 2009 12:41 pm
Posts: 1859
Location: Devon UK
Weather Station: FO WH1081PC (Maplin)
Operating System: OS X, Linux Mint, Win7 & XP
This is the circuit I'm proposing to use for the new sensor set-up. I shall be building my own wind vane but using the same direction detection as in the Fine Offset weather stations viz. 8 reed switches in a circle operated by a magnet on the vane arm. The spacing of magnet to reed switches will be adjusted so that as the magnet moves between the reeds, it turns on two reeds. In this way, 16 individual directions can be sensed using just 8 reed switches. The circuitry provides digital values not just for the 8 cardinal points but for the in-between points as well. The chip used is a 4 input A/D converter. A table will be used to translate the various 4 channel digital numbers into compass points (0-15).

The top part of the circuit uses a DS2438 chip (temperature, 10v A/D and 250mV A/D plus a seconds counter). The anemometer reed switch produces a 0-5v square wave which is RC filtered to remove contact bounce and then fed into the 10v A/D. The output voltage from a photovoltaic cell taken from a garden solar light, is reduced and fed into the 250mV A/D input. I'm using this arrangement for the anemometer rather than the more usual counter due to the counter chips seemingly being unavailable from a UK supplier.

Power for both wind sensors is taken from the 1-wire bus using a Schottky diode and capacitor.
Attachment:
0-new-aws-1.png


You do not have the required permissions to view the files attached to this post.

_________________
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Wed Dec 29, 2010 6:47 pm 
Offline

Joined: Mon Jan 04, 2010 10:01 pm
Posts: 179
Location: Stevenage, UK
Weather Station: WH1081
Operating System: Vista 32bit bus edit
Looks and interesting project Gina,

What's the chip you can't source in the UK...

_________________
Regards

Malcolm
http://www.micro-heli.co.uk/

Image


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Wed Dec 29, 2010 10:02 pm 
Offline

Joined: Sat Feb 21, 2009 12:41 pm
Posts: 1859
Location: Devon UK
Weather Station: FO WH1081PC (Maplin)
Operating System: OS X, Linux Mint, Win7 & XP
malc-c wrote:
What's the chip you can't source in the UK...
It's the DS2423 counter chip.

I posted some info on another board and forgot to post it here so I'm afraid my last post here doesn't follow on properly so I'll add more info in here...

Temperature sensors are no problem - I've even found a cheaper source for the sensor chips in the UK - just £2 each and a 10% discount on 10+. P&P is also £2.

The DS2438Z+ called a Smart battery monitor looks a useful chip. It includes temperature, 10v A/D, another low voltage A/D and an elapsed time counter (in secs). Although designed to monitor rechargeable batteries for voltage and charge/discharge accumulated currents, it has many other uses. Available from HomeChip in the UK.

1-wire chips for some of the other things like counting reed switch closures don't seem to be available from a UK source (haven't found one yet) so might have to go direct to Maxim (aka Dallas Semiconductors) in the USA.

For counting anemometer rotations and/or rain gauge tips, a DS2423 counter chip would be best but failing that, I'm going to try to cater for the anemometer and rain gauge in a different way. Rather than counting revolutions or bucket tips during the logging period, I propose to directly sample the reed switch often enough to detect the shortest open or closed period. I could then convert to rpm or no. of bucket tips in software. For the rain gauge, the time between bucket tips could be used to calculate the rain rate.

I'll use an RC low-pass filter to remove contact bounce then apply that to one of the A/D inputs of a DS2438. In the case of the anemometer, the other A/D can be used to monitor the output of a photovoltaic cell to measure daylight levels. Another DS2438 can be placed in the Stevenson screen and use it's temperature measurement plus one A/D for the rain gauge.

Later...
I've been researching sources of 1-wire components on-line. UK sources, apart from a mere handful of devices are like hens teeth! In particular the DS2423 counter is not even available direct from Maxim :( A couple of companies evidently have some stocks as they offer modules or kits using it - at a price! I guess if you really want to build a counter you'd have to use a CMOS counter and a 1-wire digital switch chip to connect it to the 1-wire network. Deviating rather from the principle of 1-wire of everything in the one chip or at least very few other components.

As for Maxim themselves, they have a delivery fee of $50 for countries other than the U.S.A. it's even $15 for local delivery. And a policy currently of serving larger companies rather than individuals.

_________________
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Thu Dec 30, 2010 10:33 am 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2512
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Gina, have you seen how Peet Brothers do their wind direction sensing, they use the anemometer in combination with the direction vane to calculate a phase difference. http://www.peetbros.com/HTML_Pages/part2.htm#windsensor

I think this has been mentioned before, but I have also seen it can done using the cup anemometer only by adding a small tab to one cup and using two switches (Derek Weston), the phase difference can again be used to calculate the wind direction - but no additional direction vane is required at all.

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Thu Dec 30, 2010 11:47 am 
Offline

Joined: Sat Feb 21, 2009 12:41 pm
Posts: 1859
Location: Devon UK
Weather Station: FO WH1081PC (Maplin)
Operating System: OS X, Linux Mint, Win7 & XP
mcrossley wrote:
Gina, have you seen how Peet Brothers do their wind direction sensing, they use the anemometer in combination with the direction vane to calculate a phase difference. http://www.peetbros.com/HTML_Pages/part2.htm#windsensor
No, I've not seen that one before. Looks interesting. Unfortunately, I can't quite work out how the reed switches are arranged. It seems as if one reed is on the vane but if so, how is it's output connected - slip rings? I don't think so from the description. Or are there two ball bearings to conduct the signal - very iffy if there's any lubrication. Maybe I'm missing something. My brain is not as young as it was!
Quote:
I think this has been mentioned before, but I have also seen it can done using the cup anemometer only by adding a small tab to one cup and using two switches (Derek Weston), the phase difference can again be used to calculate the wind direction - but no additional direction vane is required at all.
Yes, I've read about this method but don't remember the details (if they were given).

EDIT... Later... I've re-read the Peet Bros info and definitely come to the conclusion that there is a magnet on the cups, one reed switch on the base at North and the second reed switch on the vane. That exactly fits the description about the reed switch timings. I'd like to know how the vane located reed switch connects to base.

_________________
Gina

Sorry, no banner - weather station out of action. Hoping to be up and running with a new home-made one soon.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 74 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group