Tags:
Basically, I took a big stack of APM boards and a big stack of 7002 and 5004 sensors and tested all the combinations, creating a spreadsheet of all the results. Typical values for the "no airspeed" were in the 2700s. 5004s were in the 1300s when they were connected and 7002s were all in the 3000-3200 range.
I did all these under USB power. Maybe these values are all highly influenced by input voltage, and some ESCs give different voltage?
I could easily drop the threshold to 2900. Would that work for you?
Permalink Reply by Bob Anderson on May 30, 2011 at 10:21am The logic for autodetect of airspeed sensor presence seems inverted to me. In APM 2.12 test.pde and system.pde there is the code...
if ((adc.Ch(AIRSPEED_CH) > 2000) && (adc.Ch(AIRSPEED_CH) < 3000)) {
airspeed_enabled = false;
}else{
airspeed_enabled = true;
}
The idea is to detect the zero offset voltage of about Vcc/2 when the sensor is connected. But in that case, airspeed_enabled should be set to true when the condition is satisfied, not in the "else".
Permalink Reply by Bob Anderson on May 30, 2011 at 11:03am OK. I didn't know that about a disconnected sensor. But, a connected sensor that has a zero offset of Vcc/2 (such as the ratiometric MPXV7002DP ) will have an ADC reading of...
((Vcc/2)/Vcc)*4096 = 2048
and so will be shown as disabled. Isn't that a problem?
Permalink Reply by Bob Anderson on May 30, 2011 at 11:26am
Permalink Reply by Bob Anderson on May 30, 2011 at 11:41am I just measured my MPXV7002DP.
With 5.06 volts in, analog reads 2.45 volts, which is pretty close to the spec sheet.
I measured this open circuit with a DVM.
I guess the "sensor unconnected" readings that you get from the ADC has something to do with internal couplings of nearby voltages. That's probably been as repeatable as your tests have shown because the surrounding voltages are also quite predictable.
BTW: with that ratio (2.45/5.06), the sensor connected reading that I would expect is 1983, and that would yield airspeed_enabled = true, as desired.
Permalink Reply by Harry Cheung on May 30, 2011 at 10:22am
Permalink Reply by Luke on June 12, 2011 at 3:14pm
Permalink Reply by Luke on June 13, 2011 at 7:34pm
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.86 members
51 members
671 members
1280 members
8 members
© 2013 Created by Chris Anderson.
Powered by
