Lucky

  • *
  • 12
Trouble setting up a MS4525DO
« on: May 26, 2017, 01:10:02 am »
I am trying to set up a MS4525DO (Pixhawk) airspeed sensor on a Sparky2 flashed with 16.09. No matter what I do the Sparky2 will not talk to the sensor. The Flexi port works. I configured for a GPS aux mag and it works fine. But when configured for an airspeed sensor (0x28)I see no activity at all with a USB Logic Analyzer. It never toggles. I looked at the I2C port with a scope and the pull ups looked weak (slow rise time) so I changed them to 2.2k to sharpen up the pulses. I looks like it is talking to the Baro sensor on the board (0x77) just fine. I have used the Configuration Wizard and poked at the settings page all to no avail. The Sparky2 never tries to communicate with the MS4525DO. The Status pane shows the airspeed as a black box with a red X over it. The I2C is always black.

Ideas?

Thanks
Lucky

Re: Trouble setting up a MS4525DO
« Reply #1 on: May 26, 2017, 07:27:28 am »
You might need to go into System -> Settings -> HwSettings -> OptionalModules and enable the airspeed module.

Lucky

  • *
  • 12
Re: Trouble setting up a MS4525DO
« Reply #2 on: May 26, 2017, 05:56:42 pm »
Thanks for the reply.

I was using OP with a Pixhawk. Now I'm trying to set up LibrePilot on a Sparky2.
Thanks for all your hard work. I love the open source community and hope I can contribute.
I think I have enabled the airspeed module but I will revisit it when I get home.

Lucky
Lucky

mr_w

  • *
  • 207
    • LibrePilot
Re: Trouble setting up a MS4525DO
« Reply #3 on: May 31, 2017, 11:17:36 pm »
Airspeed module will talk to MS4525DO only if AirspeedSettings.AirspeedSensorType is set to PixHawkAirspeedMS4525DO. Default value for this setting is None. It might be worth checking through System tab.

It also seems that MS4525DO can be used with only with Flexi port on sparky2, dedicated i2c port is not an option for pixhawk sensor. These two ports are two different i2c ports, and now when you mention the you see barometer traffic, this is most definitely not FLEXI port you have hooked logic analyser to.






Lucky

  • *
  • 12
Re: Trouble setting up a MS4525DO
« Reply #4 on: June 03, 2017, 12:00:47 am »
I did some more research over the week. I have a NAZA GPS and a Chinese clone (http://www.ebay.com/itm/Ublox-NEO-M8N-GPS-Module-with-Shell-for-Pixhawk-PIX-PX4-Flight-Controller-CA-US-/281764017000?hash=item419a71b368:g:H7UAAOSw9N1VvspD) which seems to work really well by the way... 13-14 sats vs 7-9 on the NAZA in my living room.
I configured the Sparky2 with the NAZA and I have GPS and aux mag. Both serial on the main port. I changed over to the pixhawk clone... GPS on the main port and aux mag on the Flexi. Everything worked properly.
I went back to the NAZA and the Pixhawk airspeed sensor....used the wizard....and nothing on the flexi port...flat line high. I went through all the configuration settings I could find and everything looked like it was configured properly, but still no joy.
Does anyone have the MS4525DO working on the Flexi port on the Sparky2. Did something get missed on the port to the Sparky2 or have I missed something?

Thanks for the help.

Lucky
Lucky

Re: Trouble setting up a MS4525DO
« Reply #5 on: June 03, 2017, 10:02:20 pm »
FYI: Authentic DJI/Naza GPS has a Neo6 in it.  This is old tech that can only see USA GPS satellites, not all the other flavors.

It bears saying that with a typical installation, you must have the flight battery plugged in for any external device (GPS, mag, airspeed, rc receiver) to get power.

If it is still configured to see the I2C mag on flexiport, you may try disabling that to see if it helps.  Just set the aux mag type to something different, like DJI.  If that fixes it, it should be treated as a bug because I2C is a bus and you should be able to put both things on it.

On the other hand, configuring it for two things on I2C but only connecting one will likely cause problems.  It could be that all you need to do is have both I2C devices attached to FlexiPort and powered.

Lucky

  • *
  • 12
Hi The Other Cliff,

Thanks for working with me.
Your last post got me to thinking.....
I put the Pixhawk GPS on the mainport. I put the Aux Mag on the Flexi. I set up the Flexi as I2C.
Everything works fine. The Flexi talks to the Aux Mag 8-bit read address is 0x3D
8-bit write address is 0x3C. I set the airspeed sensor type to pixhawk and I started seeing the Flexi trying to read from 0x51. I set the airspeed sensor type to none and the Flexi quit trying to read from 0x51.
I looked at the data sheet for the 4525D.
http://www.te.com/commerce/DocumentDelivery/DDEController?Action=srchrtrv&DocNm=MS4525DO&DocType=DS&DocLang=English
The part type on my Pixhawk airspeed sensor is 4525D 5AI 001D which is a 5 volt dual port 10%  I2C (Addr.0x28H) 1psi part.
I think Librepilot is looking for the airspeed sensor at 0x51 which is the 150PSI part.

So, what I have learned is that the Flexi port will not talk I2C with just the Pixhawk speed sensor turned on. The Flexi port does work when talking to the Aux Mag over I2C. It talks to the Pixhawk speed sensor and the I2C aux mag if they are both turned on, but the airspeed module is looking for the wrong part on the bus. (0x51, 150 PSI  vs 0x28, 1 PSI)

I haven't set up a build environment yet, but I'm working on it. Then see if 'm smart enuf to figure out where that address is set.

Thanks, Lucky
« Last Edit: June 04, 2017, 06:27:30 am by Lucky »
Lucky

Re: Trouble setting up a MS4525DO
« Reply #7 on: June 04, 2017, 06:53:15 am »
On one hand I can believe that it hasn't been tested in a while and certainly could be broken, but on the other hand, I find it puzzling that it is talking to a port only available on the wrong part.  I would guess that it worked in the past and if it's now broken I wouldn't expect that sort of error.

Let us know what you find.  I have a fixed wing waypoint project that I just got working using the groundspeed based estimation, and I just ordered a MPXV7002DP APM sensor to try it out.
http://www.xt-xinte.com/F19512.html

Lucky

  • *
  • 12
Re: Trouble setting up a MS4525DO
« Reply #8 on: June 07, 2017, 06:07:35 am »
I have discovered the  source of my pain......It is me.... I had the I2C decoder set up for 8 address bits when it should have been 7. Anyway, the firmware is pointing to the right addresses... always has been. I built an I2C expander board and I put the aux mag and the Airspeed sensor on the flexi Port. The aux mag is working fine and the firmware is looking for the airspeed sensor but it is still not ACKing. I will look into that.
Thanks for wading through my stupidity with me....

I'm working towards a fixed wing route follower too...
I had one working years back based on a Crossbow unav and flight software by Curtiss Young??? I wrote my own groundstation but then OP passed me up so I quit working on it.

Lucky
Lucky

Lucky

  • *
  • 12
Re: Trouble setting up a MS4525DO
« Reply #9 on: June 14, 2017, 11:36:12 pm »
This turned out to be an I2C pull up issue. The MS4525 is a 5v part powered by VCC_UNREG. The Flexi port I2C pull ups are tied to 3.3v (VCC). I looked at the data and clock lines on the scope and they looked marginal at best. I changed the pull ups (R20, R21) from 10k to  4.7k and the airspeed sensor started talking to Sparky. I still get intermittent I2C and airspeed errors so I am going to try 3.3k resistors and see if they go away.
Lucky

Brian

  • *
  • 119
Re: Trouble setting up a MS4525DO
« Reply #10 on: June 15, 2017, 12:22:35 am »
You might try powering the airspeed sensor with 3.3V.    I don't see any specs in the datasheet on what the threshold voltages are for high and low, but usually it's not a good idea to mix 3.3V and 5V parts without a level converter.  It's likely that the high-level threshold is near 3.3V, and any noise on the line will cause errors.

Lucky

  • *
  • 12
Re: Trouble setting up a MS4525DO
« Reply #11 on: June 15, 2017, 09:44:07 pm »
I have not tried to power the airspeed sensor from 3.3v. I can try that. TE Connectivity lists a part number for a 3.3v version of the part, but a Google search returns nothing.
Changing the pullups to 3.3k does not seem to help the intermittant I2C/airspeed errors.
Lucky

Brian

  • *
  • 119
Re: Trouble setting up a MS4525DO
« Reply #12 on: June 15, 2017, 10:08:29 pm »
The datasheet is confusing.  It shows a supply voltage supported from 2.7 to 5.5, but then seems to imply that there are 3.3V versions and 5V versions.  In any case, it's probably worth a try powering it of 3.3V.  It shouldn't hurt anything, and it might work.

Re: Trouble setting up a MS4525DO
« Reply #13 on: June 15, 2017, 11:48:39 pm »
At one time you had I2C mag set to talk on FlexiPort.  Try setting the aux mag type to say DJI to make sure the i2C mag sensor is not interfering.  I can imagine that it is trying to talk to the aux mag and timing out.

Lucky

  • *
  • 12
Re: Trouble setting up a MS4525DO
« Reply #14 on: June 16, 2017, 04:34:04 pm »
I built a little I2C expansion board so I can put both the GPS aux mag and the airspeed sensor on the Flexi port. Sparky2 talks to them both just fine now that I've changed the pull ups. I will disable the aux mag and see if the intermittent I2C/airspeed errors go away. Seems like this should not be an issue as the I2C controller should manage the traffic. Ideally, I would like to put the aux mag on the I2C port shared with the on-board baro sensor and plug the speed sensor into the Flexi port. I haven't looked into it yet. I'm still getting familiar with all this.

I have not figured out how to get the pitot airspeed on the PFD yet. Anybody? Still looking at that. I was successful building the package so I can start to poke at it a little.

Lucky
Lucky