Sandaysoft

Support forum for Cumulus weather station software
It is currently Sun May 26, 2013 3:57 am
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 Dec 31, 2010 9:49 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
Been thinking about this (Peet Bros system) and realise there's a snag. This will also mean sampling the reed switches at least 16 times per revolution in order to provide sufficient timing accuracy. That's assuming the simple 1-wire circuit above. If the reed switches were to be connected to an interrupt on a microprocessor or to a counter plus timer chip the timings could be measured directly. Again, this is getting away from the 1-wire principle but a 1-wire chip could be used to send the data to the computer.

_________________
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 Dec 31, 2010 12:23 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
Been looking into providing a counter for 1-wire. A CMOS 4040 chip is a 12bit ripple counter and available in the UK from Maplin. The data outputs could be fed into one or more DS2408 1-wire chips. Messy but do-able and it still comes nowhere near the two 32 bit counters in the DS2423 (actually 4 counters, 2 with hardware clock inputs). However, the DS2408 data sheet is marked "Not recommended for new designs" so I guess they're thinking of withdrawing that too! :(

This is getting silly!!!! No!! This is getting beyond a joke!! :( Are they trying to kill off 1-wire?? It makes you wonder.

Looks like the mixed digital/analogue may be the thing yet again using the DS2450 4 channel A/D and resistors. What a bodge-up!

_________________
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 Dec 31, 2010 5:10 pm 
Offline

Joined: Mon Jan 04, 2010 10:01 pm
Posts: 180
Location: Stevenage, UK
Weather Station: WH1081
Operating System: Vista 32bit bus edit
One other protocol you might want to consider is SPI (Serial Peripheral Interface). There may be more options, and some may include counters, but I've not checked.

_________________
Regards

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

Image


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Sat Jan 01, 2011 5:08 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:
One other protocol you might want to consider is SPI (Serial Peripheral Interface). There may be more options, and some may include counters, but I've not checked.
Had a quick look at that and it seems rather complicated. I'm persevering with 1-wire for now.

I've just made up a 1-wire temperature sensor with cable long enough to reach from the computer in the lounge and out via the kitchen and back porch, across the grass and up into my Stevenson screen box, next to the F.O. unit. The F.O. is reading 5.0C and the 1-wire 4.625C. The 1-wire is specified as accurate to 0.5C and they are within 0.5C of each other :) The resolution of the F.O. is 0.1C and the 1-wire is 0.0625C ie. 1/16 of a degree. I estimate the distance to be something like 18-20 metres. I plan to thread the cable through plastic water pipe and bury that under the grass to protect it from the goats.

_________________
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: Sun Jan 02, 2011 4:30 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
Has anyone in the UK managed to order anything from Hobby Boards? Just been on their site and they have DS2423 counter chips for $8. They're also selling counter board modules at $28 but have run out of the kits. I created an account with them - that went fine, it accepted my UK address without any problem (a drop drown list to choose country from). Then tried to buy some stuff. I got as far as the delivery options and it said USPS (United States Postal Service) was the only available delivery service available on this order and that an error had occurred. I tried again with the same result. I had ordered 5 DS2423s and a humidity sensor. Another dead end it would seem! :(

HomeChip UK have a counter box which also uses the DS2423 counter chip for £28 (28 UK pounds) (ie. £28 + postage +VAT). Bit pricey for the simple thing I want to do. Do I spend three dozen quid to avoid the hassle of CMOS and all the extras? I dunno. I don't think software + 1-wire sampling at 200 times a second is going to be practical. The anemometer reed switch would need checking at least twice a revolution and allow for the maximum wind speed.

Maybe I should crawl back into my shell and hibernate until spring and perhaps then the I'll have forgotten the whole idea! ;) What would have been easy-peasy and dead simple a couple of years ago has now become a real headache! I guess I'm lucky that this is only a hobby and that my business does not depend on the DS2423 as I'm sure many do.

_________________
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: Sun Jan 02, 2011 4:43 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
Further to the above... I've now tried a number of Hobby Board items and get the same result each time. It would seem they are not currently selling to the UK. This is what they say about shipping :-
Quote:
Shipping: We use the US Postal Service for shipping. Shipping cost (both domestic and international) will be calculated at checkout. You can also get a shipping estimate at any time by viewing your shopping cart and using the shipping calculator. We charge actual shipping costs, plus a small packaging and handling fee. If you order Global Express please make sure to include your phone number.
I've underlined international.

_________________
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: Sun Jan 02, 2011 5:03 pm 
Offline

Joined: Mon Jan 04, 2010 10:01 pm
Posts: 180
Location: Stevenage, UK
Weather Station: WH1081
Operating System: Vista 32bit bus edit
Gina, it might be that as it's Sunday and they need to give the exact cost of shipping overseas and can't do so that's why they are not processing international orders. It might be worth trying to place the order on Tuesday when (possibly) the offices are manned

_________________
Regards

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

Image


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Sun Jan 02, 2011 5:10 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:
Gina, it might be that as it's Sunday and they need to give the exact cost of shipping overseas and can't do so that's why they are not processing international orders. It might be worth trying to place the order on Tuesday when (possibly) the offices are manned
Could be - yes, I'll try later. Thanks :)

_________________
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: Sun Jan 02, 2011 5:54 pm 
Offline

Joined: Mon Jan 04, 2010 10:01 pm
Posts: 180
Location: Stevenage, UK
Weather Station: WH1081
Operating System: Vista 32bit bus edit
Not sure if this is of any help, but googling turned up a surplus supplier which seemed to have supplies available. However the min order seems to be £150, but then I'm sure if you bought up the stock you could recover some cost by reselling them as it seems that there is still a demand for this chip, especially in the DIY weather station community :)

here (hopefully) is the link http://www.oraclecomponents.co.uk/parts ... &search=Go!

_________________
Regards

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

Image


Top
 Profile  
 
 Post subject: Re: 1-wire info and recommendations
PostPosted: Sun Jan 02, 2011 6:34 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:
Not sure if this is of any help, but googling turned up a surplus supplier which seemed to have supplies available. However the min order seems to be £150, but then I'm sure if you bought up the stock you could recover some cost by reselling them as it seems that there is still a demand for this chip, especially in the DIY weather station community :)

here (hopefully) is the link http://www.oraclecomponents.co.uk/parts ... &search=Go!
Thanks :) But I think the price is just a little too high :lol:

_________________
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: Sun Jan 02, 2011 9:56 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
I've been experimenting with software - running a loop continuously reading a 1-wire chip and reading data. This is just the simple DS18B20 thermometer chip, so no variation in output over a period of just seconds. Tests have shown data gathering to be very fast - a million reads in 5 seconds. But is this actually taking a new temperature reading every 200us? I think not! I think it more likely that it's just reading a buffer.

I increased the loop count in 10x steps until the process took several seconds to complete the count. I ended up doing a million loops reading the temperature and the computer clock in about 5 secs. At every 100,000 counts it prints the count, time and temperature and logs the latter two to a file. This is the terminal output :-
Quote:
gina@AMD64-Mint-9 /mnt $ sudo python ~/Weather-1-wire/ReadTemperature.py 28.6686E0020000 ~/Weather-1-wire/Temperature.txt
100000 2011-01-02 21:10:51 1.125
200000 2011-01-02 21:10:52 1.125
300000 2011-01-02 21:10:52 1.125
400000 2011-01-02 21:10:53 1.125
500000 2011-01-02 21:10:53 1.125
600000 2011-01-02 21:10:54 1.125
700000 2011-01-02 21:10:54 1.125
800000 2011-01-02 21:10:55 1.125
900000 2011-01-02 21:10:55 1.125
1000000 2011-01-02 21:10:56 1.125

ATM the only 1-wire chips I have are DS18B20s and a couple of DS2450 4 channel A/D chips. I have not tried a DS2450 as yet. I think that's the next step - get one working and reading an input signal. I have a waveform generator which covers a large frequency range with sine, square and triangular wave output at 0-5v. That should be ideal for testing this chip. I would think other chips that perform A/D would work at a similar speed.

This testing should tell me if it's feasible to sample the anemometer reed switch at 200 times a second. That gives 5ms to communicate with the chip and process the results. It only needs to increment a software counter for each positive (or negative) transition of the reed switch data. Then the counter can be read at the data logging interval chosen, be it say 10secs for real time dials or 5min for normal plotting.

_________________
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 Jan 04, 2011 4:05 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:
Gina, it might be that as it's Sunday and they need to give the exact cost of shipping overseas and can't do so that's why they are not processing international orders. It might be worth trying to place the order on Tuesday when (possibly) the offices are manned
Eureka!!! You're right! :) HobbyBoards international sales is/are working :) I have just ordered 5 DS2423 counter chips @ $8 each = $40 plus just over $5 shipping. PayPal converted the total to just under £30 so that works out at about six quid each. That's not too bad. Probably didn't need that many but better than not enough :lol: And they could run out any time.

_________________
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 Jan 06, 2011 12:34 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
I now have a DS2450 four channel A/D chip wired into the 1-wire network and working. I'm feeding a 0-5v very low frequency sine wave into one input and an attenuated version of it into another. I've added it into the logger app which now logs date, time, temperature and four voltages every 10 seconds. In view of the frequent data collection I've added the date into the data file name so I get a new file for each day. So... records per day = 6x60x24 = 8640. Actually, ATM the logging is a little over 10secs since I'm just using a 10sec pause in the logging loop. I'll change the timing to log at exact time intervals later. The readings from the 5v sine wave input go from nearly zero to nearly 5 in a 3 minute cycle, exactly as expected :)

_________________
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: Mon Jan 17, 2011 5:45 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
Still waiting fro delivery of counter chips from HobbyBoards (probably in Customs) so I've been thinking... Ouch! :lol:

Many decades ago I was involved in a project requiring a number of simple counters - ICs were in their infancy. I came up with an analogue solution to a digital problem - a diode pump circuit. Now I have another totally unrelated use for it! The idea is to transfer charge from a small capacitor to a larger one. The voltage reached in the larger one is proportional to the number of small charges applied. By adding a "current leak" resistor, the average voltage produced is proportional to the frequency of charges applied. Below is a circuit which takes the closing of a reed switch and pair of diodes to pump charge from one capacitor to another. The application I have in mind is the anemometer.
Attachment:
00-diode-pump-cct-a.png
How it works :-
Parasitic power is obtained from the 1-wire bus in the usual way with Schottky diodes and smoothing capacitor. The anemometer reed switch causes the small capacitor to be charged and discharged alternately. During the charging, current is fed into the reservoir capacitor through a diode from the parasitic 5v supply. The discharge current flows through the other diode and resistor to earth. The resulting voltage across the reservoir capacitor may be measured with a DS2438 1-wire chip (called a Smart Battery Monitor) using the current sense A/D converter. This has a full scale input of 250mV. This relatively small voltage compared with the 5v supply maintains adequate linearity.

Component values may be calculated to give a full scale reading of 100mph or whatever is wanted. Resolution is limited to one charge unit (pulse) = half a revolution or the A/D resolution, which I think is 8 bits (1 in 256). EDIT Checked up - signed 10bit so 1 in 512.

A variation of the circuit could involve removing the leak resistor and discharging the reservoir capacitor after each reading but this would require an extra chip.

Of course, this is a bit more complicated that using a DS2423 counter chip with more components but it beats using a CMOS counter and DS2408 8 bit I/O chip.


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: Tue Jan 18, 2011 1:33 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
Yippee!! My counter chips have been delivered :) I guessed as soon as I'd sorted out an alternative, they'd arrive :lol:

_________________
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 3 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