What is trim?

vortix

Well-Known Member
when looking up trim, people often discuss what trim does and how to use it but i haven't been able to find information on what it is Code wise. What is it really?
 
Trim and sbb-trim is more related to airplanes and helis. For example, say you have two aileron servos, and one servo is off-center and the other one is fine. If you can't fix that situation mechanically by moving the servo arm on the gear, you can use sub-trim on only that servo (output channel). Then when you're flying the plane, you need to trim the roll, and you click the trim - THAT trims the STICK itself, affecting BOTH ailerons.

As long as you understand your radio as a simple input-output device, it makes sense. The sticks and switches are the input, where trim works - the output of the radio is a servo position for every channel, and sub-trim works there.
 
Trim and sbb-trim is more related to airplanes and helis. For example, say you have two aileron servos, and one servo is off-center and the other one is fine. If you can't fix that situation mechanically by moving the servo arm on the gear, you can use sub-trim on only that servo (output channel). Then when you're flying the plane, you need to trim the roll, and you click the trim - THAT trims the STICK itself, affecting BOTH ailerons.

As long as you understand your radio as a simple input-output device, it makes sense. The sticks and switches are the input, where trim works - the output of the radio is a servo position for every channel, and sub-trim works there.

so my quad drifts and i wanted to implement some trim. would it be the same to add a flat speed increase to the motors that are drifting?
 
Think of trim as mechanically holding the stick slightly in the direction you add trim. There is no code lol.
but if i want no stick movement equaling hover than there should be some code to make it so that stick angle is applied as an initial .
 
It's quite simple actually but you would need to equip your quad with a GPS module and load your flight controller with iNav software. You then have the ability of various flight modes such as position hold, altitude hold, RTH, etc
 
i don't know, i just feel like its really neat to see it float so im trying to do it.
Hiya Vortix,

So I know you were doing the DIY arduino based flight controller, but even off the shelf flight controllers suffer from accelerometer drift, there are some ways I saw and think I shared about how to try and account for that over time, but like Renov8r is saying without some other sensors to help with position locking you might be chasing that one forever. Along with the options mentioned you could use optical flow sensors to try and lock position have heard good things about this for some smaller quads (never tried myself), for the altitude lock you can use a combo of ultrasound sensors (if close enough to the gnd to bounce sound waves off it), barometric pressure (for larger altitude changes high in the air), and/or GPS/compass to get position roughly.

Renov8r answered the original question too but yah "trim" itself is typically just an adjustment to account for the stick center not sending actual center values or to adjust for the aircraft itself dragging one direction or another and is basically adjusting the 'default' for planes, but quad auto-levelling with PID tuning is somewhat less about the control input and more about the computer/configuration that actually sends out the motor control signals and attempts to help level things.... all said I agree on all accounts with Renov8r hovering is overrated learn to fly acro and you don't need to worry about the accelerometer drifting :D
 
It's quite simple actually but you would need to equip your quad with a GPS module and load your flight controller with iNav software. You then have the ability of various flight modes such as position hold, altitude hold, RTH, etc
im using a custom flight controller that i made so its more tricky.
Hiya Vortix,

So I know you were doing the DIY arduino based flight controller, but even off the shelf flight controllers suffer from accelerometer drift, there are some ways I saw and think I shared about how to try and account for that over time, but like Renov8r is saying without some other sensors to help with position locking you might be chasing that one forever. Along with the options mentioned you could use optical flow sensors to try and lock position have heard good things about this for some smaller quads (never tried myself), for the altitude lock you can use a combo of ultrasound sensors (if close enough to the gnd to bounce sound waves off it), barometric pressure (for larger altitude changes high in the air), and/or GPS/compass to get position roughly.

Renov8r answered the original question too but yah "trim" itself is typically just an adjustment to account for the stick center not sending actual center values or to adjust for the aircraft itself dragging one direction or another and is basically adjusting the 'default' for planes, but quad auto-levelling with PID tuning is somewhat less about the control input and more about the computer/configuration that actually sends out the motor control signals and attempts to help level things.... all said I agree on all accounts with Renov8r hovering is overrated learn to fly acro and you don't need to worry about the accelerometer drifting :D

Hello Wafflejock :D.

ah ok, so if another sensor is required than thats good. ill look into that. I know acro is better but im too noobish to do that right nowo_O. i got the angle mode to work im just trying to make it as perfect as it can be for my project presentation. i would imagine that a hovering quad would look really cool. i don't want to fly acro right into the instructor grading me project thats for sure :D
 
Back
Top