Showing posts with label lighting. Show all posts
Showing posts with label lighting. Show all posts

Sunday, November 6, 2011

Calculus and Christmas Lights (or, the flicker problem)

This is a problem that I was wrestling with a little over year ago, building an LED prop for a friend's movie. That was before I started taking math classes...

To simplify it, many "efficient" light sources are efficient because they flicker- they are not constantly "on" like incandescent lights. Filmmakers love incandescent lights because they don't flicker (see note).* More efficient sources like HMI's are very carefully engineered to flicker in sync with the camera shutter, so that the camera doesn't notice the flicker. And most LED light sources are battery powered with a constant DC voltage, so there is absolutely no flicker.

This is where we come to the problem of LED Christmas lights- long strings of LED lights in series, that plug into AC power. LED's don't normally run on AC power because the voltage is too high, and LED's are at their hearts, diodes, which means they only pass current in one direction. Most LED circuits you plug into your wall go through both a transformer, to step down the voltage to a safe level, and a rectifier, to invert the negative half of the AC wave, and provide a constistent DC power supply.

But LED Christmas lights are an ingenious solution to this problem... almost. They take 60-70 LED bulbs, and wire them in series. LED's tend to drop about 1.2-2.0 volts individually, but put 60 in series, and you've got yourself a circuit that can drop 120v. That eliminates the transformer (wall wart) from the equation. However, it does not adequately address the flicker problem. LED's are still diodes, and if you have 60 of them, all pointing in the same direction, they will only be "on" when the AC wave is positive. That means, they will only be on for half of the AC wave.

You may notice this flicker if you look with the corner of your eye. The first time I noticed this was rigging on the set of a pretty big movie that will go unnamed. If you can see a light source flicker with your eye, a movie camera will definitely pick it up, and possibly ruin the shot (I wonder how much it cost to fix that...).

That's because movie cameras generally shoot at 24 frames per second, and the shutter speed is 1/48 of a second. That means that the camera only sees HALF of the time you're filming (they say half of every movie is darkness), and the camera ONLY sees things 1/48 of a second at a time. This being a film camera with a mechanical shutter. Digital cameras (and digital shutters) make things even weirder.

Hence, some math:


I've approximated the 60Hz AC power with the red sine wave, and the 24 fps camera shutter with the green sine wave. The LED's are only on when the red wave is positive, and shutter is only open when the green wave is positive (shutter speed is calculated from when the shutter is half-open to half-closed, probably because it's constantly moving).

So each positive half-wave of the green curve is one frame in the movie. The exposure (brightness) of the LED's in each frame would be equal to the intersected area beneath both curves, when both are positive. Keep in mind there are 24 frames per second:


This is done by adding up piecewise integrals. A1 is the "brightness" of the first frame, and A2 is the "brightness" of the second frame, which is slightly more than the first. Keep in mind these are abstracted, and don't actually correlate to any real measure of brightness. However, the proportions should be accurate, and Frame 2 is 18% brighter than Frame 1. That's not good.


Another interesting thing is that 5 AC power cycles = 2 camera shutter cycles. The waves line up every 2 frames, or 5 flickers. So all the even frames are the same, and all the odd frames are the same- which means every other frame is 18% brighter than the one before it. There's your flicker!

Thanks to Maple for doing the heavy lifting for me. I need to figure out how to code in Maple. It would make my life much easier...

*Note: Incandescent lights also "flicker" because they are on AC power, but they are so hot (read: inefficient) that the flicker is negligible.

Saturday, October 9, 2010

Shooting the Moon



Live-blogging the shoot!

Using Processing to control the moon. The physical controls are nice, but limited in their capabilities. Very handy for Backpack Mode, so the kid can run around in the woods with the thing. But Processing allows for much more fine control, and better random number effects (and processing speed!) too.

Sunday, September 5, 2010

If Film Crews Ran the World...

I've discovered that having a background in show business really comes in handy when your best friends decide to throw a backyard wedding on three weeks' notice.

Compared to the long hours and stress of producing multi-million dollar films and television shows, a wedding is a piece of cake.

I did the lighting, video, and a significant portion of the photography for the event, as well as AD-ing (Assistant Directing, or keeping things on schedule, for those of you not in the biz), and impromptu sound reinforcement, and I must say I'm really proud of the results. It was also helpful having a TV producer on the bride's side of the aisle.

My elaborate spiderweb of rope and wire caused some palpable amount of anxiety for the bride and groom at first, and understandably so. Things aren't always pretty behind the scenes-

But I told them, "Hey, trust me, I'm a professional," with all the inflated self-assuredness I could muster, and a big wink at the end, to instill confidence and calm their fears.


We couldn't put up all the China lanterns until the day-of, for fear of rain (and hurricanes), so we didn't know how it would all look until it finally got dark...

The bar/dance floor, looking toward the garage. The ceremony was under the grape leaves in front of the garage, with a wall of French doors and beautiful silk drapery to set the scene. (I'll have to find pictures of it, as my eye was glued to the video camera for that part.)

Wide shot of the back yard/seating area, and the pool with candles floating in it. Surprisingly none of us drunks fell in, on purpose or by accident...

Roughly 580 watts of China balls... outside was actually brighter than inside. I actually threw out a quick-on plug and replaced it with a real 15-amp plug after realizing the tiny quick-on contacts were kind of a fire hazard... I think in total we pulled a respectable 15 amps... not bad for a bunch of Christmas lights.

The wedding cake(s). Pay no attention to the only dead string of lights behind it. The candlelight is prettier anyway.

The happy couple, and the presiding minister/brand new sister-in-law. I think they approve.

Eat your heart out, Nextel.