Sunday, July 28, 2013


Piper's Bellflower, growing in the
Alpine meadows at Hurricane Ridge.
I was at the Olympics this weekend with a friend, and on Saturday night after dark we went out with our cameras to try some long exposures.

It was dark there!  Even though we could clearly see the city lights from Port Angeles, it was so dark that the plane of the Milky Way was obviously visible in the night sky.  Feeling ambitious, I decided to take a very long 30 minute exposure with an inspired shot.  There was a teardrop camper parked on his parents' properly, resting idyllically under some fruit trees with the mountains in the background.  I decided to brightly light-paint the mechanical teardrop camper with an LED flashlight, and then light paint the underside of the trees more gently with the golden hue of an incandescent.  12 minutes into the shot, Nature decided to step in and paint everything else as the moon rose over the Olympics.  The result is one of my favorite photos I've ever taken.  Thanks to Benson for his assistance in light painting this shot!

30 minute exposure, ISO 100, f/3.5.  Light painted.  No photoshopping.  

Thursday, July 25, 2013

An Arduino Time-Lapse Camera Using ArduCam

While experimenting with my pinhole cameras, I did a lot of thinking about capturing and displaying the passage of time.  Day and night, the change of seasons, sunrise, sunset, moonrise, moonset, tides, rush hour, busy times at restaurants, even life and death marks the passage of time.

There are plenty of commercially-available time-lapse photography devices.  These require either an AC power source, a solar panel or a beefy battery, expensive photography equipment, and are large and easy to spot.  Between the size and the expense, this strongly limits the duration of time lapse I would be able to take even if such a device wasn't prone to being stolen by the first philistine that came across it.  My goal is to make the smallest, most energy efficient and least expensive camera possible so that I am free to set them everywhere and see what the passage of time shows me.

To do this, I decided to give ArduCam a try.

Actually, I found ArduCam pretty disappointing and difficult to use for a few reasons:
  • The open source libraries don't use any modern version control system like GitHub.  They're just a few files.  What's more, they fail to compile under Linux without changing the #include statements to correct for case-sensitivity.
  • While the ArduCam website shows full-resolution images pulled from "supported" camera modules, the ArduCam Rev. B shield is unable to take bitmap images greater than 320 by 240 pixels because it has only a 3 megabit buffer.  For cameras with on-board JPEG compression it is able to take higher-resolution images, but they come out looking fuzzier than a Georgia peach because they must be made to fit in the buffer.  If these images were indeed taken with an ArduCam shield, they weren't done with any code made available on their website.
  • The first "supported" camera I bought, the MT9D111, failed to take any worthwhile picture at any resolution.  I was only able to get it working with the OV2640 module.
Sample image taken with the "supported" MT9D111 camera using an example from the open-source ArduCam code.
So, the ArduCam was a bit of a let-down.  It is actually pretty impressive that someone figured out how to hack together a camera that interfaces with an Arduino, but it's not particularly useful.  The image size is pathetically small and the power draw is substantial (I'm able to take about 370 images on 4 AA batteries).  It may be useful for some applications, but quality time-lapse photography is not going to be one of them.

Let's take a look at my camera, my code, and the results.

My ArduCam

My camera uses the following components:
  • Arduino Uno Rev. 3
  • ArduCam Rev. B Shield
  • OV2640 Camera Module
  • 2GB MicroSD Card
  • 4 AA batteries
Assembly is positively trivial.  Everything just fits together.  Build time is under a minute.

Note that while the ArduCam board can be made to work with the Arduino Mega, it requires some rewiring because the pinouts are not exactly the same.  The power efficiency could have been improved somewhat with a DC step-down buck converter, but I decided against doing this because even if the power efficiency was greater the image resolution was unacceptable.

An image taken with the OV2640 out an office window at Google Seattle.

The first iteration of my code simply took a picture, then waited a minute using delay before taking another, repeating until the camera ran out of battery.  This managed to take 364 bitmap images until it ran out of juice.  The second iteration of my code made use of the Sleep_n0m1 library to place the Arduino in sleep mode and wake it up each minute.  I had hoped that this would improve battery life substantially, but instead it managed only to take 370 images before running out of battery.

I assembled the time-lapse photos into a video using the following command with avconv on Linux:
avconv -f image2 -i %08d.BMP output.avi

Overall, this was an enlightening exercise but it's clear that if I want a very long-term and reasonably high-quality time lapse photo solution, the platform for that is not going to be ArduCam.

Monday, July 1, 2013

More Pinhole Photography from Mt. Rainier

I pulled 4 of my original 6 pinhole cameras from Mt. Rainier's Sunrise Area last weekend.  The results confirmed some follies of my original design and placement strategy:  First, the camera should be mounted vertically like the soda can sits.  Mounting the camera horizontally does not give the massive depth-of-field effect that I expected it to.  Second, the pinholes were way too large.  1mm diameter pinholes are way too big.  Finally, I underestimated the vigilance of passers-by.  The mountain was only open to visitors for three days total while my cameras were there, and one was crushed by some curious tourist during one of those three days.  Only one of the four cameras that I retrieved gave what I would call a worthwhile shot.  One thing that I like about it is that you can see the first few snowfalls:  horizontal bars show the ever-increasing level of the snow with the trees disappearing behind it over time!

Pinhole photo from Mt. Rainier's Sunrise area.  1mm pinhole, can mounted horizontally, and exposure lasted from October 6, 2012 to June 29, 2013.