Home        Store        Docs        Blog

Strange problem about the depth hold mode


(WYK) #1

When I put bluerov in the bottom of the tank and start it in the depth hold mode, the motors spin more and more quickly and it immediately float above the water and turn over.
Why?

This is a screenshot of QGC when my vehicle is underwater, QGC shows that the altitude is -0.3. I have connect a Bar30 High-Resolution 300m Depth/Pressure Sensor to the i2c of pixhawk.



(WYK) #2

Motor 5 spins extremely fast so that the bluerov turn over immediately after it is armed.


(Rusty) #3

Hi WYK,

The depth is always negative when you’re in the water. As you get deeper, it will become more negative.

Have you checked the motor directions and changed any that are reverse with the MOT_DIRECTION parameters? Please see this step if you haven’t done that yet: http://ardusub.com/initial-setup/#configuring-motor-directions

-Rusty


(WYK) #4

I add three pictures. Days before I thought my motor 5 is not in the correct direction so I changed it to “reverse” in the QGC. Are the motor directions correct?





(Rusty) #5

WYK,

I can’t tell from pictures alone because it depends on exactly how you connected these to the ESCs. The easiest way to tell is to arm the vehicle in air, push on the joystick to put the vehicle into a full dive, and make sure that the thrusters are blowing air upwards. If they are not, reverse them.

Please give that a try and let me know how it goes.

-Rusty


(WYK) #6

Yes, motor 5 is blowing air upwards when I put the vehicle into dive, and motor 3 and 4 are blowing air downwards. The motors are labeled as the picture shows.



(Rusty) #7

Hi WYK,

Okay, then motors 3 and 4 should be reversed.

Best,

Rusty


(WYK) #8

Okay, after reversing motor 3 and 4, it still immediately turns over in the depth hold mode. I quickly catch a screenshot of the servo values after it is armed in the depth hold mode.
I think it is because motor 5 is much too powerful compared to motor 3 and 4, because when I give a single ascend command in the manual mode, it just tilt instead of rising like a helicopter.
Is the reason that I guess correct? If it is correct, how to only reduce the power of motor 5?



(Rusty) #9

Hi WYK,

Okay, can you try running it in stabilize mode?

-Rusty


(WYK) #10

Hi Rusty, yes, I tried stabilize mode just now(after reversing motor 3 and 4). In the stabilize mode, motor 3 and 4 spin slightly after it is armed. If I give throttle or strafe command, the command works, but if I give command to change yaw, it turns over.


(WYK) #11

Try hours again, but still cannot fix this problem…


(Jacob) #12

Hi WYK, you probably missed something (specifically verifying motor directions) in the setup that is causing your issues. Please follow these instructions carefully:

Download the latest daily build of qgc from ardusub setup website link.

Go to flight modes page in qgc, and change flight mode 1 to manual, make sure the vehicle is in manual mode.

Push the LEFT joystick FORWARD, ensure that ONLY motors 1 and 2 are spinning. Verify they are pushing air the correct way to push the vehicle forward.

Push the LEFT joystick to the RIGHT, ensure that ONLY motor 6 is spinning. Verify that it is pushing air the correct way to move the vehicle to the right.

Push the RIGHT joystick FORWARD, ensure that ONLY motors 3, 4, and 5 are spinning. Verify that they are pushing air the correct way to make the vehicle ascend.

Push the RIGHT joystick to the RIGHT, ensure that ONLY motors 1 and 2 are spinning. Verify that they are pushing air in opposite directions.

 

If the behavior for any of these is different, please give a detailed explanation.

You said you tried throttle and strafe, did you try moving it forwards and backwards? (throttle is up and down)

-Jacob


(WYK) #13

Thank you for your reply!
I download the latest version of QGC and test the vehicle the way as you reply. Motor responses to LEFT joystick FORWARD, LEFT joystick RIGHT, RIGHT joystick RIGHT are all correct. However, when I push the RIGHT joystick RIGHT, although motor 3, 4, 5 are pushing the air to the same direction, but motor 5 is much more powerful than motor 3 plus motor 4, so the vehicle turns over.

Oh, throttle is up and down…
Then forwards, backwards, and strafe commands that work well in the stabilize mode, but bluerov will turn over when I try up, down or change yaw.


(WYK) #14

EDIT: Actually it is forwards, backwards, and strafe that works well in the stabilize mode, but it will turn over when I try up, down or change yaw.


(WYK) #15

Is that because my channel value settings? My channel values are:
CH1 to CH8 MAX are 1900, MIN are 1100.
CH3 TRIM is 1000, and TRIM values of other channels are 1500.
(So CH3 TRIM is lower than CH3 MIN, is that right?)


(Jacob) #16

No this is because you are in manual mode, there is no stabilization. Switch to stabilize mode and you will have a much better time.all of your channel values are fine. The motor behavior is correct, we can adjust the values slightly, but it will never be right for everyone on every bluerov1 in manual mode. It depends on many factors to get the motors to spin just right without any stabilization.

Edit: Are you sure you are in stabilize mode when it flips over?

 

 


(WYK) #17

Maybe it is not an ordinary problem. I’ll try changing some ardusub code so that it is more suitable for my bluerov.
Thank you for answering my question! @Rusty @Jacob



(Jacob) #18

How is your board oriented inside the tube? It sounds like your board orientation setting is incorrect and or your accelerometer calibration is incorrect.

 

Motor 5 will only spin as fast as it needs to in order to maintain level, that is not the issue. The issue is that it doesn’t know what level is or your motors are spinning in the wrong directions. Try recalibrating your accelerometer and compass. Did you download a parameter file? Can you take a video of this behavior?


(WYK) #19

My board actually has an opposite direction in the tube, but I thought it should not matter. Am I right?
Okay, I will try recalibrating the accelerometer and compass. I did not download a parameter file.
I took a picture before its final flipping over.
Can I just change some PID related function in the ardusub code?



(Jacob) #20

The orientation of the board does matter. The sensors that determine the current orientation of the vehicle are on the board. Think about this. If the board is in the normal orientation, and the vehicle starts leaning forward, then the board outputs to the motors to correct for the error and return the vehicle to level. If you turn the board so that the arrow faces the rear of the vehicle, when the vehicle starts leaning forward, the board thinks the vehicle is leaning backwards, because you did not tell the board that it is facing the opposite direction. In this case the board tries to correct for the error and instead of returning the vehicle to level, it pitches the vehicle forward even more, this cycle repeats, and the vehicle flips over.

 

You do not need to make changes to the source code to fix this issue. Fortunately, there is a parameter that you can change so that you can tell the board how it is oriented in the vehicle, so that it can react appropriately. This is what you need to change.

See here: http://ardupilot.org/copter/docs/parameters.html#ahrs-orientation-board-orientation

In qgc, before you calibrate the accelerometer and compass, it prompts for the orientation of the board, you need to enter that setting appropriately for your setup.