FrSky inverted TTL APM2

Hi together,

i want to use a D4R-II together with APM2, PPM and RSSI are no problem. What i want to connect as well is 

the serial port of RX and APM2 to send compressed GPS information over the FrSky data downlink to my antenna tracker. in principle i have that working, currently with an arduino pro mini evaluating an attached GPS sensor, compressing the GPS data and sending it over the downlink. So tweaking arducopters software to do that as well will be no big deal. I use NewSoftSerial with the arduino as it provides the inverted TTL signal, that is expected from the FrSky RX.

Question now is:

1) Can FastSerial in Arducopter 2.6 somehow be used for generating an INVERTED TTL signal?

2) Which Pins/Port should i use on the APM2 to connect the FrSky RX serial port?

Thanks!!!

Christian

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer

    Now that I was able to turn my self back to programming mode. I have been able to make some updates on IOBoard software. Also Simon bumped coding forward a lot.. Well that's how communities are working :)

    After looking a bit more around I found that some people have cloned IOBoard codes to GitHUB. That's great.

    Anyways here is small update that fixes several problems on earlier MAVLink/FrSky software. This software works really well with Taranis/er9x and openTx based radios. FrSky TLD-02 display still have some problems but those will be sorted out later.

    Many things are currently static on this but they will hopefully change too.

    Be free to distribute this to your friends and let us know if/what problems there are.

    jD_IOBoard_FrSkyMAVLink.v02a.hex

    https://storage.ning.com/topology/rest/1.0/file/get/3692783566?profile=original
  • Jani - forgot to mention that I added the following variables to IO_Board.h


    // new variables
    static float      deg_dat = 0 ;
    static float      dec_deg = 0 ;
    static float      min_dat = 0 ;
    static float      dec_min = 0 ;
    static float      sec_dat = 0 ;
    //end of new variables

    This was simply to make the degree/minutes/seconds conversion in MavLink.ino more intelligible. You could reorganise the calculation and eliminate these.

  • Hi All,

    I have my telemetry stream working correctly with APM 1 telem output to an IO_board and thence to a FrSky D8RII-Plus Rx. The connection to the Rx is simply IOBoard D5 -> D8R-II Plus Tx port; the Gnd line is already common.

    My Tx uses the Sky9x board but the software (ersk9x) is directly equivalent to the Er9x. Taranis uses OpenTx but again this should work similarly.

    The problem with the GPS display is because the FrSky_Mavlink program for use with the IO_Board (or Arduino Pro Mini etc.) mixes up Lat and Lon - follow the FrSky_Funcs module through against the FrSky Telem Protocol. Curiously it is said that this mis-allocation works OK with the FLD-02 display. I can't comment on that but I do know that switching the functions in the program gives me the (almost) correct display on my Tx.

    I say almost because as you will realise MavLink sends the GPS data as degrees.decimal degrees whereas the FrSky protocol uses degrees,minutes.decimal minutes.

    To correct for this I modified the FrSky_MavLink program accordingly; in fact I went further and made the display format degrees,minutes.seconds - i.e a display of 5324.1465 means 53 degrees, 24 minutes, 14.65 seconds. The modified program modules FrSky_Funcs.ino and MavLink.ino are in the zip file appended.

    FrSky.zip

  • Developer

    APM2 does not have any pins available that you can use to talk with FrSky telemetry that's why we made jD-IOBoard and software for it that can do this. FastSerial cannot invert signals as it uses hardware serials and HW serial cannot invert. 

    There are 2 ways to do it, 1) either have inverter chip between APM/FrSky receiver, 2) run SoftwareSerial on main electronics to do inversion for you.

    Option 1 needs always external hardware, easiest is to do with jD-IOBoard or Arduino MiniPro. Option 2 would work in generally but in case of ArduCopter it does not as it needs too much CPU resources and currently there are no extras. 

  • Frankly, I dont know exactly what they mean by level. But I do know you can't talk to an RS232 port by connecting TTL Tx/Rx pins to it. I don't know the exact details, but my understanding is that voltage is different and LOW/HIGH in RS232 are negative and positive voltage, where TTL is 0 and either +3.3 or +5v.

    For what its worth, I connected up an Arduino UNO, with its pin 0/1 (tx/rx) to the telemetry tx/rx pins coming from my APM 2.5 and pin 5 up to my FRSky D8R-XP's 'RX' port, along with its GND ports connected from APM telemetry, to UNO and to D8R-XP GND, and powered the Uno from the APM telem +5v. I then loaded the jD_IOBoard_FrSkyMAVLink sketch onto the Uno (pulled from jdrones google code svn repo). 

    I have a FLD-02 LCD connected to the back of my DJT module and never got any telemetry other than the stock RSSI that shows up from the receiver.

    I tried switching Uno<->APM tx/rx pins just in case something was backwards. I did enable some of the debugging #defines in the code and opened serial monitor at speed 57600 to make sure the sketch was actually running, and it was, because I saw all the EEPROM debug messages.

    I was pretty sure this setup would have replicated what the jD-IOBoard was doing, but perhaps I missed something. I am hoping my real jD-IOBoard actually works when it gets here :)

  • I just ordered a couple IOBoards so I can send telemetry to the FRSky Rx, and see it on my 9XR transmitter. I also plan to split out the serial port on the DJT and feed it into an antenna tracker. 

    I am excited to be able to have antenna tracking, telemetry on my transmitter and not run a 3rd RF link for telemetry. I think this is going to be a very powerful combination.

    One question though, one of the comments on this posts says "Just connect jD-IOBoard pin D5 to your receiver pin RX and data will start to flow.", but all the docs for the FrSky telemetry Rx's say that the "streaming data port" are RS232 level (and not TTL). Doesn't this imply we need a MAX232 between the IOBoard and the FrSky RX?

  • Hi!

    You said:

    "i want to use a D4R-II together with APM2, PPM and RSSI are no problem."

    Please, can you tell me how to put the PWM RSSI signal of the d4fr into the apm2, wich normally expects an analog rssi signal?

    So long

    Kraut Rob

  • hi jani, i have bought a jdrones ioboard for arducopter LEDs. can u pls tell what type of board to select when using arduino022 IDE compiler. it has a choice of 4 types of arduino 328. also whcih arduino code to use for the LED to glow without any I2C input.

  • Developer

    APM cannot do inverted serial as it will require too much CPU power but there are another choices. We have been working some time with jDrones IOBoard and it will have MAVLink support in few days. After that we plan to extend it's software and that extension includes FrSky protocol output. 

    Originally IOBoard was meant to drive all your LEDs/LED Strips/Sound devices and so on. You can look more from IOBoard blog post that we made awhile back. 

    We are finalizing it's configurator program now and then software will be released for it.

     

    jD-IOBoard v1.0, MCU controlled IO Board for driving LEDs, Relays, Servos
    R/C UAV and ArduCopter manufacturer and one stop shop. We make your FPV come true.
  • Guys, I managed to get my D4R-II up and running without too much trouble.  I was able to bind in CPPM mode, etc. no problem at all.  The only issue was I had though the CPPM was coming out of Ch2 like on the D4FR.  Once I fixed that, no problem.

This reply was deleted.

Activity