Shop Learn
BS2 to BS2 via XBee(or other RF modems) — Parallax Forums

BS2 to BS2 via XBee(or other RF modems)

trookstrooks Posts: 228
edited 2015-02-10 09:39 in BASIC Stamp
I apologize in advance if I am asking for something that my limited search capability can not find on this forum.

What I need is to make eight remote modules perform a function as close as possible to the same instant.

I have chosen the BS2 for my processor modules because it meets Mil. Std. for operating temperature range and I can use PBasic language. I need modems to answer to individual quires as well as broadcast messages and of course meet Mil. Std.

I have used AT modem commands before but getting into API may be beyond me because of all the gray hair that now surrounds my gray matter.(small grin)

What I need are examples of or pointers to anything close to having done this task before. Recommendations to good documentation will also be greatly appreciated.

Much Thanks to all that can help,



  • 72sonett72sonett Posts: 82
    edited 2015-02-07 10:38
    This tutorial at explains how BSs and XBees can communicate.
  • trookstrooks Posts: 228
    edited 2015-02-07 17:59
    Thank you very much for the quick response .

    This looks like a good place to start
  • stamptrolstamptrol Posts: 1,731
    edited 2015-02-09 08:43

    By all means, when you get into your project, let us know where you're getting hung up. Start with getting two units to talk.

    Once you get used to the XBees, they are quite a neat little package.

  • ercoerco Posts: 19,925
    edited 2015-02-10 09:39
    trooks wrote: »
    What I need is to make eight remote modules perform a function as close as possible to the same instant.


    That's a whole lot of BS!

    BS2 that is.

    You may be bordering on a BS2 supercomputer, or even a Propeller with 8 cogs. Please be careful to avoid creating a black hole.

    Seriously though, are your XBees just to synchronize the function start, or is there a lot of complicated interstamp communication going on? Seems like there might be a more cost effective solution that 8 XBees.
  • erco,

    it's been a while since I last checked in here.

    The reason I am sticking with BS2s and XBees is the high degree control of what, how and when each unit does what it does. This will be an RTOS endeavor. My later years in field service exposed some problems with using UNIX and C when timing of data capture and transfer is crucial in mechanical based systems and having to deal with cogs only compounds the inherent loss of timing caused by a library driven OS.

    Even more crucial for having salable security for this system is not using an 'off the shelf' communication protocol. Using BS2s and the version XBees I have chosen allows for 'on the fly' changing of communication channels and an 'offbeat' baud rate to even more complicate life for those that would try to hack or even jam this system. The XBees are the best available units considering the varying size areas and varied topographies where where this system can be expected to operate.

    Once I can make this beast work the most valuable part of it for me will be the copyright for my software that runs it. I am fast running up against a real time bind though. My cataracts are not yet bad enough to justify surgery and medications for my painful palsied fingers only dulls my concentration. Making the units as small as possible is a requirement so that the circuitry that looks like a cross between a birds nest and a can of worms can more easily be hidden and not detract from a successful demonstration. Once we have some backing the circuitry gets changed from thru-hole to SMT and all those wires become almost invisible lands on a module that will be a small fraction of the smallest size I can make it myself.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2016-07-27 19:30
    If all the modules need to get the same message at the same time that's pretty easy and I have shown this type of thing before with multicasting or point-to-multi-point.

    This video shows the Propeller BoE sending out time data via Series 1 XBee and being received by three BASIC Stamp BoEs with XBee Modules and displaying the time on three LCD modules.

    This is just a testing phase for testing Point to Multi-Point packets from one XBee to many others.
  • Chris,

    Thanks but I have seen quite a few demonstrations of the same and similar RF communications. The cheapest would be to use a 555 and doing parallel to serial through a chip to a 433 MHz transmitter and into a 433 MHz receiver and through a serial to parallel chip on the other end. It can all be done with old technology that is almost dirt cheap. Anyhow nobody really knows what time it is<G>.

    What I am working on is a bit of point-to-multi-point and some point-to-point depending on inputs at any given time. By using BS2 OEM modules on a proto-board I am already way smaller that a BOE. Way back in the 60's I worked on a piece of equipment called a CCM for Communications Controller Multi-channel that was going in computer systems for the Army, Navy and Air Force. It had a mixture of Selector Channels and time-slice multiplexer channels. Even though things are 1,000's of times faster today the same principles of how it works still apply. Much of what was being done by hardware back then can be done way faster and more reliable by software these days.

    Did I mention that security is of the utmost concern for potential users of our system and that having a proprietary communications protocol will be our biggest selling point to the vast majority of potential customers.

    "Just because I am delusional and paranoid does not necessarily mean they are not out to get me." - trooks
  • Progress update.

    I tested the software and various drivers and LED indicators using BS2 OEM modules and the lowest power XBee S1 modules. All units are the same hardware but each has slightly different programming with one acting as master decoder and coordinator of the remote units and everything checked out just fine. Since our final product will likely need more range I then installed higher power XBee Pro modules and things really got hairy. I am running my laptop on a 12V marine battery and all modules are either 12V AA packs or dual 6V rechargable lantern batteries. The only connections are via RF and I use an XBee connected to the laptop to monitor communications.

    I am thinking that the higher powered rf is getting into the circuitry. My next step will be to build a faraday box around the logic and and batteries and run a shielded cable to the 3.3/5V adapter and move it a short distance from the logic modules. I plan to build cardboard boxes and cover them with a few layers of foil. I would love to hear from anyone that has had the same or similar problems along with the cheapest reliable way to fix it.

    My friend and partners' cabin is in a remote location where I am doing testing. I have to climb a ridge behind the cabin to get minimum cellphone connection. I make a trip home every week or two to empty my snail-mail box and replenish supplies. I fully expect there will be some very informative and helpful information forthcoming so I thank Y'all in advance.


    "I thought I had made an error once but soon found I could blame it on someone else."

  • kwinnkwinn Posts: 8,691
    Muffler tape around the boxes makes a pretty good faraday cage and strengthens the cardboard boxes a bit.
  • Thanks, kwinn,

    That reminds me that I still have part of a roll of tape used to construct fiberglass duct work. It is thin metal with paper you peel off to use it and the glue is almost like instant super glue. I also have some wooden paint stirring sticks that I can tape to the logic box and hold the rf modules up in the air away from the logic just to have some extra distance from the logic modules.

    Back in the stone ages I sometimes used thin sheets of metal with plastic laminated to both sides to protect logic and core memory stacks in rf intensive environments. I have no idea if they still make those or even where I would try to find them. If anyone knows of such please let me hear from you.


    - I consider myself a wit and my friends agree that I am at least half right. -
  • An update on 'The Project' - Using paired XBee Pro and BS2 OEM modules.

    The software(PBasic 2.5) is completed and debugged.

    The circuitry design is completed and tested via soldered protoboards.

    What remains is building enough circuit boards that fit the available space to put together a base system and begin introducing it to some selected groups for evaluation and input. I am using cut up protoboards and had to go to a 2 level design to meet space restrictions.

    For now my biddness partner and I are headed back into the deeper mountains to our secret 'mad scientist' lab to assemble a prototype system suitable for demos. We realize that once we start showing the system it will be very difficult to keep the lid on it. I do hope that I get to be the first to show Y'all what we built.

    Much thanks is due to Parallax, Digi and some others for valuable input along the way.


    - As a wit my specialty is picking nits. -
  • Well, it has been a year since my last update. Mostly I have little to report exept 'real life' things that have little to do with our project other than slowing it to a crawl. While gleaning firewood from a huge pile of trees that were clear-cut but then rejected for sale I maneged to jam my left leg into the pile and fall in a most painful way. Fortunately I had the presence of mind to fling the chainsaw away from me as I went down. The pain totally wrecked my concentration and the meds that eased the pain had the same effect. After several months the doctor finally impressed on me the need to seek other means of relieving the pain. I finally got myself a new knee in August.

    I am still going to physical therapy but the pain is less and the meds to relieve it do not befuddle me near as much as before. I am presently going through the tutorial to learn how to use DipTrace and design my very own much smaller PCB. It may turn out that my brain is a bit to ossified to master DipTrace in which case I will be asking for pointers on who to turn to. One problem we were facing will be resolved when a patent we could likely be infringing on expires at the end of this year.

    I wish to express again my gratitude to Parallax, Digi and members of this forum for all the valuable input I have received.


    - Of all the things I have lost I miss my mind the most. -

  • Left out of my last report was that a horrible picture of my heart came into focus. It was one of those things that can cause you stop still and carefully examine where you are and where you are going. I was most worried that the surgeon may have second thoughts about giving me that new knee.

    Some of my work over the years had been on medical electronics so I got to see firsthand the advances in diagnostic techniques. The picture of my heart was the kind always used to illustrate borrowed time.

    After much upheaval and shifting of priorities it dawned on me that I could have finished the project by now.

    I started gathering the pieces needed to get my head back where it should be to complete this thing. I really want to hear the expletives from people that see it in action the first time. It did not help that everything had been packed as though the house was on fire.

    One thing remaining to get done is the configuration of the XBee PRO S2C units. One piece of vital reference material went missing.

    I have searched as best I can for it. There is a tutorial with built in projects to build for configuring XBee modules using 802.15.4 protocol. It was published by Parallax and had 2 or 3 authors whose names escape me.

    If you know of this publication or where I might look for it please let me hear from you.


    The best thing I ever borrowed was time.
  • The link to the manual in the second post still works.

  • Thanks 72sonett, for the resend.

    What is the emoticon for feeling really stupid?

    As far as I can tell that was the only file associated with what I was doing that was not on a thumb drive when my last PC made like an ex and left.

    I've got to finish this thing while I can still drive the Big Ol' Motor Home I'm goin' to buy.


    "If it didn't happen that way, it shuda." - The ending of all the best huntin' and fishin' stories I've heard.

Sign In or Register to comment.