Wednesday, September 17, 2008

Motorized Tripod with GPS

The idea came during a Windsurfing trip. I'd like somebody to video tape me while windsurfing. Trouble is you cannot find anybody, it is windy at the beach, nobody wants to film for an hour or more. And you need a tripod as the wind blows so strong you cannot hold the camera steady enough. What if you have a motorized pan-tilt head mounted on the tripod which receives the GPS coordinates wireless and translates that into the correct angles to keep the GPS receiver in the center of the view finder.

Given my experience with GPS you can assume - good reception given - to get the correct position from the GPS with an error margin of about 5 meters in distance, height is worse, I would expect the position wandering +-10meters. So the first limitation is, you cannot expect to follow objects very close to the camera. If the camera position is off by five meters and the GPS receiver another 5 meters in the other direction you need to be at least 20m away to make sure the camera points somewhat into your direction. For Windsufing no problem.

So the entire project can be split into the following components:
1. Receive GPS data wireless over a good distance
2. Microcontroller and its software
3. The pan-tilt mechanic

Typical GPS receivers have either an USB, a bluetooth or a serial connection to the computer. Bluetooth would be just perfect but its range is 10meter. In theory bluetooth can span up to 100meter but even that is not far enough for this application nor do you find bluetooth class2 enabled GPS recievers prebuilt. All common microcontrollers support a serial connection, the easiest method would be to go for a serial GPS receiver and some wireless replacement for a serial cable. The most current standard for that is ZigBee or XBee. Low-Cost, Low-Power, free 2.4GHz band and distances up to 1.5km.

Next question was how to connect the XBee module with the GPS receiver on one side and on the other end, XBee connected to the microcontroller. Guess what, there are controllers available already that have a plug for XBee modules built in.

Deciding on the mechanical components took the longest time. Basically I had two options. Either use a stepper motor or RC servos. Stepper motors are very precise, slower but that would be okay. And I would need to make the mechanics all by myself. A standard RC servo on the other hand is all I really needed. It is fast, cheap, it is a +-180 degree rotating movement already. But for a heavy D-SLR camera they might not be strong enough. And the question still was, how to attach the camera to the servos.

At the end I bought the following components (bought in Germany but I am sure you find equivalent offerings anywhere else).

Navilock NL-501ETTL Sirf3 TTL Modul: A GPS receiver with 3V UART interface and the SIRFIII low power chipset, costs just 30EUR.
XBee PRO Module with wire antenna: Need two items, 45EUR each.
Droids XBee Simple Board: The board connecting the GPS unit to the XBee module. As it has an integrated voltage regulator it will power both, the XBee and the GPS.
Droids Multi Interface Board PIC18F2520: A PIC microprocessor based development board with Servo output, XBee enabled and ICSP interface for programming.
The PICKit2 programmer to transfer the compiled software into the microcontroller. In theory you can do that via other ways as well, but if anything goes wrong or you need to debug the code you have to have such a thing anyway. (see microchip web site) Software is available there free of charge including the C compiler I used, it is called C18. If you search for "Clone Microchip Programmer" or "pic kit clone" in some variations at e.g. ebay you get this for 30EUR or so.
LCD03 display and keyboard: Used to interact with the user. Search for LCD03, seems to be a standard component found everywhere.

Servo bracket: With these you can screw multiple servos together and build the pan-tilt head. This bracket will hold the servo body.
Servo C-bracket: The other half of the bracket, this time for the servo head.
Metal Servo Horn: Required component for the two brackets, two pieces needed.
Manfrotto Quick release plate: Two items, one is used to attach the camera to the servo bracket, the other is between servo and tripod.
Hitec HS-5745MG servos: Again, two pieces required. I tried with analog servos first but they kept trembling even in a static position. Digital servos are much better and do not cost that much more.

...more to come...

Post a Comment