Scribbles and Snaps

Linux, Open Source, Photography

Archive for August 2011

Arduino for Photographers: Building a Universal Intervalometer

with 2 comments

Practicing the art of time-lapse photography without an intervalometer is doable, but not particularly efficient. And while any decent photo equipment store will be happy to sell you one, you can go the DIY way and build your own intervalometer based on the excellent Arduino platform.

Theoretically, building an Arduino-based intervalometer is as easy as connecting an infrared (IR) LED to the GND and 13 pins and then feeding the Arduino a simple sketch with controls the IR LED. But by adding a few more components and tweaking the sketch, you can build something a little more advanced.

First of all, here is a list of parts you need for this project (besides Arduino, of course):

  • Infrared LED (940nm)
  • Green or red LED
  • 100 Ohm resistor
  • Breadboard
  • Handful of jumper M/M wires

You need the last two items only if you want to build a prototype first. Before you start, you should connect Arduino to your machine and install the Arduino IDE. The Arduino Getting Started guide can help you with this. Once Arduino is up and running, grab the latest version of the Multi Camera IR Control library, unzip the downloaded archive, and move the resulting folder into the ~/sketchbook/libraries directory (if the directory doesn’t exist, create it manually). The great thing about the Multi Camera IR Control library is that it supports a wide range of camera models of many popular brands, including Nikon, Canon, Pentax, Olympus, and Sony. So you can use your DIY intervalometer with virtually any DSLR with an IR receiver.

The schematics of the intervalometer is rather simple and it looks as follows:

If you are using a breadboard for prototyping, here is the wiring diagram for your convenience:

(Both the schematics and the breadboard wiring are created using the excellent Fritzing software). As you can see, this is all pretty straightforward stuff. LED2 acts as a status indicator: it blinks just before the IR LED is activated, which signals to you that the camera is about to fire.

All you need to do now is to write a sketch that controls the LEDs. Here is what the sketch for controlling Nikon DSLRs looks like (tested with Nikon D5000 and Nikon D90):

#include <multiCameraIrControl.h>

int onValue = 10; // specify how long the status LED is turned on
int delayValue = 5000; // specify interval between shots in milliseconds
Nikon D90(9); // specifies the camera model

void setup(){
  pinMode(13, OUTPUT); // initialize pin 13 as an output.
}

void loop(){
  digitalWrite(13, HIGH); // set the LED on
  delay(onValue); // wait
  D90.shutterNow(); // trigger the shutter
  digitalWrite(13, LOW); // set the LED off
  delay(delayValue-onValue); // wait
}

Of course, you can easily modify it for use with your particular camera model, and the sample code bundled with the Multi Camera IR Control contains a few examples that can help you to get started.

So how does this sketch works? The onValue variable specifies how long the LED2 stays on. Usually, you’d want it to blink briefly, so 10 milliseconds work just fine. The delayValue variable defines the interval between shots in milliseconds, while the Nikon D90(9); statement defines the camera model and the pin to which the IR LED is connected. In this case, the camera is Nikon D90 and the IR LED is connected to pin 9. The rest is easy. The digitalWrite command turns LED2 on and off, and the D90.shutterNow(); command activates the IR LED which, in turn, triggers the camera shutter.

Written by Dmitri Popov

2011/08/24 at 10:21

Posted in Hardware

Tagged with ,

Lightweight Budget Macro Combo

with 2 comments

Macro lenses are expensive. This probably explains the popularity of low-cost alternatives like extension tubes and macro filters. I’ve been using Kenko extension tubes for quite a while. And while it’s a cheap way to get into the world of macro photography, it’s not the most practical one. Constantly adding and removing tubes quickly becomes a nuisance, especially if you are shooting on location. The Raynox DCR-250 macro conversion lens is not only a cheaper alternative to extension tubes, it’s also a much more practical one. It comes with a snap-on adapter which you can use to fit the Raynox DCR-250 on virtually any lens. Before I splashed out on a proper macro lens, I’ve been using DCR-250 for several years, and I can’t praise it enough.

In fact, even though I’m now the proud owner of a Tamron AF 90mm f/2.8 Di SP macro lens, I still find the Nikon 50mm f/1.8D AF Nikkor Lens and Raynox DCR-250 combo quite handy. It’s significantly smaller and lighter than the Tamron lens, and it produces excellent results. Don’t take my word for it, and take a look at the sample photo below. This is a macro shot of my Tamron lens taken with the Nikkor 50mm/Raynox DCR-250 combo.

So whether you are getting starting with macro photography and you can’t justify buying a proper macro lens, or if you are looking for a lighter and more portable alternative, the described setup is a good solution, indeed. You might wonder why use Raynox DCR-250 with precisely the 50mm lens. For starters, this is one of the most versatile lenses out there, and it’s also one of the cheapest. Its lightweight and compact design makes the lens a perfect travel companion. In addition to that, the lens features an aperture ring, so you can adjust f-stops manually. This means that the lens is suited for use with a reverse ring macro adapter.

Buy from Amazon:

Nikon 50mm f/1.8D AF Nikkor Lens

Canon EF 50mm f/1.8 II Camera Lens

Raynox DCR-250 Macro Converter

Written by Dmitri Popov

2011/08/16 at 09:05

Use the Focal Length Analyzer Script with digiKam

with 6 comments

The Focal Length Analyzer is a nifty little Bash script that pulls focal length data from digiKam’s database back end and generates nice graphs based on the extracted data.

To perform its magic, the script relies on the sqlite, gnuplot, and imagemagick packages. On Ubuntu and Debian-based distributions, you can install these packages running the apt-get install sqlite3, gnuplot imagemagick command as root. Download then the latest version of the script and make it executable using the chmod o+w focalAnalyzer.sh command. The script accepts two switches: -png and -pdf. Use the -png switch to generate separate graphs for each camera model in the PNG format and the -pdf switch to produce a multi-page PDF file. The script automatically detects whether digiKam uses the SQLite or MySQL database back end, so you don’t need to do anything beyond running the script with the switch you want, for example: ./focalAnalyzer.sh -png

Written by Dmitri Popov

2011/08/08 at 08:46

Quick Tip: Disable Certain File Types in digiKam

with 3 comments

digiKam supports an impressive range of file formats, so you can use the application to handle RAW files, movies and everything in between. But what if you want to explicitly exclude a specific type of files? digiKam offers a simple solution for that.

Choose Settings → Configure digiKam and switch to the MIME Types section. To exclude, for example, the PPM format, enter -ppm in the Image Files field. You can add multiple formats using a space as separator. Excluding specific formats from digiKam doesn’t actually delete them, but simply hides them from digiKam and removes all metadata from the digiKam databases. So be careful when using exclusion filters if you don’t want to lose tags, ratings, and other metadata.

Written by Dmitri Popov

2011/08/03 at 08:39

Posted in Open Source, Software

Tagged with

Follow

Get every new post delivered to your Inbox.

Join 306 other followers