Need help setting PID using pixhawk

The main drive motor has one speed only, flat out.
I want to steer the boat streight to a way point, it needs to combat the tidal drift which can cause the boat to go off course by a long way.
I have the thrusters setup to 73 and 74, I don’t know about function 70.
David I don’t know what 1 M/S means would you explain please.

1 M/S means a cruise speed of 1 meter per second. Function 70 is the main motor being controlled by the throttle or throttle controller if running a mission. Can you put a ESC on the main motor? Maybe you are better of using rudders and Ackerman Steering?

I can’t put an ESC on the main motor.

I have been wondering if I could ignore the main motor and setup for the thrusters as being the drive motors with a cruise speed of 1mtr per sec.?

It would depend on how heavy the boat is and what amount of thrust they produce. Maybe worth a try but I don’t have enough information to really speculate.

My main worry is setting the PID for the boat to go stright without too much zigzaging. I need basic settings before I put the boat in the water… can you suggest some settings to try.

Post a .bin log in auto or at least a parameter list. I don’t have enough information to give any advice on. What are you worried about. you can bring the boat home easily whether it is ugly or not.

my experience up till now has been with a rover truck and I had a lot of trouble to get it to drive straight and its still not very good.
These settings seems so complicated when you are not confident you are doing the right thing or not.
See screen dump of current PID settings, is there anything you would change before you ran a test?

You are definitely going to want to tune those numbers

Would Randy Mackay be reading this? He has a video of a mapping boat with two thrusters which is about the same size as mine, see link


maybe I could use his settings to start with.
1 Like

http://ardupilot.org/rover/docs/rover-first-drive.html

I have set up two motors and pixhawk on a board for testing and one of the first problems I see is, when I switch to auto, the motors run at about full speed.
This is not what i want. I dont want the motors to run unless I go off course, then the left or right motor will run untill the boat is back on course. Is this possible?
Is there a way I can run the thrusters like a rudder?

If you have it configured for typical skid steer with Throttle Left and Right outputs it would do that. To do what you want they need steering signals only. What happens if you configure both servo outputs for Ground Steering? Maybe you will have to play around with the direction and trim, not sure. It may balk w/o a Throttle output configure so assign that to another output which won’t be used anyway.

That may work. I think you would need one output reversed or use counter rotating props. However if the main motor was controlled by a speed controller I can’t think of any reason why throttle plus differential would not work provided the cruise speed and other stuff was set properly

I have counter rotating props. I will look into throttle plus differential and ground steer and see what I can achieve.

What about this then.
What if I fit a servo connected to pin 1 that turns a potentiometer with the two outer lugs connected to the 2 esc’s and the centre lug connected to the positive. Or use dual pots.
Just a thought, maybe there’s a product that will do this.

If the main motor was controlled you could make it work like a Rover with 4 wheel steer (kind of). With that arrangement you drive 2 steering servos both controlled with Ground Steering outputs and of course the drive motor.

But as I understand it the main Motor is on or off right and not controllable right?

Not following the servo/pot idea. I don’t suppose adding a servo rudder is do-able? That would seem to solve the proble easily.

1 Like

I will look at 4 wheel steer and see what happens.

The servo idea.
Set two micro switches one either side of the servo arm. When the servo arm turns to the right / left it operates the right or left switch and turns on the right or left thrusters esc.
With the throttle control preset.

Main drive motor is switched on indepently.

Why wouldn’t you drive the thruster ESC’s with PWM output proportionately from the FC directly?

I have had some success.

I set the 2 servo functions to RC1 and RC3 with Ground Steering and have reversed one of them, now I get steering from both motors. push the stick to the right and the right motor rotates and vice versa.
I set the trim to 1150 which idles the motors with the stick in the centre.
This arrangement also works when set AUTO. When on course the motors idle, when moved off course one or the other motors accelerates.

One problem is I can’t Arm, I get an error message.
PreArm: check steering and throttle config.
Maybe I need to configure throttle out to RC2 and assign it to throttle, i am not sure about this, is there some other setting I would need to set as well??

Strange, I can get Auto when its not Armed.

I mentioned this in a previous post. Configure throttle on a servo output and the error will go away. I don’t think it matters which channel but in SITL I used Servo out chan 2. Like this:

Thank you, that works.

I am not sure I have Auto setup correct yet. just cooked a motor running it fast for too long without cooling.
To avoid this happening again can I temporary lower the top speed while tuning Auto.

No need to reply I see how to restrict the speed.