XBEE RF Contolled UAV
plau45
Posts: 109
I can't find any tutorial that features the XBee 900HP Module (XBP9B-DMST-002). This agrivates me because I cannot figure out how the two xbees communicate with each other. None of the tutorials I have read will work with the xbees I bought and I will not spend another 70 dollars on two more xbees. Please someone help me. I don't want $76 to go to waste. I am using an activity board and communicating commands to it through a qucik start board with joysticks and buttons. HELP! Any tutorial or PDF that would help me would be amazing. Once my scimatics for the multirotor UAV are done I will send them to this forum. I plan on making a controller that uses a 9 volt power supply along with the plane using the same thing. Thanks
Comments
Most XBees will work in transparent mode where they transmit to each other as if they were connected with a wire. I'm not sure if the XBees you're using need to be setup with X-CTU software before they'll communicate with each other or not. You might need to set the destination serial number of the XBees to match the serial number of the unit you want it to communicate with (as mentioned on page 33 of the manual).
You could also set the destination serial number to 0x000000000000FFFF which is the broadcast destination.
I haven't used those particular XBees but I've used the 900MHz XSC version and I think they should work the same way (at least for basic communication).
There are a lot of ways to connect and set things wrong and if you already had a wired communication between two microcontrollers, you'd at least know the serial communication part of the problem had been solved and you could work on replacing the wired link with the radios.
I just tested this one with the XBee HP900 modules with this tutorial. They are compatible and work fine with it:
http://learn.parallax.com/propeller-c-simple-protocols/full-duplex-serial
P.S.
IMPORTANT: The tutorial assumes that the XBees still have their factory default settings. If they have been configured some other way with X-CTU software as discussed in other posts on this thread, then it might not work as advertized.
Here are a couple examples (attached) that use the library to implement a tilt controlled ActivityBot. They are written for the XBee S1 and for your S3B.
Wiring info and other instructions are in the comments at the top of each example program.
http://www.parallax.com/product/32450
When you unzip the folder, there should be a couple of .side project files, .c code files, and a library folder named libxbeedev05. After installing SimpleIDE http://learn.parallax.com/propeller-c-set-simpleide, you can use it to open one of the project files, edit, compile, and/or load the code into a propeller and run it. There are some primers for editing/compiling/loading & running here http://learn.parallax.com/propeller-c-start-simple and here http://learn.parallax.com/propeller-c-simple-circuits, and lots more to choose from here http://learn.parallax.com/propeller-c-tutorials.
Just make sure to open the project .side file from a folder you unzipped to, not from within the zip itself. Also, make sure to either keep the libxbeedev05 folder in the same folder or in a sub-folder with your .side and .c files. Alternately, you can place libxbeedev05 inside ...Documents/SimpleIDE/Learn/Simple Libraries/. After putting it there, you can put your .side and .c file (together, both of them) in pretty much any folder on the drive, and it'll still be able to find the library for xbee_open and xbee_cmd. The xbee_open call causes the library to set up a full duplex serial connection and returns you a pointer that you can use with anything in the simpletext libary, like writeChar and dprint.
The libxbeedev05 library is still pretty early in its development, but I use it a lot because xbee_cmd saves a lot of coding work when configuring XBee modules. I prefer to always have my code configure them on startup because configuring them with X-CTU can create mysteries for other folks trying a variety of different applications. If the XBees always have their factory defaults, the code can normally do any special configurations that X-CTU can do. The only exception is firmware upgrades.
P.S. Before diving into the libxbeedev05 library to examine the header and code, try the library primer first, its here: http://learn.parallax.com/propeller-c-library-studies
Don't let that be a deterrent to getting this project underway. If it doesn't work out for some reason I'll happily refund the purchase - not a problem whatsoever. Though we can't resell this kind of returned product one of our tech guys (or myself) would be very happy to have a pair of the long-distance XBees on our desk
Oh, one more thing. We have successfully flown an ELEV-8 over XBee last year. We used the Quantam Robotics robotic controller with an XBee Tx/Rx (50 mW, 802.15.11 I think) and sent pulses to another XBee on the ELEV-8 which fed them right into the OPEN board. Worked well enough to fly without experiencing any discernible latency.
Ken Gracey