Dallas 1-wire Weather station & Propeller ... reinventing the wheel?
K6MLE
Posts: 106
I've just gotten my first Propeller and thought it would be a perfect candidate to resurrect my old (original) Dallas 1-wire weather station. Has this been done successfully by anyone here? Last night I figured out how to output text to a small composite video display ... this is what I'd like to use to display information from the weather station. Will I be reinventing 'the wheel'?
Thanks,
Michael
K6MLE
Thanks,
Michael
K6MLE
Comments
Welcome to the forum.
I see that no one has replied to your question. I guess that nobody has worked with the Dallas 1 wire weather station.
I have thought about weather station applications with the propeller, but never attempted any.
Sounds like fun.
Welcome to the forum!
It shouldn't be too hard, have a look in the OBEX and search the forum, you should find a number of examples of folks reading data from other Dalas Semi devices like the DS18B20. Though read past posts in the forum for the most up to date working code. From memory Dallas published a lot of information on their 1 wire sensors.
When searching the forum, you may find you can only search a few weeks, you can adjust this in your Profile, under Settings, General Settings, called "Default Thread Age Cut Off:"
If you get stuck, post your sample code in the forum and ask for help.
Regards,
Dave
Since the Spin language is new to me, I will probably work my way through the 'Help' tutorial and get a feel for how the syntax works. Just for starters, it would appear the various functions could be assigned to different cogs: TV out, 1-wire comm, etc. Once through the tutorial, the next step will be to grab a few 1-wire devices I have around here and see that I can talk to them and have their data display on the video monitor.
Once that 'proof-of-concept' is working, it might be prudent to scan the weather station and see that I can still read it. I did come across an article in Sensors Magazine (from years back) that talked about interfacing/communicating with the weather station. That looks like it might be a useful source.
Then ... having 'mastered' Spin ... I'd like to take a look at one of the Forth dialects (a language loved by us old hardware types) and see what sort of projects I can dream up using Forth.
So many cogs; so little time!!
Regards,
Michael
K6MLE
It seems at this point you are trying to determine your 'cog budget'
Some video requires two cogs to perform. I believe that is VGA
If you want to do something fancy, you might add a mouse to your video screen.
How many cogs for 1-wire? I really don't know. Some of this would depend on what you have for the weather station. Are humidity and temerature separate chips. Are all the chips on truly 1-wire and require addressing? And so on.
I most significant issue may be that 1-wire is expecting +5 volts and the Propeller is +3.3 volt i/o. You may have to insert and active bi-directional level shifter (can be done with one 2N7000 Moset and a few resistors) in order to get the communications right. As I recall, the Dallas 1-wire may have difficulty with a purely 3.3 v interface.
temp := ow.readByte + ow.readByte << 8
is taking the lowest bit in the MSB of the temperature register and moving it to the highest bit position, then adding them together.
If I'm correct, the first ow.readByte command grabs the LSB of the temperature register; the second grabs the MSB. I've tried the code (unchanged) with a DS1822 and it works just fine! It seems that a shift of more than 7 bits will push bits into oblivion, therefore the code, as written, should not work.
Clearly I'm missing something quite simple! If someone can steer me back on track, I'd greatly appreciate it!
Thanks,
Michael
K6MLE