Shop OBEX P1 Docs P2 Docs Learn Events
using an Xbee Module with a Propeller — Parallax Forums

using an Xbee Module with a Propeller

DgswanerDgswaner Posts: 795
edited 2009-01-09 16:02 in Propeller 1
I've looked for some info on connecting/using a propeller with an Xbee Pro, and have had little luck. perhaps it's too simple to need a tutorial, but I've never used an Xbee module and I've very green when it comes to serial communication.

Can someone answer a few questions, or direct me to a site addressing this.

I'm pretty sure I can connect it to the propeller, and plan on using the Xbee object so I think most of the work done, a Post someone else said made me worry,

Do I need the development kit to configure the modules? I thought that I read (can't find it now) that the pro models come preset to point to point communication? I just want to talk from one propeller to another.... for now.

I'd love a tutorial or advise as my learn curve usually ends up costing me!

Thanks for any help

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

DGSwaner

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-18 21:50
    Look at Martin Hebel's website (www.selmaware.com). For a while he sold adapters for the xBee modules for both the Stamps and the Propeller. He still sells the bare boards and has the user's guides on his website. You can configure the boards from a Propeller, but it's easier to do so from a PC with the utility program that you can download from the manufacturer. I used a USB to 3.3V logic serial adapter from FTDI for the PC end of things and use the setup for communication between the PC (actually a MacBook) and a Propeller powered BoeBot running BoeBot Basic from the Propeller Object Exchange.
  • hippyhippy Posts: 1,981
    edited 2008-03-18 21:53
    I'm not familiar with the Mark II XBee modules but Mark I modules were 'ready-to-go' ( probably multicast ) and can be configured using AT commands over a two-wire serial link (TX/RX/0V). Not sure what each type is properly called today as it seems to change from week to week.

    To flash the firmware requires a full DTR etc serial interface but otherwise it's two-wire, with AFAIR handshaking supported if you want that. Once configured, it's largely a case of send serial, that arrives at serial-out on the receiving XBees.

    To configure point-to-point comms it's mainly a matter of setting the channel and network group. It may be a bit more complicated for Mark II XBees.
  • DgswanerDgswaner Posts: 795
    edited 2008-03-18 22:16
    ok, thanks guys I'm already impatiently waiting for some boards from Selmaware, I didn't see the tutorial link, my bad. looking over it briefly it looks like it cover everything,

    Thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2008-03-18 23:04
    DGS, though I don't know your real name, I can't recall any recent orders for which you may be impatiently waiting.

    My XBee object you mentioned works pretty well for configuring & comms. I use it in projects all the time, and it's pretty simple.
    Please contact me off-line if you'd like:· martin@ selmaware. com· · (take out spaces)
    -Martin (SelmaWare)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards

    Southern Illinois University Carbondale, Electronic Systems Technologies

    American Technical Educator's Assoc. Conference·- April, Biloxi, MS. -- PROPELLER WORKSHOP!

    Post Edited (Martin Hebel) : 3/18/2008 11:09:28 PM GMT
  • DgswanerDgswaner Posts: 795
    edited 2008-03-18 23:11
    Martin... I haven't order them.. I'm waiting for you to get them, so I can place an order, I PMed you about them originally.

    sorry wasn't trying to imply that you hadn't sent them... I'm excited and can wait to get them!

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2008-03-18 23:46
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-03-19 01:42
    You may find the old version of PropCOMM useful.
    It's on my list of things to update, but works fine for Xbee testing.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • joeldjoeld Posts: 49
    edited 2008-03-19 02:37
    DGSwaner

    I just finished a project using xbee modules with the propeller. I bought the Appbee sip carrier board from Martin and added the jumpers to skip the 5V buffering. I purchased a couple of xbee modules and the maxstream usb xbee board. Made it really easy to trouble shoot. The maxstream usb board allows you to easily program the firmware and change settings on the xbee modules with maxstream's x-ctu software. x-ctu also has a terminal window so you can use it to send and recieve data from the xbee on your prop.

    With the xbee and full duplex serial objects on the object exchange, it's all pretty easy to get going.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2008-03-19 20:25
    DGS,
    FYI, I'll have the AppBee Proto PCB's tomorrow, so if you'd like to order, you are welcome to. I still need to take a picture for the pages, but it's listed.

    http://store.kagi.com/cgi-bin/store.cgi?storeID=J1A_LIVE&&

    You did need 100, right? [noparse]:)[/noparse]

    Thanks,
    Martin
    ·
  • DgswanerDgswaner Posts: 795
    edited 2008-03-31 19:12
    I've made some progress! I martins boards got them connected and I'm tried your API base and robot code from another thread. I've got the Xbee's talking but I haven't actually been able to display the message that is received.

    I have a question, is API mode the best option? this is for web control via a pink. I need bi-directional communication sending input from the user and receiving sensor data from the bot. As I understand it API mode sends "a packet" for lack of a better term. a pre-sized amount of data containing data from the x-bee modules as well as user data. this is kinda what I was going to set up for communication with the parallax RF adapters. so I think that it's a good match, but on the receiving side I need to receive the whole packet and then extrapolate out the message part of it. is this correct?

    from what I read on the forum, I though I could just send data by just using one of the serial objects. and not have to set an ID, or CH (channel?). this might be a preferable option, but do I loose buffering and flow control if I go that route?

    any help would be appreciated! The X-bee manual isn't for the casual hobbiest!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2008-04-01 01:50
    The XBee will buffer if you send it data (it has a timeout, so if it arrives fast enough, it doesn't matter). All data sent is packetized and error checked, using API or AT mode. API allows you to create the packet yourself on sending, or to pull out extra info (who sent that?) on reception of data. But it is troublesome at times. If you don't need anything fancy, simply use AT mode to send/receive. It will be totally transparent and simply act like you have two wires between the units.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards

    Southern Illinois University Carbondale, Electronic Systems Technologies

    American Technical Educator's Assoc. Conference·- April, Biloxi, MS. -- PROPELLER WORKSHOP!
  • joeldjoeld Posts: 49
    edited 2008-04-01 04:07
    Dgswaner

    Sounds like we're working on a very similar project. I'm trying to use a prop and xbee to read some weather sensors then send them inside to a prop and the Pink module to read over the internet. I just spent the weekend trying to get my DSL modem and router set up to let me port forward some ports. I have a little weekend cabin and am trying to monitor/control some environmental stuff over the internet.

    My final dream is to have some type of remote control robot I could run around outside via xbee.

    Have you had any luck setting up the Pink to talk with the prop yet?
  • DgswanerDgswaner Posts: 795
    edited 2008-04-01 05:34
    joeld, I've used the PINK object briefly, I was able to read variables from the pink, the biggest challenge for WAS the Xbee adapters. now that I have them working all I need to do is write 2 little bits of spin and I'm web enabled!
    It does sound like we are working toward the same goal. my ultimate goal is an autonomous bot with mapping capabilities, but I wanted to be able to remotely monitor sensors, and processes first. so making it web enabled took care of that while adding a fun ability.

    Martain, to tell my experience briefly, I got your boards didn't have any of the Xbee dev boards. I built your break out boards, wired them up and was able to get them to work propeller to propeller, in about 1 hour (not counting my learning curve).
    With your break out boards and your help, figuring out the serial object was harder than getting the Xbee's to work. I'm up and running, I should be web enabled by weeks end! Thanks again for all your help.


    added the code:

    XB_out: sends hello world
    XB_in: receives data and sends what it receives to a computer via the propeller programing port.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner

    Post Edited (Dgswaner) : 4/1/2008 5:46:44 AM GMT
  • joeldjoeld Posts: 49
    edited 2008-04-04 03:21
    Sounds interesting. I may have to ask you a question or two when I dig into the PINK module. I bought some weather sensors and a module that outputs a serial string kind of similar to an NMEA string out of a GPS. I wouldn't think it would be too hard to read the string into the prop, parse it and write the values to the PINK to be read over the web.

    What type of sensors are you working with and plan to put on the bot?
  • DgswanerDgswaner Posts: 795
    edited 2008-04-04 17:54
    what your planning on doing sounds very doable. All of my projects have been indoor and so I haven't messed with a GPS.

    for my bot, I'm using a PING, some Sharp Ir sensors, the compass from parallax, and I will be adding wheel encoders. I also have 2 channel sound output, 10 LED Headlights, and LCD display to show status and sensor readings, a USB camera with pan and tile servos, and a servo for the Ping. I also want to add Ir remote control functionality. and even further down the road I want to add an Emic text to speech module. But at that point I think I'll be adding another prop to handle the required I/O pins.

    I don't have the Ir sensors connected to the bot yet, but I'm going through the Basic Analog and Digital booklet so i can get it figured out. lack of sensors if my bots biggest down fall. the codes works for navigating but the one PING I have doesn't always "see" everything.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • pgbpsupgbpsu Posts: 460
    edited 2009-01-08 20:00
    Dgswaner-

    It seems like you got your project working. In the end did you uses the XBee AT interface in Martin's object?

    I'm working on a wireless project using XBee that (I believe) requires the API mode. I've looked over your posted code for examples of using Martin's object for its API features, but it looks like you are using it in AT mode. Is that correct?

    Martin-

    Do you have any example programs, showing how one uses the API stuff you built? My XBee manual has several API Frames defined in it which aren't in your object. Presumably I could add any additional frames I need to the object you have on the OBEX based on your example. That seems pretty straight forward. What I seem to be missing is how one utilizes the object in an "upper-level" program. Any examples you could share would be great. I feel a bit like Dgswaner must have when he started this: "perhaps this is too simple for a tutorial", nonetheless I'm a little lost.

    Thanks,
    pgb
  • DgswanerDgswaner Posts: 795
    edited 2009-01-09 08:44
    pgbpsu, I got my project working about 90% I was having timing issues and getting bidirectional communication between everything. but I did get things work to a satisfactory level. I used the AT interface, I don't have the Xbee programing module. I'm not sure what your doing exactly but you shouldn't need to use the API Mode, once you get it figured out, it's actually quite simple to use the AT mode. Dealing with the data on the propeller is harder than getting the Xbee Modules working. let me know if you would like specifics.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DGSwaner

    "When in doubt, use C4" - Jamie Hyneman, Myth Buster
  • pgbpsupgbpsu Posts: 460
    edited 2009-01-09 16:02
    Dgswaner-

    I tried the AT mode and I got some basic tests done. However, I need the mesh and point-to-multipoint capabilities which I think are only available with the API mode. I have the programming module so changing the firmware isn't a problem.

    Maybe Martin has an example or two he can share.

    Thanks,
    pgb
Sign In or Register to comment.