Shop OBEX P1 Docs P2 Docs Learn Events
communicating between nodes — Parallax Forums

communicating between nodes

FranklinFranklin Posts: 4,747
edited 2007-12-27 03:21 in General Discussion
I am building a weather station and have several units (temp/humidity/pressure, rain gauge, wind speed/direction) that all need to talk to the central processor and then a radio link. Some of these devices talk SPI but the nodes can be as far as 25 feet from the sender to the receiver. What would be a good protocol to use to communicate between these nodes?

Thanks.

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

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-24 23:19
    Are these units wired? You mention SPI for some sensors. That isn't intended for distances on this order. You can't talk protocol yet until you define your communication needs further. How much data do you need to send? How often? How fancy is the central processor? If it's a Stamp, that can only listen some of the time. A Stamp central processor would need to be the master and poll the sensors. If you're using a BS2p/pe/px, the 1-Wire protocol is very helpful at that sort of distance. There's even a 4-channel ADC (DS2450) available.
  • FranklinFranklin Posts: 4,747
    edited 2007-12-25 00:04
    Mike, all the sensors are wired. I plan to have a radio link from the station to the house but that comes after all the data is collected. Some of the devices are 1-wire and that isn't my main problem. I'm thinking I will have to have several processors (Atmel, picax, pic, sx) involved sending data to the main processor (propeller) when requested. Then the propeller will crunch the data into a packet and send it on to the house.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • pwillardpwillard Posts: 321
    edited 2007-12-27 03:21
    It's kind of a bummer that DALLAS doesn't like it when you create your own 1-wire device (IE; use a microcontroller to emulate a 1-wire device with a custom sensor behind it.)· If you could use 1-wire that way it might be a nice "affordable" way to use 1-wire everywhere.

    A good second choice, in my opinion, is RS485.· RS485 has been convered a lot by Jon Williams (and Scott too).· even the latest Stamp Applications in Nuts and Volts (January 2008) has Jon talking about RS485.· A good protocol for use with RS485 is called S.N.A.P.· ( http://www.hth.com/snap/)··NOTE: SNAP-001.BAS is located in SNAP-001.ZIP file·on that page.···Code samples for it are also in the Claus and Klaus book (BASIC Stamp 2p: Commands, Features, and Projects) Book available in the·Product Info·section.

    The nice idea behind RS485 and SNAP is that 1 is a standard and the other is an open source protocol designed for a multi-drop bus.· There are implementations of SNAP for AVR and PIC as well.


    FYI: Your project interests me since I'm in the middle of my weather station project.
    http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KGACUMMI15






    ·

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

    There's nothing like a new idea and a warm soldering iron.

    Post Edited (pwillard) : 12/27/2007 4:39:42 AM GMT
Sign In or Register to comment.