{"action":"created","issue":{"url":"https://api.github.com/repos/cyoung/stratux/issues/309","repository_url":"https://api.github.com/repos/cyoung/stratux","labels_url":"https://api.github.com/repos/cyoung/stratux/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/cyoung/stratux/issues/309/comments","events_url":"https://api.github.com/repos/cyoung/stratux/issues/309/events","html_url":"https://github.com/cyoung/stratux/issues/309","id":138867770,"number":309,"title":"Hardware measurements on an  HMC5883L Digital Compass in a LEADIY-D3","user":{"login":"Ergonomicmike","id":15025888,"avatar_url":"https://avatars.githubusercontent.com/u/15025888?v=3","gravatar_id":"","url":"https://api.github.com/users/Ergonomicmike","html_url":"https://github.com/Ergonomicmike","followers_url":"https://api.github.com/users/Ergonomicmike/followers","following_url":"https://api.github.com/users/Ergonomicmike/following{/other_user}","gists_url":"https://api.github.com/users/Ergonomicmike/gists{/gist_id}","starred_url":"https://api.github.com/users/Ergonomicmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ergonomicmike/subscriptions","organizations_url":"https://api.github.com/users/Ergonomicmike/orgs","repos_url":"https://api.github.com/users/Ergonomicmike/repos","events_url":"https://api.github.com/users/Ergonomicmike/events{/privacy}","received_events_url":"https://api.github.com/users/Ergonomicmike/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-07T02:20:21Z","updated_at":"2016-03-07T07:02:04Z","closed_at":null,"body":"1. Stratux version: 0.vb7+alpha to 18de.sh build\r\n2. Stratux config:\r\n\r\n    SDR\r\n      [ ] single\r\n      [X] dual\r\n\r\n    GPS\r\n      [X ] yes\r\n      [ ] no\r\n      type: BU-353\r\n\r\n    AHRS\r\n      [X] yes\r\n      [ ] no\r\n\r\n    power source:\r\nAnker E5\r\n    usb cable:\r\nAnker cable\r\n3. EFB app and version: (e.g., WingX Pro7 8.6.2)\r\nN/A\r\n    EFB platform: (e.g., iOS 9.2)\r\nN/A\r\n    EFB hardware: (e.g., iPad Mini 2)\r\nN/A\r\n4. Description of your issue:\r\n\r\nFirst, after seeing a Stratus V2 play, I don't think that getting the digital compass to work on the Stratux is an issue. (No warning from Stratus to place the unit away from metal or to swing the compass before using.) Still, it bugs me because the digital compass is suppose to work, whether Stratux uses it or not.\r\n\r\nSo, I bought a LEADIY-D3, per https://www.reddit.com/r/stratux/comments/479wy0/ry835ai_ahrs_alternative_for_sale_2499/\r\n\r\n(Note now that the website leadiy.com (all in Chinese) shows a -D3A now.)\r\n\r\nIt says it has the same chipset as the RY835ai.\r\n\r\nIt has (ostensibly) a Honeywell  HMC5883L on the board. (Ostensibly because it says L883 on the IC.)\r\n\r\nAlthough I get a \"Heading\" indication in the Stratux UI AHRS page that tracks, that appears to be a (drifting) gyro output, that starts at 360 degrees when the Stratux first powers up, regardless of the orientation of the Stratux.\r\n\r\nI got out my old 'scope. Now, my eyes are old, my hands are shaky, and these parts have gotten a lot smaller. (And my 'scope pin probe a lot bigger.) So someone should confirm my findings.\r\n\r\nData sheet from http://www51.honeywell.com/aero/common/documents/myaerospacecatalog-documents/Defense_Brochures-documents/HMC5883L_3-Axis_Digital_Compass_IC.pdf\r\n(Updated for Data Sheet for the \"L\" version.)\r\n\r\nPin 1, SCL is not toggling. It stays high all the time. (The header pin on the board for SCL does pulse low.)\r\nPin 16, SDA is also high all the time.\r\n\r\n~~Pin 2 and Pin 4 are connected by the PCB. The data sheet shows that Pin 4 is supposed to be No Connection.~~\r\n\r\n~~Pin 14 is supposed to tie to Pin 2 in a single supply configuration. If it does, I can't see a pad. Looking at an enlargement of the same board without the L883 confirms that there is no connection on pin 14.\r\nhttp://www.amazon.co.uk/LEADIY-D3C-MPU6050-Angular-Sensor-Acceleration/dp/B00WG9HUTM?tag=duc08-21~~\r\n\r\nSome folks in the arduino forum have been fighting inconsistencies with data sheets and code.\r\nhttp://forum.arduino.cc/index.php?topic=55159.0\r\n\r\nThey also say that the chip is susceptible to failure from reflow soldering.\r\n\r\n~~If there are actual misconnections at the hardware level (on the PCB) , then it might be that no amount of code is going to make the chip with this board.~~\r\n\r\n(Updated to remove reference to pin 15, DRDY. Not needed unless max throughput it desired.)\r\n\r\nI'll leave it to Chris to close this \"issue\" out."},"comment":{"url":"https://api.github.com/repos/cyoung/stratux/issues/comments/193132246","html_url":"https://github.com/cyoung/stratux/issues/309#issuecomment-193132246","issue_url":"https://api.github.com/repos/cyoung/stratux/issues/309","id":193132246,"user":{"login":"Ergonomicmike","id":15025888,"avatar_url":"https://avatars.githubusercontent.com/u/15025888?v=3","gravatar_id":"","url":"https://api.github.com/users/Ergonomicmike","html_url":"https://github.com/Ergonomicmike","followers_url":"https://api.github.com/users/Ergonomicmike/followers","following_url":"https://api.github.com/users/Ergonomicmike/following{/other_user}","gists_url":"https://api.github.com/users/Ergonomicmike/gists{/gist_id}","starred_url":"https://api.github.com/users/Ergonomicmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ergonomicmike/subscriptions","organizations_url":"https://api.github.com/users/Ergonomicmike/orgs","repos_url":"https://api.github.com/users/Ergonomicmike/repos","events_url":"https://api.github.com/users/Ergonomicmike/events{/privacy}","received_events_url":"https://api.github.com/users/Ergonomicmike/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T07:02:04Z","updated_at":"2016-03-07T07:02:04Z","body":"So, since the SCL input is always high to the Compass, I have to assume that it's wired to the MPU-6050's Auxiliary i2c bus. \r\n\r\nI also assume that the Compass has to be switched to the Continuous Measurement Mode thru the MPU-6050's Aux Bus. (A one time event after 56 milliseconds after start up.)\r\n\r\nOn page 26 of the [MPU-6050 datasheet](https://www.cdiweb.com/datasheets/invensense/MPU-6050_DataSheet_V3%204.pdf) they discuss using their Aux i2c bus for Magnetometers. They say this is good for sensor fusion in their on-chip DMP. (But since metal in the aircraft could be a problem, the Stratux might not want that fusion.)\r\n***\r\n7.11 Auxiliary I 2 C Serial Interface\r\nThe MPU-60X0 has an auxiliary I 2 C bus for communicating to an off-chip 3-Axis digital output magnetometer or other sensors. This bus has two operating modes:\r\n-  I 2 C Master Mode: The MPU-60X0 acts as a master to any external sensors connected to the\r\nauxiliary I 2 C bus\r\n-  Pass-Through Mode: The MPU-60X0 directly connects the primary and auxiliary I 2 C buses together,\r\nallowing the system processor to directly communicate with any external sensors.\r\n\r\nAuxiliary I 2 C Bus Modes of Operation:\r\n- I 2 C Master Mode: Allows the MPU-60X0 to directly access the data registers of external digital\r\nsensors, such as a magnetometer. In this mode, the MPU-60X0 directly obtains data from auxiliary\r\nsensors, allowing the on-chip DMP to generate sensor fusion data without intervention from the\r\nsystem applications processor.\r\nFor example, In I 2 C Master mode, the MPU-60X0 can be configured to perform burst reads,\r\nreturning the following data from a magnetometer:\r\n-  X magnetometer data (2 bytes)\r\n-  Y magnetometer data (2 bytes)\r\n-  Z magnetometer data (2 bytes)\r\nThe I 2 C Master can be configured to read up to 24 bytes from up to 4 auxiliary sensors. A fifth sensor\r\ncan be configured to work single byte read/write mode.\r\n\r\n- Pass-Through Mode: Allows an external system processor to act as master and directly\r\ncommunicate to the external sensors connected to the auxiliary I 2 C bus pins (AUX_DA and\r\nAUX_CL). In this mode, the auxiliary I 2 C bus control logic (3 rd party sensor interface block) of the\r\nMPU-60X0 is disabled, and the auxiliary I 2 C pins AUX_DA and AUX_CL (Pins 6 and 7) are\r\nconnected to the main I 2 C bus (Pins 23 and 24) through analog switches.\r\nPass-Through Mode is useful for configuring the external sensors, or for keeping the MPU-60X0 in a\r\nlow-power mode when only the external sensors are used.\r\nIn Pass-Through Mode the system processor can still access MPU-60X0 data through the I 2 C\r\ninterface\r\n***\r\nPass Through mode sounds more like what Chris wants. But I can't tell if you HAVE to use analog switches (on the PCB) for AUX-DA and AUX-CL. \r\n\r\nEven if you don't need analog switches, it appears from the traces on the LEADIY-D3 that it is wired for the Auxiliary Mode of the MPU-6050. (That is, the SCL pin from the Compass comes from the AUX-CL pin on the 6050.) So it seems that it would take a different PCB layout for Pass-Through Mode. \r\n\r\nSo if Stratux had to have Compass, and if there are no production boards wired for Pass-Through, then someone might have to come up with a break out board specifically for the Stratux.\r\n\r\nI'm ready to close this now.\r\n"}}