My pantilt is acting sort of crazy

Version 3 (Rich LeGrand, 05/09/2014 01:14 pm)

1 1 Rich LeGrand
h1. My pan/tilt is acting sort of crazy
2 1 Rich LeGrand
3 1 Rich LeGrand
The pan/tilt mechanism should track objects smoothly.  If it doesn't, here are a few things to try/check.  
4 1 Rich LeGrand
5 1 Rich LeGrand
h2. 1. Check to make sure there is no mechanical binding
6 1 Rich LeGrand
7 1 Rich LeGrand
Unplug Pixy from power/USB and gently check the pan axis by moving it back and forth over its entire travel.  It should move fairly easily and smoothly.  Then test the tilt axis by moving the *servo horn* back and forth (not Pixy!).  It too should move fairly easily and smoothly and not bind on any cables.
8 1 Rich LeGrand
9 1 Rich LeGrand
When Pixy is plugged into the USB cable, make sure there is plenty of cable for Pixy to look up and down, left and right.  
10 1 Rich LeGrand
  
11 1 Rich LeGrand
h2. 2. Check the connections
12 1 Rich LeGrand
13 3 Rich LeGrand
This is an obvious one, but make sure the connectors that plug into Pixy are secure and fully engaged (you shouldn't see any of the terminal posts on Pixy -- each servo connector should completely cover the terminal posts on Pixys servo connector.)  
14 1 Rich LeGrand
15 1 Rich LeGrand
h2. 3. Does the pan/tilt seem to avoid the object?
16 1 Rich LeGrand
17 1 Rich LeGrand
That's not good!  But it's usually caused by the pan and tilt servos being swapped where they plug into Pixy.  Try swapping the servo connectors where they plug into Pixy so they are correct.
18 1 Rich LeGrand
19 1 Rich LeGrand
h2. 4. Do you get a good solid rectangle in PixyMon when running the "pan/tilt demo"?
20 1 Rich LeGrand
21 1 Rich LeGrand
If the rectangle changes shape rapidly or you see lots of rectangles (detected objects), Pixy will have a hard time tracking.  You should probably re-teach.  Or you may need to adjust some parameters -- consult [[Some Tips on Generating Color Signatures|this guide]] to learn more.
22 1 Rich LeGrand
23 1 Rich LeGrand
h2. 4. Test the servos
24 1 Rich LeGrand
25 2 Rich LeGrand
Run PixyMon and hit the stop button (upper left corner of PixyMon).  In the command window type this, hitting <return> after each line:
26 1 Rich LeGrand
27 2 Rich LeGrand
<pre>
28 2 Rich LeGrand
rcs_setPos 0 1000
29 2 Rich LeGrand
rcs_setPos 0 0 
30 2 Rich LeGrand
rcs_setPos 1 1000 
31 2 Rich LeGrand
rcs_setPos 1 0 
32 2 Rich LeGrand
</pre>
33 1 Rich LeGrand
34 1 Rich LeGrand
This should exercise the pan servo first then the tilt servo.  The movement should be smooth and rapid.  If not, make a note of which servo is acting strange. and send us an email describing your experience (support@charmedlabs.com).
35 1 Rich LeGrand
36 1 Rich LeGrand
37 1 Rich LeGrand
38 1 Rich LeGrand