PDA

View Full Version : Dallas Weather Station WS-1



Jonathan
09-01-2007, 04:04 AM
Hi All,

I am working on a data logger for weather using a Dallas Experimenter's Kit WS-1. I have found a fair amount of data, but can't seem to find connection info. The kits came with an adapter for PC use, but I want to use it with a Prop, of course. The cable that came with it is a phone cord, with only two wires, red and green, connected to the plugs.

Any help as to how to hook it up? I have DL'd the one-wire object, and just need to figger out how to hook the dang thing up.

Thanks!

Jonathan

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot

Paul Baker
09-01-2007, 04:11 AM
This document should help you: http://davidbray.org/onewire/Owstd.pdf

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

deSilva
09-01-2007, 04:14 AM
To my knowledge there is not yet a 1-Wire driver for the Propeller.
DALLAS has a wealth of information for it www.maxim-ic.com/appnotes10.cfm/ac_pk/1 (http://www.maxim-ic.com/appnotes10.cfm/ac_pk/1)

There exist drivers for many other microcontrollers (e.g. AVR -> see BASCOM)

BTW: Here is a nice descripotion ofthe "Wheather Station":
oww.sourceforge.net/oww.html (http://oww.sourceforge.net/oww.html)

Paul Baker
09-01-2007, 04:15 AM
deSilva, it is here: http://obex.parallax.com/objects/18/

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

deSilva
09-01-2007, 04:20 AM
Paul Baker (Parallax) said...
This document should help you

Paul, don't you think your link was a little bit too economical?

Speaking of economics and marketing.. Funny that they call a thing that works fine with three wires, a 1-Wire...

Jonathan
09-01-2007, 04:21 AM
Thanks for the help!

The trouble is that the connectors that came with the kit only use the green and red wires. The pinout you so kindly linked shows green as HOT and red as RETURN. I'm still left puzzling as to how to hook this up. Green = +5VDD? Red = data?

Thanks,

Jonathan

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot

deSilva
09-01-2007, 04:23 AM
Paul Baker (Parallax) said...
deSilva, it is here

Thank you! Sorry I missed it; but I had never an application for it http://forums.parallax.com/images/smilies/smile.gif

Paul Baker
09-01-2007, 04:45 AM
Jonathan, Green is data and Red is the return (GND), one wire gets it's power from the data line by requiring periodic transitions on the data line to charge a local capacitor it derives it's power from.

DeSilva, Ive never worked with one wire, but in my previous job I was a professional searcher, so I quickly found the information. Since it's information was spartan, so was mine.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

deSilva
09-01-2007, 04:49 AM
Paul Baker (Parallax) said...
Ive never worked with one wire, but in my previous job I was a professional searcher


So Google sent you into redundancy? Just kidding http://forums.parallax.com/images/smilies/smile.gif

I think the Dallas way is extremely interesting, but it is also expensive, and hardly known in Europe..

Jonathan
09-01-2007, 04:49 AM
Paul,

Many thanks for the help. I still don't get how to hook it up- looking at the example for the DS1820 in the Stamp manual, I don't see how I can acheive this configuration using only 2 wires- I see the need for 3.

Thanks, I'll keep puzzling,

Jonathan

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot

Paul Baker
09-01-2007, 05:00 AM
deSilva said...

Paul Baker (Parallax) said...
Ive never worked with one wire, but in my previous job I was a professional searcher


So Google sent you into redundancy? Just kidding http://forums.parallax.com/images/smilies/smile.gif

I think the Dallas way is extremely interesting, but it is also expensive, and hardly known in Europe..
I was a patent examiner, half of my job consisted of looking for prior art. Thier search engine puts Google to shame, there were no unsearchable characters, infinitely nestable booleans, range searchs,·wildcard and n wildcharacter,·proximity searches both ordered and unordered (words apart, same sentance, same paragraph, adjacent paragraphs, same heading), any sub field is searchable (title, abstact, body, claims, author, assignee, filed date, examiner, assistant examiner), and Im sure Im forgetting some features.

I did internet searches, but we were only permited to background searches, no searching of inventive concepts because inventive concepts are confidential information.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

deSilva
09-01-2007, 05:09 AM
Here are two extraordinary good descriptions:
en.wikipedia.org/wiki/1-Wire (http://en.wikipedia.org/wiki/1-Wire)
pdfserv.maxim-ic.com/en/an/onewirebus.pdf (http://pdfserv.maxim-ic.com/en/an/onewirebus.pdf)

I do not know whether your devices need any power, but for data only you should just connect the green line through a 1k resistor to a Propeller Pin (RED to GND).

Then start Cam's demo program...

Tom Wyckoff
09-01-2007, 09:27 AM
I did a lot with the one-wire devices a few years ago. One-wire refers to the communications mode, one bi-directional wire & ground. Most of the devices run on parasitic power from the 5 volt pull-up on the commmunication line. The timing requirements are nasty. Dallas also sells (sold?) a DS9097U serial port adapter that could connect a standard RS232 port to a one-wire line.

Oldbitcollector (Jeff)
09-01-2007, 11:42 AM
They still do...

www.maxim-ic.com/quick_view2.cfm/qv_pk/2983 (http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2983)

Oldbitcollector

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.

— Calvin, of 'Cavin and Hobbes.

Ken Peterson
09-01-2007, 12:07 PM
I find 1-wire interesting...certainly applicable for situations where you want to use an existing phone line (for example) to do something else. 2 wires are all you need. I think the 1-wire name is misleading....anyone who has electrical background knows you need 2 wires to complete a circuit.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


The more I know, the more I know I don't know.· Is this what they call Wisdom?

deSilva
09-01-2007, 03:36 PM
O.k. I think I had a blackout last night (It's morning now in Europe!). But reading the documentations I pointed to helped http://forums.parallax.com/images/smilies/smile.gif
The 1-wire bus is best considered as an "open-collector" bus, same as I2E is.
So the voltage is controlled by Vcc only!
As the devices drag current from this supply, the collector resistor ("pull-up" is not the absolutely correct term in this connection... I have also read: "strong pull-up" http://forums.parallax.com/images/smilies/smile.gif ) must be selected carefully. I should recommend 1k, but 470R or 2k2 will do as well, depending on the size of the "micro lan".

A series resistor is neither necessary nor useful!!

And - as I already said - Cam's test program and driver should work immediately


However: I also found remarks as to certain needed voltage ... Maybe some devices will not work from a 3V3 supply. But due to the nature of open-collector circuits, you can connect this "strong pull-up" to 5V without any fear for your Prop

Post Edited (deSilva) : 9/1/2007 7:45:44 AM GMT

BradC
09-01-2007, 06:16 PM
I'm using the DS18S20 in 3 wire mode here. I have the VDD pins connected to the 5V rail and just use a 3.3V pullup on the data line connected directly to the prop IO pin.

I had already written my own one wire driver before I spotted Cam's (which is far superior to mine) but they will reliably communicate with 3.3v on the data line. Not sure about powering them from 3.3v over long distances though. It works locally on the breadboard however.

I used cheap-o 4 core telephone cable to the sensors and put a 103 cap across the power pins of each sensor at the end of their cables. Seems to be reliable (read as 0 data errors, polling 3 units per second for about 3 weeks continuously). I have 3 sensors and each one has its own data pin, so I can poll them in parallel.

deSilva
09-01-2007, 07:00 PM
Quite interesting reading.... What DALLAS calls "parasitic power supply" is not just that easy... I post the recommended "strong pull-up".

At the moment I can see no reason why a - say - 470R collector resistor, rather than a transistor should not fulfil all requirements, wasting 7 mA all the time of course...
But 3V3 Vcc is certainly on the low side - connecting to 5V seems quite appropriate

Post Edited (deSilva) : 9/1/2007 11:27:29 AM GMT

Ken Peterson
09-01-2007, 09:40 PM
@deSilva: The circuit you show won't work will it? You have a pull-up resistor and a transistor connected to V-pu. There's nothing to pull the line down. The transistor should be connected to ground (return).

Most of those 1-wire devices have very low power requirements, so pulling them up with a resistor should be sufficient.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


The more I know, the more I know I don't know.· Is this what they call Wisdom?

deSilva
09-01-2007, 10:43 PM
Ken Peterson said...
... and a transistor connected to V-pu. There's nothing to pull the line down.

The device will do that. That is one of the many tricky things in the 1-wire protocol. The "master" must not switch the transistor unless it detects this situation - in fact exactly when a slave pulls the line down.

Jonathan
09-01-2007, 11:21 PM
Still no luck getting it to work.

Desilva, using your schematic, I take it the base of the transistor is connected to another Prop pin. Looking at the one wire object, I don't see this pin in use.

All of the other methods I have tried so far have failed. I have a one wire temp. sensor around here, I'm going to try that later and see if I can get it to work.

Thanks for all the help, folks!

Jonathan

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot

Ken Peterson
09-01-2007, 11:25 PM
@deSilva: My understanding of the 1-wire protocol is that it is simply a wired-or bus with a pull-up resistor. Either the master or the slave can pull the line down. The device will only pull down on the line when instructed by the master to send data. The device gets its power from the bus because the average voltage on the bus is high and the device has an internal cap to keep it powered during the brief periods when the line goes low.

The Dallas/Maxim data sheets show the device connected to a microcontroller with a pull-up resistor...that's it.

http://www.maxim-ic.com/appnotes.cfm/appnote_number/3989

The only tricky thing about 1-wire is the protocol itself - like device discovery, etc.

Ken

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


The more I know, the more I know I don't know.· Is this what they call Wisdom?

Ken Peterson
09-02-2007, 12:06 AM
OK...I read the DS18S20 data sheet...NOW I get what you're trying to do. The 1-wire object on OBEX may not support parasitic power, but I didnt' look at it that closely.

Perhaps you could put a button battery on Vdd of your temperature sensor.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


The more I know, the more I know I don't know.· Is this what they call Wisdom?

deSilva
09-02-2007, 12:11 AM
As I am totally lacking practical experience I cannot say when to use strong pull-up and when a simple resistor suffices.

Ken Peterson
09-02-2007, 12:49 AM
I think in this case - use strong pullup or local supply when indicated by the datasheet for the device. Not all devices require that much power, but the DS18S20 apparently does. I guess I incorrectly assumed all 1-wire devices were very low power.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


The more I know, the more I know I don't know.· Is this what they call Wisdom?

Ken Peterson
09-05-2007, 10:26 PM
Thought this might be handy for anyone thinking of using 1-wire devices.

http://www.maxim-ic.com/quick_view2.cfm/qv_pk/4382

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


The more I know, the more I know I don't know.· Is this what they call Wisdom?

Goran (Sweden)
09-06-2007, 03:25 AM
Jonathan

Reading the Datasheet it seems 1 Wire mean it use only 1·PIN to communicate!!!
But it still need Power and ground.

It seems this 1 wire (DS1820) needs a bit more power then other 1 wire chips which take the power from the dataline.

I have used the DS1820 in a project·with a SD card for logging long time

I simply connected the VDD to 3,3V on the Prop
and used one i/o pin for communication.
GND was also connected to the prop.

I used the 1 wire demo found in the http://obex.parallax.com/
and it works fine. I change it a bit to fit in my project but it's mainly the same function.

Goran Sweden

Pasted from the datasheet:
FEATURES
Unique 1-Wire® interface requires only one port pin for communication
Can be powered from data line. Power supply range is 3.0V to 5.5V
PIN DESCRIPTION
GND - Ground
DQ - Data In/Out
VDD - Power Supply Voltage

ahanktcd
09-11-2007, 01:47 AM
Hi all,

Thanks for the discussion on the DS18s20. I've got quite a collection of these and am just getting into the Propeller. I'll be hooking up a bus of these devices and testing the OW routines. Thanks for the insight!

Franklin
09-11-2007, 12:10 PM
Circuit Cellar magazine August and September have an article on building a leading edge de-icing system using one wire devices to communicate between themselves. It addresses the pullup problem and has some great ideas on making a OW network robust.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen

Jonathan
09-11-2007, 11:14 PM
J found a one-wire temp sensor (forget # ATM) in my parts bin yesterday, so I will try playing with that.

However, I still don't get how I can possibly hook the weather station up with only 2 wires. However, that is obvioulsy what the manufacturer intended, so I have to think it's possible.

Grrr.

Thanks for all the help folks!

Jonathan

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot

Paul Sr.
09-11-2007, 11:54 PM
Professor Peter Anderson has done quite a bit with "one wire" and sells products that facilitate easy use of these devices. I have purchased some of his items and they are very good quality.

This is a good and relevant example www.phanderson.com/onewire/owc190.html (http://www.phanderson.com/onewire/owc190.html)

Jonathan
09-12-2007, 12:29 AM
The problem is that I am trying to make a Dallas weather station work, and it only has 2 wires coming out from it. I can see how to hook up a 1W temp. sensor for example, but am still mystified as to how this dang weather station is supposed to work.

Jonathan

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info (http://www.madlabs.info) - Home of the Hydrogen Fuel Cell Robot

K6MLE
04-01-2013, 06:43 PM
I'm wondering if Jonathan was ever successful in getting his WS-1 to work?

I've been tinkering a bit with mine and have recently purchased some DS18S20 parts that I'll try to get working in parasitic mode. This mode (I think) is the key with the WS-1, hence only having the RED and GREEN wire. If I can get the DS18S20 part to work in parasitic mode, then it shouldn't be too far of a leap to make the WS-1 work, unless something in the WS-1 has stopped working!

Will post my results as I go.

Michael
K6MLE