-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems reading two barometers from version 0.3.3 onwards. #23
Comments
You're welcome, thank you for reporting this issue. As I only have one sensor I am not able to recreate your setup, so I need your help to analyse. 0.3.2 works and 0.3.3 does not. OK-> compare There is an optimization done in the timing reset() => delay(3) replaced by delayMicroseconds(2800) These timings are from the datasheet so considered correct, hypothese 1 TEST 1: swap the sensors addresses to see if problem happens with the 0x76 address or with the same physical sensor? hypothese 2 TEST2: increase the delays e.g. in convert to 3000 microseconds? in convert, add a few 100 us per entry. hypothese 3 What board are you using? |
If hypothese 2 solves the problem I can include it in the 0.3.6 release. |
Updated timing added to develop branch - https://github.com/RobTillaart/MS5611/tree/develop |
Adding a simple example for two sensors to the example folder to have a minimal test. |
Thank you for the reply and your work on this. I will do the testing. I am not sure if I can get this done during the evening (Norway time), I'll return with result tomorrow at the latest. |
For testing I use a NodeMCU v1.0 (ESP8266). This is easy because of the USB connection. For permanent installation in my model airplane I will use an Arduino Pro Mini. |
I'm in the same time zone (Netherlands, near EIndhoven) Good to hear you are testing the library with processors I did not test with. Helps to get it robust! Do you have a picture of the model plane?) |
My experimental plane (among other ordinary planes). Two ms5611 connected to create differential pressure. |
The latest version adds support for an offset for pressure and temperature. |
I managed to do a couple of tests just a few minutes ago. For info, in my sensor sketch i read both baros, then add 200ms delay, then read both baros again, and so on... Swapping adresses did no difference, other than to move the error to the other baro instance in my sketch. However, i tried in the convert function to change some values: I have not gone deep into the library, but the changed values seem to correspond with the values used in the delay() statement in 0.3.2. Now both baros worked fine. |
exact, so hypothesis 2 was the right one. Can you verify if these values work for you? // values from page 3 datasheet - MAX column (rounded up)
uint16_t del[5] = {600, 1200, 2300, 4600, 9100}; these are the rounded up MAX values from the datasheet. Would still allow to gain 10-40% waiting time compared to 0.3.2 Thanks for testing! |
I just tried with the above values. Both barometers run fine now. |
OK, I will merge 0.3.6 then. That should work for you too. |
Thank you very much for your help and support ! |
You're welcome, please let me know how your experiments go. |
I will, testing during flight is next when the flying season starts. |
I created an issue - #26 The idea is that if you know the sensor ID you can store an calibration offset for temperature and pressure in code or in EEPROM and provide every sensor with the right offsets without calibrating every time. The ROM constants are read in the ms5611.cpp file in the reset() function. As you have more than one sensor please provide a list per sensor. Thanks in advance, |
Hi Rob,
I am sorry, I have been out all day, so could not provide the constants so
far. I will try to do this tomorrow.
Regards,
Helge.
lør. 22. jan. 2022 kl. 10:00 skrev Rob Tillaart ***@***.***>:
… @HWal <https://github.com/HWal>
I created an issue - #26 <#26>
The idea is that if you know the sensor ID you can store an calibration
offset for temperature and pressure in code or in EEPROM and provide every
sensor with the right offsets without calibrating every time.
The ROM constants are read in the ms5611.cpp file in the reset() function.
Can you print your ROM constants per sensor and post them here so I can
compare if they are different enough?
just add a line Serial.println(readProm(reg)); will do the job.
As you have more than one sensor please provide a list per sensor.
Thanks in advance,
Rob
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBZHGF2BB3YBAYCSZ2XOHDUXJW27ANCNFSM5MBAWCVQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
No problem, already had other source . |
Hi again,
For the baro with address 0x76 i get:
12
52157
46715
31062
25551
33042
27419
For the baro with address Ox77 i get:
16
53012
52757
31868
29782
32409
27506
Does this make sense?
Helge.
lør. 22. jan. 2022 kl. 19:16 skrev Rob Tillaart ***@***.***>:
… No problem, already had other source .
But still interesred in your deviceid to see it works.
Thanks
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBZHGDGYIZKXCENJS53JKLUXLYBVANCNFSM5MBAWCVQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It's perfect that they are different. got now 5 results, all different!
|
Ok,
I'll move the baros back into the plane then.
Helge.
lør. 22. jan. 2022 kl. 21:46 skrev Rob Tillaart ***@***.***>:
… It's perfect that they are different.
That makes them a good source to generate an "unique" device ID.
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBZHGBAJER2WBHR3NDHIGLUXMJR5ANCNFSM5MBAWCVQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thank you for testing, hope the plane flies soon! now I'm pretty sure I can create a uint32_t getDeviceID() function, to uniquely (enough) identify sensors from calibration data. |
@HWal |
Thanks Rob.
Yes the plane flies! And flies well too!
I am using two 5611's to calculate airspeed and one of them to calculate
height and climb rate.
The data is sent to a FrSky Taranis radio Tx with the help of a library for
telemetry.
For information I attach the (simple) Arduino code.
Helge.
tir. 25. okt. 2022 kl. 21:01 skrev Rob Tillaart ***@***.***>:
… @HWal <https://github.com/HWal>
just came across this issue, and was wondering if the plane did fly..
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBZHGG5LLCYFX55SNDHGYLWFAU63ANCNFSM5MBAWCVQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thank you for this library, it is of good use to me. I am using it in a DIY airspeed indicator based on two GY63 ms5611 breakouts. The pressures from the pitot tube are read in succession and their values are compared, compensated for the offset between them.
Using version 0.3.2 this all worked fine. But with versions 0.3.3 to 0.3.5 I get corrupted values from the first baro that is read; that is the one with address 0x76.
The text was updated successfully, but these errors were encountered: