Changing revo Flexio wires
« on: February 23, 2017, 06:01:20 pm »
Hello all,

Forgive me if this is the wrong place for this. I am trying to setup bluetooth telemetry on a Revo. I originally had it working using the flexio port. I am using PPM for my controller. I should also note I am using a gps in the main port and an external mag in the flex port.

A few days ago I had bluetooth telemetry working, but for some reason today it is not working through the flexio green and yellow wires. If I remove the mag and use the flex port for telemetry it works fine, leading me to believe the problem is in the flexio. My question is: can you change the wires in the flexio for telemetry? Say using the blue and orange instead of green and yellow? Follow up questions: is there any other route I can take to get gps, external mag, and autonomous flying going? I notice there is an option for PPM+GPS through the flexio but have been unable to find any documentation for this.

I do have an oplink ground coming so I can use that, but I'd like to get in the air before then.

Thanks for the help!

Edit: double follow up question:
If I strip a micro usb and solder the wires directly to my bluetooth module, will it correctly send telemetry data through that?
« Last Edit: February 23, 2017, 06:04:28 pm by gelatinouscactus »


Re: Changing revo Flexio wires
« Reply #2 on: February 24, 2017, 02:48:38 am »
Thanks for replying!

Yes, I have seen that, but I'm unless I'm missing something, I'm not sure that helps me. I don't believe I explained myself clearly.

I have GPS on Main port. I2C external mag on flex port. I had bluetooth telemetry going through the flexiIO with PPM+telemetry a few days ago, however now it is not working.

In order to test my bluetooth setup, I temporarily dc'd the I2C and did bluetooth telemetry through the flexi port and confirmed it was working. This makes me believe that the telemetry output on flexiIO pins 7 and 8 are not working anymore. I was hoping to find a solution by means of switching which pins on the flexIO send the telemetry data.

I have an oplink ground station on the way, so in the future I will be able to easily set up telemetry that way, but I was hoping to find a solution now so I can set everything up.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Changing revo Flexio wires
« Reply #3 on: February 24, 2017, 02:57:29 am »
All FlexiIO (receiver port) serial functions (telemetry, GPS, MSP, MavLink) uses pin7 and pin8:
https://librepilot.atlassian.net/wiki/display/LPDOC/Revolution+Configuration#RevolutionConfiguration-FlexiIOpinOut/Functions

You may need the receiver port set as "Telemetry+PPM" or "PPM+GPS"

* You cannot use the USB port for additional telemetry output.

« Last Edit: February 24, 2017, 03:02:16 am by f5soh »

Re: Changing revo Flexio wires
« Reply #4 on: February 24, 2017, 03:12:28 am »
And theres no way to change these to say, pin 9 and 10?

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Changing revo Flexio wires
« Reply #5 on: February 24, 2017, 03:26:51 am »
No

UART port is only here in receiver port : pin7 / pin8

or Main / Flexi port.

Re: Changing revo Flexio wires
« Reply #6 on: February 24, 2017, 03:39:46 am »
Got it, thanks!

Re: Changing revo Flexio wires
« Reply #7 on: February 24, 2017, 04:32:33 am »
f5soh,

One more question if you don't mind.

You say you cannot use usb for telemetry. Does this include using a raspberry pi on board the vehicle and plugged into the revo?

Re: Changing revo Flexio wires
« Reply #8 on: February 24, 2017, 06:36:18 am »
You could have something that looked like a GCS talking to the FC via USB, The pair could indeed do telemetry via USB and the something could do whatever it wanted with the FC that the GCS can do.  The something could certainly send the telemetry down to the ground.

The only question would be whether having the USB plugged in somehow makes the firmware run in a way that prohibits flight.  I don't think so, but I have some 3 meter USB cables and now I have a strong urge to hover with USB plugged in.  :)  It's possible that some USB timing requirements would hurt the real time performance of the flight code to the point of affecting flight.  :(  If I remember, I will try it tomorrow and report back.

Be aware that the GCS adds timestamps to the telemetry it receives.  The FC should really be the one to time stamp this stuff.  Retransmissions, delays, etc. make timestamping on the GCS less accurate than it could be.  Adding a relay between the FC and the real GCS would make the timestamps even less accurate.  It would still be accurate enough for probably all usage if the relay was quick and immediate with no buffering.

Re: Changing revo Flexio wires
« Reply #9 on: February 24, 2017, 04:16:16 pm »
I'd be interested to see your results if the usb affects flight. Please report back!

I would actually, with a RPi in the usb on board, not really need to send the telemetry from that down to a computer. I would just be using this to record data (gps, mag, acc, alt).

The only reason I am considering this is I can't seem to send and receive data through flexiIO pins 7&8 anymore.

Also, when flying with this arrangement it would be very sedate flying anyway, slow waypoint flying while I am taking data with an external sensor.

Re: Changing revo Flexio wires
« Reply #10 on: February 24, 2017, 09:28:37 pm »
USB cable flight was perfect and uneventful.  Really nothing else to say.

I'm guessing you have an RPi and an itch to use it, else there are the obvious other solutions (besides more debugging of why FlexiIO doesn't work):

- buy a DJI GPS (it puts GPS and mag data on a single port), I would recommend a clone until we get an official patch for the extra smoothing of data the authentic one does (and the resultant delays it causes).  About $20 shipped on eBay.  I just this minute bought one for additional testing.
http://www.ebay.com/itm/Ublox-M8N-GPS-Compass-Module-for-DJI-NAZA-M-V2-LITE-Flight-Controller-Board-/282354189890?hash=item41bd9f0642:g:KTkAAOSwUKxYmutU

- buy a Sparky2 that has a dedicated I2C port in addition to RcvrPort, MainPort, and FlexiPort, but does not have FlexiIOPort.  Probably the best one is this for about $46 shipped, which is the authentic version that they don't sell at the official place any more.  I have two arriving today in the mail that I bought when I saw they were the authentic ones.  :)  You may need to add pullup resistors to the mag to get I2C mag really reliable on any FC.  It does bad things when it isn't reliable (short freezes and reboots).
http://www.ebay.com/itm/172353561802

Re: Changing revo Flexio wires
« Reply #11 on: February 24, 2017, 11:36:19 pm »
You would be right about the rpi and the itch to use it. But also I don't have a ton of money to spend on more stuff! I do like that naza gps/mag that is on the same port though.

But also, I am not sure how to debug the flexiIO anymore than I have. Bluetooth telemetry works through flex port and main port, but not flexIO. Any hints on further debugging that would be appreciated.

Re: Changing revo Flexio wires
« Reply #12 on: February 25, 2017, 07:18:45 am »
The code looks like GPS should use FlexiIO pins 7 and 8 when you have RcvrPort configured as PPMGPS.

Pin 7 transmits, so you connect it to RxD on the GPS
Pin 8 receives, so you connect it to TxD on the GPS

You could try swaping the pins around in case you got it backwards.  Be aware that you can't go by color because they use whatever cables they can get.  You have to count the wires at the connector that comes out of the Revo.

This is a standard Revo right?  Not one of those Revo Mini?  I would guess the pin order would be the same, but I don't know.

I will configure a Revo to talk to GPS and see if I can get it working.

Re: Changing revo Flexio wires
« Reply #13 on: February 25, 2017, 07:29:29 am »
Oh yea, there is a confusion factor here I forgot about.  The Revo has a 10 pin header, but pins 3 and 4 are missing.  Don't use the last two wires because they are actually 9 and 10.  Go back to pin locations 7 and 8; kind of like wires 5 and 6 out of 8 wires.
« Last Edit: February 25, 2017, 07:42:48 am by TheOtherCliff »

Re: Changing revo Flexio wires
« Reply #14 on: February 25, 2017, 07:39:09 am »
Pins 7 and 8 (wires 5 and 6 out of 8 ) work fine.  Revo talks to GPS fine.

I bet large money that is your problem.  :)

I didn't even bother to figure out what was tx and rx.  I just tried it one way and it was wrong, so I tried it the other way and it worked.