Gigapixel Photo RigGigapixel Photo Rig

» Summary

The project objective was to control a motorized mount made for telescopes to move to the right position, take a shot with the camera and then move to the next position. I wanted to have a simple user interface so I choose to have a joystick and two buttons as input and a graphical display and a summer as output. This made it possible to have a nice little menu system and to have a few configuration parameters that can be changed on the fly.

The mount I used is called Merlin in Europe and Orion in USA. It is robust, cheep and have an output connector for camera shutter. All this together makes it a very good gigapixel photo mount.

» Hardware

The central part of the hardware design is the Arduino processor platform. This is used to get input from the buttons, send commands to the mount and output all the necessary information on the graphical display. The processor has 19 I/O ports and the display uses most of them so to save a few ports are the buttons connected through a shift register. This makes it possible to get the input from the buttons with 3 ports instead of 6. See the circuit diagram on the right for details on how I connected the shift register and the Merlin mount. Go to the ks0108 GLCD library page for information on how to connect the display.

The communication with the mount is done with the hardware serial interface on port 0 and 1. The interface is a RS232 interface with two exceptions. It uses 5V and RX and TX are wired together. More on this later in the embedded software.

The shift register used for the buttons are a 74HC165N. It is a parallel to serial converter. One output pin is used for shift between read and shift out mode. One pin is clock and the last is for data. It has 8 input pins and can easily be extended if needed but as I said earlier was only 6 buttons needed for this project.

» Embedded Software

The embedded software is developed in C/C++ with the Arduino IDE (ver 16). It is designed as a state machine with the current menu as the state. Each menu/state has two main functions. One function used to go to that state and draw the menu screen on the display. The second function is a loop...Menu() function that is called from the main loop() function. The handling of input and reacting to actions from buttons etc. are handled in this function.

The communication with the Merlin/Orion mount is placed in a class/library called MerlinMount. This takes care of all commands needs to control the mount such as moving, stopping, shooting and also to convert the mounts position from/to degrees.

The menus is divided in two menu branches, one for configuration and one for new shots. The configuration has four parameters: order (columns or rows), overlap in percent, bracketing and stabilization delay in seconds. The configuration is saved to the EEPROM to prevent it from being lost when the processor is powered off.

The menu for taking a new photo is made as a wizard. First step is to select the focal length, second is to set the start position and third to select end position. The last step is a summary and last change to check if everything is correct.

The shooting phase is handed with sub states; moving to the next position, stabilization delay and shooting and then it start over.

» Software

A gigapixel photo can easily be several hundred raw images. I use the stitching software Autopano Pro 2 to stitch these together into one large image file. This gives a Photoshop file that is then exported to the krpano flash script that I use on this site.

» External Resources

ks0108 - This is the graphical LCD library used in this project.
bitmap2LCD - A small application to convert a BMP file to a file that can be compiled into the C code.
GLCDFontCreator2 - A small application to convert a TrueType font to a file that can be compiled into the C code.
Merlin/Orion protocol - Information about the Merlin/Orion communication protocol.
Merlin/Orion Hardware info - Information about the Merlin/Orion Hardware.

OpenMoco - OpenMoco MX2 uses the MerlinMount lib and have made some improvements.
My Autopano Pro forum - A forum thread discussion among other things the MerlinMount lib.
Panorama Community - A forum thread discussion the MerlinMount lib. (German)