Jump to content


Photo

DiY FrSky / MultiCopter Telemetry Interface

Project Blog

  • Please log in to reply
11 replies to this topic

#1 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,559 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 03 August 2012 - 03:24 PM

I leveraged off what was learned in the DiY FrSky GPS-Hub Project and spun-off the development of a FrSky telemetry interface specifically for MultiCopters. The goal was to use the sensor data already provided by the copter's Flight Controller. For example, my Quadcopter models' flight controllers have a barometric altitude sensor, voltage monitoring, GPS data, and more. In its simplest form, all that is needed to send this information to the FrSky telemetry Rx is a 9600 baud serial port and some custom code on the flight controller.

I fly open source MultiWiiCopters with a hacked FlySky/Open9X transmitter, so this new design's reference point is based on my experience using them. The Flight Controllers in my models use the Arduino Pro Mini CPU (a low-end $20 processor board). It has a single serial port that could communicate the FrSky telemetry data. But this port is used by the GUI programming interface and it would be inconvenient to share it with the FrSky telemetry Rx. I'm not saying it is impossible or impractical, but rather I wanted a more elegant solution. Another issue is that memory space in the flight controller is getting a bit low, so I wanted to help minimize the impact to it.

These two issues were the perfect invitation to create a co-processor that would interface the flight controller to the FrSky Rx. First on the list was to have the interface eliminate the need to use the Arduino's serial port. Next I thought it should perform as many high level functions as possible so that the main flight controller would have less to do (hence, reduced memory space requirements). But this means that the interface software would need to be customized to the flight controller. But a universal interface was more desirable so that other MultiCopter pilots could use it too. In the end, the most brilliant thing to do was to make the interface as dumb as possible. "Dumb" is the new "smart." :)

So, now that you are up to speed, let's move on and talk about what was created. Essentially, it is a i2c bridge that connects the Flight Controller to the FrSky Telemetry Rx. The FrSky Rx thinks that it has a common telemetry hub attached to it, so there are no changes to FrSky's telemetry system.

It is NOT a Arduino CPU based design. Instead, it uses a MicroChip PIC (PIC16F886).

And although it was developed for the MultiWiiCopter, any open source flight controller, that has an i2c buss, should be able to use the bridge interface. The i2c buss is a 4-wire interface: V+, Ground, Data, and Clock. Flight controllers use it to communicate to the various on-board sensors.

Today I received the new PCB boards and I quickly assembled one. It was a relief to find that everything worked as planned. For sure, it looks a bit nicer than my Frankenstein development prototype (a hacked up DiY Hub PCB). Here's a picture of the final version (shown above the smallest available FrSky telemetry Rx for size comparison):

FrSky-MWC1_600.jpg
- Thomas

#2 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,559 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 03 August 2012 - 03:45 PM

The i2c Bridge has a 100 byte circular data buffer. This allows the flight controller to efficiently send the telemetry data over its I2C buss at a 100KHz rate. The i2c Bridge interface will then pass this data at the slower 9600 baud rate to the FrSky telemetry Rx. The buffer size is very generous since if you come close to filling it you will surely overload FrSky's telemetry channel and lose information.

The Flight controller must send the data to the i2c bridge per the FrSky DataID format. The FrSky telemetry information is sent in a short data sentence that has a header, some DataID identifiers, a payload, and a terminating tail byte. It is all explained here: http://www.frsky-rc....24233818462.pdf

The i2c Bridge also has a FrSky FAS-100 amp sensor interface. The FAS-100 sensor plugs directly into the bridge and the flight controller can query the voltage and Amp data from it. This $25 FrSky accessory is an easy way to get volts and amps data from the flight pack.

In addition, a DiY FAS Amp Sensor was created just for the i2c Bridge. The DiY FAS is smaller than the FrSky FAS-100 and it supports volts and amps just like its big brother. It is possible to use the DiY FAS by itself or with the FAS-100. So you can measure two currents and two voltages with both sensors plugged into the i2c Bridge. Sorry, but the DiY FAS will NOT work with standard FrSky hubs; It is only compatible with the i2c Bridge.

Here's a photo of the DiY FAS next to the FrSky FAS-100:

FAS-100_600.jpg

Keep in mind that since the Flight Controller can now directly read the FAS-100 or DiY FAS data, not only can it send it via the telemetry, but it is also possible for it to use the data for its own onboard alerts. So even if you do not have a need for telemetry, maybe you've been dreaming of adding Amps (or Watts) monitoring and battery fuel gauging to your multicopter? The i2c Bridge makes this an easy add-on feature.
- Thomas

#3 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,559 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 03 August 2012 - 03:50 PM

The i2C Bridge plugs into the FrSky Telemetry Rx (there are several different Rx's to choose from). The four i2c wires are soldered to the Flight Controller and two Futaba style cables are plugged into the Rx (for power and telemetry data). If the FAS-100 or DiY FAS are used then they plug into the i2c bridge. Here's a road map of the cables:

FrSky-MWC2_600.jpg

BTW, it would be possible to install the i2c bridge board *inside* the FrSky 8 channel telemetry Rxs (e.g. D8RSP & D8R-II Plus). This would reduce the cable clutter. But every installation is different so the best location is up to you.
- Thomas

#4 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,559 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 03 August 2012 - 03:57 PM

As mentioned, the flight controller needs some new software so it can manage the telemetry information. So this requires that yours is an open source design. Your customized flight controller code selects which telemetry data to use and this flexibility allows for some interesting tricks. For example, I have the Flight Controller's cycle-time (CPU loop execution time) sent in the RPM register. The R/C Tx's stick positions for CH1 through CH6 are sent in the VI-V6 (cell voltage) registers and appear as mS values. The GPS satellite count is sent in the Fuel register and is scaled as 0-100% to represent GPS signal quality.

BTW, did you know that many barometric/pressure altitude sensors, that are used on flight controllers, have a precision temperature sensor in them? For example, the popular BMP085 pressure sensor has one and it allows us to easily include ambient temperature in the telemetry data without any fuss.

Of course all the usual telemetry data can be sent too, such as GPS coordinates, GPS course, GPS altitude, Baro altitude, battery voltage, and so on. The telemetry information that is sent is only limited by the Flight Controller's sensor inventory and your imagination.

Because my Tx is a hacked FlySky 9X running Open9X, all this information appears directly on the Tx's LCD. I expect that ER9X Tx firmware will work fine (but I have not tried it). I would be very surprised to hear that the stock FrSky LCD telemetry display works, so plan on using a hacked 9X. A detailed discussion about the 9X R/C transmitter modifications can be found here:
http://www.rc-cam.co...827-er9x-hacks/

There's more work to do but things are looking good so far. If there is sufficient interest in this project I can post the schematic and some example Flight Controller code.

.

Edited by Mr.RC-Cam, 01 September 2012 - 08:32 AM.

- Thomas

#5 Tizzy

Tizzy

    RC-Cam Visitor

  • Members+
  • Pip
  • 2 posts

Posted 13 September 2012 - 12:18 PM

Hey this sounds better than excellent Thomas! I'm using a Crius AIOP with Multiwii and 1 one MPNG. Would it be possible to implement your build on those? Will you be selling prebuilt kits or just sharing your wisdom to DYI'ers?
Cheers,
Rick

#6 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,559 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 13 September 2012 - 07:11 PM

No plans to sell kits or assembled boards. But if there is strong interest then I would take the time to create the documentation so others can build it. But that is a lot of work and unfortunately the interest in the i2C Bridge device has been essentially zero. So I will hold off on doing anything until there is more interest in the project. So far you are the first to ask about it, which is a start.
- Thomas

#7 Tizzy

Tizzy

    RC-Cam Visitor

  • Members+
  • Pip
  • 2 posts

Posted 14 September 2012 - 06:40 AM

Eh pity, I'd definitely be willing to shell out some cash for a preassembled unit if I knew I could get it to work with a Crius AIOP! All I can do is spread the news tho and hope it catches alight somewhere..

#8 mbanzi

mbanzi

    RC-Cam Visitor

  • Members+
  • Pip
  • 2 posts

Posted 31 October 2012 - 03:07 PM

Thomas, any chance to get the schematics for the i2C Bridge & DiY FAS? I'm really surprised there hasn't been a lot more interest in this project!

Is that an INA168 you're using for the current sensor? I built my own current sensor using the INA168 and added a voltage divider for a combined current/voltage sensor.

#9 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,559 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 31 October 2012 - 04:15 PM

any chance to get the schematics for the i2C Bridge & DiY FAS?

I don't think the schematics would be of much value. I would have to also publish the firmware and some integration instructions. These tasks would involve too much work, for no good reason, given the meager interest in the project.

I'm really surprised there hasn't been a lot more interest in this project!

It's always a pleasant surprise when I post about a project that causes some excitement. I can't make any such claims on this one since I can count on one hand the number of interested readers. But I enjoyed building it, so mission accomplished.

Is that an INA168 you're using for the current sensor? I built my own current sensor using the INA168 and added a voltage divider for a combined current/voltage sensor.

I'm using the INA139 for current (configured to accept up to 66 Amps) and a 10K/100K voltage divider for measuring the flight pack voltage (up to 36V / 8-cell). The measurements are accurate (within 1%).
- Thomas

#10 arcorsai

arcorsai

    RC-Cam Visitor

  • Members+
  • Pip
  • 1 posts

Posted 01 November 2012 - 05:35 AM

HI Thomas,

First, Thank you for all your work,

I would also love a couple of these units, I'm also a MultiWii Pro , Frsky, & modded 9x user, I'm trying to get get my head around how to integrate all of the sensors from the MultiWii Pro, Frsky an interface ( or Hub if we could integrate it with your FRsky Hub) like this would go a long way if not all the way in solving this.

I would hope ( and be very thank fulll) that you could at some time post the the schematics and code as you did with the Hub.

Art

#11 Mr.RC-Cam

Mr.RC-Cam

    RC-Cam Mentor

  • Admin
  • PipPipPipPipPip
  • 4,559 posts
  • Location:USA
  • Interests:R/C video and photography.

Posted 01 November 2012 - 02:27 PM

Thanks for joining the discussion. I will continue to keep my eye on the feedback to see if there is sufficient interest in this project to justify the extra work. I have plenty of other projects to keep me busy in the meantime. :)
- Thomas

#12 KCFlyer

KCFlyer

    RC-Cam Visitor

  • Members+
  • Pip
  • 1 posts

Posted 27 November 2012 - 03:18 PM

This is pretty cool stuff. I'm now finishing up my 2nd quad (1st one flew off and disappeared) using timecop's Naze32 (MultiWii/Baseflight) FC and the free telemetry FrSky adapter that came with it.

http://abusemark.com...e3ec2af897e5df2

I had just ordered a 9x so just a matter of a few mods and off to the races right?

So I now have a modded 9x running Open9x with a DIY DHT module modded for telemetry, SmartieParts board with HK BL and 1800 LiFe 3s batt. I'm using a D8R-II Plus RX with the free adapter plugged into the digital telemetry port as well as the Tx connection on the FC. I have the LiPo also connected to the FC for VBAT. I added the "feature telemetry" in the CLI as well.

The A1 display works fine showing the RX voltage
Tx and Rx signal values look reasonable.

I'm not seeing anything for the "hub" values yet but not quite sure how to set everything up. Still trying to figure things out with that.



Also tagged with one or more of these keywords: Project Blog