My Projects

This is an old revision of the document!


Published 2 Apr 2018

Making 360 degree GIF Photos

Original camera setup to manually produce 360 degree animation.I wanted to automate the creation of 360 degree animated GIF photos. The obvious way to do it appeared to be to use an Arduino board to control a stepper motor and synchronize the camera. I had previously created such animations by manually moving the camera and taking many photos, then manually aligning the images and stitching them together to get a more or less smooth animation. But this requires a subject that stays still as it takes a lot of time, and the images inevitably are slightly out of alignment.




Doing it the hard way, the first animation shows the raw frames jerking about, and the second shows the manually aligned frames giving a smoother animation:

Beetle with pseudo-scorpion attached Beetle with pseudo-scorpion attached

Finished result, trimmed manually adjusted frames:

Beetle with pseudo-scorpion attached

Animation created by trying to move a camera around the subject at a fixed distance.

(Published: Naturewatch)

Overview

The advantage of automating this by putting the subject on a rotating turntable is that the camera, lighting, distance to the subject, alignment and background all remain static. Additionally the number of images taken to get a smooth animation can be easily adjusted, and frames are in alignment without the necessity of editing or scaling to rectify variations in camera distance etc.

This was to be my first Arduino based project, so I looked for examples that had already implemented the tasks required. I came across shapespeare-scanner, a homemade 3D scanner to create 3D models. I didn't need 3D models, but just the basic automated image capture. So I purchased an Arduino Uno board, plus LCD shield and stepper controller module. I already had a bunch of stepper motors, so set to work.

Hardware configuration

  • Arduino Uno clone (duinotech UNO classic r3, p/n XC-4410)
  • LCD keypad shield clone (duinotech 2 x 16 LCD Controller, p/n XC-4454)
  • Stepper Motor controller (duinotech L298N based, Dual Stepper Motor Controller, p/n XC-4492)

I had a choice of a number of recycled stepper motors, and settled on using a msaf200b51, a Sankyo Mitsubishi flat motor with 1.8º/step (200 steps per revolution) and runs off a 12V power supply. Its low profile, and lack of any protruding shaft from underneath meant it could just sit on the desk while testing.

Arduino, LCD, Stepper controller, stepper motor


The hardware setup consisting of the Arduino UNO with LCD shield, stepper motor controller, stepper motor (with rubber disk on the end of its shaft as a platform for mounting subjects), and an infrared LED for controlling the shutter on the camera (the green and white wires to the left go to the 12V power supply for the motor, the rest is powered from the USB port)


The program code

As mentioned, I started with Shapespear's 3D scanner firmware, which was a great base as I had no experience with Arduinos at this point and his code did most of what I wanted.

As mentioned in the comments to his instructables page, there were a few strange things with delay timings have no effect : this turns out to be a problem of not understanding the order in which expressions are evaluated in the C programming language - easily solved by adding a few brackets around arithmetic expressions!

The program has the stepper motor and camera type set within the code, I am assuming it will be used in a fairly dedicated mode and would need to recompile to use it with alternative devices.

There are 6 control switches on the LCD shield :
SelectStart/stop scanner
LeftStep through post shutter delay times
UpCycle through options for number of exposures per revolution
DownStep one unit counter clockwise without triggering camera
RightStep one unit clockwise without triggering camera
ResetReset scanner

scanner_firmware-2.ino
and you would need :
multicameraircontrol.cpp and
multicameraircontrol.h

The results

Below are some initial scans, still a bit of work to do, but promising results:

Animated dead longhorn beetle

Animation of a dead longhorn beetle found outside our house.

Animation chiton 'valve'

Animation of a 'valve' (plate) from a chiton shell.

Further ideas

I have further work to do to setup good lighting and methods of mounting photographic subjects to give the best results. Also it would be useful to package this up in a portable form so the I can photograph subjects in the field.

The setup would also work fine for operating a microscope camera, the stepper could be connected to adjust the microscope up and down to move the focus and take multiple photos that are then combined with focus-stacking software to produce sharp macro photos.

References and Additional Resources





If any referenced page no longer exists, try looking for its URL on http://archive.org.





   Home Page   About this Site   Copyright Questions   Contact Us