Rocket Camera Controller
I recently completed a controller for an AipTek PenCam digital camera. I modified this camera so it could be launched in the payload bay of a model rocket. The controller pulses the shutter line on the camera every eleven seconds so that a series of pictures can be taken while the camera is in the air.
The controller is built around an SX28. A G-switch is used to tell the controller when the rocket begins to take off. The first picture is taken 6 seconds into the flight when the rocket is close to its highest altitude. The remaining pictures are taken as the rocket is coming down under its parachute.
Information about the controller and camera is at home.swbell.net/davehein/ModX/ModX3c.html
You can get more information about the rocket, which is named Mod X at home.swbell.net/davehein/ModX/ModX.html
One of the pictures taken by the camera is at home.swbell.net/davehein/AARG110406/IMAGE0050.jpg
Other pictures can be found in the launch log for the Mod X rocket.
I plan on making some changes to the software so that it allows the camera to go into a power saving mode. I also plan on implementing a configuration where a motion video sequence is taken while the rocket ascends, and still pictures will be taken as the camera descends.
The controller is built around an SX28. A G-switch is used to tell the controller when the rocket begins to take off. The first picture is taken 6 seconds into the flight when the rocket is close to its highest altitude. The remaining pictures are taken as the rocket is coming down under its parachute.
Information about the controller and camera is at home.swbell.net/davehein/ModX/ModX3c.html
You can get more information about the rocket, which is named Mod X at home.swbell.net/davehein/ModX/ModX.html
One of the pictures taken by the camera is at home.swbell.net/davehein/AARG110406/IMAGE0050.jpg
Other pictures can be found in the launch log for the Mod X rocket.
I plan on making some changes to the software so that it allows the camera to go into a power saving mode. I also plan on implementing a configuration where a motion video sequence is taken while the rocket ascends, and still pictures will be taken as the camera descends.
Comments
Pretty Cool!
What are you using for your G-Switch on your new SX controller?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
Dave
Dave Hein
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
I have attached pictures showing the controller, the Aiptek camera, the rocket launching and one of the pictures it took.· The camera looks out the small 1/2" hole on the side of the rocket.
Dave Hein
Do you have more pictures?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
links:
My band's website
Our album on the iTunes Music Store
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
This looks very nice. I am interested in using the SD-PenCam on a 4-6 hour balloon flight, but was worried about the time-out/shutdown. How do you put the camera to sleep, and wake it up ? Did AipTek document this, or did you hack it?
Cheers!
Paul Rowntree
There is no way to turn off (or put to sleep) the mini PenCam manually. It turns off automatically after being idle for 60 seconds. The program in the SX keeps track of the state of the PenCam by timing how long it has been idle. It is important to know if it's in the sleep mode because the mode button must be held down for a second to wake it up before a picture can be taken. If the mode button is held down while it is awake the camera will go into the movie mode instead of the still image mode.
The SD PenCam is nice because you can put a 128 MB SD card in it. It is also possible to manually turn off the SD PenCam. The manual says that the mode and shutter button must be held down for 2 seconds to turn it off. The SD is newer than the mini PenCam, so Aiptek may have improved a few things on it. The mini PenCam draws quite a bit of current when it is on, even when it is not taking a picture. This is why its important to let the camera turn off when its not taking pictures. The SD may not have the same problem as the mini, but I suspect it uses the same circuitry as the mini.
With the SD PenCam, you could turn it on, take a picture, wait till is completely stored and then turn it off. This would give you the longest battery life.
One thing about the mini PenCam is that it could take a picture about once every 6 seconds when I first got it. However, after taking lots of pictures, the time between pictures became longer -- somewhere around 10 seconds per picture. I programmed the SX to take a picture every 11 seconds to ensure that the PenCam is ready. Also, the mini PenCam would store fewer and fewer pictures over time. Initially, it would store about 90 pictures, but my current PenCam (I'm on my third one now) is down to about 50 pictures. My first PenCam got to the point where it could no longer write to internal flash memory. The SD PenCam may not have these problems with SD memory.
Dave
I didn't have time to reprogram the controller before I left for my trip, so had to do it once I got to my destination. I downloaded the SK-Key IDE software from the Parallax website onto my laptop, which had never been used for programming SX chips before. Everything worked great, and I was able to take a few nice pictures from the kite.
I have attached the schematic for the controller and a couple of pictures I took from the kite. These pictures were de-skewed to compensate for distortion caused by the the Aiptek PenCam when it is moving.
Thanks to the Parallax team for their great online support!
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
My initial attempt at de-skewing was to shift each line to the right or left by an increasing amount. As an example, I would shift the first line by 1 pixel, the second line by 2 pixels, the third line by 3 pixels, and so on. The actual amount of the shift was determined by measuring the angle of a vertical structure against the angle of the horizon in the picture.
This method works fairly well if the camera is rotating along its main axis at a constant rate, which is what happens when the camera looks out the side of a rocket. In the case of the kite, I just hung the camera from a string. The wind would cause it to rock back-and-forth and spin around. This caused straight objects to appear curved.
I found that I could correct for this motion by varying the amount that I de-skewed each line. The pictures contained many vertical lines, so I was able to measure the amount of skew at various places in the image. I did a least-squares fit to the measured data, and it produced the results shown in the pictures.
A better reconstruction would require rotating the lines in addition to de-skewing them. However, that was more work than I wanted to do on them.
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
-Phil
Thanks for the information on the Picavet.· I have considered a Picavet, but I intentionally wanted the camera to turn in the wind·so I would get pictures from different directions.
For these pictures I attached it to a short string that was only a few inches long.· In a previous attempt I used a string that was 2 or 3 feet long, and I did not get as much distortion.· A longer pendulum has a longer period, so the angle changes at a slower rate.· This is probably why the pictures with the shorter string were so distorted.
There are some fairly complicated camera cradles that use a Picavet to provide a stable platform, and then use and actuator to rotate the camera to get different views.· However, at this point I'm just trying to keep it simple.
Dave
·