Shop OBEX P1 Docs P2 Docs Learn Events
Protocol and board recommendation for prop to prop project — Parallax Forums

Protocol and board recommendation for prop to prop project

erantzeerantze Posts: 3
edited 2012-03-13 12:05 in Propeller 1
I have a cool but not too complicated project that requires different conference rooms to communicate to a central controller that also feeds a status panel. The general idea is this: there are 6 assigned people that can go into one of 6 different rooms. When a user goes into a room, he will press a dedicated button that will illuminate and notify the controller. The controller will read that the person is in the room and will illuminate the correct item in the status panel. When the user leaves the room, he will press the button again, the light will go out and the controller will turn off the corresponding light in the status panel.

Because of some additional IO requirements in the rooms, it makes sense to use a propeller board in each room. As such, I need a way to communicate from the prop controller to the prop in each of the rooms, and the room can be up to 50 feet away. Things need to be wired, so wireless is not an option.

My original idea was to use a developer board and go I2C using I2C drivers on each end, primarily because OBEX has drivers for I2C and it can interface with several devices with just a few IO pins. However, the PropStick has a much better form factor for this use and USB is already on board - can it be utilized in some way? I didn't see something obvious in the OBEX for this kind of use, so figured I would post it here and look for suggestions and recommendations. I would prefer to use existing boards rather than create my own, so was looking at the dev board, propstick, or even a quickstart.

So recommendations for protocols? Boards?

Thanks in advance.

-Red

Comments

  • cavelambcavelamb Posts: 720
    edited 2012-03-12 14:22
    RS-232 serial ports.

    Trying to drive a logic signal from room to room, even with open collector is going to be chancy at best.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-03-12 15:05
    You might look at the MAX3323E Multidrop RS232 interface. This'll run off 3.3V and produces RS232 signal levels which should easily handle the 50 foot distances you want. It supports multi-drop networks, so you can connect everything using two twisted pair lines. You can use telephone cabling and jacks if you want. One Propeller acts as a master controller and transmits a coded query to all of the 6 rooms (like "!A" or "!B or "!C, etc.) and the slave controller in each room that sees its code will answer with its status including some kind of checksum. The slave that receives its query will turn on its MAX3323E transmitter to transmit the answer, then turn it off so the others can use the line.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-03-12 15:14
    Like cavelamb said, I2C (at least at the Prop's logic levels) isn't a long range protocol. I considered myself lucky when I had an I2C device working at the end of a meter of wire.

    RS-232 is good so is RS-485. One of JonnyMac's Spin Zone articles (there's a link in my index) covers using RS-485. I believe RS-485 as better noise tollerance, since it's a balanced signal, than RS-232 which is unbalanced.

    Edit: I hadn't seen Mike's answer. I don't know enough to know which would be easier to use in your case, RS-232 or RS-485.
  • TubularTubular Posts: 4,706
    edited 2012-03-12 15:55
    Hi Red, and welcome

    RS232 is good for 50 ft and two boards. I like Phil Pilgrim's original Propstick that has a 9 pin connector right on the end. Connecting two would be as single as a null modem serial cable (or Laplink cable) between the two propsticks.

    But as soon as you mentioned 6 rooms I reckon RS485 is the way to go, widely used in industrial environments. It gives you the option to have simple local I/O in each room.
    You could check whether JonnyMac (Jon Williams) has something suitable off the shelf for RS485 or CAN or LIN.

    I have a simple RS485/Prop board designed to drive small 2x20 or 4x20 LCD, it has about 12GPIO which can be used with up to 4 onboard BCD switches for setting operating modes or addresses, with the leftover GPIO being spare.
  • erantzeerantze Posts: 3
    edited 2012-03-13 06:23
    Thanks much for the responses! You guys really got me on the right track quickly. I have made a lot more progress in the past few hours from your responses than I have made in the past few weeks by myself.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-03-13 09:08
    erantze wrote: »
    Things need to be wired, so wireless is not an option.

    You didn't mention why they can't be wireless (not that you need to). I would think this would be a lot easier to implement with wireless devices. Nordic nRF24L01+ modules sell for less than $2.50. You can plug then directly into a QuickStart board without any other hardware of connections (you power the module with a pair of IO pins). I've used these modules in my home and I can't find a place far enough away from each other that they can't communicate. You could even use some sort of message hopping protocol to extend the range of the devices by passing transmissions from one module to the next.

    If you can use wireless, you might want to check out my panic button project (see second post of my index). If you're sticking with a wired solution, you might want to look at my serial port merger project (found in the same list in my index) to see how to use multiple serial lines with one Prop.
  • JonnyMacJonnyMac Posts: 9,197
    edited 2012-03-13 09:11
    I use RS-485 is a lot of Propeller projects. It's easy to implement and gives you up to 4000 feet between nodes. The attached schematic is now a standard module in EFX-TEK products that allow for RS-485. With the circuit we can support half- and full-duplex RS-485 and protocols that our customers may want to use (like DMX from a show control system or MODBUS for device IO).
    1024 x 534 - 45K
  • erantzeerantze Posts: 3
    edited 2012-03-13 09:29
    Duane Degn wrote: »
    You didn't mention why they can't be wireless (not that you need to).

    It is not as much that they cannot be wireless but because of the other requirements we need to run a wire for the DC power and, as such, running a few extra lines for communication makes sense. In fact,I can fit it all in standard CAT-5. Additionally, some of the walls are filled cement block and so who knows how well the reception would be.

    That said, I am going to pick up a few of those Nordic units just to play with. Thanks.
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-03-13 12:05
    I2C-bus buffer NXP P82B96
    "For long-distance communications between boxes or even between buildings"

    http://www.mouser.com/Search/Refine.aspx?N=1323043&Keyword=P82B96&Ns=Pricing%7c0&FS=True
Sign In or Register to comment.