Skip to content

News

Shutter Tuning

Aug 12, 2011

Building a photometric shutter can be a complicated task. The goal is to expose every pixel of the CCD for the exact same window of time. However, since we have to live within the bounds of reality, we must cope with the fact that the shutter cannot physically open and close instantaneously. The next best option is to expose every pixel for the exact same amount of time.

The shutter designed for the 1.0m Sinistro imaging package is a round nylon composite disk with cut-outs (see the Shutter disk image and the Shutter dimensions drawing) that rotates around the center axis of the disk; it looks like Pacman. When the cut-out is positioned over the CCD, photos from the sky are allowed to collect in the CCD, creating an image of the sky. Keep in mind three states of the shutter relating to an exposure:

  1. Shutter closed, with cut-out positioned in a negative direction (counter-clockwise) from the CCD field of view. This is the position shown in the picture.
  2. Shutter open, cut-out is centered over the CCD field of view.
  3. Shutter closed, with cut-out positioned in a positive direction (clockwise) from the CCD field of view.

The two closed states are important because a single exposure uses all three states to expose each pixel of the CCD for the same amount of time. Each exposure consists of two moves: 1) from state 1 to state 2, and 2) from state 2 to state 3. Both moves are in the same direction, so the cut-out leaves the CCD field of view on the opposite side it entered. The next exposure just reverses the procedure, but follows the same rules. See the Shutter Exposure video to see two 2-second exposures; you will notice the first exposure consists of two moves, then the second exposure consists of two moves in the opposite direction.

Now the tricky part: exposing every pixel the same amount of time. Because the transit of the edge of the cut-out across the CCD field of view takes a non-zero amount of time, by the time the cut-out is fully exposing the CCD, pixels near the edge of the CCD where the shutter cut-out started the move have had more time to collect photons from the sky!

Think of it this way: picture a stage in a theater with a big heavy curtain across the front. Behind the curtain are three flashing lightbulbs that flash once every second. They are spaced evenly across the stage, from left to right. You're sitting in the audience, so you can't see the flashing lights yet. But as the curtain is drawn across the stage (this one goes left to right, not up and down!) you start seeing one lightbulb flashing. You see it flash four times, then as the curtain is drawn further across the stage, you see a second lightbulb. Finally, you see the third lightbulb. All three lightbulbs have been flashing at the same rate, but you saw the first bulb flash 12 times, the second flash 8 times, and the third only 4 times! So in your snapshot of the lights on stage (i.e. your exposure), you saw a different amount of light from each bulb, even though we know they were all emitting at the same rate.

How do we solve this problem? To continue with the example, we need a second curtain that has been hiding offstage to be pulled across the stage at the same rate as the first curtain. The rate of travel is important because you can think of the sky as an infinite array of lights and every one deserves the same amount of time so we can accurately measure its light!

To reiterate the key to solving this problem, as the shutter transitions over the CCD field of view, it must be moving at a constant speed. This applies both for when it is transitioning to the open position, and when it is transitioning to the closed position. If the speed is constant (and the same between both moves), we can be confident that each pixel is being exposed for the same amount of time.

Now, how do we get the contsant speed? If we look at the shutter dimensions drawing, it shows that the shutter has approximately 112 degrees to move from closed position to open (and vice-versa). We also see that the shutter has approximately a 14 degree window to get to up to speed before transitioning across the CCD field of view. So, now we know we need a 112 degree move and we must reach maximum velocity within the first 14 degrees of the move.

Lucky for me, our controller includes a PMD motion processor that makes defining the motion profile pretty simple. I normally use an S-curve profile because it provides the smoothest motion, but due to the 14 degree acceleration window constraint, I'm using a trapezoidal profile to simplify the math. Using some physics equations (thanks to my colleague Strawberry), we found the relationship between maximum velocity and acceleration, to meet the 14 degree target. This relationship allowed me to write a routine to tune the speed of the shutter using a single input for the maximum velocity.

The routine starts with a large velocity, attempts a move equal to the distance of a shutter open move, then checks the encoder position to see if it was actually able to complete the move. If the velocity or acceleration is too high, the motor does not have enough power to perform the move, so the maximum velocity is reduced, and the move is attempted again. This is performed until the move is successful, according to the encoder position. The routine also writes the motion profile out as JSON data, then uses flot to plot the profile.

In the Shutter motion profile image, in the top plot, the yellow line is shutter position (the left axis) and you can see it runs from 0 to 112 degrees. The bottom axis is time in milliseconds. The blue and red lines are shutter speed in degrees/msec, the blue is commanded, or planned by the motion profile generator, and the red is actual computed from values read off the encoder. The bottom image shows commanded and actual shutter speeds vs shutter position. The thin green line in the bottom plot is the 14.4 degree target where the shutter must be at constant velocity. The green shading in both plots shows the regions where the shutter is either acceleration or decelerating, as opposed to the white section in the middle, where it is at constant (maximum) speed. You can see we have achived the goal of reaching constant speed within the window, and the move took approximately 130 msec.

To take this further, the measured transit times can be used as part of an exposure time calculation to make actual pixel exposure time more accurate. You may also have noticed that the disk has a small slit opposite of the large cut-out; for even higher-speed exposures, this will be swept across the CCD field of view.