Direct Frsky telemtry data from MW FC

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

Sebbi wrote:The issue is not in just rewriting the files, but to do it in a more modular way. I want the serial stuff (GUI & telemetry with different protocols) as interchangeable as possible.

Thank you for the clarification.

Sebbi wrote:e.g. RPM and speed are weird

In my implementation RPM is just a more or less rough guess depending on the fact whether you have a powermeter or not.
Furthermore, some KV-values could result into an integer overflow. Thus, in an official version this issue should be resolved e.g. by precompiler checkings.

The speed is the GPS-speed which should not be weird - but that depends on the GPS device.

Sebbi wrote:I have the FLD-02 display and it is not showing everything that's defined here http://frsky-rc.com/uploadfile/201211/2 ... 905895.pdf

You are right, it is not showing everyghing that is possible due to the protocol. But, I do not expect much more for a 20€ device...

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: Direct Frsky telemtry data from MW FC

Post by Sebbi »

RPM could (and is in my implementation) the average motor speed scaled from the 1000-2000 range to FrSkys 0-60000 range. RPM and Speed are strange because the official FLD-02 display doesn't show the values in the same units, but does some kind of conversion (e.g. speed is transmitted in "knots", but displayed as kph) ;-)

Well ... it might be a 20€ device, but it is THE telemetry display from FrSky, the same company who invented this protocol ... so it doesn't make sense, that they don't use all the information they transmit (why is there even a "date"?)

I'd like to start a discussion on what data should be transmitted with what frame ID. Feel free to comment.

Shown on FLD-02 display:
  • P1: Time (HH:MM:SS) -> time since start of copter or time since arm or - if LOG_PERMANENT defined - total armed time of the board?
  • P1: Fuel Level (in 25% steps) -> calculated from lipo voltage or calculated from ampere hours (needs total capacity of battery) or used to display flight mode (0 = acro, 25 = angle/horizon/mag, 50 = baro, 75 = gps hold, 100 = gps home)?
  • P1: Temperature 1/2 -> baro/gyro temperature or heading or track distance or heading to home
  • P2: Altitude -> baro altitude or GPS altitude
  • P2: RPM -> estimated RPM of motors or average of the motor output or distance to home
  • P2: Speed -> GPS speed, true air speed with additional sensor
  • P2: Current -> Powermeter current or heading or heading to home (if you need to fly by display because your copter/airplane is too far away)
  • P3: Up to 6 voltages -> could be used for anything really ... ranges from 0 -> 7.xx V
  • P4: Accelerations (signed, range from -65 to +65) -> acceleration or gyro rates or pitch/roll/yaw angles
  • P4: Lon/Lat -> GPS lon/lat

Not shown:
  • Voltage -> normally transmitted by the transmitter itself (shown on 1st page of FLD-02), but this protocol value is hidden
  • GPS Altitude -> not shown (but could be shown optional from MultiWii side, replacing the baro altitude)
  • GPS Course -> not shown
  • Date -> not shown

Some implementations also have frame IDs for gyro data defined, so custom data could be transmitted with unused IDs and could be shown by modified T9X firmware or software like MultiWii EZ Gui on Android. What kind of data would be interesting? One could use the received data to feed a ground based OSD for FPV flights, so generally all the data for this application (home position, distance to home, heading, pitch/roll, speed, altitude, voltage/current, flight modes) would be interesting ;-)

Ideas?

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: Direct Frsky telemtry data from MW FC

Post by wilco1967 »

I've been using the FrSky telemetry now since almost when this thread was started, and I really like it.
But now the dev's changed the structure of MW, with the .cpp and .h files.

Did someone get the original FrSky_telemetry.ino working in the new MultiWii format ?

I did get the new MW to compile with the new format, but cannot get the Frsky_telemetry working again. I'm sure I must change someting, but no idea what....

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

Sebbi wrote:I'd like to start a discussion on what data should be transmitted with what frame ID. Feel free to comment.

P1: Time (HH:MM:SS) -> time since start of copter or time since arm - the total arming time since power on would give another indication of the accu status
P1: Temperature 1/2 -> baro/gyro temperature or heading or track distance or heading to home -> distance via temperature will be difficult since it is limited to a value of 200
P2: Altitude -> baro altitude or GPS altitude - d'accord
P2: Speed -> I prefer GPS speed over true air speed with additional sensor since that will be quite seldom
P2: Current -> Powermeter current or heading or heading to home - ampere result automatically to teh calculation of ampere hours, heading would end up in weird calculations...
P4: Accelerations (signed, range from -65 to +65) -> acceleration or gyro rates or pitch/roll/yaw angles - actually, I do not meed neither the one nor the other
P4: Lon/Lat -> GPS lon/lat - d'accord

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Direct Frsky telemtry data from MW FC

Post by Alexinparis »

d'accord is a french word and means ok ;)

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

The issue of the Frsky display device FLD-02 is the small screen. In order to view all data you have to switch between 4 different screens.
This makes it a bit complicated to pick up all relevant data and to navigate in parallel in accordance to those data.
Therefore, in my view the display FLD-02 is a nice add-on while flying on-sight for displaying those additional data which are more or less for your interest only (RPM, current, gyro).

If you want to fly autonomously, you have to rely on data like heading, distance and height. This would require a bigger screen with all relevant data displayed in parallel like voltages, height, flight mode, distance, heading, compass, angles, temperatures,...

Since I have recognised the deficencies of the FLD-02 I am working on a home-brew display based upon an Arduino Mega and an 3,2"-display ( http://www.elecfreaks.com/store/32-tft- ... p-113.html )
It displays voltages, temperatures, height, motor settings, flight modes, and angles. The color of some bars indicate the safe region in green, a warning in yellow, and an alarm in red. Further effort has to be taken to implement the distance and heading stuff.
Be aware, that this prototype is a very early step with only a few funcions already implemented and that it will require most probably a lot of time until I wil have it completed. I plan to implement the Frsky protocol without level shifting.

Thus, my idea is more a question: should we look for a alternative to the FLD-02? What do you think about it? Are there other possibilities than a home-brew arduino - maybe a tablet?
Attachments
home_brew_display.jpg

janekx
Posts: 63
Joined: Wed Sep 12, 2012 10:08 pm
Location: Brno, Czech Republic

Re: Direct Frsky telemtry data from MW FC

Post by janekx »

It looks really nice, still use DHT module and telemery on openTX FW. Why not to connect BT module to serial link from module and make some Android app?

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

janekx wrote:Why not to connect BT module to serial link from module and make some Android app?


Multiwii Apps already exist,have a loot at https://play.google.com/store/apps/deta ... iwii&hl=en
The issue with it is the limited range of 200m or 300m.
The Frsky telemetry should range up to 1 mile...

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: Direct Frsky telemtry data from MW FC

Post by Sebbi »

1) the or/ands above weren't ment exclusively ;-) these should be options for the user to choose from. I'd make the FrSky Hub frames and their transmitted data standard and all other stuff optional via defines

2) a bigger display is always helpful! The linked Android app can connect to your FrSky TX if you fit it with a bluetooth serial dongle. I hope you don't stand 200m apart from your smartphone/tablet while flying ;-). As I own an Oculus Rift Devkit my bigger display will most likely be those VR goggles with a custom OSD derived from FrSky telemetry data (sent with custom IDs). It would be nice if we all (MultiWii EZ GUI on Android, your Arduino display and ground based OSD devices) used the same IDs ... I'll post my code later this week (I want to have a basic Mavlink implementation before asking MultiWii committers to take a look) ;-)

janekx
Posts: 63
Joined: Wed Sep 12, 2012 10:08 pm
Location: Brno, Czech Republic

Re: Direct Frsky telemtry data from MW FC

Post by janekx »

QuadBow wrote:
Multiwii Apps already exist,have a loot at https://play.google.com/store/apps/deta ... iwii&hl=en
The issue with it is the limited range of 200m or 300m.
The Frsky telemetry should range up to 1 mile...


I know this app.

on the thread about EZ-GUI I saw a diagram, look like easy way

[MultiWii with FrSkyTelemtry.ino] --- level shifter -- [Frsky Rx] >>>> [Frsky Tx] --- level shifter --- BT adapter@9600 >>> [Android phone running EZ GUI]

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

janekx wrote:[MultiWii with FrSkyTelemtry.ino] --- level shifter -- [Frsky Rx] >>>> [Frsky Tx] --- level shifter --- BT adapter@9600 >>> [Android phone running EZ GUI]

This is a long chain... additionally, you have to convert the protocol from Frsky telemetry @9600 to the MultiwiiConf protocol which is used for bluetooth transmission @115200. You have to develop another converter/adapter and the long chain has more single points of failure...
Honestly, I prefer a more straight forward solution.

Sebbi wrote:The linked Android app can connect to your FrSky TX if you fit it with a bluetooth serial dongle.

I see the advantage of a commercial off the shelf solution over my home-brew solution.
But, I also see the disadvantage when more people are using the same bluetooth technology in parallel challenging the related bandwidth...
Thus, it could be a solution for sole flyers. The thing that has to be done for this approach is to develop the related Android and/or iOS app, which will be based upon the Frsky protocol instead of the MultiwiiConf protocol. But, it should not be a big challenge for app developers.

Have fun!

User avatar
ezio
Posts: 827
Joined: Sun Apr 01, 2012 11:03 pm
Location: Paris
Contact:

Odp: Direct Frsky telemtry data from MW FC

Post by ezio »

I like what I can read here.
As soon as it will be ready I will implement it in my app.

Good work.

Bart

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: Direct Frsky telemtry data from MW FC

Post by Sebbi »

QuadBow wrote:
janekx wrote:[MultiWii with FrSkyTelemtry.ino] --- level shifter -- [Frsky Rx] >>>> [Frsky Tx] --- level shifter --- BT adapter@9600 >>> [Android phone running EZ GUI]

This is a long chain... additionally, you have to convert the protocol from Frsky telemetry @9600 to the MultiwiiConf protocol which is used for bluetooth transmission @115200. You have to develop another converter/adapter and the long chain has more single points of failure...
Honestly, I prefer a more straight forward solution.


I think you missunderstood. You directly connect a BT adapter to the FrSky TX (with a level shifter/inverter circuit) and the Android App directly speaks the FrSky protocol ... there are several available and MultiWii EZ Gui ist one of them. That is as straight forward as it gets ;-) (cable bases solutions with a serial-to-USB-converter could work too, but aren't implemented as far as i know)

QuadBow wrote:
Sebbi wrote:The linked Android app can connect to your FrSky TX if you fit it with a bluetooth serial dongle.

I see the advantage of a commercial off the shelf solution over my home-brew solution.
But, I also see the disadvantage when more people are using the same bluetooth technology in parallel challenging the related bandwidth...
Thus, it could be a solution for sole flyers. The thing that has to be done for this approach is to develop the related Android and/or iOS app, which will be based upon the Frsky protocol instead of the MultiwiiConf protocol. But, it should not be a big challenge for app developers.


As written above, there are already several Android apps who can read FrSky protocol from a Bluetooth connection. There is no need to convert into other protocols. As for the bluetooth spektrum being crowded ... well, since everything nowadays uses 2,4 GHz to communicate it's already pretty crowded around that frequency. As for bluetooth itself, the amount of bluetooth devices in one area is almost unlimited. Bandwidth will most likely drop, but that's no issue for slow serial communication.

Having fun ;-)

@ezio: I'll send you a pull request when I have something!

janekx
Posts: 63
Joined: Wed Sep 12, 2012 10:08 pm
Location: Brno, Czech Republic

Post by janekx »

Becuase I have here one lightly demaged galaxy ace phone where display , BT and GPS works it looks like perfect setup for me now. ;)

User avatar
ezio
Posts: 827
Joined: Sun Apr 01, 2012 11:03 pm
Location: Paris
Contact:

Re: Direct Frsky telemtry data from MW FC

Post by ezio »

Sebbi wrote:@ezio: I'll send you a pull request when I have something!

You can also look at my implementation of frsky protocol and improve it. I think there is a small bug somewhere. But I couldn't find it.

1eleven
Posts: 6
Joined: Mon Jun 03, 2013 7:17 pm

Re: Direct Frsky telemtry data from MW FC

Post by 1eleven »

disq wrote:Here is my branch, based on QuadBow's FrSky Telemetry code. https://github.com/disq/multiwii-firmwa ... /telemetry

Update 2: Also added a Multiwii 2.2 based branch, at https://github.com/disq/multiwii-firmwa ... emetry_2.2


disq, I finally got a chance to try your code tonight with not so favorable results. I have a witespy Mega Ez 3 (ATMega2560) with baro, mag, GPS. While I did receive telemetry data back, once in the air, my quad had these minor "jerks" during flight. I've never experienced this before. It's hard to explain, but they were like minor twitches in pitch and roll. It may still fly, but the erratic behavior made me nervous to do much more than a steady hover. Have you noticed this behavior with any other boards?

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

Sebbi wrote:You directly connect a BT adapter to the FrSky TX (with a level shifter/inverter circuit) and the Android App directly speaks the FrSky protocol ... there are several available and MultiWii EZ Gui ist one of them.


If the Frsky protocol has already been implemented in an app you are right.

ezio wrote:As soon as it will be ready I will implement it in my app.

So, it is up to us to decide on a better use of Frsky telemetry and - if required - an extension to the Frsky protocol...

janekx
Posts: 63
Joined: Wed Sep 12, 2012 10:08 pm
Location: Brno, Czech Republic

Re: Direct Frsky telemtry data from MW FC

Post by janekx »

I tryed implemet Frsky to lattest version r1541 but without success, asking for help with it please.

To Multiwii.cpp added

Code: Select all

#include "FrSkyTelemetry.h" 


and to void annexCode() at the right above last } as it was in MW 2.2 added

Code: Select all

 //Frsky Telemetry
    #if defined(TELEMETRY_FRSKY)
   telemetry_frsky();
  #endif


Prepare new cpp + h
Frsky_MW_new.zip
(3.04 KiB) Downloaded 1739 times


but still got
C:\Temp\build8843587832400643343.tmp/MultiWii.cpp:561: undefined reference to `telemetry_frsky()'

Any idea?

Thanks

User avatar
mgros
Posts: 90
Joined: Thu Jan 20, 2011 12:32 am

Re: Direct Frsky telemtry data from MW FC

Post by mgros »

Try in FrSkyTelemetry.h this

Code: Select all

#ifndef FrSkyTelemetry_H_
#define FrSkyTelemetry_H_

   void telemetry_frsky();
   void write_FrSky8(uint8_t Data);
   void write_FrSky16(uint16_t Data);
   void check_FrSky_stuffing(uint8_t Data);
   static void sendDataHead(uint8_t Data_id);
   static void sendDataTail(void);
   void send_GPS_altitude(void);
   void send_Temperature1(void);
   void send_RPM(void);
   void send_Fuel_level(void);
   void send_Temperature2(void);
   void send_Cell_volt(void);
   void send_Altitude(void);
   void send_GPS_speed(void);
   void send_GPS_position(void);
   void send_Course(void);
   void send_Time(void);
   void send_Accel(void);
   void send_Voltage_ampere(void);
   
#endif /* FrSkyTelemetry_H_ */


And add to the header of FrSkyTelemetry.cpp this:

Code: Select all

#include "Arduino.h"
#include "config.h"
#include "def.h"
#include "types.h"
#include "MultiWii.h"
#include "IMU.h"
#include "Sensors.h"
#include "Serial.h"
#include "FrSkyTelemetry.h"



Hope this help.

janekx
Posts: 63
Joined: Wed Sep 12, 2012 10:08 pm
Location: Brno, Czech Republic

Post by janekx »

Thanks much will try it tomorow

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: Direct Frsky telemtry data from MW FC

Post by wilco1967 »

mgros wrote:Try in FrSkyTelemetry.h this

.....
Hope this help.


Hi mgros,

I'm struggling with the same problem. Could not get it to compile yet , even with your code, but thats probably because I copied something wrong.
Could you perhaps post a zipfile with your complete MW code, including the FRsky telemetry, that compiles for you ?

Thanks a lot !

Wilco

janekx
Posts: 63
Joined: Wed Sep 12, 2012 10:08 pm
Location: Brno, Czech Republic

Re: Direct Frsky telemtry data from MW FC

Post by janekx »

getting

FrSkyTelemetry.cpp: In function 'void send_Altitude()':
FrSkyTelemetry.cpp:263: error: 'EstAlt' was not declared in this scope
FrSkyTelemetry.cpp:266: error: 'EstAlt' was not declared in this scope
FrSkyTelemetry.cpp: In function 'void send_Course()':
FrSkyTelemetry.cpp:332: error: 'heading' was not declared in this scope
FrSkyTelemetry.cpp: In function 'void send_Accel()':
FrSkyTelemetry.cpp:369: error: 'accSmooth' was not declared in this scope
FrSkyTelemetry.cpp:369: error: 'acc_1G' was not declared in this scope
FrSkyTelemetry.cpp: In function 'void send_Voltage_ampere()':
FrSkyTelemetry.cpp:407: error: 'vbat' was not declared in this scope

But EstAlt and others are declared in types.h, and included by #include "types.h"

User avatar
mgros
Posts: 90
Joined: Thu Jan 20, 2011 12:32 am

Re: Direct Frsky telemtry data from MW FC

Post by mgros »

This one Works and compile to me. I think is r1539
In an HEXA with flyduino MEGA 2560 board, FFIMU, GPS
I have done some modification in telemetry, im reading clicle time instead motor RPM and vertical speed.

Hope this help.
Attachments
MultiWii_HEXA2.zip
(151.02 KiB) Downloaded 1802 times

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: Direct Frsky telemtry data from MW FC

Post by wilco1967 »

Hi Mgros,

Thanks a lot !.... that one compiles fine,
I'll customize that for my tricopter setup later today ...

EDIT
Confirmed..... works beautifully
Thanks a lot !
Last edited by wilco1967 on Mon Jul 22, 2013 7:08 pm, edited 1 time in total.

janekx
Posts: 63
Joined: Wed Sep 12, 2012 10:08 pm
Location: Brno, Czech Republic

Re: Direct Frsky telemtry data from MW FC

Post by janekx »

Thnaks you have change send_Altitude function so then my code work too

disq
Posts: 29
Joined: Tue May 21, 2013 2:11 am
Location: Northern Cyprus

Re: Direct Frsky telemtry data from MW FC

Post by disq »

1eleven wrote:
disq wrote:Here is my branch, based on QuadBow's FrSky Telemetry code. https://github.com/disq/multiwii-firmwa ... /telemetry

Update 2: Also added a Multiwii 2.2 based branch, at https://github.com/disq/multiwii-firmwa ... emetry_2.2


disq, I finally got a chance to try your code tonight with not so favorable results. I have a witespy Mega Ez 3 (ATMega2560) with baro, mag, GPS. While I did receive telemetry data back, once in the air, my quad had these minor "jerks" during flight. I've never experienced this before. It's hard to explain, but they were like minor twitches in pitch and roll. It may still fly, but the erratic behavior made me nervous to do much more than a steady hover. Have you noticed this behavior with any other boards?


I only tested the softserial setup with a TRI config and PPM input (without GPS) and didn't notice any jerks in-flight. Of course, a hardware level inverter would always perform better. I should put a warning up.

1eleven
Posts: 6
Joined: Mon Jun 03, 2013 7:17 pm

Re: Direct Frsky telemtry data from MW FC

Post by 1eleven »

Commander1024 wrote:Hi, I modified the scematic above to do both: level converting and inverting

UPDATED: fixed misplaced resistors


Thanks for the schematic. I'm curious as to what the normal current max is for serial ports on the arduino boards? Also, is the signal input to the Rx sense only, or does it have a current draw? Maybe I'm over-analyzing this, but it seems like a lower current circuit would be more efficient and reduce power (although we're talking about very little). Would increased resistor values still work for this purpose?
3mA vs. .7mA:

*edit - used this on my MultiWii Mega Ez3 board from WiteSpy and it works great. I used two 4.7k in parallel instead of the 2.4k which cut down the shopping list. Thanks for the hard work, everyone!
Attachments
TTL-Conv-Inv2.jpg

Nickman1200
Posts: 36
Joined: Sat Jul 06, 2013 10:31 am

Re: Direct Frsky telemtry data from MW FC

Post by Nickman1200 »

Just wanted to say thank you and i hope this is included some way in to main branch in the future.

I'm using this on my HK 328p FC with soft serial and a modded TH9X receiver.
Also added a BT module on the receiver and enjoy using EZ-Gui and Frsky dashboard on my phone.

Now if i could have on version with this AND nhadrian's failsafe code combined my Tricopter will never be lost again :lol:

User avatar
ezio
Posts: 827
Joined: Sun Apr 01, 2012 11:03 pm
Location: Paris
Contact:

Odp: Direct Frsky telemtry data from MW FC

Post by ezio »

Nickman1200 wrote:Just wanted to say thank you and i hope this is included some way in to main branch in the future.

I'm using this on my HK 328p FC with soft serial and a modded TH9X receiver.
Also added a BT module on the receiver and enjoy using EZ-Gui and Frsky dashboard on my phone.

Now if i could have on version with this AND nhadrian's failsafe code combined my Tricopter will never be lost again :lol:

I'm waiting for final implementation in the main branch too. So I can work on better implementaton in my app.
I have no idea why it is not merged already. It is in working state for ages.
Bart

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Direct Frsky telemtry data from MW FC

Post by e_lm_70 »

I made MultiWii 2.1 and 2.2 working with FrSky telemetry both on 328 and 2560, all with GPS (on 328 GPS is set at 9600bps, 4HZ with only the two NMEA messages needed)

In none of my board, I have to use an external signal inverter, I get normal 9600, connect to a atmega pin, assign an interrupt, and output reverse signal on a free pin .. yes this cost 2 pins, but using CPPM I have free pin also on 328

The basic code for FrSky I copy from MPNG, that must be copied for somewhere else .. and adapted to MW 2.x

Clearly, I use custom personal thing, like temp 2 give me the number of GPS satellite + 100 in case of lock
acc X and acc Y, give me the distance to home, etc etc etc

I'm using the FrSky little telemetry display stuck to my DIY FrSky module ... no bluetooth adapter, no pc no phone/tablet

All very simple but with all data always there

If somebody is interested, I can share the code ...

PS: on atmega328, I defined a custom check box for FrSky, when not enabled, serial is 115k for use the GUI or bluetotth, when the FrSky is check (I have one switch for it) then serial is 9600, output is FrSky, Input is GPS ... on 2560 with 4 serial things are more easy ... on 328 I have it working on MW 2.1 , not sure I can fit all my extra stuff on new 2.2, on 2.1 and 328 I have still space left with gps, baro, sonar and FrSky telemetry ... I could even add GPS navigation on it :-) .... anyhow ...

Nickman1200
Posts: 36
Joined: Sat Jul 06, 2013 10:31 am

Re: Direct Frsky telemtry data from MW FC

Post by Nickman1200 »

I did the same. Used disq version as i need soft serial and put it in the current SVN version,
It's realy nice and clean already so I hope Sebbi finish his Unified communication bransh so we can have it easier.

KaiK
Posts: 58
Joined: Thu Jul 28, 2011 8:32 pm
Contact:

Re: Direct Frsky telemtry data from MW FC

Post by KaiK »

@Timecop: Where did you get this tiny transistor PCBA from shown in viewtopic.php?f=7&t=1929&p=19309&hilit=frskyadp#p19309
I guess it is just the well known voltage inversion circuit?

Nickman1200
Posts: 36
Joined: Sat Jul 06, 2013 10:31 am

Re: Direct Frsky telemtry data from MW FC

Post by Nickman1200 »

KaiK wrote:@Timecop: Where did you get this tiny transistor PCBA from shown in viewtopic.php?f=7&t=1929&p=19309&hilit=frskyadp#p19309
I guess it is just the well known voltage inversion circuit?


I cant see the picture right now but HK has a nice small one i use.

FrSky Telemetry Reciever upgrade USB/Serial lead interface
Image

KaiK
Posts: 58
Joined: Thu Jul 28, 2011 8:32 pm
Contact:

Re: Direct Frsky telemtry data from MW FC

Post by KaiK »

Yes, I know this item, which is a real TTL-RS232 + Inversion device.

But I meant this super simple small PCBA which only uses a Transistor for inversion (as FRSky receivers understand TTL 5V but need inverted signal).


e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Direct Frsky telemtry data from MW FC

Post by e_lm_70 »

Nickman1200 wrote:
KaiK wrote:@Timecop: Where did you get this tiny transistor PCBA from shown in viewtopic.php?f=7&t=1929&p=19309&hilit=frskyadp#p19309
I guess it is just the well known voltage inversion circuit?


I cant see the picture right now but HK has a nice small one i use.

FrSky Telemetry Reciever upgrade USB/Serial lead interface
Image


Why use a HW inverter, when just a little cable can do the same job, with just few lines of code:

This is what I'm doing on my ATmega2560 board MultiWii: (I did same on MPNG)

Code: Select all

// OSD Initialization
void osd_init()
{
    pinMode(19,INPUT);   // RX1
   pinMode(18,OUTPUT); // TX1

  EIMSK |= (1 << INT2);
  EICRA |= (1 << ISC20);
 
//  SerialOpen(3,9600);  already open at start up
  SerialEnd(1);
}

ISR(INT2_vect)
{
  if (PIND & 4)
    PORTD=~8;
  else
    PORTD|=8;
}

Nickman1200
Posts: 36
Joined: Sat Jul 06, 2013 10:31 am

Re: Direct Frsky telemtry data from MW FC

Post by Nickman1200 »

e_lm_70 wrote:
Nickman1200 wrote:
KaiK wrote:@Timecop: Where did you get this tiny transistor PCBA from shown in viewtopic.php?f=7&t=1929&p=19309&hilit=frskyadp#p19309
I guess it is just the well known voltage inversion circuit?


I cant see the picture right now but HK has a nice small one i use.

FrSky Telemetry Reciever upgrade USB/Serial lead interface

Why use a HW inverter, when just a little cable can do the same job, with just few lines of code:

This is what I'm doing on my ATmega2560 board MultiWii: (I did same on MPNG)

Code: Select all

// OSD Initialization
void osd_init()
{
    pinMode(19,INPUT);   // RX1
   pinMode(18,OUTPUT); // TX1

  EIMSK |= (1 << INT2);
  EICRA |= (1 << ISC20);
 
//  SerialOpen(3,9600);  already open at start up
  SerialEnd(1);
}

ISR(INT2_vect)
{
  if (PIND & 4)
    PORTD=~8;
  else
    PORTD|=8;
}


I dont use it between the fc and RX (that is done in software like you say) i use it between TX and th9x / bt adapter.

robert82h
Posts: 3
Joined: Fri May 17, 2013 3:55 pm

Re: Direct Frsky telemtry data from MW FC

Post by robert82h »

Hi,

has anyone got telemetry via Smart Port to a FrSky X8R receiver working? I'm using disq's MultiWii 2.2 branch (telemetry_2.2). As my board has only one serial port, I'd like to use the soft serial version (in order to use a bluetooth module for PID tuning). On the web I read that S. Port is just a 57600 baud serial connection, so I tried with that baud rate. However, my receiver displays all telemetry data as 0 (except for things measured by the X8R directly like RSSI, these work fine).

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Direct Frsky telemtry data from MW FC

Post by e_lm_70 »

robert82h wrote:Hi,

has anyone got telemetry via Smart Port to a FrSky X8R receiver working? I'm using disq's MultiWii 2.2 branch (telemetry_2.2). As my board has only one serial port, I'd like to use the soft serial version (in order to use a bluetooth module for PID tuning). On the web I read that S. Port is just a 57600 baud serial connection, so I tried with that baud rate. However, my receiver displays all telemetry data as 0 (except for things measured by the X8R directly like RSSI, these work fine).


I don't think it is a smart idea to use a 56k soft serial on a 8bit 16Mhz processor ... you are going to was a lot of CPU power for it, assuming you will manage to make it works

As well .... I don't see the point to have Telemetry and PID tuning over Bluetooth on the same time.
On my 328 board I define a new BOX, and via a radio switch I can enable either the GUI or the telemetry(frsky out, GPS in)

robert82h
Posts: 3
Joined: Fri May 17, 2013 3:55 pm

Re: Direct Frsky telemtry data from MW FC

Post by robert82h »

As the telemetry data is probably quite compact, I was hoping that soft serial (TX only) shouldn't be too heavy on the MCU. However I like your method with the radio switch and will try that, thanks for the suggestion!

Are you using an X8R receiver or one of the older models?

How hard would it be to use the MultiWii Serial Protocol over the two-way, full-duplex telemetry link between a Taranis and the X8R? On Smart Port RX and TX are multiplexed to a single line, so some special circuitry might be needed at MultiWii's USART end. I couldn't find any details on that so far, any hints are greatly appreciated.

vpb
Posts: 231
Joined: Mon Jul 23, 2012 4:09 pm

Re: Direct Frsky telemtry data from MW FC

Post by vpb »

As Multiwii 2.3 is completely changed in code structure, Frsky Telemetry cant work with MW 2.3 (it can work with 2.2). I make some changes to the FrskyTelemetry.ino, now it turns into 2 files FrskyTelemetry.cpp & FrskyTelemetry.h. Those just need to be copied to MultiWii folder.

In MultiWii.cpp,
line 28, add this line

Code: Select all

#include "FrskyTelemetry.h"


line 556 (at the end of annexCode function) add those lines

Code: Select all

  #if defined(TELEMETRY_FRSKY)
     telemetry_frsky();
  #endif


In config.h, line 462

Code: Select all

  /******                Serial com speed    *********************************/
    #define TELEMETRY_FRSKY
 
    /* This is the speed of the serial interfaces */
    #define SERIAL0_COM_SPEED 115200
    #define SERIAL1_COM_SPEED 115200
    #define SERIAL2_COM_SPEED 115200
    //#define SERIAL3_COM_SPEED 115200
    #define SERIAL3_COM_SPEED 9600


I also made small changes that will send the distance-to-home & number of satellites in the temp1 & temp2 boxes.
Attachments
FrskyTelemetry.zip
(3.27 KiB) Downloaded 2208 times

baco3000
Posts: 2
Joined: Sun Dec 15, 2013 4:23 am

Re: Direct Frsky telemtry data from MW FC

Post by baco3000 »

But this code work multiwii 2.3?

User avatar
haydent
Posts: 583
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Re: Direct Frsky telemtry data from MW FC

Post by haydent »

baco3000 wrote:But this code work multiwii 2.3?


i believe vpb points this out in the post b4 yours.

do i need to use an inverter with this ?

i have x8r, will this code work with it

baco3000
Posts: 2
Joined: Sun Dec 15, 2013 4:23 am

Re: Direct Frsky telemtry data from MW FC

Post by baco3000 »

Por supuesto que has de utilizar un conversor RS232 / TTL para que funcione.
------------------------------------
Of course you have to use a RS232 / TTL converter to work.

bob195558
Posts: 38
Joined: Wed Jul 17, 2013 1:16 pm
Location: New England, USA

Re: Direct Frsky telemtry data from MW FC

Post by bob195558 »

Hi

I have built a Quad using the MultiWii Pro V3 Flight controller board from WiteSpyQuad (Ready To Fly Quads)
and I use a 9x Radio with erSky9x firmware with FrSky XJT Transmitter Telemetry Module with the FrSky D8R-XP Receiver w/ Telemetry.


Is there a way to see the Sensor Readings on the MultiWii Pro V3 Flight Controller Board through the FrSky Telemetry System to my Sky9x Radio telemetry screens?

Bob

scf
Posts: 6
Joined: Sat Oct 12, 2013 9:00 pm

Re: Direct Frsky telemtry data from MW FC

Post by scf »

I have a Multiwii Pro 3.0 board, D8R-XP receiver and 9x TX with opentx firmware. The problem here is that 9x shows invalid GPS position. For my current position first part of lat/long is correct (degrees), but minutes for lat is 92' which is invalid due to the format. Minutes for long is 8', but should be 5'. What could be broken? Multiwii code (I use https://github.com/disq/multiwii-firmware) or opentx?

Johnnynunes
Posts: 35
Joined: Wed Aug 28, 2013 2:38 pm

Re: Direct Frsky telemtry data from MW FC

Post by Johnnynunes »

Anyone got it working on Multiwii 2.3?

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: Direct Frsky telemtry data from MW FC

Post by wilco1967 »

yes, works fine with MW 2.3 ....
no problem.

User avatar
mgros
Posts: 90
Joined: Thu Jan 20, 2011 12:32 am

Re: Direct Frsky telemtry data from MW FC

Post by mgros »

me too.

1eleven
Posts: 6
Joined: Mon Jun 03, 2013 7:17 pm

Re: Direct Frsky telemtry data from MW FC

Post by 1eleven »

Can someone clarify exactly where this goes?
vpb wrote:line 556 (at the end of annexCode function) add those lines

Code: Select all

  #if defined(TELEMETRY_FRSKY)
     telemetry_frsky();
  #endif



Line 556 in my download of MW2.3 is

Code: Select all

  #if !defined(GPS_PROMINI)


Guessing that if this goes at the end of annexCode, then line 551 - 558 should be

Code: Select all

    #endif
  }
    #if defined(TELEMETRY_FRSKY)
     telemetry_frsky();
    #endif
}

void setup() {

Post Reply