Arduino Pan&Tilt-System

On this page we present the Arduino Pan&Tilt-System.
An Arduino controlls a Canon Ixus Camera and two servos of the camera pan&tilt system from Lynxmotion. We also designed a aluminium plate where all parts are mounted on. You can use this design to make ultra-mega- or even giga-pixel images or make time lapsed movies from single photo shots.

Hardware



- Arduino Duemilanove (at Ebay, around 20€/$)
- Arduino Prototyping Shield (at Ebay, around 8€/$)
- 7.2V racing battery pack (NiCd or NiMh) (around 15€/$)
- Lynxmotion Pan&Tilt system (Link , around 45€/$)
- digital camera (see our hack here)
- milled 160x170mm aluminium plate (you can create and upload a design to www.schaeffer-ag.de using the Frontplatten-Designer tool, around 35€/$)
You can download the plate design in the download section.
- screws and other assembly material (around 8€/$)

Software

The software is devided into different parts:

1.) Init

Initialization of the driver modules of the servos, (serial interface if needed), button, … .

2.) Functions

There are two main functions, one for the “time lapsed mode” and one for the “pan&tilt mode”.

3.) Main loop

In the loop section on of the two main functions is called, depending on the button state during start-up (after power-up or reset).

You can download the code in the download section.

Download

Code Arduino:
click here

Aluminium plate design (for the Frontplatten-Designer from schaeffer-ag.de):
click here

Time lapsed mode

In this mode, the pan&tilt system is positioned to a stationary position. The images are taken every six seconds. You can adjust the delay like you want.
After 255 pictures the Arduino stops to take further pictures.

Combining the 255 images to one video is easy, when you use the freeware tool Virtualdub – Link: www.virtualdub.org. It’s free and extremely easy.

This is what you have to do:

Go to ‘File -> Open -> Image sequence’ and select your first photo (you can’t select multiple ones, so just click the first one).
Then make adjustments and ‘Save as AVI’ (you might want to use a codec, ‘Tools->Compression’).

Pan&Tilt mode

In this mode 10 pictures per row are taken, then the camera tilt is decresed and the camera takes again 10 pictures. This continues until the tilt points to the ground. You have 40 or 50 images at the end, that you can stitch together with different kinds of software tools. I used the Microsoft Image Composite Editor (ICE). Click here for more information.

7 Antworten auf “Arduino Pan&Tilt-System”

  1. [...] compacta para realizar time lapse y el control 3D mediante unos servos controlados por Arduino. Arduino Pan&Tilt-System | Zipfelmaus – Blog Canon 30D, y otros accesorios. http://www.flickr.com/photos/fotostrenado Responder [...]

  2. cgiles sagt:

    Hello, i build my own pan&tilt based on arduino and chdk.
    My first try of the system give me a shaky result. Did you try to do a pan&titl timelapse ?
    If yes do you use the write(int angle) or the writeMicroseconds(int usAngle) command ?
    regards and nice job

  3. Dave Brown sagt:

    Hello,

    I did not see what size resistor or capacitor you used in your circuit. I am hoping to put the images that I capture together with GIMP.

    Have you tried to use GIMP for your assembly of images?

    Thanks,

    And Good work

    Dave

  4. SES sagt:

    @Dave:
    Hi Dave,
    there is a 150 Ohm resistor at the base of the transistor (I use the transistor to trigger the camera shot). And I used 0,1µF electrolytic capacitors, one for each servo motor. Maybe a little more is better, like 10µF.

  5. Dave Brown sagt:

    Thanks for getting back so soon. I am anxious to try the Sketch for the pan tilt.

    Dave

  6. Dave Brown sagt:

    I got all setup using 10uF Caps Pan Tilt sketch works beautifully. I now need to hack a camera, or I may buy the Adafruit IR Camera. My intent is to mount the unit on my robotic track vehicle.

    Thanks,

    Dave

  7. Lucas sagt:

    Good afternoon,

    My name is Lucas and I’m from a website where people share contents about mechatronics, I found your tutorial very interesting, would you let me share it? Of course I’ll give you the credits.

    Thank you for you attention.

    Greetings.

Hinterlasse einen Kommentar