Tuesday, 7 May 2013

GigaPi Project
by Tim & Jack Stocker

Objective: To build an automated panoramic tripod head for use in photography, the main purpose to accurately produce an image using many/hundreds of separate photographs, enabling very high detail and the ability to zoom in on minute details.

Components: After some research we decided to build our GigaPi using the following:-

Main camera support/gimbal:  MDF frame, providing controlled tilt around the camera nodal ( no parallax) point. Lego Turntables to provide the pivot points and gearing.

Tripod Head/Pan control: Cheap laser level kit (Tribrach), Modified with a worm and gear drive.

Camera/Mount: MDF frame designed around a Canon 5DMKII, and a adapter plate top allow Lumix FZ100 to also be fitted. 'Fotomate' Focus Rail fitted to allow the no parallax point to be set for each camera and lens combination, connected to the frame using a bolt.

Drive: Two 5volt DC Stepper Motors, one for panning and the other for tilting, with worm drive gears fitted.

Control: Raspberry Pi to provide the computer control, including pan, tilt, shutter operation etc. Stepper motor driver circuit board attached directly to the Pi and shutter control circuit designed and built by us to operate the shutter electrically. Modified remote release cables for both cameras to enable easy connection to the board via a 3.5mm jack plug. USB hub connected to the Pi, to enable connection of a keyboard, memory stick etc. A rechargeable battery pack to be used to power the PI.

User interface:  A 12 volt 5 inch display screen (actually a car reversing camera display) and a touch pad to provide the interface.  All housed in a project/instrument box, with outlets for shutter, stepper motors, USB and charging point.

Software:  Bespoke programme written by Jack to control every aspect of the operation of the GigaPi. The programme is required to calculate the horizontal and vertical angles required, the camera sensor size, the length of zoom used and the image overlap required, it then     needs to calculate the total photos required to complete the task, operating the stepper   motors the required amount in the right order and fire the shutter at the right time, allowing     for focus and shutter activation time etc, a tall order indeed.

Build details:

One inch thick MDF cut with a jigsaw and filed and sanded to a smooth finish, two lego turntables fitted to allow it to tilt, the pan/pivot point is set to the center of the camera lens.

A cheap 5volt DC stepper motor was fitted with a worm drive to turn the 56 tooth lego gear, an MDF block made to provide the correct spacing for the gears.

A cheap laser level kit brought off the internet provides the panning control, even comes with a tripod for around £20. the three plastic screw adjusters were removed as they had too much side play in them, replaced them nuts and bolts. A 40 tooth drive gear fitted on the center bolt which had to be modified to provide a 4mm shaft for the gear to fit onto. Another 5v stepper motor fitted to a hand made bracket and a worm drive gear press fitted to the shaft. Both motor wires were then fitted with an RJ45 jack plug to enable quick connection to the control box later on.

The completed framework was painted yellow to match the laser head, and a focus rail bolted into place to allow the nodal point of the camera lens to be set.

Raspberry Pi computer, you can also see attached the Stepper motor driver circuit, and two RJ45 sockets to allow easy connection to the two stepper motors, you can also see in the bottom right hand corner 4 wires soldered on to the back of the stepper motor board to provide the power, earth and  activation of the focus and shutter control relays.

This is the shutter control circuit, designed by us and laid out on Vero board. it's is basically two 5v solid state relays which are activated and powered by the Pi. One controls the focus/exposure function, and the other controls the shutter. The relays close the circuit on the shutter release cables, starting with the focus/exposure function and this remains on whilst the shutter is activated a split second later.

This is the completed circuitry. The Raspberry Pi at the top, the stepper motor driver circuit fitted, the shutter activation on the right, the USB hub on the left and the touch pad and display screen.

The project/instrument box, was cut to allow fitment of all the components, plus  the Anker Astro 3 rechargeable battery pack. A hole was made in the bottom of the box to allow access to the power button, and an on/off switch fitted to the front panel to allow the screen to be powered on and off.

The battery pack provides enough power for several hours work, provides both 5volt for the PI/stepper motors, and 12volts for the display screen.

 This is the completed setup. It is fully portable and all the control cables can be unplugged easily.


The bespoke Raspberry Pi programme code: https://github.com/Frankincense/GigaPi

Stepper motor C code: http://unicorn.drogon.net/step.c


  1. Not discussed here is how the camera is being controlled. Are you using gphoto2?

    Are you using that for calculating the lens width, degrees?

    Have you found a way to control the shutter speed in spite of the changing light on a cloudy day?

    How fast does your system take images? A 10 frame shot takes 10 minutes or...?

    1. To control the camera, we are using a modified remote control, which has the ability to focus and use the shutter. The two cameras we use have different remote, so we had to make a circuit that can handle both types of remote.
      The remote wires were then plugged into the circuit seen above (on the breadboard) which controls the remote using a relay switch and a transistor. This is then connected to a GPIO port on the Pi and controlled directly by the program. The replay is turned on, and the waits for a period of time (depending on settings), then turns off, which simulates a shutter press.

      The calculations for the actual picture size, how many images in each row/each column etc. were found using the link at the bottom of the page, which contains an excel spreadsheet with these calculations.

      We can only change the shutter speed before taking the entire image, which is normally set to 750 milliseconds. To see it in action, you could download Qt and the code from github (link at bottom).

      The system focueses the camera, for a user specified period of time,
      Turns on the shutter for a user specified period of time,
      Waits twice the shutter period in order to save the image to the SD card,
      Moves the camera,
      Waits for the mount to stop moving, and repeat
      Which, depending on the settings, normally takes around 4-5 seconds per image. But it does also have to wait for the camera to move all the way back to the left after one row!

  2. Can this work for my Olympus EPM1? How would I know to make the shutter/ focus control? I'd really like to build this and credit you.

    1. As long as it has a standard mount hole on the bottom, you can create an adapter (which we had to do for the smaller of our two cameras), so theoretically it can fit any camera, as long as the motors can handle the weight.

      The shutter & focus control circuit would connect to a remote control (hopefully you can get one for your camera), which, given a bit of tinkering with the remote, should work perfectly.

      You can get circuit diagrams and examples of how to use a relay & transistor as a switch, via the Pi, on google.

  3. Have you thought about using this for astrophotography?

    1. Haven't given it much thought, but they would make for very interesting pictures!

  4. Can you supply the link to the "cheap laser level kit brought off the internet"?

    1. Sure; http://www.ebay.co.uk/itm/Power-master-laser-level-tool-kit-with-case-/400483917118?pt=UK_BOI_Industrial_Tools_Construction_Tools_ET&hash=item5d3eb39d3e

      But there are loads of them about on ebay, with varying prices.

  5. Thank you for the link to my calculator.
    I hope you will enjoy it.

    1. No problem, you saved us a lot of time!
      Perfect for the job.

    2. If you have issues with colors, you may also be willing to have a look at this :

  6. What size 40 tooth gear did you use? Another lego gear? And what size worm gears?

    I would guess that if I use different sizes, I'd need to fine tune the 'amount to turn the camera' variables.

    1. Here is a link to the wheel and the worm gear that we used at the bottom:



      And yes, if you look at the code I made, in the settings.cpp file you will find this:
      'double( 1 / double( double( 40 * 2048 ) / 360 ) )'

      Where 40 is the number of teeth in the wheel and 2048 is the number of steps for a full revolution.

  7. Can you give the dimensions of the MDF frame
    With a schema ?

    Pouvez-vous donner les dimensions du cadre MDF
    Avec un schéma ?