Analog speed sensor drifting maybe a idea...

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
Yogilours
Posts: 22
Joined: Tue Nov 21, 2017 6:49 pm
Country: -

Analog speed sensor drifting maybe a idea...

Post by Yogilours »

Hello,

I recently read a MPX5700DP analog sensor on the arduino via oXs on an analog pin of the arduino. There is absolutely no drift in the measure.

I also used a MPXV7002 sensor and a MPX5010DP sensor later on the ADS1115 converter to calculate airspeed. Both suffered drifting. So as we discussed in a previous post it could be the time the sensor heats up.

So I tried the 7002 and the 5010 on the A1 pin of the arduino : no drift. I tested also the MPX5700 on ads1115 : Drift !

So for me it's the ads1115 that's responsible for drifting measures. Is there any other stuff that could do the job without drifting ? Couldn't we use the arduino's ADC even if it's less accurate ? Any idea ?

Guillaume

Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: Analog speed sensor drifting maybe a idea...

Post by Carbo »

Any chance to use a DVM in parallel in both cases? Presumably the drift ia always identical, but the higher resolution of the ADS1115 may show the drift, the Arduino analog in not (16bit vs. 10bit resolution). A DVM shows exactly, what´s happening on the analog out. Eventually there are other influences, but the DVM will show it.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Analog speed sensor drifting maybe a idea...

Post by mstrens »

Perhaps internal temperature of ADS1115 increases to much when oXs ask for many conversions.
When airspeed is not used for vario compensation, it should be possible to reduce the frequency of ADC conversion.
This could perhaps help.
Yogilours
Posts: 22
Joined: Tue Nov 21, 2017 6:49 pm
Country: -

Re: Analog speed sensor drifting maybe a idea...

Post by Yogilours »

Hello !

I used a DVM to perform some tests. I power the arduino with a 2S LiPo to be sure to have a voltage over 5V on entry of the arduino.

It appears that the sensor voltage is around 206.5mV on startup and quickly drops around 202mV. That's for the first part of the drift. it gives around -10 km/h with the MS parameter at 2.

So I added in the setup delay(10000); in the setup to get rid of this drift. This time on startup I have 0.0 km/h for the first measure but it drifts to around 6km/h in 3 minutes. The MS parameter changes nothing (MS2 and MS69 tested) .After reset (after 3 minutes) I have -1 km/h stable.

I also plugged the sensor to A1 on the arduino. I have the same drop on startup but no noticebale drift on telemetry. Probably due to the lower precision of the arduino ADC.

So for me there is a drift of the sensor that stabilises quickly and one due to the ADS1115 that is much slower. Probbaly the MPXV7002 has the same problem.

Honnestly I'm not very good at electronics so if my protocol is wrong tell me.

Guillaume
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Analog speed sensor drifting maybe a idea...

Post by mstrens »

So you identified a drift from the sensor : it goes quicly from 206.5 to 202 mv.
After 3 min you have also noticed a drift in the telemetry data.

It is not clear from your report if the drift over 3 min results from ADS1115 or from the sensor.
To clarify this, did you measure the voltage on sensor with a DVM after 3 min. It could be that is not 202 mv anymore.

If the voltage provided by the sensor is not stable, there is no solution measuring with arduino instead of ads1115.
Please note that a drift of 6 km/h around 0 km/h is not bad.
In fact around 0 km/h a very very litle change of the measured voltage has a big impact on the calculated airspeed.
But when airspeed increases, the same change of voltage will have much much less impact on the calculated airspeed.
So, even if you have an offset of 6 km/h, when you fly at about 100km/h this offset will only have an impact of about 0.5 km/h.

Using arduino ADC instead of ads1115 will probably not give a better accuracy , it will just mask the issue because it is much less sensitive.
Furthermore, arduino ADC refers to VCC (or to internal voltage reference) wich is probably less accurate than the internal voltage reference from ads1115.

Yogilours
Posts: 22
Joined: Tue Nov 21, 2017 6:49 pm
Country: -

Re: Analog speed sensor drifting maybe a idea...

Post by Yogilours »

hello,

Thanks for the answer. After the drop from 206mV to 202 the voltage is stable. That's why I suspected the ADS1115.

Yes you're right 6km/h drift is not so bad especially if become very tiny with speed increasing. (0.5km/h a 100km/h as you told).

So do you think I should keep my modification based on delay(10000) on startup ?

Guillaume
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Analog speed sensor drifting maybe a idea...

Post by mstrens »

Yes I suggest that you keep your modification based on delay.
You could also furthermore increase the delay to reduce the drift.
Up to you to see how long you can wait.

Note : take care that when you are on the field and if there is some wind, this wind would have an impact on the "zero" if the pitot tube is not protected.
oXs offers also some ways to force a reset of airspeed (e.g. button, ppm signal) where oXs uses current voltage from sensor as new reference for zero km/h.
Yogilours
Posts: 22
Joined: Tue Nov 21, 2017 6:49 pm
Country: -

Re: Analog speed sensor drifting maybe a idea...

Post by Yogilours »

Yes I know that I have to protect the pitot tube. This version will be for my friend. I will personnaly use a MS4525, I tried it and there is absolutely no issue...
I also used the ppm signal in my tests and it works great after all the drifts. Apparently I'm not the only one to have seen the drift maybe other will be interseted by this modification...

Thanks a lot Guillaume

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”