Direct Frsky telemtry data from MW FC

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

Re: Direct Frsky telemtry data from MW FC

Post by scf »

I should receive my taranis tomorrow - will have some coding try/trial session :)

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 »

also if you dont have a serial inverter yet, you can use the software serial library without one

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 »

also theres this
Frame Protocol of FrSky Telemetry Hub System (V2.0)
[removed]
Last edited by haydent on Mon Feb 17, 2014 11:12 pm, edited 1 time in total.

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

Re: Direct Frsky telemtry data from MW FC

Post by scf »

haydent wrote:also if you dont have a serial inverter yet, you can use the software serial library without one

I have one, use it with D8R-XP :)

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 »

cool, im not sure how compatible softwareserial is with multiwii, particularly sending, as that is blocking...

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

Re: Direct Frsky telemtry data from MW FC

Post by scf »

haydent wrote:also theres this
Frame Protocol of FrSky Telemetry Hub System (V2.0)
http://www.rcgroups.com/forums/attachme ... id=6266364

I guess this is old protocol?

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 »

yes sorry, removed. try this one attached
Attachments
FRSKY.pdf.zip
Two-way system protocol
(60.51 KiB) Downloaded 1427 times

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 »

though its not latest, as sport runs at higher speed and theres more too it, alot i looks more similar than the old protocol

Rangarid
Posts: 6
Joined: Thu Jul 28, 2011 6:45 pm

Re: Direct Frsky telemtry data from MW FC

Post by Rangarid »

vpb wrote: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.


I get ACC_1G missing and when i deselct FAS_100 i get vbat was not declared. Fixed this by including "Sensors.h" for ACC_G1 and vbat should be analog.vbat

Oh and BTW, you should use

Code: Select all

#if defined (FAS_100){
...
} #elif defined (VBAT)
...
}

Instead of just else. if you dont use the FAS_100 it does not mean you have VBAT declared.

Rangarid
Posts: 6
Joined: Thu Jul 28, 2011 6:45 pm

Re: Direct Frsky telemtry data from MW FC

Post by Rangarid »

Tested it today. Works great:
IMG_20140310_203418.jpg

IMG_20140310_203628.jpg


Here are my settings:

Pro Mini TX <-> RX Frsky Receiver
GPS TX <-> RX Pro Mini

You need a small RS232<->TTL converter. Costs about 2$ from china on ebay.

Settings in Multiwii:
#define GPS_PROMINI_SERIAL
#define GPS_BAUD 9600
#define NMEA

#define TELEMETRY_FRSKY

In FrskyTelemetry.cpp
// Serial config datas
#define TELEMETRY_FRSKY_SERIAL 1

szakacs
Posts: 18
Joined: Wed Dec 11, 2013 11:53 pm
Location: Sydney, NSW Australia

Re: Direct Frsky telemtry data from MW FC

Post by szakacs »

I am just getting into this C++ so please bare with me.
I am wishing to extract the time from the GPS nmea. In the current MW 2.3 is there a variable I can get a source from i.e. in GPS.cpp ??

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

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

szakacs wrote:I am wishing to extract the time from the GPS nmea

No, that is not foreseen in the current implementation of MW.
However, it can be easily implemented by adding a line to gps.ino dealing with the time.
But, for what purpose do you need the UTC time? In my view it is better to have the time of arming available in order to estimate the remnant accu capacitv.

szakacs
Posts: 18
Joined: Wed Dec 11, 2013 11:53 pm
Location: Sydney, NSW Australia

Re: Direct Frsky telemtry data from MW FC

Post by szakacs »

QuadBow wrote:
szakacs wrote:I am wishing to extract the time from the GPS nmea

No, that is not foreseen in the current implementation of MW.
However, it can be easily implemented by adding a line to gps.ino dealing with the time.
But, for what purpose do you need the UTC time? In my view it is better to have the time of arming available in order to estimate the remnant accu capacitv.


Curiosity and learning curve ...
My Turnigy 9x is flashed with er9x, so it does a timing based a throttle use.
I have been playing with a FrSky FLD-02 Telemetry Display Screen and FrSky FSH-01 Telemetry Sensor Hub through a FrSky D8R-II PLUS and XJT module. I seen that the hub sends a utc time to the display and I was looking at doing the same using the MW FC as the source. I have been able to modify some of data to suit me. i.e. RPM -- instead of motor revolutions I display a stick value between min throttle and max throttle.
So any hints and pointers with the gps stuff would be appreciated ..

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

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

szakacs wrote:So any hints and pointers with the gps stuff would be appreciated ..

Assuming that you are using a gps device running NMEA code (#define NMEA in config.h and not UBLOX or MTK_BINARY) and that you got a mega based board (without an additional i2c_gps_nav module required) you can add one line in the two existing lines in gps.ino:

Code: Select all

      } else if (frame == FRAME_GGA) {
        if      (param == 1)                     {GPS_time = (uint32_t) grab_fields(string,0);}
        if      (param == 2)                     {GPS_coord[LAT] = GPS_coord_to_degrees(string);}

Firstly, you have to declare GPS_time as uint32_t.
Lastly, you have to calculate hours, minutes and seconds of local time out of it.

PS: the code has not been tested yet.

szakacs
Posts: 18
Joined: Wed Dec 11, 2013 11:53 pm
Location: Sydney, NSW Australia

Re: Direct Frsky telemtry data from MW FC

Post by szakacs »

Thank you for your time. It is appreciated.. Using your pointers I have been able to achieve what I was after.
I can now display either utc or local time on the FrSky FLD-02 Telemetry Display Screen.

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 finally got hold of a Taranis to replace my 9X

Taranis works exellent, but now I have some small issues with the Frsky telemetry from multiwii.

All was working fine with my old 9X running openTX.
Using the same receiver (D4R-II / D8R-II), the telemetry data is visible on the Taranis, however some of the values are odd...

For example, Alt seems to move alright, but often the value turns negative (approx minus 655 meters, with the copter on the ground, and after I reset the alt to 0 using reset telemetry).
Also Hdg rolls over to 65536 whenever the actual heading becomes negative (-1 .. -179).

Also Spd seems to have another unit.... I was getting km/h correctly on the 9X (with some correction factor in the Frsky telemetry to convert cm/s to knots, which is than shown as km/h, at least on 9X). With the Taranis, the Spd value I'm getting is a lot higher.... still have to investigate how much, but something like 2...3x...

Is there anything that needs to be done on the MW side, or is this purely a openTX issue?
Seems like there is a difference between openTX for 9X and Taranis...

Nothing was changed on the MW side.
I've tried the original firmware the Taranis arrived with (opentx-x9d-v1.1.02), as well as the most recent openTX (R2940), both having the same issue.

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 »

as ive pointed out in previous posts, taranis uses different telemetry code (hub vs hubless) and is not compatible with this mod currently

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 »

also in case it hasnt been pointed out, you can use this as an inverter: https://www.hobbyking.com/hobbyking/sto ... Cable.html
it does not convert the logic voltage level, but it still works
24523-main.jpg

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

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

haydent wrote:it does not convert the logic voltage level

It would be strange if this inverter did not convert the voltage level (Vcc <=> Gnd).
Otherwise it wouldn't happen to work...
Thus, it is most problably not only a cable, but a cable with integrated converter in the middle.

Quentin
Posts: 3
Joined: Wed Jan 01, 2014 12:54 pm
Location: Pessac, France

Re: Direct Frsky telemtry data from MW FC

Post by Quentin »

Hi everyone,

First, thanks for the work done here !

I've read as carefully as i could this thread, but still can't get the FrSky telemetry working.

I use QuadBow code. Telemetry is sent on serial 1.

I've a DIY QuadX 450, with MWii 2.2
- Crius AIOP v2
- AIOPIO extension board which, if i believe this schema, have an inverter for frsky telemetry
- a Voltage / current sensor (rctimer) plugged on A1 / A3 on AIOPIO
- GPS - ublox cn-06, on serial 2 (AIOPIO)
- a D8r-II plus receiver and it's mate transmitter on a 9xR
- a FLD-02 LCD beautifully taped on the 9xR

All sensors look ok in MWiiConfig (gps and Vol/Curr).
On the AIOPIO, the select jumper for FrSky telemetry is soldered, in order to link serial 1 and the telemetry output ( ground and Tx pins are plugged on D8R-II).

and... still nothing on the FLD-02. If I plug the Volt/Current sensor directly on the D8R-II, on A1/A2 pins, I've the results on the LCD.
I've measured variable signal on the AIOPIO telemetry output.

I'm not using Mwii 2.3 cause I can't keep the quad in air. After takeoff, the FC continuously lower the thrust signal on ESC.

Any suggestion ?

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

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

Hi Quentin,

Actually, it should run in this configuration.
Most problably it is just a simple mistake.

1. Have you set in config.h
#define SERIAL1_COM_SPEED 9600 ?
and
#define TELEMETRY_FRSKY ?
and
#define TELEMETRY_FRSKY_SERIAL 1 ?

2. Have you connected
- GND and VCC to the receiver's servo outputs (not to the side pins which are only for telemetry) ?
- the output of the extension board to the RX pin at the telemetry side ?

3. Have you soldered the jumper SJ4 at the extension board ?

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 »

QuadBow wrote:
haydent wrote:it does not convert the logic voltage level

It would be strange if this inverter did not convert the voltage level (Vcc <=> Gnd).
Otherwise it wouldn't happen to work...
Thus, it is most problably not only a cable, but a cable with integrated converter in the middle.


as i said, i have measured it and it does not, and i have also successfully used it both for sbus and x8r s.port communication with mega. here is a photo of its guts:

P1050328_Edit.JPG

P1050329_Edit.JPG

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

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

haydent wrote:i have measured it and it does not


Haydent,
The hardware you are presenting shows 2 direct connections betweeen the ground (black) and vcc cables (red).
Between the white signal cables is no direct connection, but a transistor acting as a converter.
Thus, it will convert/invert the voltage level...otherwise there were a malfunction.

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 »

ok well you put some doubt in my mind, so i will have to test it again

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 »

haydent wrote:ok well you put some doubt in my mind, so i will have to test it again


well i just hooked it up to my scope again and it measures 3.4v peak to peak

i would take a photo, but my camera couldnt focus on the lcd writing

so that seems to support my point :idea:

User avatar
Gartenflieger
Posts: 65
Joined: Sat Oct 01, 2011 10:07 pm
Location: Dortmund, Germany

Re: Direct Frsky telemtry data from MW FC

Post by Gartenflieger »

i'd guess an INVERTER will swap the low and high levels of the signal, whereas a LEVEL CONVERTER will shift the high level to a different voltage. Am I right ?

Gartenflieger

Quentin
Posts: 3
Joined: Wed Jan 01, 2014 12:54 pm
Location: Pessac, France

Re: Direct Frsky telemtry data from MW FC

Post by Quentin »

QuadBow wrote:Hi Quentin,

Actually, it should run in this configuration.
Most problably it is just a simple mistake.

1. Have you set in config.h
#define SERIAL1_COM_SPEED 9600 ?
and
#define TELEMETRY_FRSKY ?
and
#define TELEMETRY_FRSKY_SERIAL 1 ?

Yes
QuadBow wrote:2. Have you connected
- GND and VCC to the receiver's servo outputs (not to the side pins which are only for telemetry) ?
- the output of the extension board to the RX pin at the telemetry side ?

Yes
QuadBow wrote:3. Have you soldered the jumper SJ4 at the extension board ?

and yes

I've a steady 4.51 V on telemetry output (after the inverter) and a moving 3.9~4.3V on Tx (Serial 1, before the inverter). Besides, I'v just noticed that i've 4.51V on the +5V.
So Frsky out = +5v . Should i look around the SJ4 one more time ?

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

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

Hi Quentin,

Quentin wrote:Should i look around the SJ4 one more time ?

Yes, your measurements indicate that the signal does not reach the transistor in the upper right corner of the schematics.
So, the output signal is bent to +5V via the 1k-resistor and remains at +5V without input signal at the transistors basis.
The connecting element SJ4 could be the problem - or a bad soldering.

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 »

Gartenflieger wrote:i'd guess an INVERTER will swap the low and high levels of the signal, whereas a LEVEL CONVERTER will shift the high level to a different voltage. Am I right ?

Gartenflieger


a level converter will just convert the voltage
an inverter will just invert it

and a rs232 to ttl (which i believe you guys are using) does both

Abbe
Posts: 1
Joined: Sat Apr 05, 2014 7:13 am

Re: Direct Frsky telemtry data from MW FC

Post by Abbe »

Hi!

Going nuts trying to clarify some stuff here.

I got:

dji flamewheel f450

turnigy 9x diy dht with fld-02 screen coonected to pins on the module (original FW, waiting for my solderless board)

HK Multiwii 328p FC

d8r-II plus reciver

Edit: when binded i get readings in page 1 the two top squares show voltage. but thats it no arm time or anything else


What if any readings can i get to the fld with this setup? soft serial?

I want to know step by step what to do and connect?

What code do i have to edit in arduino?

The setup now so far works i conected everything but nothing done or connected between the a1/a2 sideports except the jumper.


(I do not want telemetry on the built in screen)


Last thing if i want to by some sensors in the future wich should i get?

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

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

Hi Frsky telemetry users,

I just want to inform you that I have integrated the measurement of lipo cell voltages. This part has been titled "to be done" for a significant period of time.
To use this you have to use the multiwii telemetry (files telemetry.cpp/h) extension mentioned in this thread and to adapt it.
Since you have to use a free analog pin for each cell and some more flash memory, it will most problably run only on an ATmega2560-based board.

First you have to add/change the function send_cell_volts() in the file telemetry.cpp as follows.

Code: Select all

// Cell voltage (not longer to be done)
void inline send_cell_volt(void) // Data FrSky FLVS-01 voltage sensor
{
  uint16_t Data_Volt;
  static uint8_t cell_counter = 0;

  #if defined(VCELLS) // indeed this was not that easily to be found out...
      Data_Volt = (cell_voltage[cell_counter] << 8) + (cell_voltage[cell_counter] >> 8) + (cell_counter << 4);
  #endif
  if (++cell_counter >= CELLNUMBER)
    cell_counter = 0;
  sendDataHead(ID_Volt);
  write_FrSky16(Data_Volt);
}


You have to configure the functionality by following definitions in config.h:

Code: Select all

// voltage of cells
#define VCELLS              // activate measurement
#define CELLNUMBER       2 // current number of cells, maximum: 6 cells
#define CELL0PIN        A3 // analog pin for voltage of cell 0
#define CELL1PIN        A0 // analog pin for voltage of cell 1, same as for vbat in mycase
#define CELL0SCALE      10 // scale multiplied by 10 => 10 means scale 1:1
#define CELL1SCALE      31 // scale multiplied by 10 => 31 means scale 1:3.1

I got only a 2S-equipment, if you have 3 cells or even more (up to 6 are possible) you have to add CELL2PIN and CELL1SCALE due to your configuration.
Be aware that you can only attach the first cell (cell 0 in my counting) directly to the analog pin. The others require a voltage divider, the division ratio is described by CELLxSCALE.

Furthermore you have to define the cell voltages in multiwii.cpp:

Code: Select all

#if defined VCELLS
  uint16_t cell_voltage[CELLNUMBER];             // voltage of each cell in 0.1V steps
  uint8_t cell_pin[CELLNUMBER]   = {
  CELL0PIN,
  #if CELLNUMBER > 1
    CELL1PIN,
  #endif
  #if CELLNUMBER > 2
    CELL2PIN,
  #endif
  #if CELLNUMBER > 3
    CELL3PIN,
  #endif
  #if CELLNUMBER > 4
    CELL4PIN,
  #endif
  #if CELLNUMBER > 5
    CELL5PIN
  #endif
  };
  uint8_t cell_scale[CELLNUMBER] = {
  CELL0SCALE,
  #if CELLNUMBER > 1
    CELL1SCALE,
  #endif
  #if CELLNUMBER > 2
    CELL2SCALE,
  #endif
  #if CELLNUMBER > 3
    CELL3SCALE,
  #endif
  #if CELLNUMBER > 4
    CELL4SCALE,
  #endif
  #if CELLNUMBER > 5
    CELL5SCALE
  #endif
  };
#endif


and to access them via the following entry in telemetry.h:

Code: Select all

extern uint16_t cell_voltage[];


Now, the most important item is to calculate the voltages in the function annexCode of the file multiwii.com.
The scheduler is extended from 3 to 4, so you have to search for the first both lines and to change the third one:

Code: Select all

// query at most one multiplexed analog channel per MWii cycle
  static uint8_t analogReader =0;
  switch (analogReader++%4) {

Then you have to add the following switch statement. Don't touch the definitions below.

Code: Select all

case 3:
  {
  static uint8_t analogSubReader = 0;
  static uint8_t SubCounter;
  SubCounter = (analogSubReader++ % (CELLNUMBER + 1));
  if (SubCounter != CELLNUMBER) {
    #if defined(VCELLS)
      #define VCELLS_SMOOTH 22
      static uint8_t cind[CELLNUMBER];
      static uint16_t cvvec[CELLNUMBER][VCELLS_SMOOTH], cvsum[CELLNUMBER];
      uint16_t cv = analogRead(cell_pin[SubCounter]);
      cvsum[SubCounter] += cv;
      cvsum[SubCounter] -= cvvec[SubCounter][cind[SubCounter]];
      cvvec[SubCounter][cind[SubCounter]++] = cv;
      cind[SubCounter] %= VCELLS_SMOOTH;
      cell_voltage[SubCounter] = ((cvsum[SubCounter] / 9) * cell_scale[SubCounter]) / 10;
      if (SubCounter > 0)
         cell_voltage[SubCounter] = cell_voltage[SubCounter] - cell_voltage[SubCounter-1];
      debug[SubCounter] = cell_voltage[SubCounter];
    #endif // VCELLS
    }      // end of if
   break;
   }       // case 3


Finally, the result can be displayed with the Frsky display FLD-02. I have only my 2 cell copter prepared with cell lipo telemetry.
Is there anybody being able to test the code even for more cells? (The issue might be the missing female adapter for the lipo, like it is used in the lipo balancers.)

Have fun!
Attachments
SDC10132.jpg

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 »

well done

Udeste
Posts: 6
Joined: Sat Feb 08, 2014 1:09 pm

Re: Direct Frsky telemtry data from MW FC

Post by Udeste »

QuadBow wrote:Is there anybody being able to test the code even for more cells? (The issue might be the missing female adapter for the lipo, like it is used in the lipo balancers.)

I can test it for 3 cell battery. But how can I calculate my voltage divider ratio to put in your code? :D

Quentin
Posts: 3
Joined: Wed Jan 01, 2014 12:54 pm
Location: Pessac, France

Re : Direct Frsky telemtry data from MW FC

Post by Quentin »

QuadBow wrote:The connecting element SJ4 could be the problem - or a bad soldering.


Hi,

The soldering was bad. I've now something moving between 3.4 and 3.45v, and still nothing correct on the fld-02.

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

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

Hi Udeste,

Thank you for your support.
Below I show you some examples for the voltage divider via resistors:

Code: Select all

#define CELL0SCALE      10 // scale multiplied by 10 => 10 means scale 1:1 => no resistors required (direct connection to first cell)
#define CELL1SCALE      20 // scale multiplied by 10 => 20 means scale 1:2 => R1=22k (to ground) and R2=22k (to second cell, up to 8.4V, requires scale of more than 1:1.7), scale = 22/(22 + 22) = 1:2
#define CELL2SCALE      31 // scale multiplied by 10 => 31 means scale 1:3.1 => R1=22k (to ground) and R2=47k (to third cell, up to 12.6V), requires scale of more than 1:2.6), scale = 22/(22+47) = 1:3.13

turismo05
Posts: 3
Joined: Mon Apr 14, 2014 8:43 am

Re: Direct Frsky telemtry data from MW FC

Post by turismo05 »

1eleven wrote: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() {
[/quote

I'm having trouble getting this to work.

Does the above code go as shown?

I'm not getting any data on the serial port I have assigned to telemetry.

Thanks in advance.

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

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

Hi turismo05,

It also should run at the place you have proposed.
What about your hardware configuration - board, receiver, level shifter/inverter, etc?

turismo05
Posts: 3
Joined: Mon Apr 14, 2014 8:43 am

Re: Direct Frsky telemtry data from MW FC

Post by turismo05 »

QuadBow wrote:Hi turismo05,

It also should run at the place you have proposed.
What about your hardware configuration - board, receiver, level shifter/inverter, etc?


Hi Thanks for the reply

I'm using 'Multiwii and Megapirate AIO Flight Controller w/FTDI (ATmega 2560) V2.0'
https://www.hobbyking.com/hobbyking/sto ... duct=31138

with NEO-6M GPS Module
https://www.hobbyking.com/hobbyking/sto ... duct=31135

with tll/rs232 converter
https://www.hobbyking.com/hobbyking/sto ... rface.html


FrSky D4R-II 4ch 2.4Ghz ACCST Receiver (w/telemetry)

Mutliwii 2.3

I have gps on serial 3 and working
Bluetooth on serial 0 and working
Added the lines to multiwii.cpp and config.h
set telemetry to serial 2 and set serial 2 to 9600 in config.h

I'm not getting anything on serial 2 at all. I have even tried a ttl - usb adaptor on there and no activity.

does telemetry run all the time? I have tried arming as well and still no activity.

Many thanks

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

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

@turismo05,

I guess you have the files telemetry.cpp/h in the same directory - otherwise the compiler would complain - and
you have defined TELEMETRY_FRSKY in config.h. You told that also you set serial 2 to 9600 baud with #define SERIAL2_COM_SPEED 9600 in config.h.

Under those conditions everything should work fine.
Maybe it is just a simple error.
Which devices are connected to the level converter?
Have you tried to change RX2/TX2?
What kind of telemetry display do you use - FLD-02?

turismo05
Posts: 3
Joined: Mon Apr 14, 2014 8:43 am

Re: Direct Frsky telemtry data from MW FC

Post by turismo05 »

QuadBow wrote:@turismo05,

I guess you have the files telemetry.cpp/h in the same directory - otherwise the compiler would complain - and
you have defined TELEMETRY_FRSKY in config.h. You told that also you set serial 2 to 9600 baud with #define SERIAL2_COM_SPEED 9600 in config.h.

Under those conditions everything should work fine.
Maybe it is just a simple error.
Which devices are connected to the level converter?
Have you tried to change RX2/TX2?
What kind of telemetry display do you use - FLD-02?


I've got it working. I never noticed the defined TELEMETRY FRSKY statement in config.h, I missed it thinking that bit was just setting com speed.

Thanks for pointing that out.

I also have a FAS100 connected into the RX of my Telemetry port on the multiwii but not getting any info from that. I'm not sure how complete that part of the code is as it says todo next to it. Not had much time to look at that but at least the other bit is working.

Thanks again Quadbow

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

Re: Direct Frsky telemtry data from MW FC

Post by QuadBow »

turismo05 wrote:I also have a FAS100 connected into the RX of my Telemetry port on the multiwii but not getting any info from that. I'm not sure how complete that part of the code is as it says todo next to it. Not had much time to look at that but at least the other bit is working.

The issue is that the telemetry extension has not become part of the official multiwii distribution. Therefore, there are different approaches to be found.
I just handed over vbat in tenth of volts and amperage in milliampere:

Code: Select all

// Voltage (Ampere Sensor) 
void inline send_Voltage_ampere(void)
{
  uint16_t Data_Voltage_vBat_bp;
  uint16_t Data_Voltage_vBat_ap;   
  uint16_t Data_Voltage_I_Motor;

  Data_Voltage_vBat_bp = analog.vbat / 10;         
  Data_Voltage_vBat_ap = analog.vbat - Data_Voltage_vBat_bp * 10;         
  Data_Voltage_I_Motor = analog.amperage / 100;

  sendDataHead(ID_Voltage_Amp_bp);
  write_FrSky16(Data_Voltage_vBat_bp);
  sendDataHead(ID_Voltage_Amp_ap);
  write_FrSky16(Data_Voltage_vBat_ap);   
  sendDataHead(ID_Current);
  write_FrSky16(Data_Voltage_I_Motor);   
}


Your challenge will be to configure the FAS-100. A similiar discussion can be found here: http://www.multiwii.com/forum/viewtopic.php?f=8&t=3230

Fastrack
Posts: 23
Joined: Tue May 14, 2013 5:36 am

Re: Direct Frsky telemtry data from MW FC

Post by Fastrack »

Long time, stuff got in the way. So I haven't posted I a long time. Getting back to my quad build.

I've read over what I missed and it seems telemetry is still not working on SPORT or Smart Port on the X8R. I also have a D8r, but would rather use the X8R.



Ben

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 »

correct, there is no s.port code yet

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 »

hi all, just want to give this thread the drop on something soon to be released.
https://code.google.com/p/scarab-osd/wiki/Frsky_SPort
does the opposite of this thread, takes smart port sensor data and shows it in the osd

also as a sub point, it should be pointed out that the s.port vario sensor also doubles as a connector between hubbed and hubless sensors and recievers

Fastrack
Posts: 23
Joined: Tue May 14, 2013 5:36 am

Re: Direct Frsky telemtry data from MW FC

Post by Fastrack »

haydent wrote:hi all, just want to give this thread the drop on something soon to be released.
https://code.google.com/p/scarab-osd/wiki/Frsky_SPort
does the opposite of this thread, takes smart port sensor data and shows it in the osd

also as a sub point, it should be pointed out that the s.port vario sensor also doubles as a connector between hubbed and hubless sensors and recievers


Kinda cool. But buying sensors that we already have seems like a waste ... gps etc.. Good for planes, helis and gliders I guess.

Still waiting on the SPort to multiwii :)

Ben

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 »

individual cell monitoring is something its worth it for, as its important for your lipos health as cells dont drain equally

Fastrack
Posts: 23
Joined: Tue May 14, 2013 5:36 am

Re: Direct Frsky telemtry data from MW FC

Post by Fastrack »

Ah okay yes that's true. Good idea.

Ben

Laze
Posts: 1
Joined: Thu Aug 14, 2014 1:35 pm

Re: Direct Frsky telemtry data from MW FC

Post by Laze »

Any news on this?! Getting Multiwii to send telemetry data to the FrSky (X8R and the rest of the X-series) SmartPort?

This subject is also being discussed at RCG:
http://www.rcgroups.com/forums/showthread.php?t=1866206&page=2223#post29173822

dreadful
Posts: 2
Joined: Wed Aug 27, 2014 10:19 pm

Re: Direct Frsky telemtry data from MW FC

Post by dreadful »

Does anyone have any pictures or schematics on how to get this to work with the latest MultiWii 2.3? I'm using the PARIS v5r3 with FrSky X8R transmitter and the Taranis RC. I believe that I have the proper sketches to make it work. I'm a mechanical designer by trade and I know simple electronics.

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 »

i think youll find x8r is not supported by this code, some day it likely will

Post Reply