Sunday, June 4, 2017

Modifying a Kodak Pixpro FZ43 for external shutter control

Modifying a Kodak Pixpro FZ43 for external shutter control


I've been using REALLY cheap 808 Keychain cameras for video on my flights.  I decided I wanted to upgrade to something a little nicer, to get better video and still quality.  There are some cameras out there with open firmware that people are using, but they're on the used market, and won't be available forever.  I figured I'd try to venture off on my own and see what I could do.

Design points:

  • Relatively inexpensive (sub-$100) camera that has decent resolution for video and stills.
  • External microcontroller to run the shutter.  I targetted the Atmel ATTINY13, since I have about 5 of them in my junk box.
  • AA powered camera, so that I can use Energizer Ultimate Lithiums (good in cold weather)
  • Depending on battery life when testing, I might want to wire in more batteries in parallel to allow for more pictures.
After trolling around on Amazon, I settled on the Kodak Pixpro FZ43.  I scored it on Amazon Prime for $64.  


The specs for the camera indicated that it could take about 120 pictures on a pair of batteries.  I would definitely want to wire in more. 

Modification


I opened up the camera, and it was a simple matter to find a little semi-riser where traces led from the shutter.  As expected, pressing the shutter shorts a connection to ground.   I connected two tiny wire-wrap wires to do some testing.



I whacked together a little circuit diagram to control the shutter from my ATTINY13 chip.  I was unsure how much current the shutter might sink, so rather than wiring it directly to the chip, which can only handle about 20ma, I elected to control the shutter via a transistor switch.  A 2N3904 served nicely, and I had a about 8 of 'em in my parts box.



I confirmed that I could trigger the shutter by holding the pin (PB3 in my setup) high for 1/2 second. I assumed there would be some button de-bouncing done by the camera, so I started with 1/2 second, and it worked, so I left it.  It worked like a champ.

First Test


With the camera working by microcontroller, I decided to do a duration test to see how the batteries held up.  I turned off the flash, and left the camera running, taking one picture per minute, overnight with just a pair of internal batteries.  The documentation stated about 120 pictures.  I got 460!  Those Ultimate Lithium batteries really rock!  Also, there was no flash, and we were operating at room temperature, so in flight, I'm SURE there would be less capacity.  I settled on wiring in two additional batteries in parallel with the camera, for flight, assuming that I could do 400-500 still shots in flight without difficulty.

For balloon operations, I also like to have a beeper on the payload.  I decided to put that under microcontroller as well, since hell, I'm a geek and idle hands are the devil's playground!  The final schematic looked like this.



Again, I used a transistor for the beeper.  In testing, it was drawing well under 20ma, but I wasn't sure what the surge current was, so rather than take a chance, I tossed in another transistor.

Here are the final mods to the camera.  I found a third pin that had the VCC rail on it.  I put a wire to that, and secured it down with a little kapton tape.  The wires are strain-relieved by knots on the inside of the case, which are too big to pass through the holes I drilled.



I decided I would attach the camera to my controller and external batteries via a connector with some riser pins on it.  Here's the finished product.


Having tested all functions on breadboard, I just needed to whack together a little board for the payload.  Here's the finished product, sitting on top of the breadboard mock-up.  Subsequent to this picture, I wired in a few LEDs which fire when the transistors do.  This just gives some visual indication that things are working, even if the camera or beeper aren't attached.

I set up the board to be powered from a bus which consists of the two external batteries wired in parallel to the internal camera batteries.  The circuit, therefore, runs on 3.0 volts, which is well within spec of the ATTINY13.  I did reset a "brownout" software fuse on the chip to make sure that it didn't reboot if it had a bit of voltage drop.

I built the board with an 8-DIP socket on it, so that I could externally program the chip, test it on my breadboard, and then just pop it off, and transfer it to the flight board.  That way I didn't need to put programming risers on the flight board.


I ran predictions for my first flight.  It estimated 93 minutes to burst, and 135 minutes to landing.  So, I wrote code for the ATTINY such that it took 6 pictures per minute in a 15 minute around burst time, and around landing time.  I scaled back the picture rate during "boring" times for the flight.

Final flight configuration

Here's a picture of all the "guts" of my first flight payload.    The green thing on the left is the tracker, which runs on one AAA battery.  Then, I have the camera, flight board, beeper, and the two batteries that supplement the camera.  The two batteries in the upper left are for the camera itself.



The first flight showed that this system worked like a champ!  I was getting 6 pictures per minute at burst, and at landing time.  This allowed me balance battery power (and weight) against the desire to get interesting pictures.

First flight.  Two minutes after apogee, on the descent.  That's Lake Ontario in the background.


Next Steps


While the shutter mechanism worked great, I was disappointed in the focus of the pictures.  The camera does auto-focus on the center of the screen,  An unfortunate number of the photos were out of focus.  I'm going to mess with the settings to see if I can do better, or perhaps have it hard-code to "focus on infinity".

Also, this worked very nicely.  I'm getting a second camera which I will wire similarly.  I'd like to have one taking stills and another taking video.  I'll wire up the video record shutter (a different button) on the second camera, in addition to the shutter, so I'll have a 4-wire configuration.  The microcontroller will then be able to switch between video and stills, should I choose.



No comments:

Post a Comment