View Single Post
  #30   Spotlight this post!  
Unread 18-01-2007, 16:58
phoenixRae phoenixRae is offline
Registered User
AKA: Liam Caven
FRC #0581 (Bulldog Robtics)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: San Jose, California
Posts: 1
phoenixRae is an unknown quantity at this point
Re: Who has the camera working?

Team 581 here - got the camera up and running by the end of the first week, but was initially stumped as to why Kevin Watson's scanning algorithm wasn't working for us properly. From what we could see, the camera started out at an orgin way left of what it should be, and the 5 step pan reflected that bias. Turns out that the guy who assembled the camera (definitely wasn't me... yeah... *cough*) forgot that the servo plates need to be engaged to the servo in such a way that the PWM values for facing straight forward (which are 124 for pan, 144 for tilt, if memory serves) actually translate to facing straight forward. In case anyone else's run into this problem, here's how we fixed it:

1.) Before bolting the camera board onto the pan-tilt assembly, connect up the servos in the configuration described by Kevin Watson's default code (Pan in PWM01, Tilt in PWM02). You won't be needing the actual camera to do this, and since we'll be unscrewing a few things in the process, it's safer for the camera not to be involved.

2.) Follow Mr. Watson's instructions on installing and loading his code onto your 2007 Robot Controller, and tether your robot to its OI. Make sure your PWM cables aren't tangled with the pan-tilt assembly, then fire 'er up.

3.) What you'll see the camera do may vary depending on how your plates are aligned already, but if you're using Mr. Watson's code, it should move to its defined center, then repeat a path through 5 pan positions:

1 - Far left (PWM: 0)
2 - Left (PWM: 62)
3 - Center (PWM: 124) *This supposed to be the center of the camera's pan motion; it may not be at this time.*
4 - Right (PWM: 186)
5 - Far Right (PWM: 248)

What you want to do is unplug the pan servo from the Robot Controller at position 3 and turn off the robot. Now, unscrew the servo plate on the pan servo (without turning the servo), take it off the gear-shaped servo shaft, and align the camera so that it's facing forward. Put the plate back onto the servo shaft (again, without turning the servo), and screw it back on.

4.) The tilt servo runs through 3 positions, the second of which is supposed to be parallel with the ground. Repeat step 3 for the tilt servo (unplugging it at that second position), and you're done! =)

Thanks for reading my incredibly long post, hope it's of help to someone suffering from the same problem.