Hello and welcome to our community! Is this your first visit?
Register
Page 1 of 16 12311 ... LastLast
Results 1 to 10 of 159
  1. #1
    Administrator AeroQuad Founder Mikro's Avatar
    Join Date
    Jun 2009
    Posts
    3,238
    Downloads
    4
    Uploads
    7
    Reputation Points (Add)
    9

    Wireless Communication

    Note: The information below is outdated and only kept for historical reasons. The latest and greatest information can be now found in our wiki!



    Would you like to setup a wireless communication link to your AeroQuad? One big advantage of doing this is that tuning your quad is MUCH easier! You can start flying your quad, observe it's flight characteristics, land it, update new tuning parameters, then fly again. Also, if you are doing high altitude flying, features like the artificial horizon will allow you to see what your quad is doing at those heights.

    Please keep in mind that if you need to upload a new sketch to the quad, you will still have to connect a USB cable to upload it to the Arduino.


    Hardware needed:
    How To Connect It Up
    It's very easy, there is no soldering involved and it is plug and play. First we need to configure each XBee modem with your computer. Download and install the X-CTU program from the XBee manufacturer's website at: http://www.digi.com/support/kbase/kb...etl.jsp?kb=125

    • Plug in one of your XBee modems into the XBee Explorer.
    • Connect the XBee Explorer to your computer with a USB MiniB cable.
    • Run the X-CTU application.
    • You should see "USB Serial Port (COMx)" under the Select Com Port field selected. If this is the first time you are configuring a modem, the default Baud rate will most likely be 9600. Leave the baud rate at the default and press the Test/Query button.
    • If communication is OK between the computer and the modem a dialog box will appear stating this. Hit OK.
    • Select the Modem Configuration tab.
    • Under the Modem Parameters and Firmware section, hit the Read button. The application will read the parameters from your modem and will update the screen with all the information found.
    • Find and click on "ID - PAN ID". Change this number to anything you want. This is the ID used between the two modems. You'll want to change this from the default in case someone else is using the default ID in your vicinity. Remember this ID because you will configure your other modem with the same ID.
    • Find and click on "BD - Interface Data Rate". From the pull down menu, select "7 - 115200".
    • You're done! Now select Write under the Modem Parameters and Firmware section. This will write these two critical settings to your modem.
    • Unplug the XBee Explorer from your computer. Remove the XBee modem from the Explorer and plug that into the XBee Shield.
    • Plug the next XBee modem into the XBee Explorer, then plug the Explorer back into the computer.
    • Follow the same procedure above to set the PAN ID and Baud rate of the other XBee Modem.
    [br]You should be ready to go! Plug the XBee Shield into your AeroQuad Shield (or equivalent). There will be a row of headers on the XBee Shield that will fit into the same female header the contains the Arduino TX and RX pins. If you are an AeroQuad Shield owner, be sure to install the ICSP header to provide the +5V needed by the XBee Shield.

    Once the XBee shield is connected to your AeroQuad, there are two switches that need to be configured. If you need to program the Arduino with the USB cable, move both switches to the direction of the rear of the AeroQuad. If you want to talk wirelessly over the XBee modems, then both the switches need to be moved in the direction of the front of the AeroQuad.

    That's it! Although there seems to be a lot of text instructions to follow, it actually is very easy to physically setup. Please comment if any of the above steps are unclear and I'll get it fixed!

    Troubleshooting:
    Are you getting jumbled data using Arduino 017? Here's a fix from Pyjamasam...

    Go to ..\hardware\arduino\cores\arduino\HardwareSerial.c pp and insert:
    Code:
    use_u2x = false;
    Just before:
    Code:
     if (use_u2x) {
      *_ucsra = 1 << _u2x;
      baud_setting = (F_CPU / 4 / baud - 1) / 2;
     } else {
      *_ucsra = 0;
      baud_setting = (F_CPU / 8 / baud - 1) / 2;
     }
    The HardwareSerial.cpp file for Arduino 0018 is attached at the end of this post for your convenience. Make a backup copy of the existing file and copy this into ..\hardware\arduino\cores\arduino
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	ConnectToXBee.png 
Views:	3714 
Size:	160.0 KB 
ID:	142   Click image for larger version. 

Name:	ChoosePanID.png 
Views:	3690 
Size:	267.8 KB 
ID:	143   Click image for larger version. 

Name:	ConfigureBaudRate.png 
Views:	3642 
Size:	290.4 KB 
ID:	144   Click image for larger version. 

Name:	ReadWriteParametersToXBee.png 
Views:	3665 
Size:	284.9 KB 
ID:	145  
    Attached Files Attached Files
    Last edited by Airwolf; 07-10-2013 at 08:25 AM. Reason: added link to wiki article

  2. #2
    Senior Pilot
    Join Date
    Nov 2009
    Location
    Hoofddorp, Netherlands
    Posts
    316
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0

    Re: Wireless Communication

    @Mikro, Are you using the XBee shield next to a AR7000? Have you noticed and issues with reduced control distance? That has been an issue preventing video downlinks with the 2.4GHz systems in those areas where only 2.4 (and 5.8) GHz are legal. I could imagine that the tranceiver setup of XBee could in theory also "overshout" the DX7 and thus reduce control distance. That's so far stopped me from seriously looking. But if it works reliably for you, that is certainly going to shoot up on my wishlist ;=))

    Of course DraganFlyer resolved the whole issue with their beautiful little X6 transmitter (and the recever build into the X6 flyer) but switching to Xbee completely if I understood it correctly. That allows more controls and allows feedback onto the nice colour LCD on the TX. Interestingly I haven't seen many people in the multikopter community rush around to put together something similar. It would probably be very helpful to have both more channels, and a downlink with flight data (altitude, orientation, battery voltage, location and speed and vector relative to take-off point, and number of times a PPM frame is missed and failsafe has kicked in as signal you are at getting into a dangerous area, etc).

  3. #3
    Administrator AeroQuad Founder Mikro's Avatar
    Join Date
    Jun 2009
    Posts
    3,238
    Downloads
    4
    Uploads
    7
    Reputation Points (Add)
    9

    Re: Wireless Communication

    Quote Originally Posted by Arthur P.
    Are you using the XBee shield next to a AR7000? Have you noticed and issues with reduced control distance?
    No, I haven&#39;t noticed reduced transmitter distance while using an XBee modem/shield with my Spektrum receiver. Here&#39;s a video of such a system flying taken in the spring of this year when the AeroQuad used to be called the MikroQuad.

    MikroQuad On Screen Display Flight

    Please note in the source video, the artificial horizon lines were solid... I got tired playing with Adobe Premiere trying to find the right video encoder to make it look right.

    BUT one thing I did notice is that if you use a 2.4GHz wireless camera, the camera will have a greatly reduced operating range when using it with a 2.4GHz Spektrum receiver. In both videos here, I am using a 500mW 900MHz video system. In the top video, you&#39;ll see that it had some interference, but I believe it&#39;s because I&#39;m using it between houses and didn&#39;t have a direct line of sight at times. When I flew in an open field the results were better. Here&#39;s a video of it flying on my Mikrokopter (this one didn&#39;t have XBee, but just the Spektrum receiver).

    Mikrokopter - High Altitude Flight

    Quote Originally Posted by Arthur P.
    That has been an issue preventing video downlinks with the 2.4GHz systems in those areas where only 2.4 (and 5.8) GHz are legal. I could imagine that the tranceiver setup of XBee could in theory also "overshout" the DX7 and thus reduce control distance. That&#39;s so far stopped me from seriously looking. But if it works reliably for you, that is certainly going to shoot up on my wishlist ;=))
    I bought my video gear from this company:
    http://www.futurehobbies.com/index.p...mart&Itemid=53

    Yikes, looks like they don&#39;t sell a 900MHz 500mW system but now a 1000mW one. The price has seemed to increase along with it. I always thought the price was a bit steep, so if I was to buy another video system I&#39;ll be looking here:
    http://www.rangevideo.com/index.php?...a2c972ae72f44e

    I also purchased an 8dBi Patch receiver antenna. That REALLY cleared up the picture at high altitudes. This is my current motivation for integrating GPS now, I want to see in real time how high my quad can get!

    So does this mean that 900MHz is not allowed in your area (only 2.5 or 5GHz?) Hopefully that&#39;s not the case... but I think the 5GHz should work (but probably will be more expensive).

    Quote Originally Posted by Arthur P.
    Of course DraganFlyer resolved the whole issue with their beautiful little X6 transmitter (and the recever build into the X6 flyer) but switching to Xbee completely if I understood it correctly. That allows more controls and allows feedback onto the nice colour LCD on the TX.
    Hmmm... that&#39;s a very interesting product idea. With both the links you and Pyjamasam have posted, I can see a path to build a custom transmitter tailored for quads. In the past I had seen that Sparkfun sells the joysticks that are similar to the ones used in the PS3 game controllers. Wouldn&#39;t a neat touch screen be great for "soft" switches? I even see there are touch screens geared for Arduinos out there.

  4. #4
    Senior Pilot
    Join Date
    Nov 2009
    Location
    Hoofddorp, Netherlands
    Posts
    316
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0

    Re: Wireless Communication

    Quote Originally Posted by Mikro
    ...

    BUT one thing I did notice is that if you use a 2.4GHz wireless camera, the camera will have a greatly reduced operating range when using it with a 2.4GHz Spektrum receiver. In both videos here, I am using a 500mW 900MHz video system. In the top video, you'll see that it had some interference, but I believe it's because I'm using it between houses and didn't have a direct line of sight at times. When I flew in an open field the results were better. Here's a video of it flying on my Mikrokopter (this one didn't have XBee, but just the Spektrum receiver).

    ....
    So does this mean that 900MHz is not allowed in your area (only 2.5 or 5GHz?) Hopefully that's not the case... but I think the 5GHz should work (but probably will be more expensive).
    In the EU we are indeed very restricted to 35MHz for RC airplanes, sometheing in the 400MHz band for free use, something in the 800 MHz band for free use, 2.4GHz and 5.8GHz. For a while there were 1.1MHz downlinks, but they are illegal as this is a aircraft emergency frequency.

    Using a video downlink AND a 2.4GHz is a well documented reason for interference and very much reduced range with control failures occurring within 10s of meters in some cases. So be very careful with that combination. The higher power of the video transmitters overshouts the TX signal. Like someone whispering next to you while you're at a classical concert.

    Have you seen the latest video from OMM in the Multirotor forum over in rcgroups, where he is flying FPV from his study, the multikopter flying at quite high altitude and approximately 1 mile from his house (I believe it is in his thread on collecting MK parameter sets) ? Very impressive but not something I-m going to be doing anytime soon. We have too many 1:1 helis and smaller aircraft flying at just over 100m (and sometimes even lower) in my area and FPV view is too restricted to share airspace safely. Real view makes use also of sound and vibration input and allows quicker 360 degree scanning. But I-ll certainly at some point move to FPV capability for reasons of better framing, more targeted video, and better ability to fly close to obstacles if needed (e.g. I-ve seen nice videos of flying between trees where I wouldn't go that quickly flying on direct sight).

  5. #5
    Senior Pilot
    Join Date
    Nov 2009
    Posts
    104
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0

    Re: Wireless Communication

    Thanks for the tutorial, Mikro!

    I currently have 2 1mw chip antenna XBee modules (i know, low range) and 2 adafruit xbee adapters.

    My question is, shouldn't these work as well, albeit with a shorter range?

    I don't have an XBee shield, and I used standard pin headers rather than the pass-thru headers on the Aeroquad shield (something i slightly regret, but didn't have them at the time!) so I just added a tiny breadboard and hooked up +5v, GND, TX, and RX to the XBee. For some reason, the subsequent wireless connection to the Aeroquad configurator is very unstable, and the values are jumbled. I know that the XBee modules are configured for 115200 baud and have the same PAN ID (as I use them for other things) but for some reason the connection is shaky at best (totally unusable for real-world tests).

    Any ideas?

    Thanks,

    Jamie

  6. #6
    Senior Pilot Feliksayk's Avatar
    Join Date
    Jun 2009
    Location
    Queens, NY
    Posts
    732
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0

    Re: Wireless Communication

    Hey Mikro, thanks for the tutorial. I guess more questions will come when I get my hands on the parts from the list.

  7. #7
    New Recruit
    Join Date
    Oct 2009
    Posts
    14
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0

    Re: Wireless Communication

    Pumba also says "thank you"!

  8. #8
    Administrator AeroQuad Founder Mikro's Avatar
    Join Date
    Jun 2009
    Posts
    3,238
    Downloads
    4
    Uploads
    7
    Reputation Points (Add)
    9

    Re: Wireless Communication

    Quote Originally Posted by asifjahmed
    I currently have 2 1mw chip antenna XBee modules (i know, low range) and 2 adafruit xbee adapters.
    I don't have an XBee shield, and I used standard pin headers rather than the pass-thru headers on the Aeroquad shield (something i slightly regret, but didn't have them at the time!) so I just added a tiny breadboard and hooked up +5v, GND, TX, and RX to the XBee. For some reason, the subsequent wireless connection to the Aeroquad configurator is very unstable, and the values are jumbled.Any ideas?
    I seem to remember that there are actually two types, the XBee and XBee Pro. I think the Pro's are good for streamed data, while the other is good for network like communication (don't quote me on that... I had thought I read that's what the difference was). So maybe you have the version that isn't optimal for data streaming? ???

    A quick test to run is to just use the Arduino IDE's Serial Monitor. Change the AeroQuad code up to use something slower than 115200 for the baud rate, then use the same baud rate (like 9600) in the Arduino Serial Monitor. It would be interesting to see if we can discern anything after that test.

  9. #9
    Senior Pilot
    Join Date
    Aug 2009
    Posts
    262
    Blog Entries
    6
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0

    Re: Wireless Communication

    Quote Originally Posted by Mikro
    I seem to remember that there are actually two types, the XBee and XBee Pro. I think the Pro&#39;s are good for streamed data, while the other is good for network like communication (don&#39;t quote me on that... I had thought I read that&#39;s what the difference was). So maybe you have the version that isn&#39;t optimal for data streaming? ???
    The Pro&#39;s are available at a higher power then the non pros. Thats the only real difference (unless you start to get into the mesh network or other feature sets of some of the line).

    Almost any of the adapters in this list:
    http://www.sparkfun.com/commerce/categories.php?c=111
    will work for our purposes.

    I have a pair of the 1mW models (http://www.sparkfun.com/commerce/pro...oducts_id=8665) and their range is quite limited.

    I upgraded to a pair of the 60mW pro models (http://www.sparkfun.com/commerce/pro...oducts_id=8710) and even without an antenna on the quad side one I have much longer range then the 1mW (which I would expect).

    But otherwise they run exactly the same. I even added all 4 to the same PAN and have enabled encryption on them using the same key and they can all talk to eachother.

    @asifjahmed Are you using a Arduino Mega? (Though it might impact the "normal" arduino as well). I use a adafruit xbee adapter on my quad (I have a USB Explorer from Sparkfun on the ground station side), and I found that in Arduino 017 there were problems with some of the serial code and it was picking a slightly off baud rate and I was getting garbled output even when I had the correct baud rate picked on the serial monitor.

    I ended up tweaking a few lines of code in the main arduino libraries and it fixed things right up (basically reverted back to the 016 HardwareSerial code).

    The thing that tipped me off was that the output looked like I had the wrong baud rate picked. I was seeing bits of the correct data, but then a bunch of jumbled up junk.

    After the tweak everything works just right.

    My suspicion is that its something to do with the combination of the adafruit xbee adapter and the new serial code.

    chris.

  10. #10
    Senior Pilot
    Join Date
    Nov 2009
    Posts
    104
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0

    Re: Wireless Communication

    Hi Chris -

    It's funny you mention that - I think that may be what is happening.

    I have 2x 1mW modules set up for 115.2 baud and am using adafruit adapters on both ends (with an ftdi cable on the PC side).

    When I try to connect to the quad wirelessly using the configurator, sometimes it will connect, but all of the readings are garbled (very very noisy). However most of the time I simply cannot even connect.

    Could you elaborate on what changes you made to the serial library? If I could get this working with my 1mW modules then i could potentially do some debugging over the holiday weekend!!

    Thanks!

    -Jamie


 
Page 1 of 16 12311 ... LastLast

Similar Threads

  1. Using xbee wireless to send pre programmed commands?
    By Tomo8281 in forum AeroQuad Flight Software
    Replies: 7
    Last Post: 03-21-2010, 08:41 AM
  2. MikroQuadAero ~ IMU/Wireless
    By Tomo8281 in forum AeroQuad Flight Software
    Replies: 7
    Last Post: 02-17-2010, 06:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •