Jump to content
Mr.RC-Cam

DiY FrSky / MultiCopter Telemetry Interface

Recommended Posts

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):

post-2-0-50768500-1344035952_thumb.jpg

  • Like 1

Share this post


Link to post
Share on other sites

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:

post-2-0-16902600-1344037462_thumb.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.

Share this post


Link to post
Share on other sites

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:

post-2-0-06497700-1344037823_thumb.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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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%).

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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. :)

Share this post


Link to post
Share on other sites

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/store/index.php?main_page=product_info&cPath=1&products_id=30&zenid=e5933a5689cd30c52e3ec2af897e5df2

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.

Share this post


Link to post
Share on other sites

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.

Hi Thomas, I am asking as well.. would be very interested to use this with the I2C of the APM2.5?

Share this post


Link to post
Share on other sites

I'm not a APM2.5 user so developing the necessary host code is not possible for me. However, I just did a quick search and found that interfacing the APM2.5 to the FrSky Rx has already been done. It is explained in this document: http://www.multi-rotor.co.uk/index.php?action=dlattach;topic=676.0;attach=2828

Seems there's a solution to everything on the web! :)

Share this post


Link to post
Share on other sites

Hello Again, thanks for the thread... I actually had this document tucked away somewhere... but never really saw that part. Funny thing is that I found a similar solution on the JDrones Website and have tried that several times with failure.

The reason why I find your solution compelling is that the IOBoard firmware is not developed yet with stability. Its slowly starting to happen, but not there yet.

I was interested in your I2C connection that could potentially interface with the APM2.5 I2C connection. I say this being niave to the fact that there is effort to make that work i am sure.

But if it did, this would be a great solution.

Heck, I just want to read the battery voltage and mAh remaining on my Telemetry Screen for my Radio. (GPS is a plus)

Share this post


Link to post
Share on other sites

The reason why I find your solution compelling is that the IOBoard firmware is not developed yet with stability. Its slowly starting to happen, but not there yet.

Just like the similar APM2.5's projects, the FrSky bridge is not considered a stable/commercialized design. That's the unspoken reality of these cool personal projects that are created by the DiY hobby community. In my case I rarely release anything to the public that is not sufficiently validated and well documented.

Due to the low initial interest in this project (and my scarce free time) I never created useful documentation that would have allowed other FC developers to incorporate the i2c bridge into their code. In retrospect, that was a wise choice since I don't see any need for it now. The popular FC hardware now has the hardware resources to get the job done.

I was interested in your I2C connection that could potentially interface with the APM2.5 I2C connection. I say this being niave to the fact that there is effort to make that work i am sure.

Keep in mind your APM2.5 FC still needs the appropriate software to talk to a FrSky Rx. That is why the APM 2.5 solution mentioned above seems to be a reasonable solution even though it may still be under development.

The FrSky i2c bridge was a nifty hardware solution that allowed me to connect FrSky's telemetry receivers to my old MultiWii flight controllers that did not have a second serial port. But now that it is common for low cost FC's to have multiple serial ports this bit of hardware is no longer needed.

Heck, I just want to read the battery voltage and mAh remaining on my Telemetry Screen for my Radio. (GPS is a plus)

I completely understand, I have the same needs. For simplicity, you can use the FrSky hub. It supports all that stuff right out of the box. No need to write special code and you can omit the hub if you don't need GPS data. At the moment this is what I am doing since I have not ported any of my FrSky telemetry code to the new MultiWii FC hardware I installed a few weeks ago. Due to my schedule it will be awhile before I get to that.

Edited by Mr.RC-Cam
FrSky Hub will do it.
  • Like 1

Share this post


Link to post
Share on other sites

Thanks for writing back... its unfortunate that it didn't take off, I really liked what you did. I would buy the hub, if i could get it, it seems to be out of stock in most places and especially for canada.

I am going to try the Amp/Volt Sensor again and just move on for when I get my OSD to work when i get around to purchasing a pair of goggles. ;-)

Thanks again, all the best!

Share this post


Link to post
Share on other sites

I would be interested in a board like this. I have a HK MultiWii PRO Flight Controller w/MTK GPS Module on my quad 450. :)

and my next one most likely would be a crius AIOP board (better sensor and GPS) for a tricopter like VTOL EDF plane which I am building/drawing. ;)

Share this post


Link to post
Share on other sites

The FrSky i2c bridge was a nifty hardware solution that allowed me to connect FrSky's telemetry receivers to my old MultiWii flight controllers that did not have a second serial port. But now that it is common for low cost FC's to have multiple serial ports this bit of hardware is no longer needed.

Can you point to me where to find this piece of info?

Share this post


Link to post
Share on other sites

Any flight controller that has a ATMEGA2560 will provide four serial ports at low cost. Besides the ATMEGA stuff, there's some 32-bit flight controllers too (and prices are not horrible either). The best source of information to the latest choices would be at the multiwii and megapirate forums. The information changes too fast for me to be an authority on it.

I've upgraded two of my Quads with the Crius AIOP V2 and I'm satisfied with the board (I use MWC V2.1). It is less than $60 from rctimer and other China shops. Hobbyking has a clone of it that is under $50, but I don't know if it is the same quality.

Share this post


Link to post
Share on other sites

Thx for the info. when I was looking at the crius AIOP v2 boards, all were sold out at the time. only dealextreme has v1. So I put it off for a while. Just checked the RCtimer, they have the AIOP V2 and the U-blox GPS V2 as well, so ordered a set. cheaper than at dealextreme. ;)

I just started the Multiwii thing, got my hands full just to get it up in the air. ;) have not looked into the serial port communication yet. Will look into that.

Edited by kaos

Share this post


Link to post
Share on other sites

The project became obsolete due to the release of cheap Multiwii Flight Controller hardware that had extra serial ports. So despite being really cool at the time it was created, this project is now as useful as wooden wagon wheels.

  • Like 1

Share this post


Link to post
Share on other sites

Hi Thomas,

Thanks for the quick reply. I have a MultiWii Pro 2.0 so indeed it has 4 serial ports. I'm still trying to figure out though how I can get my MultiWii to send the relevant data (ie gps, height, baro measurements etc) to the FrSky D8R-II Telemetry Receiver (http://www.t9hobbysport.com/frsky-d8r-ii-plus-8ch-telemetry-receiver).

I have a hacked FlySky TH9x with ER9x atm but looking to put on OPENTX instead. Could you offer any advice as to how I can accomplish this without having to fork out for the FrSKY hub and all the expensive sensors that my FC already has please?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×