AT Pitch - Ready to throw this thing out the window!

I’ve been working on a few AT projects this past month, and can use some help. I have no previous experience with coding, and have figured everything out on my own so far with the help of this forum.

Through way to many hours of trial and error, I got it to work for Pan, but getting the pitch to work has me ready to scrap the whole thing.

I’ve tried using postion and continuous rotation servos for the pitch. I was never able to get the position servos to work right. I recently switched to a continuous rotation servo (HSR-2648CR) and somewhat had it working. It would accurately track a sim plane at altitudes above 200m, but not below, regardless of PID or max/min pitch settings. After taking a break for an hour, I fired it up again and now I can’t get it to track pitch at all.

I would welcome any suggestions! My setup is below. Please note, I changed the layout after the photo. The PX4 now sits on the tilt frame and moves with the pitch.

I also would like to know how to disable the internal compass on the PX4 and only use the external compass in the GPS puck, so that I can swap them so only the GPS puck moves with the pitch.

Physical Hardware Setup

•Custom designed gimbal frame, 3D printed
•Pixhawk 4 Autopilot w AT 1.0 firmware
•Mission Planner, latest release
•Hitec HSR 2648 continuous rotation servos for Pan and Tilt.
•Holybro sik Telemetry (vehicle to AT)
•OLED display on i2c.
•5000mah 3cell lipo, PX4 power module, Castle creations 10 amp BEC @ 5v feeding the servos.

For the Sim:

•I run two separate instances of MP with AT firmware on the computer.
•One connected to the tracker via USB for adjusting parameters.
•The second running the same AT firmware Sim with Plane, circling my house at various altitudes with a radius of 200M. MavLink telemetry from Sim is sent to the actual tracker via a Sik radio connected to computer via USB.

image image image image image image

Hard to tell from the pics but it looks like the flight controller is not moving with the antenna? It needs to move with the antenna to close the loop of the angle feedback.

I noted this above. The pictures are from before I changed the layout. The board is now on the pitch frame and rotates with the pitch axis.

sorry, didn’t spot your note. The GPS (or at least the compass in the gps) will also have to be mounted with the flight controller or the EKF will be very upset. If it tracking in yaw OK that would suggest its knows where it should be trying to point at least.

First step is to make sure there pitch servo type matches what is actually fitted. Then set GCS_PID_MASK to 1 for pitch. You can then use the tuning screen in MP to give a insight into the pid values to help tuning. This is probibly best explained in the rover wiki here. First think to check is if the desired angle seems to match where the aircraft actually is.

Thanks! I moved the GPS to the pitch carriage, re-calibrated everything and after playing with the PID’s, it’s now working!!!

Here is a link to it in action running off the sim.

1 Like