NineOnions and PurpleCarrots

|

The search for nonsense.

Archive for the ‘Photography’ Category

Powering a Canon EOS from an External Power Source

Monday, July 26th, 2010
Star Trails over Big Pond in Lewis, NY; 1-hour exposure

© 2010 Marcus Griep

Star Trails over Big Pond in Lewis, NY; 1-hour exposure, July 2010

For most situations, the stock 1080mAh, 7.4V batteries that come with the Canon T1i1 will work pretty well. In some other instances, including time-lapse and star-trail, that amount of power doesn’t cut it. For these types of photography, either the camera needs to be on but inactive for a long period of time, or needs to have the sensor enabled for a long exposure. When I last used my T1i for a long exposure, the 1800mAh extended battery pack I used lost power after about 3 hours, giving an approximate power need of 600mA while the sensor was exposed.2

To get around this battery life problem, Canon provides an AC/DC power supply and coupler that you can use to power the camera. Unfortunately an AC power supply requires a connection to the power grid, a generator, or a power inverter. In the middle of the Adirondacks where I am most likely to do long-exposure photography, an AC connection is just not feasible and a power inverter is inefficient. There are also professional battery packs that can be purchased specifically for astrophotographers, but the couple I found were prohibitively expensive. The third option was to use a battery grip provided by canon, but at $180 for just the grip, I was convinced there was a cheaper option.

Canon EOS T1i running on an Energizer XPAL battery pack with 8V DC/DC power supply

Canon T1i running on XPAL battery pack

This led me to the realization that I already had on hand an Energizer XPAL XP18000 battery pack. I use it when I travel on long trips as an extra battery for my laptop and charger for my cell phone. This pack is light and portable at only about 17 ounces and less than 8 inches long and 1 inch thich and comes with a bunch of connectors for laptops, cellphones, and other gadgets. That 18000 in the name indicates that the battery stores 18,000mAh of power and sports 3 different outputs in varied voltages (5V, 10.5V, and 19V). Since I already had a nicely powerful battery pack, I determined I’d use it to power my camera.

Bottom of a Canon EOS T1i showing rated voltage of 8.1V

T1i rated at 8.1V

Unfortunately, I needed to regulate the voltage. My Canon T1i is rated to take an input of 8.1V DC. The camera will accept 10.5V DC, but doing so is dangerous, may break sensitive components in the camera, cause fires, physical harm, or worse: void your warranty. I don’t recommend you do it, and if you do over-volt your camera, you do so at your own risk. After searching around, however, I found that some earlier enthusiasts had succeeded in making a DC/DC power supply for their own cameras. Resolving to do the same, I pulled together everything I needed to build the power source.

DC/DC Power Supply Electrical Diagram

DC/DC Electrical Diagram

Combining resources I found from Daniel McCauley and Texas Instruments, I determined the circuit I would need to build out the module. At the center of it all, and hardest to get a hold of, was the PTN78020W module which actually does the conversion. This module accepts up to 36V as an input and can output anywhere from 2.5V to 12.5V. Of the other electrical components mentioned in the parts list, most are recommended to ensure the power in and out of the regulator is free of noise. Consult TI’s official documentation to ensure that, if you use fewer components, you include the mandatory capacitors in the correct locations.3

A PTN78020WAH set into a breadboard

The installed PTN78020WAH module

Because I don’t have the skills to produce a custom board myself, and since fabricating a single circuit board is not cost effective, I used a standard solderless breadboard which fit in my enclosure.4 For the input, I used a 2.1mm(ID)/5.5mm(OD) jack which mates perfectly with the base 19V cable included with the XPAL battery pack.5 For the output, I picked my own jack/plug combination since I needed to make a cord to go from the power supply to the camera’s DC coupler.6

Finished DC/DC power supply in open enclosure

Finished power supply

After assembling all the components as described in the electrical diagram, installing the plugs into the enclosure and soldering things together, the project looked as pictured. Of special note is that the PTN78020W does not fit easily into the breadboard. I had to bend several of the leads to get it to sit properly. I don’t recommend this, as you are likely to end up with a $30 (retail) broken module and nothing to show for it.

Multimeter hooked up to the DC/DC power supply, reading 8.08V

Verifying 19V to 8.1V conversion

Once it was all put together, I used a multimeter to verify that I was getting the desired voltage out. I was able to verify that I was hitting my target 8.1V very closely, and once I hooked it up to the camera, I was showing a “full” battery. I used it this past weekend when I attempted a 4-hour long exposure (unfortunately I had the exposure misread, and didn’t get the result I wanted). After the 4-hours taking photos with the LCD viewscreen enabled, I hadn’t even exhausted a quarter of the XPAL battery’s power.

DC/DC Power Supply Circuit Board Design

DC/DC Power Supply Circuit Board Design

As an after-exercise, I downloaded a circuit board CAD program from Pad2Pad—they fabricate custom circuit boards and prototypes—and designed my own circuit board. Unfortunately, as I said before, it’s not cost effective for me to purchase a single board, but if I get some interest in this, I’d certainly purchase several and manufacture the power supplies myself and ship one to you. The price I’m looking at, which includes the power supply and 6-foot cord connecting to the DR-E5 is $70. This price is about the same as the mass-produced AC power supply provided by Canon, so the $70 price is a value for the hand-manufacturing. You can buy the DR-E5 coupler for around $30 on Amazon (see link below). If you already have an AC adapter, then you are likely to already own this coupler. If you’re interested in an 8V DC/DC power supply (or 12V for your Canon 1D, or other custom voltage), send me an email: photo+power@xpdm.us.

Disclaimer: I’m not an electrical engineer. I have not vetted this design with an electrical engineer. I am an amateur who loves photography and found a tool to continue to improve my art. Completion of this project is done at your own risk to yourself and camera. If you take issue with the circuit or anything else, feel free to leave a comment.

Parts List

Part IDs in parenthesis lead to Digi-Key parts.


Energizer XP18000 Rechargeable Power Pack for Laptops

Xpal Power, Electronics, Too low to display

  1. 1800mAh for the 5DmII, 2300mAh 11.1V for the 1DmIV []
  2. This is just an estimate. For a D60, Daniel McCauley measured 400mA required while the shutter was open. See his 8V power supply guide, on which this one is based. Variations will also occur with the ambient temperature as well, so your mileage may vary. []
  3. The power supply doesn’t work optimally if there is electrical noise on the input side. Also, because the PTN78020 is a switching voltage regulator, it introduces electrical noise at the frequency of its internal switching. []
  4. It is important to note that the PTN72080WAH module does not sit well into the standard breadboard. I had to “adjust” a few of the leads so that it could fit into the breadboard’s grid at all. This is why I would much prefer manufacturing the printed circuit board I mention later in this article. []
  5. I chose the 19V output because the PTN78020 module requires a voltage difference of at least +2.5V from the target output voltage. Using the 10.5V output puts me right at that limit, and I’d rather have a large buffer to avoid undervolting the module. []
  6. The DR-E5 coupler requires a 1.1mm(ID)/3.0mm(OD) right angle plug. The right angle is tight, and it took me a good deal of searching to find a plug with a short enough lead to fit in the confined space. The jack/plug I used on the other end of the cable was a 1.3mm(ID)/3.5mm(OD) which happens to fit into the 9-12V plug on the XPAL battery pack. []

My First Show

Thursday, July 1st, 2010

Powered By SmugWPOver the past several months, I have really stepped up my photography to a serious level. In that time, I’ve been dabbling in landscape, portrait, music, journalistic, and model photography. Recently, though, I had the opportunity to be a part of a show put on by Music Ecology. Each month, they put on a Visual Enlightenment party at the Wonder Bar in Allston, MA.

Powered By SmugWPI was one of six artists that were selected to have our artwork hang in the bar during the month of July. On the right above, you can see the layout I chose to go with and clicking on the image will link to a gallery where you can see larger versions of photographs.

I chose to have a couple of themes run through the display. At the top are two fall images from northern New York. In the center is a photograph (featured) of the New England Holocaust Memorial where a person’s face (my friend Justin Kwan) stands as the backdrop to the ID numbers given to prisoners in the concentration camps. On the right are a couple of animal photographs with very narrow depth of field, bringing extreme sharpness to the faces of the sparrow and turtle.

Powered By SmugWPThe smaller photographs arrayed around the main centerpiece include a lead crystal car sitting on a reflective black tile. On the top left (featured), Scott Strazzullo plays his guitar during the Songwriters’ Night at All Asia Bar in Cambridge1. On the top right, a 15-minute exposure (with the help of an ND400 filter) of one of my company’s week’s-end “workshops”. On each side in the middle are book pictures. To the left, the Bible, Square, and Compasses of my mother lodge, Mt. Horeb. To the right, a book of magic tricks turned to a page showing a coin trick.

Powered By SmugWPThe bottom three are of special interest to me, and I’ve singled out one to the left here. All three are of the Champlain Bridge, also known as the Crown Point Bridge. Or, rather, they were. As I mentioned in my earlier post, the bridge was demolished on December 28, 2009. The photograph on the left shows the bridge as it was on the somber morning of its demolition. The center (featured) and right photos show the deconstruction and ruins left behind by its demolition. This weekend, I’m going to be back up in New York and plan to extend the series, getting additional photographs of the deconstruction and re-construction process.

All in all, the staff at Wonder Bar were great and very accommodating to my layout whims. I really want to thank them, Music Ecology, and Polina Volchek in particular for organizing it. All of the my prints are on sale as are several of the other artists on display there. If you are interested in purchasing a print, you can do so either through my online gallery or by emailing me directly at photo@xpdm.us.

  1. You can see other photographs from that night in a gallery dedicated to the June 2010 Songwriters’ Night at All Asia Bar, including photos and video of Jourdan Rystrom and Norman Kim. []

The Champlain Bridge

Thursday, December 31st, 2009

This past weekend I was lucky enough to be spending my Christmas holiday with my wife’s family in the North Country in New York. For those of you that don’t know, the North Country is that region of New York and Vermont from about the Lake George area to the Canadian border. I’m not originally from the North Country, so that might be a bit off, but certainly just saying Upstate New York would not have been sufficient. I say I’m lucky because I had the opportunity to be present for a rare event, and had my camera along to document it.

The event I speak of was that the Champlain Bridge (also known as the Crown Point Bridge) was finally going to be demolished after a spiral fracture had been found in one of its concrete support piers. That fracture led to the bridge’s closing on October 16, 2009. The closing of the Champlain Bridge had vast implications in the region; the nearest bridge into Vermont is 50 miles south of Crown Point in Whitehall, and the nearest bridge north of Crown Point is over 100 miles away at Rouses Point. In between, Lake Champlain is serviced by several ferries, but only one of them operates 24 hours a day, and none of them are open to industrial traffic.

With the bridge condemned, a vital link for many individuals and companies on either side of the lake was severed. People living on opposite sides from where they worked faced an extra 2-4 hours of travel to and from work, and trailers would be forced to detour many miles to get to the same location.

The Champlain Bridge, which was dedicated and opened on August 26, 1929, was demolished with explosives 80 years later on December 26, 2009.

The morning of the demolition was cold, snowy, and visibility was very poor. None but those with permission to access the Crown Point location, and perhaps some from Vermont were actually able to see the bridge implode. For most of the public waiting to see the bridge’s final moments, all that was seen was fog punctuated by the series of bursts indicating that the charges had gone off.

The afternoon before and morning of the demolition, I set out and took several pictures at the scene, but, lacking a media pass, did not get a photograph of the actual implosion. Meanwhile, you can see the somber and eerie photographs of the Champlain Bridge in its waining days on my Flickr account in my Champlain Bridge Demolition set.

The replacement bridge is expected to be in place and opened in the summer of 20111.

All pictures in the aforementioned set (with the exception of the “Protection” meta-photo) were taken with the following lens, which I highly recommend:

  1. NYSDOT’s current schedule for the Lake Champlain Bridge Project []

When Eight Bits Just Isn’t Enough

Thursday, October 15th, 2009

There was a time when one bit per pixel was enough. Back in that time, there was only one color channel with only one value for each pixel; either on or off. One bit per pixel was sufficient. Next came progressively more graduated gray-scale, up to the 256 levels provided by a one-byte, eight-bit value. This was about the period that I got my first computer, an Apple IIc in all of it’s green-display glory.

Mario in 8-bit Color

Mario in 8-bit Color


Then color came along: red, green, and blue. Now those 8 bits were rationed out; three to green and red and two to blue in the common case1. Then came 16-bit color, followed by 24-bit color. Now red, green, and blue were on equal footing, each holding 8 bits of information. Soon after came the cake-is-a-lie 32-bit color, which is rarely adds anything more than 24-bit color2.

This brings us to today, where most computer monitors advertise the 16.7 million colors afforded by 24-bits of color data. For most of us, this is plenty, as the human eye is estimated to only be able to distinguish 10 million colors. Thus, 8-bits per channel is generally sufficient for displays and is why there haven’t been any big pushes to extend that range3. The issue is no longer one of how many colors but of how broad a gamut of colors.

The sRGB Color Space

Illustration Credit: Mysid

The sRGB Color Space


The standard gamut used in most displays is called sRGB. sRGB is a rather limited gamut but one that has such wide acceptance that, in the absence of any information to the contrary, it is the assumed default for images. It’s a form of least-common-denominator for electronic displays. For most uses that involve a computer display as the means of consumption, using sRGB is sufficient. However, sRGB lacks the ability to represent saturated yellows, greens, and cyans. This shortcoming is readily apparent when it comes to printing images. The printer has a different gamut for CMYK. Some colors that are in sRGB aren’t in CMYK and visa versa. The more saturated blues and yellows that CMYK can print but aren’t represented in sRGB can leave images of the sky and flowers a little under-saturated.

The Adobe Wide Gamut RGB Color Space

Wikipedia Public Domain

The Adobe Wide Gamut RGB Color Space


In order to handle the wider range of colors, alternative color spaces must be used with wider gamuts. Examples include Adobe RGB (1998), PhotoPro RGB4, and Adobe Wide Gamut RGB. These gamuts allow even more colors to be represented.

Or do they… In an analog system, sure; just as the cardinality of the set of real numbers, \mathbb{R}, is greater than the cardinality of the set of rational numbers, \mathbb{Q}, so too, the number colors in Adobe Wide Gamut RGB is greater than the number of colors in sRGB in addition to containing all of sRGB even though all those sets have an uncountable number of members.

However, in the digital format, each component is chunked into quanta. For 8-bits, there are 256 distinct values. When you expand the gamut, the number of representable colors remains exactly the same (256), but the distance between quanta of color is larger. Think of it as taking a 24-inch ruler and stretching it. The ruler covers more distance, but there are still only 24 sections on it. There is just more distance between each hash.

Posterization from conversion to 4-bit (16 color) palette

Image Credit: Derrick Coetzee

Posterization from conversion to 4-bit (16 color) palette


When this extended gamut is invariably cast back into a smaller gamut, such as sRGB, the lack of color data resolution causes a phenomenon called posterization. If you’ve ever used 8-bit mode during a remote session on your 24-bit desktop, you’ve seen this effect. The combined effect is somewhat similar to a rounding error.

One way to combat this posterization is to increase the resolution of the color data, e.g. from 8 to 16 bits per channel. With 256 times as many hash marks on the color ruler, the color gamut can easily be expanded to twice its size without causing the banding effect.

As most digital cameras still capture in sRGB and output to 8-bit JPEG, the common photographer has nothing to worry about, but for the more advanced photographer who wishes to have more control over their output, a larger gamut, such as Adobe RGB, and greater resolution are more important. My camera, the Canon Rebel T1i (pictured below) offers an output to RAW format5. Each pixel of the sensor has 14-bits of resolution, so it makes little sense to use a working format with less bits per channel. Thus, after importing the RAW file, my working format is Adobe RGB with a 16-bit TIFF. The TIFF format is an uncompressed beast, but it ensures that I don’t lose any of that color data in translation.

Getting the results that you want can be cannily uncomplicated. Most photographers aren’t even worrying about all this as nearly all decision making, aside from composition, is made inside the camera. But when more control is desired, the entire workflow needs to be insulated from introducing error into the process so that the end result is precisely what the photographer intended. And it’s at this time when eight bits really isn’t enough.

  1. The reason being that green is primary color to which human eyes are most sensitive, and small changes in green are more easily noted than in red or blue. This fact is further utilized by many steganographic programs which embed information in image files. []
  2. There are some 32-bit color implementations that use 30 bits (10 bits per color), but most commonly, the extra 8 bits are used for non-color data or padding. In fact, Windows 7 will support up to 48-bit color, but no graphics cards yet support it; only a few graphics cards currently support 10-bit-per-channel color; and, fewer still monitors can display the 1 billion+ colors available with 30-bit color. []
  3. Though, as mentioned in the previous footnote, Windows 7 is breaching that ceiling. Read more about the advance of digital color resolution on Wikipedia []
  4. Which uses an ‘imaginary’ blue as one of its primary colors. []
  5. A proprietary version of the TIFF format; each manufacturer often has their own proprietary extensions. []

StackOverflow DevDays: Boston — The Pictures

Friday, October 9th, 2009
StackOverflow DevDays Round Buttons

SO DevDays


I’ve finally uploaded a first batch of pictures from the StackOverflow DevDays in Boston. Out of over 350 pictures taken, only 20 made it to this cut, with several not-quite-as-good pictures that I may look at adding later. If you see any you’d like, let me know, and I’ll get a proper copy to you.

Taking photos at the event was very difficult. For human eyes, everything was fine, but for a camera’s lens, there was very little light. I didn’t use flash during the event; a common courtesy to both presenters and audience in an already low-light environment. It made me really wish that I had a 50mm f/1.4 lens like this one, though; too bad such wide aperture lenses are so expensive!


Sigma 50mm f/1.4 EX DG HSM Lens for Canon Digital SLR Cameras

Sigma Corporation, Electronics, $499.00

Joel presents FogBugz

Light source differences between two subjects in one picture cause color problems.

The other environmental difficulty for photography was all of the different light source types. There were fluorescent lights in the main area (blueish), recessed incandescent bulbs (redish-orange), and the projector light (near 6500K, or like-sunlight). So, in the picture at right, for example, the main subject, Joel Spolsky, was standing under incandescent lights. This gives him a redish-tinge. When correcting Joel’s white shirt back to white, the slides in the background, having a neutral tint before correction, end up tending toward blue after.

Regardless, I’m happy with the photos I did get. Again, feel free to check them out. Here’s the link in case you didn’t catch it earlier!

My StackOverflow DevDays Flickr Set