mstrens / oXs_on_RP2040

version of openXsensor to be used on raspberry pi pico RP2040 (more protocols, more functionalities)
89 stars 23 forks source link

oXs Ver.1.1.7 ADS values A0-A3 in FV Terminal #43

Closed Satcomix closed 1 year ago

Satcomix commented 1 year ago

Good morning Mstrens, One day no time and already 4 versions further. I am currently testing Ver1.1.5 with FrSky X20S S.PORT. With the "FV" command, I noticed that RPM is not displayed in the terminal. The display now shows 21 sensors from the oXs_RP2040 plus 8 sensors from the TD-R10 receiver. The values ​​from the ADS1115 are displayed with FV, but not in the handheld display, not even with DIY sensors. Greetings, Torsten

processing cmd

Cmd to execute:

Version = 1.1.5 Function Pin Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 1 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 0 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 12 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 13 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 2 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 4 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 6 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 255 255 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 255 255 Voltage 1, 2, 3, 4 = 26 27 28 29 (V1 / V4 = 26, 27, 28, 29)

Protocol is Sport (Frsky) CRSF baudrate = 420000 Voltage parameters: Scales : 1.000000 , 1.000000 , 0.010000 , 0.100000 Offsets: 0.000000 , 0.000000 , 0.000000 , 0.000000 No temperature sensors are connected on V3 and V4 RPM multiplier = 1.000000 Baro sensor is detected using MS5611 Sensitivity min = 100 (at 100) , max = 300 (at 1000) Hysteresis = 5 Acc/Gyro is detected using MP6050 Acceleration offsets X, Y, Z = 0 , 0 , 0 Gyro offsets X, Y, Z = 0 , 0 , 0 First analog to digital sensor is detected using ads1115 Measurement setup: 0 , 8 , 8 ,8 Gains: 2 , 2 , 2 ,2 Rates: 7 , 4 , 4 ,7 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 20 , 30 ,50 Second analog to digital sensor is not detected Foreseen GPS type is Ublox :GPS is detected and has a fix Failsafe uses predefined values Chan 1...4 = 976 , 992 , 992 , 992 Chan 5...8 = 992 , 992 , 992 , 992 Chan 9...12 = 992 , 992 , 992 , 992 Chan 13...16= 992 , 992 , 992 , 992

Config parameters are OK Press ? + Enter to get help about the commands

processing cmd

Cmd to execute: FV

GPS Latitude = xx.xxxxxxx degree GPS Longitude = x.xxxxxxx degree GPS Groundspeed = 27 cm/s GPS Heading = 174.930000 degree GPS Altitude = 5361 cm GPS Num sat. = 108 cm GPS Date J M A = 16 2 23 GPS Time H M S = 8 40 7 GPS Pdop = 262 GPS Home bearing = 355 degree GPS Home distance = 74 m Volt 1 = 1675 mVolt Current (Volt 2) = 1651 mA Volt 3 = 16 mVolt Volt 4 = 26 mVolt Capacity (using current) = 6 mAh Vspeed = 0 cm/s Baro Rel altitude = 47 cm Pitch = -9 degree Roll = 0 degree Ads 1 1 = -30 mVolt

mstrens commented 1 year ago

Did you already tried to upload again the version 1.1.9 from github without making any change. Normally there is no need to erase every thing and so you do not have to reenter your parameters. Perhaps you made typo fout somewhere without noticing it. That the reason why I propose to start from a new download from github.

Satcomix commented 1 year ago

When i put the original 1.1.9 on the board , i dont see any voltage to A0-A3 and when i make the change to MV4096, i have no Telemetry but SBUS is blinking green. PlatformIO Error???? By version 1.1.9 there are many warnings of EMF Button, but i can make a build and upload.

mstrens commented 1 year ago

When you put the original 1.1.9 on the board, did you compiled it your self or did you just make a copy/paste of the version I put in uf2 folder. If you did not do it, I suggest a test with the version I put in uf2 folder.

The warnings about EMF button should not be an issue. This part of the code is currently compiled but not activated.

Perhaps make also a test without connecting oXs to the SBUS (because it is the way I tested it on my side)

mstrens commented 1 year ago

I really do not understand why your oXs seems replies to reply to ENTER command but not to FV command. Does it reply to the "?" (help) command?

Satcomix commented 1 year ago

I will explain the way i do it every time,when a new version is out in GitHub. I go to CODE and make a .zip Download. Than i make a new folder with the Name of the version. I extract the new version in that folder and make a copy to the Projects Folder from PlatformIO and copy and replace the old -test folder. I think thats the right way i do it.

mstrens commented 1 year ago

The way you do it should be OK. Still can you try (as test) to just do a drag and drop of the file uf2/APPLICATION.uf2 that is part of the zip.

Satcomix commented 1 year ago

I do not understand, when i put the .uf2 from my fresh extracted folder to the board, i make a drag and drop, or what do you mean?

Satcomix commented 1 year ago

I make a download from Git of the APPLICATION.uf2 and copy and paste it to the board.

processing cmd

Cmd to execute:

Version = 1.1.9 Function Pin Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 1 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 0 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 12 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 13 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 2 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 4 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 6 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 255 255 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 255 255 Voltage 1, 2, 3, 4 = 26 27 28 29 (V1 / V4 = 26, 27, 28, 29)

Protocol is Sport (Frsky) CRSF baudrate = 420000 Voltage parameters: Scales : 1.000000 , 1.000000 , 1.000000 , 1.000000 Offsets: 0.000000 , 0.000000 , 0.000000 , 0.000000 No temperature sensors are connected on V3 and V4 RPM multiplier = 1.000000 Baro sensor is detected using MS5611 Sensitivity min = 100 (at 100) , max = 300 (at 1000) Hysteresis = 5 Acc/Gyro is detected using MP6050 Acceleration offsets X, Y, Z = 3024 , 356 , 1006 Gyro offsets X, Y, Z = -3 , 41 , 48 First analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 2 , 2 , 2 ,2 Rates: 1 , 1 , 1 ,1 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Second analog to digital sensor is not detected Foreseen GPS type is Ublox :GPS is detected and has a fix Failsafe uses predefined values Chan 1...4 = 992 , 992 , 992 , 992 Chan 5...8 = 992 , 992 , 992 , 992 Chan 9...12 = 992 , 992 , 992 , 992 Chan 13...16= 992 , 992 , 992 , 992

Config parameters are OK Press ? + Enter to get help about the commands

processing cmd

Cmd to execute: FV

GPS Latitude = xxxxxxxxx degree GPS Longitude = xxxxxxxxx degree GPS Groundspeed = 67 cm/s GPS Heading = 87.640000 degree GPS Altitude = 3926 cm GPS Num sat. = 109 cm GPS Date J M A = 17 2 23 GPS Time H M S = 13 24 35 GPS Pdop = 199 GPS Home bearing = 20 degree GPS Home distance = 9 m Volt 1 = 540 mVolt Current (Volt 2) = 574 mA Volt 3 = 627 mVolt Volt 4 = 218 mVolt Capacity (using current) = 0 mAh Vspeed = 5 cm/s Baro Rel altitude = 32 cm Pitch = 4 degree Roll = 1 degree RPM = 0 Hertz Ads 1 1 = 0 mVolt Ads 1 2 = 0 mVolt Ads 1 3 = 0 mVolt Ads 1 4 = 0 mVolt

A0=3.3V Input A1=GND

mstrens commented 1 year ago

You have to press the "boot" button of the RP2040 when you apply the power on. So the RP2040 enter automatically in bootloader mode and the PC see it as a USB drive. You can then do a drag and drop (or a copy/paste) from the uf2/APPLICATION.uf2 file to this drive usb drive.

This automatically upload the file (flash) and the RP2040 restart automatically.

mstrens commented 1 year ago

OK I was to late with my last reply. So now, you get a reply to the FV command but they are all 0mv.

Satcomix commented 1 year ago

Thats the normal way a make it 100-200......... times the last weeks. or you press RESET and hold the BOOT Button to get the RPi Folder.

mstrens commented 1 year ago

Yes you can also press RESET and hold BOOT. Are you sure that your wire between A0 and VCC (3.3v) is correct (good connection?)

Satcomix commented 1 year ago

I think i make some more tests with my other Boards and the 1.1.5 and 1.1.7 versions and order some new ADS1115 from Berrybase or Eckstein. I will have a look to my Laptop, if there was a update, and i will look to PlatformIO. I can't think of anything else to solve my problem at the moment. For this time, i think we should close the issue. You get the right results and Pierre also, i think. Thank you for the time and work.

Satcomix commented 1 year ago

Yes you can also press RESET and hold BOOT. Are you sure that your wire between A0 and VCC (3.3v) is correct (good connection?)

I have tested my boards several times, i dont like breadboards and thats why i like only soldered connections.

mstrens commented 1 year ago

I am not sure that Pierre get the right result. I think he does not make tests with the last version.

I can only say that It seems to work on my breadboard.

Anyway, you should get the same result if you compile your self or if you use the version I compiled.

Satcomix commented 1 year ago

For this day i must close with the tests, tomorow morning i will do new tests with other boards to test the firmware, and make some new builds with PlatfrmIO. Have a nice Day, see (write) you tomorow. Greetings, Torsten

Satcomix commented 1 year ago

Hello Mstrens, Next day, next test :-) I have now tested all 9 boards, the same result everywhere. Yesterday I read a lot about ADS1115 and what problems can occur with "supposedly genuine" ADS1115 (CN clones). I tested my ADS1115 with different scetches on Arduino Nano. Everything worked and I couldn't find any possible errors. I have also ordered two new ADS1115s, they will arrive next week. It seems to me that there is some problem with the evaluation of the register of the internal multiplexer from the ADS, since only one value is displayed, usually that of A1/Port2. Have you had time to find out yet? I don't know what to do anymore!

Test: Arduino Nano with ADS1115 A0=1020mV, A1=1596mV, A2=2035mV, A3=1042mV Analog0: 5439 1.020 Analog1: 8514 1.596 Analog2: 10852 2.035 Analog3: 5555 1.042

Analog0: 5438      1.020
Analog1: 8514      1.596
Analog2: 10852   2.035
Analog3: 5554      1.041

processing cmd

Cmd to execute:

Version = 1.1.9 Function Pin Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 255 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 0 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 4 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 5 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 255 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 255 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 255 255 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 255 255 Voltage 1, 2, 3, 4 = 26 27 255 255 (V1 / V4 = 26, 27, 28, 29)

Protocol is Sport (Frsky) CRSF baudrate = 420000 Voltage parameters: Scales : 1.000000 , 1.000000 , 1.000000 , 1.000000 Offsets: 0.000000 , 0.000000 , 0.000000 , 0.000000 No temperature sensors are connected on V3 and V4 RPM multiplier = 1.000000 Baro sensor is not detected Acc/Gyro is not detected First analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 2 , 2 , 2 ,2 Rates: 1 , 1 , 1 ,1 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Second analog to digital sensor is not detected Foreseen GPS type is Ublox :GPS is not (yet) detected Failsafe type is HOLD

Config parameters are OK Press ? + Enter to get help about the commands

processing cmd

Cmd to execute: FV

Volt 1 = 600 mVolt Current (Volt 2) = 615 mA Capacity (using current) = 0 mAh Ads 1 1 = 1597 mVolt Ads 1 2 = 1597 mVolt Ads 1 3 = 1597 mVolt Ads 1 4 = 1597 mVolt all 4 ports show the input voltage from A1

Greeting, Torsten

mstrens commented 1 year ago

I do not understand why it works on my side and not with your board. do you now get the same result when you compile your self? If yes, you can try to increase the delay oXs wait to get the conversion. This is in this line if ( ( millis() - ads_MilliAskConv ) <= (uint32_t) ( ( 0x88 >> ads_Rate[ads_idx][ads_CurrentIdx]) + 1) ) return false;

Yo can try changing "1" by e.g. "100". So having: if ( ( millis() - ads_MilliAskConv ) <= (uint32_t) ( ( 0x88 >> ads_Rate[ads_idx][ads_CurrentIdx]) + 100) ) return false;

Do you know which lib you used when you made the test with Arduino? So library does not use a delay between requesting a conversion and reading the result. They test a flag in the ADS1115 to know if the conversion is done. Perhaps some ads1115 require more time to perform the conversion.

mstrens commented 1 year ago

In your yesterday tests, I noticed a strange behavior: You got some "Attention......" messages saying the the core 1 did not performs the setup within some delay (2 sec). On my board, I do not get this message because the setup on core 1 is done within a little more than 1 sec. In the last version I made yesterday, I made a small change: oXs does not print a lot of those "Attention" messages but only one. Furthermore oXs prints also the delay it takes (Setup1 takes xxx usec) where xxx should be the delay (valid only when it is less the allowed timeout (2 sec). What is the xxx value you get? Note: when I want to be sure that the PC displays all messages sent by oXs at power on I usually activate the DEBUG option in config.h file. This forces oXs to wait a few sec before sending the first message and allow the USB/SERIAL connection to establish.

Satcomix commented 1 year ago

Hello Mstrens, the Arduino libary is ADS1115 from Rob Tillhaart https://github.com/RobTillaart/ADS1X15/releases

This day i can make new builds with PlatformIO and everything is ok, also when i go to Terminal with FV. I think trough the whole tests yesterday there was a fail in Platformio or my Laptop. processing cmd

Cmd to execute: FV

Volt 1 = 601 mVolt Current (Volt 2) = 625 mA Volt 3 = 650 mVolt Capacity (using current) = 0 mAh Ads 1 1 = 0 mVolt Ads 1 2 = 0 mVolt Ads 1 3 = 0 mVolt Ads 1 4 = 0 mVolt I put the delay from 100 into script. if ( ( millis() - ads_MilliAskConv ) <= (uint32_t) ( ( 0x88 >> ads_Rate[ads_idx][ads_CurrentIdx]) + 100) ) return false; But i only see one time after reset 1596mVolt, at the other time after reset 0mVolt. Input is A0=1020mV, A1=1596mV, A2=2035mV, A3=1042mV

mstrens commented 1 year ago

I also had sometime an issue with platformio. I had to close vscode and re-open it. I do not know why. So, it seems that your ads1115 does not perform the conversion withing the expected time. I checked the lib you used and this lib does not use a delay to wait for the end of conversion but read a flag in the ads1115 register. Perhaps you can now try to reduce the 100 with a smaller value e.g. 5 to see if it is still OK.

mstrens commented 1 year ago

I put on github a version 1.1.10 that wait 1 msec more for the end of conversion before reading the ADS1115. Furthermore, after the expected delay, it checks now that the flag saying that the conversion is done is really set. If not it wait some more time. I hope that this version works for you too.

Satcomix commented 1 year ago

You`re the best!!!!!!! processing cmd

Cmd to execute:

Version = 1.1.10 Function Pin Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 255 (PRI = 5, 9, 21, 25) Secondary channels input = 255 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 0 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 255 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 255 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 255 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 255 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 255 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 255 255 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 255 255 Voltage 1, 2, 3, 4 = 26 27 28 255 (V1 / V4 = 26, 27, 28, 29)

Protocol is Sport (Frsky) CRSF baudrate = 420000 Voltage parameters: Scales : 1.000000 , 1.000000 , 1.000000 , 1.000000 Offsets: 0.000000 , 0.000000 , 0.000000 , 0.000000 No temperature sensors are connected on V3 and V4 RPM multiplier = 1.000000 Baro sensor is not detected Acc/Gyro is not detected First analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 1 , 1 , 1 ,1 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Second analog to digital sensor is not detected Foreseen GPS type is Ublox :GPS is not (yet) detected Failsafe type is HOLD

Config parameters are OK Press ? + Enter to get help about the commands

processing cmd

Cmd to execute: FV

Volt 1 = 616 mVolt Current (Volt 2) = 630 mA Volt 3 = 656 mVolt Capacity (using current) = 0 mAh Ads 1 1 = 1020 mVolt Ads 1 2 = 1597 mVolt Ads 1 3 = 2035 mVolt Ads 1 4 = 1059 mVolt

Satcomix commented 1 year ago

I do not know what to say. It finally works!!! I will now transfer this version to my main board and do some tests with two ADS1115 and the FrSky X20S with telemetry display. Thank you very much for your great work.

Satcomix commented 1 year ago

Now, we have the next problem :-) As you can see everything is ok in terminal and FV, but in the FrSky X20S Ethos 1.4.7 S.PORT the first ADS1115 with the DIY IDs 5131 to 5134 every 10 sconds SENSOR LOST all 4 IDs from the first ADS.

processing cmd

Cmd to execute:

Version = 1.1.10 Function Pin Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 1 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 0 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 12 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 13 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 2 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 4 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 6 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 255 255 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 255 255 Voltage 1, 2, 3, 4 = 26 27 28 29 (V1 / V4 = 26, 27, 28, 29)

Protocol is Sport (Frsky) CRSF baudrate = 420000 Voltage parameters: Scales : 1.000000 , 1.000000 , 1.000000 , 1.000000 Offsets: 0.000000 , 0.000000 , 0.000000 , 0.000000 No temperature sensors are connected on V3 and V4 RPM multiplier = 1.000000 Baro sensor is not detected Acc/Gyro is detected using MP6050 Acceleration offsets X, Y, Z = 3024 , 356 , 1006 Gyro offsets X, Y, Z = -3 , 41 , 48 First analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 1 , 1 , 1 ,1 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Second analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 2 , 2 , 2 ,2 Rates: 7 , 4 , 4 ,7 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 20 , 30 ,50 Foreseen GPS type is Ublox :GPS is detected and has a fix Failsafe uses predefined values Chan 1...4 = 992 , 992 , 992 , 992 Chan 5...8 = 992 , 992 , 992 , 992 Chan 9...12 = 992 , 992 , 992 , 992 Chan 13...16= 992 , 992 , 992 , 992

Config parameters are OK Press ? + Enter to get help about the commands

processing cmd

Cmd to execute: FV

GPS Latitude = xxxxxxxxxx degree GPS Longitude = xxxxxxxxx degree GPS Groundspeed = 19 cm/s GPS Heading = 209.800000 degree GPS Altitude = 5659 cm GPS Num sat. = 108 cm GPS Date J M A = 18 2 23 GPS Time H M S = 14 16 34 GPS Pdop = 300 GPS Home bearing = 172 degree GPS Home distance = 26 m Volt 1 = 540 mVolt Current (Volt 2) = 572 mA Volt 3 = 620 mVolt Volt 4 = 230 mVolt Capacity (using current) = 1 mAh Pitch = 6 degree Roll = 3 degree RPM = 998 Hertz Ads 1 1 = 1020 mVolt Ads 1 2 = 1596 mVolt Ads 1 3 = 2034 mVolt Ads 1 4 = 1051 mVolt Ads 2 1 = 1019 mVolt Ads 2 2 = 1596 mVolt Ads 2 3 = 2034 mVolt Ads 2 4 = 1051 mVolt

mstrens commented 1 year ago

In sport a message (for a field ID) is sent only when there is a new measurement for this field ID. depending on your setup, it can take several second between 2 measurements. E.g. a ADS can only perform one conversion at a time. So if you ask for 4 measurements, oXs will make 4 conversions, the one after the other. The delay for one conversion depend on the rate that your requested. Furthermore If you ask for an average on 50, it means that oXs will have to make 50 conversions (on this pin) before having a new value. So, you have probably to increase the rate and/or reduce the Average on and/or the number of pins being measured. I expect that there is a message telemetry lost when the handset doe not receive a sensor withing a delay of x (2?) sec.

mstrens commented 1 year ago

If you want to know the time (msec) it takes to make a conversion, you can add a line of code in ads1115.cpp.

After line if ( ( adsConfigMsb & 0X80) == 0) return false; // conversion is not yet done

You can add this line printf("conversion ads115 in %d ms\n", (millis() - ads_MilliAskConv));

So you can compare it with the value set in your config.h and you can see how "slow" is your ads1115

Satcomix commented 1 year ago

Now, everything is fine. You should use in ADS_Rate max. 9ms, better 5ms and use max. ADS_Averraging=20, I use 10. No telemetry sensor lost since 10 Minutes. Thank you very much.

processing cmd

Cmd to execute:

Version = 1.1.10 Function Pin Change entering XXX=yyy (yyy=255 to disable) Primary channels input = 5 (PRI = 5, 9, 21, 25) Secondary channels input = 1 (SEC = 1, 13, 17, 29) Telemetry . . . . . . . . = 0 (TLM = 0, 1, 2, ..., 29) GPS Rx . . . . . . . . . = 12 (GPS_RX = 0, 1, 2, ..., 29) GPS Tx . . . . . . . . . = 13 (GPS_TX = 0, 1, 2, ..., 29) Sbus OUT . . . . . . . . = 2 (SBUS_OUT= 0, 1, 2, ..., 29) RPM . . . . . . . . . . = 4 (RPM = 0, 1, 2, ..., 29) SDA (I2C sensors) . . . . = 14 (SDA = 2, 6, 10, 14, 18, 22, 26) SCL (I2C sensors) . . . . = 15 (SCL = 3, 7, 11, 15, 19, 23, 27) PWM Channels 1, 2, 3 ,4 = 255 255 6 255 (C1 / C16= 0, 1, 2, ..., 15) PWM Channels 5, 6, 7 ,8 = 255 255 255 255 PWM Channels 9,10,11,12 = 255 255 255 255 PWM Channels 13,14,15,16 = 255 255 255 255 Voltage 1, 2, 3, 4 = 26 27 28 29 (V1 / V4 = 26, 27, 28, 29)

Protocol is Sport (Frsky) CRSF baudrate = 420000 Voltage parameters: Scales : 1.000000 , 1.000000 , 1.000000 , 1.000000 Offsets: 0.000000 , 0.000000 , 0.000000 , 0.000000 No temperature sensors are connected on V3 and V4 RPM multiplier = 1.000000 Baro sensor is detected using MS5611 Sensitivity min = 100 (at 100) , max = 300 (at 1000) Hysteresis = 5 Acc/Gyro is detected using MP6050 Acceleration offsets X, Y, Z = 3024 , 356 , 1006 Gyro offsets X, Y, Z = -3 , 41 , 48 First analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 5 , 5 , 5 ,5 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Second analog to digital sensor is detected using ads1115 Measurement setup: 4 , 5 , 6 ,7 Gains: 1 , 1 , 1 ,1 Rates: 5 , 5 , 5 ,5 Offsets: 0.000000 , 0.000000 , 0.000000 ,0.000000 Scales: 1.000000 , 1.000000 , 1.000000 ,1.000000 Averaged on: 10 , 10 , 10 ,10 Foreseen GPS type is Ublox :GPS is detected and has a fix Failsafe uses predefined values Chan 1...4 = 992 , 992 , 992 , 992 Chan 5...8 = 992 , 992 , 992 , 992 Chan 9...12 = 992 , 992 , 992 , 992 Chan 13...16= 992 , 992 , 992 , 992

Config parameters are OK Press ? + Enter to get help about the commands

processing cmd

Cmd to execute: FV

GPS Latitude = xxxxxxxxxx degree GPS Longitude = xxxxxxxxx degree GPS Groundspeed = 4 cm/s GPS Heading = 0.000000 degree GPS Altitude = 4700 cm GPS Num sat. = 111 cm GPS Date J M A = 18 2 23 GPS Time H M S = 14 48 40 GPS Pdop = 223 GPS Home bearing = 18 degree GPS Home distance = 37 m Volt 1 = 543 mVolt Current (Volt 2) = 572 mA Volt 3 = 621 mVolt Volt 4 = 233 mVolt Capacity (using current) = 0 mAh Vspeed = 0 cm/s Baro Rel altitude = -28 cm Pitch = 5 degree Roll = 2 degree RPM = 999 Hertz Ads 1 1 = 1020 mVolt Ads 1 2 = 1596 mVolt Ads 1 3 = 2035 mVolt Ads 1 4 = 1064 mVolt Ads 2 1 = 1020 mVolt Ads 2 2 = 1596 mVolt Ads 2 3 = 2034 mVolt Ads 2 4 = 1064 mVolt

br, Torsten

Satcomix commented 1 year ago

I made some more tests, and can`t find any issue. So i will close this "monster-post" and have to say thank you for the time and work. Greetings, Torsten