Carambola powered quadcoper

2012-05-06 19:35 | Categories: AP, Projektai, R/C, Užrašai, Video

This post is about using Carambola with Arducotper to get live telemetry data from quadcopter.

Carambola is low cost, open-source WiFi (21.5 dB / 2.4GHz) embeddable platform from 8devices. I have decided to use this board to control arducopter from computer. In order to have reliable link I have used two Carambolas. One as AP (on the quadcopter) other as Client (ground station). Mission planner connects to arducopter via bridge created by these boards.

 

 

 

Preflight photos

 

All components connected

 

Carambola inside of quadcopter

 

Fully assembled and ready to fly SUAV quadracopter

 

Current connection - Arducopter <-> Carambola <-> Carambola <-> PC

 

Using this link you can control your SUV (Small Unmanned Vehicle) via joystick from computer and get video from USB webcam. More details are provided at 8devices wiki.

Possible way to get rid of R/C RX-TX

 

Finally – field tests!

 

Added external antenna to Carambola bundle package

 

Ready to fly!

 

In a following video I have combined Arducopter Ground Station flight data, video from the ground and video from the air (FPV). Also there are two audio tracks – one from ground station camera, other from quadcopter. View this video in HD!

 

Configuring telemetry

More details on how to deal with Carambola can be found at 8devices website. I will provide only config files and  commands to run below. If you have any questions, please ask. I will try to help.

Ground station (STA mode)

Edit network settings

Prepare radio configuration

Remove wireless config and create fresh one.

Edit wireless settings

In general ad-hoc might work, but in this case I will use AP-STA mode. Don’tt forget to change MAC address if you are configuring Carambola’s copy-paste way.

Edit DHCP settings

Edit opkg settings to fix weird package source issue

If you are not using latest sources to build firmware, or using old firmware (but fresh config files… strange) you might wish to use openwrt package repository instead of 8devices. In normal conditions you don’t need to do this.

Install relayd

I should test if it works without relayd.

Remove firewall

I spent half a day figuring out how to fix link issues. After wise guy advised removing firewall (which in our case is useless) link started to work as expected.

Quadcopter (AP mode)

Edit network settings

Enable ttyS0

Make pins used for other serial port dedicated for UART not GPIO.

Disable console on ttyS0

Edit opkg settings to fix weird package source issue

Install ser2net

This program is acting as bridge between serial port and ethernet. It is not perfect, but does great job. In order to build more reliable link you should use UDP bridge.

Put everything in autorun

At first set pins as serial port, then start ser2net bridge.

Prepare radio configuration

Edit wireless settings

Edit network settings

Edit DHCP settings

Remove firewall

Edit ser2net settings

These settings can be tuned, but I have just added last line to route data from ttyS0 57600 bps to LAN:2002 port.

Testing

If you have set-up everything correctly (APM2 ↔ Carambola1 ↔ WiFi ↔ Carambola2 ↔ LAN ↔ PC ) you should be able to ping from PC to Carambola on quadcopter.

If you have connection, you can connect ardupilot board with Mission Planner.

Select "TCP" connection and click "Connect". Enter 192.168.6.6 when prompted to enter IP address.

Remote port is 2002 as configured in ser2net.conf

Connected!

You can see more details about building this quadcopter in previous posts. Sorry other posts are in Lithuanian language, but you can read translated version.

  1. tufan
    2012-05-07 05:42
    Reply | Quote | #1

    why did u use the second Carambola device as ground station? I guess ur laptop’s internal Wi-Fi would act as the same, right?
    best regards,

    tufan

  2. Saulius Lukšė
    2012-05-07 05:44
    Reply | Quote | #2

    Tufan, Sure you can use internal laptops WiFi, but Carambola has more powerful radio and you can connect external antenna, which means greater distance.

  3. Rana
    2012-05-07 18:38
    Reply | Quote | #3

    Alternative:
    Approach – 1:
    If you open up your Laptop, you will find a Wi-Fi module, which has hot UFL antenna port.
    With a UFL to SMA, you can connect this port to an external Wi-Fi amplifier may be 1Watt available in 50US$ at DIY Drones store, and achieve much much longer range.

    Approach-2:
    Put a regular Wi-Fi router nearby, this Wi-Fi router generally have SMA antenna port, and you can hook 1Watt Wi-Fi amplifier as said above and get the same thing but in this case, you can get rid of opening your Laptop.

    I my self opted for Approach 1

  4. Saulius Lukšė
    2012-05-07 20:27
    Reply | Quote | #4

    Rana, what distance can you cover with 1W amplifier? Does it work in MIMO mode?

  5. 2012-05-08 01:29
    Reply | Quote | #5

    great job…
    I agree with tufan, i think for greater distance you can use external wifi device such as ubiquity bullet radio, it support mimo (mimo capable) and power to 1 watt.

  6. axodus
    2012-05-08 01:53
    Reply | Quote | #6

    impressive project you got here :)
    can you give me some tips or details about how you build the telemetry GUI.
    i tried to implement a similar software but couldn’t find the right controls for the telemetry data (niddel gauge, signal graph, video display etc..).
    thanks, axodus.

  7. Saulius Lukšė
    2012-05-08 07:33
    Reply | Quote | #7

    @axodus GUI was written by Ardupilot team. I have implemented telemetry over LAN/WiFi and tested in the field.

  8. Saulius Lukšė
    2012-05-08 07:41
    Reply | Quote | #8

    @moshack If to talk about long range… go for ligowave products. Check this blog http://blog.ligowave.com/. It can easily reach 10 km with stock antenna.

  9. 2012-05-08 18:49
    Reply | Quote | #9

    Excellent! Thank you for posting this! I have been looking for people playing with the Carambola. I would like to grab a couple for projects of my own. Looks like its probably time!

  10. emre
    2012-05-08 22:05

    May I suggest using semi-stationary blimps as repeaters for long-distance applications?

  11. Saulius Lukšė
    2012-05-09 09:09

    @emre good idea :)

  12. Saulius Lukšė
    2012-05-09 09:13

    @dext0rb please let me know if you make something interesting!

  13. 2012-05-09 11:15

    Excellent job!
    You’re project is amazing and give real ideas!
    (Are you by any way affiliate to the LT compagny 8devices? :)
    Anyway keep up the nice work!

    i sveikata!

  14. Saulius Lukšė
    2012-05-09 11:21

    @Anthony , thanks :) Yes, I am in some way connected to 8devices :)

  15. Cody
    2012-05-27 15:12

    Very cool project!
    Did you modify the the ArduCopter firmware to use the Ethernet library instead of FastSerial, or did you connect the APM2 UART directly to the Carambola?

    I ask because I am working on something similar: video, telemetry, and control all over wifi. My approach is to connect an SPI to Ethernet converter to the APM2 and modify the autopilot’s firmware to send and receive telemetry/control using the Ethernet library.

    • Saulius Lukšė
      2012-05-27 15:15

      I have connected APM2 directly to Carambola.

  16. Cody
    2012-05-28 00:47

    Thanks! Your way is far more graceful than what I was attempting.

    You mentioned something about a UDP bridge:

    “Install ser2net
    This program is acting as bridge between serial port and ethernet. It is not perfect, but does great job. In order to build more reliable link you should use UDP bridge.”

    Could you provide any information about this? I like the idea of using UDP for this instead of TCP.

  17. Saulius Lukšė
    2012-05-28 06:12

    Cody, I was planing on rewriting (to be exact, writing my own) lan to serial gateway which would work on UDP layer. Basically it is pretty simple, just might take some time to make it work reliably. If you wish to code this gateway by yourself, there are many examples on internet how to deal with UDP packets and serial ports.

  18. Miguel
    2012-07-25 00:15

    Hi Saulius,

    Very good job.
    I have a question about the connection of Ardupilot and Carambola at the quadricopter.
    Did you connect they directly or did you used the development board?

    • Saulius Lukšė
      2012-07-25 06:03

      Thank you! I have used stripped development board.

  19. Jakob Kramhøft
    2012-08-08 15:01

    Hi Saulius Lukšė
    Thanks for this blog!
    Could you please give a little more details about how you connected the Carambola to the ArduPilot Mega?

    • Saulius Lukšė
      2012-08-08 15:27

      Connect serial cable (RX/TX/GND) directly to any telemetry port and set baudrate in APM to 115200. I do not have pinout at this moment.

  20. brijesh taparia
    2012-09-26 04:18

    wonderful details on wifi.
    can a quadricopter be built for carrying 10-20 kg payload?
    I want to build one for spraying pesticide on my crops.

  21. Saulius Lukšė
    2012-09-26 06:29

    Certainly it can! Just from my point of view you need plane instead of vertical landing air vehicle.

  22. Jamie
    2013-10-20 03:56

    Hi! I tried to follow your instructions and now I can’t get it connected with my pc. Do you have any suggestions in order to get them to communicate again so I can flash the stock firmware again? Thanks in advance ;)

    • Saulius Lukšė
      2013-10-20 06:54

      Hi, please let me know at which step it went wrong?

  23. Jamie
    2013-10-20 20:25

    Well, right now I’m just trying to connect it directly to my computer through Ethernet cable so I can flash a new image with sysupdate. I’ve tried the basic configurations that I found on Carambola Wiki, but so far no luck :(. Any ideas?

    • Saulius Lukšė
      2013-10-20 20:26

      Do you have access via serial port? Do you use Carambola1 or 2?

  24. Jamie
    2013-10-20 20:40

    I have access via serial port and that’s the only way I can access it right now. I’m using Carambola 1.

  25. Saulius Lukšė
    2013-10-20 20:44

    1. Show me “ifconfig” output
    2. Show me “cat /etc/config/network” content

  26. Jamie
    2013-10-20 20:55

    http://pastebin.com/YQZsKjZm

    and thank you so much for taking the time.

  27. Saulius Lukšė
    2013-10-20 21:07

    One more question did you tried plugging RJ45 cable to another socket?

  28. Jamie
    2013-10-20 21:13

    Both Carambola sockets yeah. On my PC I only have one though. I tried connecting Carambola to my router so I could be in the same LAN as my PC, but ifconfig shows the same.

  29. Saulius Lukšė
    2013-10-20 21:22

    Do you have DHCP enabled? If not, try setting static IP address.

  30. Jamie
    2013-10-20 21:50

    Yes, DHCP is enabled. I tried to set a static IP just in case.

    http://pastebin.com/qZ5pjmCH

    I believe I’m doing it right. Default gateway’s IP was 192.168.1.1.
    I couldn’t ping it no matter what.

  31. Saulius Lukšė
    2013-10-21 07:01

    Kind of strange. Maybe LAN cable is broken? Also you can try setting WIFI in STA mode to connect to wireless router.

  32. Jamie
    2013-10-22 12:27

    Fixed it today. Have no idea how this didn’t work sooner. Flashing with the latest version and following your tutorial once more. Thanks for the help again ;).

  33. Saulius Lukšė
    2013-10-22 12:28

    Great news, Jamie!

  34. Smithe578
    2014-04-08 03:46

    Hello, i think that i saw you visited my site so i came to return the favor.I am trying to find things to enhance my web site!I suppose its ok to use some of your ideas!! dddgkefebe

  35. yogesh dhada
    2014-05-27 11:30

    your work is very nice.

    i have connect external antenna to Carambola2, but it can not detect externel antenna, by below command
    command: iw list |grep -i antenna

    i have this antenna and connector
    w5i-bo-07 interface opwnwrt u.f.l

    can u solve my problem

TOP