Pantilt Demo Pane

Version 5 (Rich LeGrand, 01/19/2015 10:36 pm)

1 1 Rich LeGrand
h1. Pan/tilt Demo Pane
2 1 Rich LeGrand
3 2 Rich LeGrand
This pane contains parameters to adjust parameters associated with the pan/tilt demo, such as the PID gains for each axis.  To bring up the Pan/tilt Demo Pane, first bring up the Configure Dialog (click on the gear icon or select *File➜Configure*). Now select the *Pan/Tilt Demo* pane under *Pixy Parameters*.  
4 1 Rich LeGrand
5 1 Rich LeGrand
!http://i74.photobucket.com/albums/i241/cmucam/Image163_zpsd178a0d5.jpg!
6 1 Rich LeGrand
7 2 Rich LeGrand
* *Pan P gain* This parameter adjusts the proportional gain for the pan axis (servo 0). 
8 1 Rich LeGrand
9 2 Rich LeGrand
* *Pan D gain* This parameter adjusts the derivative gain for the pan axis (servo 0). 
10 1 Rich LeGrand
11 3 Rich LeGrand
* *Tilt P gain* This parameter adjusts the proportional gain for the pan axis (servo 1). 
12 2 Rich LeGrand
13 3 Rich LeGrand
* *Tilt D gain* This parameter adjusts the derivative gain for the pan axis (servo 1). 
14 2 Rich LeGrand
15 2 Rich LeGrand
Some useful notes:
16 2 Rich LeGrand
17 5 Rich LeGrand
* The default values work well with the Pixy pan/tilt mechanism, but you are welcome to tweak to get more performance or use a homemade pan/tilt mechanism, which will surely mean you'll need to play around and find good gain values.
18 2 Rich LeGrand
* The *proportional gain* will control the speed of the servos.  If your servos aren't moving fast enough, try increasing the proportional gain.
19 5 Rich LeGrand
* The *derivative gain* will help ensure that you don't overshoot or oscillate.  If your servos are oscillating, try increasing the derivative gain.  If increasing the derivative gain doesn't reduce oscillations, try reducing the proportional gain and reset the derivative gain to 0, then try increasing the derivative gain again.  
20 2 Rich LeGrand
* The gain parameters can be set to negative values, which may be necessary if your servos need to move in the opposite direction.  (Assuming you're using your own pan/tilt mechanism.)   
21 2 Rich LeGrand
* The RC-servo port pinouts, as well as which port is which can be found "here":/projects/cmucam5/wiki/Port_Pinouts.