Page 1 of 2

Camera roll stabilization.

PostPosted: Thu Jun 16, 2011 4:53 am
by daedalus
Hi Tom,

Somewere in February you said "Roll stabilization of the camera is possible (1 servo output is direct
proportional with the roll angle)."
I would like to test this but where do I start?

Re: Camera roll stabilization.

PostPosted: Sun Jun 19, 2011 8:24 am
by Tom
I would need to add 1 additional line to the source code.

Here I added another output (servo 6) to the aileron mixing mode:

control.c
Code: Select all
      default:  // aileron
         number_of_controlled_channels = 6;
                        if (config.control.reverse_servo6)
            servo_out[5] = -(int)(sensor_data.roll*636.0) + 1500;
         else
            servo_out[5] = +-(int)(sensor_data.roll*636.0) + 1500;


Attached the hex file (untested, from development code)

Let me know how it went!

Re: Camera roll stabilization.

PostPosted: Sun Jun 19, 2011 7:36 pm
by Tom
I forgot to tell you: this latest version (development) uses 57600 baud in gluonconfig...

Tom

Re: Camera roll stabilization.

PostPosted: Tue Jun 21, 2011 7:03 pm
by daedalus
And it worked really well.

Thank you Tom!

Re: Camera roll stabilization.

PostPosted: Thu Aug 04, 2011 4:56 am
by daedalus
What I've noticed is that in Gluonconfig Configuration/Servos tab reversing the servo 6 does not change anything on the servo. Is working always in the same direction.

Re: Camera roll stabilization.

PostPosted: Thu Aug 04, 2011 7:49 am
by Tom
Good remark, I'll update this as well :-)

Re: Camera roll stabilization.

PostPosted: Sat Aug 06, 2011 8:06 pm
by Vanags
Tom, why do you need 57600 baud rate ?
1) most long range systems uses low baud rate, because of low wavelength.
2) Not everybody loves XBee as such
3) If bandwidth is high the code is not efficient, and it may eat up the CPU. (like CSV is much worse than binary packet )
4) Lost packet retransmission requires some overhead. (Some RF transceivers does it by themselves, and it requires half of the bandwidth )

Re: Camera roll stabilization.

PostPosted: Sun Aug 07, 2011 7:28 pm
by Tom
Good questions...

1) That's true. But the baudrate can easily be changed (in code) and the telemetry rate can easily be slowed down. The actual rate is about 500 bytes per second in fast mode, or 200 bytes in slow mode. So even 2400 baud should not be a problem.So the serial baudrate should not always be the same as RF baudrate.
2) That's true, but as a developer I need to make some choices. So yes, it's currently optimized for XBee.
3) Also true... But the code is quite modular, so for example MAVlink is easy to implement.
4) Yes, currently there is no packet retransmission.

Re: Camera roll stabilization.

PostPosted: Sun Aug 07, 2011 7:57 pm
by Vanags
Tom, thanks for explanation! 500bps is absolutely OK.

Re: Camera roll stabilization.

PostPosted: Wed Aug 10, 2011 1:01 pm
by daedalus
Tom, I still want to reverse the direction of the servo 6.
I there a way to generally modify a variable if it's not on the GluonConfig interface?
Some command line?