Couple Flight Controler with Arduino Board via I2C?
« on: May 10, 2016, 12:20:05 am »
Hello,

I'm new in this forum and new in building quadrocopters, but i have little experiences in programming.

I'm planing to built up a quadrocopter with a Revolution FC and a OpenLink ground controller.

My plan is to read out data from the OpenLink ground controller with an Arduino board via I2C protocol. I want to manipulate the UAVobjects in the FC with the Arduino and the OpenLink ground controller, e.g. to change the flight mode.

In the forum I could find some references that there is a principle possibility to use the FC or ground controller with the I2C protocol at the Flex Port but nothing concrete.

e.g.:
https://github.com/cdaller/Arduino-Openpilot-UAVTalk/issues/1
https://forum.librepilot.org/index.php?topic=833.0

To find the  OpenLink ground controller (flex Port) with the Arduino I used a I2C scanner algorithm, but it could not find the Board.
http://playground.arduino.cc/Main/I2cScanner

Did anybody collect some experiences about connecting a Revolution Board with an Arduino Board  at the Flex Port? Did you write any algorithm for the Arduino to connect it to a Revolution Board / OpenLink ground controller? Or better experiences to manipulate the UAVobjects in the FC via I2C?

Greetings,
Vagaboul

hwh

  • *
  • 1018
Re: Couple Flight Controler with Arduino Board via I2C?
« Reply #1 on: May 10, 2016, 12:45:03 am »
..OpenLink ground controller.... via I2C protocol.  ...
...In the forum I could find some references that there is a principle possibility to use the FC or ground controller with the I2C protocol at the Flex Port but nothing concrete.
...To find the  OpenLink ground controller (flex Port) with the Arduino I used a I2C scanner algorithm, but it could not find the Board...
I've never heard of an OpenLink but if you're talking about an OPLink the hardware could talk i2c but you'd have to write your own custom firmware for it.

Likewise for the FC, it supports i2c for an external magnetometer but if you want to do something else you'll have to write your own firmware.

Arduinos have serial ports, why would you want to use i2c to read the telemetry?  It makes no difference for speed since the limiting factor is the radio link.

Re: Couple Flight Controler with Arduino Board via I2C?
« Reply #2 on: May 11, 2016, 10:08:25 pm »
Hello hwh, thank you for the fast and apposite answer.

You are right, OPLink is what I mean, which is integrated in the Flight Controler.

You are also right that Arduino can support other ports than I2C. I2C was my first idea because the Flight Controler and the Arduino support I2C. I'm not fixed on that.
Do you (ore someone else) have experiences in reading out or manipulate the UAVobjects from the Flight Controler? The most importand thing for me is to read and to change the GPS data.

hwh

  • *
  • 1018
Re: Couple Flight Controler with Arduino Board via I2C?
« Reply #3 on: May 12, 2016, 02:04:06 am »
The minoposd is essentially an Arduino (stripped down) and is programmed using the Arduino environment.  The OSD only reads UAVTalk/objects but it is a starting point that's already ported to the Arduino.  https://bitbucket.org/f5soh/minoposd

Since this is an Open Source project all of our code that reads and writes the objects is in our public repository at https://bitbucket.org/librepilot/librepilot/src

I'm not sure what you're intending to do.  By the time the GPS data is converted to UAV objects and sent out as telemetry the FC has already acted on it or is in the process of acting on it.  Changing it wouldn't really do anything useful.  If you wanted to change it and affect flight you'd have to put the Arduino between the GPS and the FC.

Re: Couple Flight Controler with Arduino Board via I2C?
« Reply #4 on: May 14, 2016, 08:57:17 pm »
Good idea with the minoposd.

My intention is to create an advanced "follow me" modus. I want to give the quadrocopter a position to fly with a handhold controller and the camera gimbal shall follow the position of the controller. The handhold controller is based on an Openpilot OPlink Mini Ground Station.

So I thought I couple the Mini Ground Station with a GPS and manipulate the target position for the quadrocopter with an Arduino Nano on Mini Ground Station.
On the quadrocopter itself I planed to use an Arduino Nano to control the camera gimbal (by calculating the angles from the different positions of the quadrocopter and the GCS).

I'm planing the electronic architecture now and want to know what's possible.

While I was researching to your lead I had the idea to use a Raspberry Pi on the GCS and control everything with this.

Pros:
- Controlling Mini Ground Station with the Raspberry Pi by USB
- Usage of the 433MHz telemetry on the FC (and on Mini Ground Station)
- Software LibrePilot GCS should work on the Raspberry Pi (Raspbian is based on Debian)
- GPS is simple to use on Rasberry Pi
- Controlling Quadrocopter and Camera Gimbal with the Rasperry Pi, maybe with Python scripts
- Usage of the normal LibrePilot flight modes

Maybe this is the way without endless researching for protocols between FC and Arduino etc.