• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
ModalAI Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
    • Register
    • Login

    Connecting i2c device on voxl2

    VOXL 2
    4
    61
    5.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Alex Kushleyev ModalAI Team @Aaky
      last edited by 20 Mar 2024, 14:01

      @Aaky , yes the latest M0065 firmware is using OneShot style pulses, which is better for all modern ESCs. Please try the digital servo as you are already planning to do.

      I am not familiar with the joystick setup in PX4. As long as the actuator test is working, it means the signal from the mixer is getting to voxl2_io driver and the correct command is sent to M0065 board and executed. It seems your joystick driver may not be sending out the correct command to the mixer.

      A 1 Reply Last reply 20 Mar 2024, 14:14 Reply Quote 0
      • A
        Alex Kushleyev ModalAI Team @Alex Kushleyev
        last edited by 20 Mar 2024, 14:14

        If you really need to try the periodic (standard, not OneShot PWM), i can add an option to use that.

        A 1 Reply Last reply 20 Mar 2024, 14:52 Reply Quote 0
        • A
          Aaky @Alex Kushleyev
          last edited by Aaky 20 Mar 2024, 14:52 20 Mar 2024, 14:52

          @Alex-Kushleyev Thanks Alex. I will let you know if PWM instead of Oneshot is to be tried out. I am yet to test Digital servo.

          Also regarding joystick setup, it works only after armed in any flight mode. Thanks for your inputs in this.

          A 1 Reply Last reply 20 Mar 2024, 16:06 Reply Quote 0
          • A
            Alex Kushleyev ModalAI Team @Aaky
            last edited by 20 Mar 2024, 16:06

            @Aaky , yes i saw that if not armed, all the actuators are disabled. I think it is a PX4 "feature" and i am not sure if you can bypass it. If you figure out how, please let us know!

            A 1 Reply Last reply 21 Mar 2024, 09:38 Reply Quote 0
            • A
              Aaky @Alex Kushleyev
              last edited by 21 Mar 2024, 09:38

              @Alex-Kushleyev Yes I am trying to see before arming how to get gripper control. Also with digital servo M0065 Oneshot works well without any jitter. So thank you once again for that update.

              A 1 Reply Last reply 23 Mar 2024, 15:27 Reply Quote 0
              • A
                Aaky @Aaky
                last edited by Aaky 23 Mar 2024, 15:31 23 Mar 2024, 15:27

                @Alex-Kushleyev We came across extremely weird problem and our aircraft crashed on ground from height of 10 meters due to this. All the actuator outputs saturated and started to vary between 0 to 100% throttle. Please have a look at our log file below. We were comfortably flying UAV for ore then 60 mins in multiples flights, but all of sudden while navigating at high speeds in mission mode, our aircraft crashed.
                Note : After this flight now our aircraft isnt able to takeoff at all, motors dosent seem to be providing enough thrust. Somehow we dont know if its ESC's fault or M0065. We are thinking to replace ESC and check again or maybe Capacitor over ESC gone bad.
                Let me know if you have any clue. Please look at the flight towards the very end.
                Log : https://review.px4.io/plot_app?log=9032c82a-421a-4f25-8fe5-30bff45cadf0

                A 1 Reply Last reply 23 Mar 2024, 16:01 Reply Quote 0
                • A
                  Alex Kushleyev ModalAI Team @Aaky
                  last edited by 23 Mar 2024, 16:01

                  @Aaky , it looks like your motor 4 (black) was operating at maximum output (1.0) for some time (when the battery voltage got lower and lower) and i suspect that it just could not maintain attitude (roll / pitch) control because the motor 4 was saturated and the drone flipped over. If the actuator saturation occurs, the drone cannot maintain stability. I can take a look at the log more carefully later, but that seems like the issue. Did the drone flip over first then fell? The actuator saturation can be caused by imbalance in center of gravity, since other motors are not saturated. but also it looks like at the low battery voltage there is not much extra margin of thrust for sufficient control.

                  e7433a59-6977-413f-8a8c-94790be2dce5-image.png

                  A 1 Reply Last reply 23 Mar 2024, 16:41 Reply Quote 0
                  • A
                    Aaky @Alex Kushleyev
                    last edited by Aaky 23 Mar 2024, 16:43 23 Mar 2024, 16:41

                    @Alex-Kushleyev thanks for your analysis Alex. Yes drone did flip but it flipped on ground if I remember correctly. Motor 4's saturation might have caused bit of saturation in other motors as well. But very weird problem is now aircraft isn't able to takeoff even at full battery condition. What can be the problem? Is it possible any components involving ESC or ESC itself damaged?

                    A 1 Reply Last reply 23 Mar 2024, 16:46 Reply Quote 0
                    • A
                      Alex Kushleyev ModalAI Team @Aaky
                      last edited by 23 Mar 2024, 16:46

                      @Aaky , hmm not sure. You should look at the px4 logs of the takeoff attempts after crash and see what the actuator outputs look like. Also try manual mode (thrust, attitude) if you are comfortable flying (instead of position / height control - not sure which one are you testing now)

                      A 1 Reply Last reply 23 Mar 2024, 16:50 Reply Quote 0
                      • A
                        Aaky @Alex Kushleyev
                        last edited by 23 Mar 2024, 16:50

                        @Alex-Kushleyev Here is the log of flight after this crash where aircraft wasn't able to takeoff.
                        We tried in Altitude mode as well as in position mode by increasing throttle upto 80% still aircraft didn't takeoff.
                        Log : https://review.px4.io/plot_app?log=84d281b9-2756-45c3-b064-ea38848f8580

                        This shouldn't be M0065 problem right? Just wanted to eliminate the variables.

                        A 1 Reply Last reply 23 Mar 2024, 19:34 Reply Quote 0
                        • A
                          Alex Kushleyev ModalAI Team @Aaky
                          last edited by 23 Mar 2024, 19:34

                          @Aaky, in your first flight, your actuator controls (thrust) was above 0.5 when vehicle took off:

                          165b6380-dcfd-41c9-bbf0-fce561cc6c46-image.png

                          But in your last test (you were in altitude control mode), the thrust barely reached 0.3 - that is not enough for vehicle to take off. That is why i was suggesting to test in thrust / angle mode (not altitude hold).

                          c5945927-c01d-4853-9655-88db5fa3b61c-image.png

                          Also, your motor outputs are quite noisy, perhaps the flight board became loose after the crash, not sure.

                          d5e8b416-14cc-4528-9587-17a88dfd2744-image.png

                          A 1 Reply Last reply 25 Mar 2024, 18:14 Reply Quote 0
                          • A
                            Aaky @Alex Kushleyev
                            last edited by Aaky 25 Mar 2024, 18:18 25 Mar 2024, 18:14

                            @Alex-Kushleyev Thanks Alex. Can you also send me M0065 firmware with normal PWM outputs on 8 channels of actuators? Maybe a switch over existing firmware with capability to switch between Oneshot vs PWM as you told before.
                            I tried flying today but aircraft is having serious vibrations which didn't exist on our previous flights. We have used dampeners still vibration and controls look very rough. I might just try with normal PWM also once.

                            A 1 Reply Last reply 25 Mar 2024, 20:36 Reply Quote 0
                            • A
                              Alex Kushleyev ModalAI Team @Aaky
                              last edited by 25 Mar 2024, 20:36

                              @Aaky , Sure we can try it, but i suspect the PWM output may not be an issue if it did not have the vibration right before the crash.

                              I do not have the firmware with this change ready to go, but it is an easy switch. I need to test it first and i can provide it to you tomorrow.

                              Meanwhile, I suggest to you to do a thorough inspection of the frame. You can also an actuator test (without propellers) to make sure the motor output seems smooth, at least when you are not flying.

                              When I looked at the original log with the crash, it seemed to me that the gyro vibrations were a bit high, resulting in motor outputs to be noisy as well. Perhaps after a crash something changed (became more loose) and the vibration worsened, pushing the performance past the point of stability.

                              Please make sure that any cables that connect to VOXL2 are not tight, which can cause vibration to travel via cables or even pull on the cables if another component is loose on the frame.

                              I am not sure how much PID tuning you have done, but if the D gain on attitude control is set too high with noisy gyro, this will cause the noisy motor commands to be sent to motors.

                              A 1 Reply Last reply 26 Mar 2024, 17:20 Reply Quote 0
                              • A
                                Aaky @Alex Kushleyev
                                last edited by 26 Mar 2024, 17:20

                                @Alex-Kushleyev Yes you were right. Problem was not with M0065 controling the motor. We got our vibrations sorted with good dampeners and now our drone flies well. Thank you! 🙂

                                A 1 Reply Last reply 26 Mar 2024, 20:19 Reply Quote 0
                                • A
                                  Alex Kushleyev ModalAI Team @Aaky
                                  last edited by 26 Mar 2024, 20:19

                                  @Aaky Great!

                                  One advice: save a few logs of good flights for future reference. In future, if something goes bad, you can go back and look at the old logs vs new logs and compare the amount of vibration, actuator outputs, etc.

                                  A 1 Reply Last reply 31 Mar 2024, 08:28 Reply Quote 0
                                  • A Alex Kushleyev referenced this topic on 27 Mar 2024, 13:42
                                  • A
                                    Aaky @Alex Kushleyev
                                    last edited by Aaky 31 Mar 2024, 08:29 31 Mar 2024, 08:28

                                    @Alex-Kushleyev Yes Alex Noted.

                                    We were flying okish since last few days and we had another crash similar to last one. While we are seeing into our propulsion system design (motor propeller and battery), Aircraft this time flipped midair and the reason is absolutely unknown. I just wanted to eliminate if PWM outputs were given correctly to motors from M0065 in below shown flight while it crashed towards the end? I just wanted to check if PWM outputs were all above 1100 and none of the motor was commanded below the same. My VOXL2_IO_MIN and MAX are 1100 and 2000 respectively. Just eliminating any software problem over here once again. Let me know if you can help 🙂

                                    Log : https://review.px4.io/plot_app?log=d9d7feb3-9e5a-469f-ac95-a4914a243fbe

                                    A 1 Reply Last reply 1 Apr 2024, 15:59 Reply Quote 0
                                    • A
                                      Alex Kushleyev ModalAI Team @Aaky
                                      last edited by Alex Kushleyev 1 Apr 2024, 16:00 1 Apr 2024, 15:59

                                      @Aaky ,

                                      I took a look at the log, the case seems a bit complicated. It seems the issue starts 6:38:500 when there is a sudden jerk that appears in Roll Rate, see here :
                                      c504e1c1-234b-4bb3-bc08-f233b0f3fb94-image.png

                                      As a a result, the vehicle tries to counter act and responds in actuator outputs (negative roll command to counteract the positive roll rate spike)

                                      4c04d157-6c2e-4c6a-bf54-f4f6da4aa8df-image.png

                                      This causes a sudden change in requested motor commands:
                                      80012099-329b-4869-a396-7adf19325563-image.png

                                      After that the vehicle starts oscillating and motor outputs are saturated. To me, it is unclear where the spike in the roll angular rate comes from after very low-noise fligiht. It is almost if something suddenly got loose, snapped, or hit the flight board, causing that angular rate spike. If the flight board became loose, it would have been impossible to stabilize the vehicle after that.

                                      Since you are using 3rd party ESCs, we do not have motor feedback, so we cannot tell if the motors performed well, but it does not look like the motors stopped, as the vehicle appears to start oscillating back and forth in roll initially. Also, if one or more motors simply stopped, we would have a smooth tumble - instead we are seeing a high roll rate impulse that seems to case oscillations and then the crash.

                                      I would suggest to inspect the vehicle and look for potential sources of that initial roll rate jerk that may have caused the oscillations and then crash.

                                      Alex

                                      A 1 Reply Last reply 1 Apr 2024, 19:16 Reply Quote 0
                                      • A
                                        Alex Kushleyev ModalAI Team @Alex Kushleyev
                                        last edited by 1 Apr 2024, 19:16

                                        Even though it is not clear what the initial roll rate spike came from, it seems that it served as an impulse test of the attitude controller and the vehicle started oscillating. If nothing actually came loose during the flight, this may suggest that your attitude controller is not stable and given an large disturbance it can become unstable. There are many unknown variables, but you may need to increase your D gain in your attitude controller to dampen the response. However, still, it is still not clear where the original roll rate impulse came from here..

                                        A 1 Reply Last reply 2 Apr 2024, 07:08 Reply Quote 0
                                        • A
                                          Aaky @Alex Kushleyev
                                          last edited by 2 Apr 2024, 07:08

                                          @Alex-Kushleyev Thanks for your analysis Alex. This is somewhat a mystery for us as well. Actually in terms of motor saturation, I feel motor saturation started first at timestamp 6:38:560 onwards motors had started to struggle leading to roll failure. We are suspecting if propeller broke in flight, since it was not in our visual sight flying 200 meters away. We flew with another set of propeller at very high speed again and things were all normal this time. There isn't any concrete answer to this just speculations as of now.

                                          A 1 Reply Last reply 3 Apr 2024, 19:45 Reply Quote 0
                                          • A
                                            Alex Kushleyev ModalAI Team @Aaky
                                            last edited by 3 Apr 2024, 19:45

                                            @Aaky Yes, it seems something "mechanical" happened right before the flip. a broken prop may cause impact on the frame and detected by the gyro as that spike. I am glad the vehicle is flying normally again! Regular inspection of the vehicle components is recommended 🙂

                                            A 2 Replies Last reply 6 Apr 2024, 10:37 Reply Quote 0
                                            • A Alex Kushleyev referenced this topic on 5 Apr 2024, 19:47
                                            30 out of 61
                                            • First post
                                              30/61
                                              Last post
                                            Powered by NodeBB | Contributors