f5soh

  • *****
  • 4572
    • LibrePilot
Re: Can't get data from Aux Mag
« Reply #15 on: March 02, 2016, 11:40:05 pm »
No need all this steps, you can stop while you got I2c orange / mag sensor connected with external power.

Post goods pictures with your setup

malakym

  • *
  • 13
Re: Can't get data from Aux Mag
« Reply #16 on: March 03, 2016, 10:56:31 pm »
I'm not exactly sure what you want but here are a few so far.

http://i.imgur.com/hJijfnn.jpg
http://i.imgur.com/FQjxjvq.jpg (ESC normally connected for flight battery power)
http://i.imgur.com/Affci3u.jpg
http://i.imgur.com/Fr1Icts.jpg?1 (SCL Blue, SDA White)

I have JST connectors on the end of the Micro JST (gps+mag) to connect to the Micro JST-SH (Revolution).

Blue SCL is connected to Pin 3 (Orange) on Flexi
White SDA is connected to Pin 4 (Green) on Flexi

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Can't get data from Aux Mag
« Reply #17 on: March 03, 2016, 11:12:20 pm »
Try shorten wires for all connections or at least Gnd/SCL/SDA for mag

malakym

  • *
  • 13
Re: Can't get data from Aux Mag
« Reply #18 on: March 03, 2016, 11:37:12 pm »
I have recently received JST-SH 20cm leads recently, didn't want to modify the GPS+MAG if it wasn't working, but since I confirmed it working on the Pi I have gone and soldered on new leads. Cable length was 42cm before, its 20cm now.

I've just done SDA/SCL with no luck, Im about to do the rest so the mag ground (from Main/GPS) is shorter too.

malakym

  • *
  • 13
Re: Can't get data from Aux Mag
« Reply #19 on: March 04, 2016, 12:02:41 am »
All done but no luck.

http://i.imgur.com/1AsLutW.jpg

GPS working.
I2C Orange, (Aux)Mag sensors showing 0s.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Can't get data from Aux Mag
« Reply #20 on: March 04, 2016, 12:18:02 am »
Be sure apply +5v from esc first.

Maybe some hardware issue somewhere, works perfectly here using I2C with two different hardware.
Your Revo board do not follow original routing, maybe related or not, don't know.
For testing a external mag alone is around 3$

malakym

  • *
  • 13
Re: Can't get data from Aux Mag
« Reply #21 on: March 04, 2016, 12:24:43 am »
I'm always powering from flight battery/ESC first. :)

I ordered a MAG3110 last week from China, so will have another one to test eventually if this doesn't get working.

What is different? It looks similar to most pictures I've seen and the diagram in GCS.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Can't get data from Aux Mag
« Reply #22 on: March 04, 2016, 12:30:35 am »
Not really the same board.


Here is my desk setup for testing

If you finally get i2c you can pull next and use the new tab for mag testing and orientation.

hwh

  • *
  • 1018
Re: Can't get data from Aux Mag
« Reply #23 on: March 04, 2016, 12:35:16 am »
...I ordered a MAG3110 last week from China, so will have another one to test eventually if this doesn't get working....

That won't do any good, the mag that LP supports is the HMC5883L.   The software doesn't have a driver for a MAG3110 unless it's a clone of the HMC5883L.

malakym

  • *
  • 13
Re: Can't get data from Aux Mag
« Reply #24 on: March 04, 2016, 12:48:43 am »
The one I have atm is a HMC5883L at least, I had to use libraries for that chip on the Pi so I know its what we need. Too bad with the 3110, I've gone an ordered a separate HMC5883L from the UK as I don't want to keep waiting :p

Ah I see now, will check the traces to make sure the Flexi port is wired up correctly - granted GPS works in it but might as well.

I saw the Mag Tab commit on IRC earlier but git pull wasn't working earlier for me, its working now so will have a look.
« Last Edit: March 04, 2016, 12:55:24 am by malakym »

malakym

  • *
  • 13
Re: Can't get data from Aux Mag
« Reply #25 on: March 05, 2016, 01:15:13 pm »
All working now :)

Received a HMC5883L this morning, wired it up and it works.

Looks like an issue with my GPS+MAG then, even if it does work in my Rasberry Pi.




Just need to calibrate it now, thanks for the help. :)

Re: [SOLVED] Can't get data from Aux Mag
« Reply #26 on: March 05, 2016, 06:47:09 pm »
Read help here:
https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration

It will tell you (among other things) that most aux mags need orientation set to BoardRotation.Pitch=180

f5soh

  • *****
  • 4572
    • LibrePilot
Re: [SOLVED] Can't get data from Aux Mag
« Reply #27 on: March 05, 2016, 07:33:19 pm »
It will tell you (among other things) that most aux mags need orientation set to BoardRotation.Pitch=180

Using the last mag gui the orientation setting is quite easy.
- Calibrate with "booth" mags

If mag chip is facing down, set Roll to 180°
Adjust Yaw orientation if needed, check sliders.
All sliders still around "0" while rotating frame if orientation is correct.