Servos some times go crazy on start up

Super - glad to hear it!

And just happened again. What servos it happens on is not always the same and this time it was just the tail.

And this has now caused a catastrophic crash. Lost the tail control of my helicopter because the servo going haywire on startup cracked a linkage but did not pull out all the way so I didn’t catch it before take off. Once I hit too much yaw torque it pulled through the cracked linkage eye and the heli went in to a spin.

What are you fixed wing pilots doing to work around this? Is everyone just using a secondary power source to boot the FC before powering servos? This seems like a pretty critical issue. I don’t have any problems with servos moving before boot on inav.

I recall there being another safety that stops servos from moving but heli setup suggests turning that off.

Im using chibios, Would possible changing to nuttx help?

I also have the brd_safety off but I’m wondering if there is a way to have this on during boot up and then turn off automatically. Seems like servo output should just be disabled on startup anyway though.

It turns out that the GPIO setting does not take effect in the place that most people put it. I can do you an updated version if you want to test.

1 Like

Sure, I’m happy to test a fix for this. I’m not able to consistently reproduce this. So I wont be able to say super affirmatively if its fixed but only that I wont have issues for a long time. I will probably detect the issue pretty fast though if its not fixed. I have not figured out why some times they or some go full throw and some times they don’t on boot.

What do you mean GPIO settings dont take effect in the place most people put it? As in the servo limits are not implemented until farther along in the boot process or something? Im pretty new to ardupilot but id love to know how to investigate this in logs or where ever I should be looking to figure this out.

I found some maybe related topics on here:
Maybe related to motor settings? Tricopter pre-arm tilt motor angle - #18 by OldRaven

Here unsolved but old archived same issue it looks like. Servo travel on startup (help!) - #3 by raphh

What flight controller is this?

Matek H743-Mini V3

http://www.mateksys.com/?portfolio=h743-mini#tab-id-11

On 4.3 or 4.4 or master?

4.3.6 currently.

I’v just learned there is a min post length of 20 characters.

Here is a copter build for Matek H743 - https://www.dropbox.com/s/udmlg4k5n8greij/arducopter.apj?dl=0

1 Like

Thanks, ill try that out as soon as I can but it wont be for a few weeks.

I’m curious of what you think the problem is and what you changed to fix it. Id like to understand this better.

Pins that are not defined in the bootloader are left floating by default. This change forces all undefined pins to be pulled low.

1 Like

Alright, finally got parts and put repaired the heli. I have the new firmware you uploaded on it now and will report back if I have a servo freak out.

I have a question though, When I load the new firmware it was 4.3.7 not 4.3.6, I just want to confirm that is expected and am not saying it is a problem. Also is there any way to identify or confirm I have loaded your custom firmware? It look in mission planner as far as I know how to look like I just loaded the next stable version. I did the custom firmware and selected the AJP, watched it erase and write and all that. I just like to be able to verify that I loaded the custom file and not the next stable version if possible, mostly because I just like to verify things as much as I can.

Thanks,

I think I built against latest 4.3 which would have been 4.3.7. Probably no way of telling whether its the version I sent you or not.

Isn’t there an abbreviated hash reported on boot?

And for the fix to be active, you need to do a bootloader update after uploading, correct?

These are the first messages on boot.
7/23/2023 6:48:34 PM : MatekH743 00480025 32305106 33393233
7/23/2023 6:48:34 PM : ChibiOS: a97ccb41
7/23/2023 6:48:34 PM : ArduCopter V4.3.7 (c8506ed4)

Im not sure its critical to verify. Im pretty sure I flashed the correct firmware but I was curious how to verify.

I am getting a error “PreArm: Motors: Check frame class and type” and “Frame: UNSUPPORTED” though.

I have tried a bootloader flash as well.
My params are set as:
FRAME_CLASS 6
FRAME_TYPE 0

If you show/tell me what code you changed I’m happy to go learn how to compile custom firmware with it my self. Ill need to do that eventually for other things anyway.

I found a couple of resources talking about it Here and Here but I have a suspicion you are already familiar with this. If there is another param that these are set in I have not found it yet.

Thanks,

I think maybe @andyp1per made a Copter (multirotor) build and not a heli build. They are different branches.

Yes sorry - did not realise you were using heli