chromvis

  • *
  • 117
Sparky2 with LibrePilot + External magnetometer (r643)
« on: May 10, 2016, 03:49:10 am »
I am raning out of connection sockets on Revolution board. I am using S.bus for control on Main port, OSD-telemetry on FlexOI, GPS on Flexi and power+voltage sensors on PWR ports. I compile and build LibrePilot r643 (next with external magnetometer, surprisingly it works fine although I did not install firmware yet), but I have no ports to connect it to I2C (SCL and SDA is only on Flexi).
Since OSD is only passive (using Tx wire) is it possible to configure any Telemetry capable output to serve for both GPS and OSD?  This configuration is working on APM with PixFalcon.
Other solution,  to use Sparky2 FC. I read in some forum (do not remember which) that Sparky2 is supported with Librepilot. Which firmware should I use on Sparky? I do not want to switch to TauLabs (already been there).
Any thoughts and recommendations will help.
Thanks.

Re: Sparky2 with LibrePilot + External magnetometer (r643)
« Reply #1 on: May 10, 2016, 04:05:03 am »

If you are running a revolution you could use

Flexi-IO: PPM for rcvr, pin 7/8 (TX/RX) for OSD
Main: GPS
Flexi; Ext MAg
Pwr/Sonar: Volt/Current Sensor

if your rcvr doesn't support PPM ( FrSky, etc ) you can get the SBUS->PPM cable.

Sparky 2 is being used by a few of the Devs from what I have read and Cliff does talk about it in the 'next' release https://forum.librepilot.org/index.php?topic=868.msg6288#msg6288.

Ben

chromvis

  • *
  • 117
Re: Sparky2 with LibrePilot + External magnetometer (r643)
« Reply #2 on: May 10, 2016, 07:01:08 am »
Thank you. This is actually an idea. I have S.Bus to cPPM converter (not sure if cPPM is the same as PPM though).
Although I just tested fresh build of 'next' release (apparently it was easy to compile), and there are lots of bugs. PFD screen in Flight data does not exist (just white field)
GSC crashes on Halt-Boot sequence if battery is powered. I got MAG tab in Attitude but was unable to activate external mag (Although I was using UBLOX-7m, and as I remember it only works with 8M version, but both have mag). So I probably will go back to 15.09 release and stick to rate mode for racing and acro. My previous ventures into GPS controlled flight with OP was stopped by excessive vibration effect, on APM and PixFalcon by system confusion between mars and GPS, their excessive Kalman filters seems to unable to decide which module is preferable, so sometimes it was doing strange things and was unreliable and I went back to Librepilot/OP at least good flexibility in tuning (manual though).
I still would like to see any info/suggestions from people who used Sparky2, with short comparison if possible.
Best.

Mateusz

  • *
  • 808
Re: Sparky2 with LibrePilot + External magnetometer (r643)
« Reply #3 on: May 10, 2016, 08:21:00 am »
  • Another option for you is to use DJI Naza compatible GPS, which has both AuxMag and GPS on one serial connection and that needs only one port for both. That works with development code and will come in next release maybe even to be scheduled for this month.
  • I am using Sbus with Sparky2, there exists dedicated I2C port on it. However, Sparky2 I2C bus uses exactly the same value 10k pull-up resistors (checked in schematics) as on Revolution. Some people reported that connecting additional device to I2C makes those pull-ups too weak because of increased capacitance. In that case signal was interrupted and not always worked, adding 1.2k pull-ups helped a lot (see here https://forum.librepilot.org/index.php?topic=1110.msg11185#msg11185).
  • For the I2C port I am going to use two devices hence I made small PCB 1x2cm with space for extra pull-ups (see attachment) or https://github.com/mashu/I2CHub meant to serve as tiny hub that easily fits into shrink tube.
« Last Edit: May 10, 2016, 08:24:21 am by Mateusz »

Re: Sparky2 with LibrePilot + External magnetometer (r643)
« Reply #4 on: May 10, 2016, 09:02:02 am »
I fly Sparky2 regularly, but am using an old Sparky2 branch.  I don't actually have any OSD yet, but plan to in the future.

Some things you could try.

On Revo / Sparky2 there is a pin on RF module that has all the transmit data.  It might work to attach (warning: tiny soldering)  MinOpOSD OSD there and configure it to send telemetry over the built in OpLink.  If you don't set the FC as coordinator though, the OSD will stop updating if telemetry goes out of range.  Baud rate on OSD must match OpLink baud rate.  Has anybody tried this and can post about it?  Edit:  Sorry.  I was wrong.  The FC talks to the RF chip with SPI, not serial.

Of course, Sparky2 has everything you need:
RcvrPort for S.Bus
MainPort for GPS
FlexiPort for OSD (MinOpOSD)
I2CPort for AuxMag (might need pullups)

Of course if your OSD can read raw uBlox data, it can be connected to the GPS TxData line.  This won't give you an Artifical Horizon though.

DJI GPS or OP V9 GPS would also get it working by putting mag data on the GPS line.
« Last Edit: May 11, 2016, 06:04:54 am by TheOtherCliff »

chromvis

  • *
  • 117
Re: Sparky2 with LibrePilot + External magnetometer (r643)
« Reply #5 on: May 11, 2016, 04:14:48 am »
 Mateusz, thank you for very interesting suggestions. I will definitely test I2C and install additional pull-up resistors.
TheOtherCliff, Could you please indicate which pin has TX data on OPLink (I suspect it is on the other side of Revo).

BTW. Which firmware should I use on Sparky2? (I should receive it tomorrow, and want to play with it.)

My old Revo  behave strangely (constantly yawing right) and I checked barometer readings - they have high noise level. This is revo-clone I got in August last year. So, I want replace it with Sparky2.

Re: Sparky2 with LibrePilot + External magnetometer (r643)
« Reply #6 on: May 11, 2016, 06:03:22 am »
Sorry.  I was wrong.  The FC talks to the RF chip with SPI, not serial.  :(
I had recalled hearing someone talk about this a long time ago, including the bit that if the FC is not the coordinator, that the transmission stops and so the OSD stops getting updates.
I will update my previous post.