This is easy camera roll stabilizer to ArduPilotMega (I used code version 2.012). Camera mount was easy to build. Camera angle can be adjusted during flight with RC controller. Stabilization needs only one line code to program! Of course also pitch can be stabilized in the same time, but I have not yet tested this.
Camera stabilizer is normal mount with servo. Servo is connected to APM's sixth output port. (I have old 1.0 version of board, name is Out5, in new version 1.4 port name is probably Out6)
Optionally some free radio receiver channel can be connected to 6th input port(In my board name is In5, in new board probably In6)
Then I added one line to APM code: In the main program there is fast_loop. To the end of this subroutine, just above }, I added this line:
APM_RC.OutputCh(CH_6, constrain(g.rc_6.radio_in - (dcm.roll_sensor * 0.1),900,2100));
Then I uploaded program to APM, and thats it.
Also pitch can be stabilized in the same way. Servo and receiver goes to next channels, and this code can be added after the code line above.
APM_RC.OutputCh(CH_7, constrain(g.rc_7.radio_in - (dcm.pitch_sensor * 0.1),900,2100));
Some explanations to codes: It is easiest to think, that servo middle position is 150 degrees, in the program this is indicated as 1500. This is default value if receiver is not connected, and we get this value from radio receiver if knob is in the middle position.
Servo maximum turn is 60 degrees to each position, so we have minimum value 1500 - 600 = 900, and maximum value 1500 + 600 = 2100. These numbers are in the code above. If we want to reduce movement, then we must change these values. For example if camera can turn only 20 degrees to each direction, the values are 1300 and 1700.
Stabilization works always, also on manual mode. Camera can turn even 60 degrees to all directions. Probably analog servos are better, digital servos jitters very often.
In the forum there are some drawings from some other camera mounts http://www.diydrones.com/forum/topics/apmimu-camera-stabilization
Comment by Janne Mäntyharju on April 27, 2011 at 12:42am
Comment by ionut on April 27, 2011 at 4:53am
Comment by Ritchie on April 27, 2011 at 5:37am
Comment by Chad P on April 27, 2011 at 5:58am
Comment by Thon on April 27, 2011 at 7:53am
Comment by Krzysztof Bosak on April 27, 2011 at 8:16am
Comment by Bart on April 27, 2011 at 8:21am nice video, but are you also working on a trigger device to take pictures?
(i know, you do a great job, publish your results and you get more questions on the things you don't have done yet, sorrry)
Comment by SciFly on April 27, 2011 at 10:39am
Comment by MarioLucich on April 27, 2011 at 11:33am Someone else might beat me to it, but I got an idea from my Dragon OSD, where at the throw of a switch, aleron and elevator becomes OSD menu navigation instead of controling the plane. This could proably be implemented when you are in stabilizing or loiter mode (or any other mode), then the Aleron and Elevator stick movement becomes camera movement instead. Then combined with this kind of stabilization it would be pretty cool.
I have been thinking about putting a heli gyro in the look instead, but this implementation of using the APM is just brilliant.
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.186 members
1298 members
24 members
51 members
51 members
© 2013 Created by Chris Anderson.
Powered by

You need to be a member of DIY Drones to add comments!
Join DIY Drones