Dallas Weather Station WS-1
Jonathan
Posts: 1,023
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 - Home of the Hydrogen Fuel Cell Robot
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 - Home of the Hydrogen Fuel Cell Robot
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
DALLAS has a wealth of information for it 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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Speaking of economics and marketing.. Funny that they call a thing that works fine with three wires, a 1-Wire...
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 - Home of the Hydrogen Fuel Cell Robot
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
Propeller Applications Engineer
Parallax, Inc.
So Google sent you into redundancy? Just kidding
I think the Dallas way is extremely interesting, but it is also expensive, and hardly known in Europe..
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 - Home of the Hydrogen Fuel Cell Robot
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
Propeller Applications Engineer
Parallax, Inc.
en.wikipedia.org/wiki/1-Wire
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...
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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
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" ) 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
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.
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
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, 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 - Home of the Hydrogen Fuel Cell Robot
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?
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?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
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?
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
[font=Arial,Bold size=4]Pasted from the datasheet:
FEATURES
[/font]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
[font=Arial,Bold size=4]PIN DESCRIPTION
[/font]GND - Ground
DQ - Data In/Out
VDD - Power Supply Voltage
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!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
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 - Home of the Hydrogen Fuel Cell Robot
This is a good and relevant example www.phanderson.com/onewire/owc190.html