Friday, December 28, 2012

time lapse photography using an arduino to drive a Sony Alpha-100 DSLR

Finally I got around to working out most of the kinks of having the an arduino control the shutter release of a Sony Alpha-100 DSLR camera.



  1. Buy a cheap (~$7.00) shutter release cord to sacrifice to the project.


  2. Carefully cut and strip the wires from release cord. Shorting the green and blue wires causes the camera to focus. Shorting the green, blue and red wires after focusing causes the camera to shoot.


  3. Remember that my soldering days are long ago (hey, was only an EE minor) and have one of the kids at our FIRST Robotics do it for me. Here is the result. Note that blue->white. The blue wires I have all seem to be a bit flakey.

    Shutter release cord mapping



  4. Find someone who has done something similar: http://ujwal.shrestha.me/arduino-intervalometer-for-sony-dslr/ and leverage their code. I'm not sure that is the right solution, but it worked for me. Something with MOSFETs I think, but that was years ago...


  5. Then connected the wires from the shutter release cord to pins as follows:
    Green -> Ground
    Red -> Digital pin 8
    Blue/White -> Digital pin 9

    Ardiuno pin mapping



  6. Now the code. I named it aifs30.ino:



    /*

    Heavily based on:

    http://ujwal.shrestha.me/arduino-intervalometer-for-sony-dslr/

    For complete writeup, see http://nozell.com/blog/

    The shutter release has 3 wires: green, red, blue which I had soldered
    to green, red and white (my blue wires are flakey)

    green - ground
    red - digital 8
    blue/white - digital 9

    green + blue/white => focus
    green + blue/white + red => take photo

    */

    void setup(void)
    {
    Serial.begin(115200);
    }

    void loop() {

    if (Serial.available() )
    Serial.println("VVVVVVVVVV");

    pinMode(8,OUTPUT);
    delay(100);
    pinMode(9,OUTPUT);

    if (Serial.available() )
    Serial.println("Sleep for 1/2 seconds");

    delay(500);

    if (Serial.available() )
    Serial.println("wake up and take photo ");

    pinMode(8,INPUT);

    delay(100);

    pinMode(9,INPUT);

    if (Serial.available() )
    Serial.println("ZZZZZZZZ Sleep for 30s");

    delay(10000);
    delay(10000);
    delay(10000);

    if (Serial.available() )
    Serial.println("^^^^^^^^^^");
    }


  7. If you connect the release to the camera while the camera is on, even if here is no power to the arduino, it will take a couple photos. That is the kink. Just connect it up with the camera off and it will be fine.


  8. Consider setting the photo size to 'standard' -- it saves a lot on disk space.


  9. Now find something interesting to point your camera at and come back later. In my case it was our backyard chickens.



  10. Download all the photos to a directory and use this linux command to convert the JPG images to an AVI file.

    mencoder -nosound -ovc lavc -lavcopts vcodec=mjpeg -o timelapse-10fps.avi -mf type=jpeg:fps=10 mf://*.JPG



  11. upload to youtube and enjoy the results




Thursday, November 8, 2012

Anti-Obama sign does not have the intended effect

Whie the sign has been up on Baboosic Lake Rd, Merrimack, NH for a few weeks, it was only on election day I stopped and took a photo. Oddly that was the first time I noticed the typo. Who misspells "YOU" as "YOE"?

IF YOE HATE YOUR GRAND KIDS VOTE OBAMA


Today my wife noticed someone had updated the sign.


I VOTED FOR OBAMA BECAUSE OF THIS SIGN

President Obama (w/ President Clinton) Rally in Concord, NH (2012)

Clinton, Lynch, ObamaSeamus the Romney Dog?It was a bit nippy (pre-time change)DSC06504.JPG4 city block line!Veterans for Obama
Crowd photo releaseGene Robinson Patricia J. Lee OFA_NHObama for America NH  Patricia J. Lee NH Senator Jeanne ShaheenNH Governor John Lynch w/ Dr. Susan Lynch
NH Governor John Lynch w/ Dr. Susan LynchNH Governor John Lynch w/ Dr. Susan LynchDSC06572.JPGSecret Service with his violin caseSecret Service with their guitar casesDSC06592.JPG
President ClintonPresident ClintonPresident ClintonPresident ClintonPresident ClintonPresident Clinton

This was a *huge* rally 2 days before the election. Over 14k people, the largest ever in NH. While Kids #4, #5, #6 & I got there around 6:15am, there was already a long line and we didn't get a great viewing spot. Before they opened the gates, the line serpentined up and down Main Street four times.

Senators Ayotte, Talent, Thune; Gov Jindal; Congresswoman Blackburn

DSC06495.JPGDSC06494.JPGDSC06493.JPGDSC06477.JPGDSC06467.JPGDSC06457.JPG
DSC06422.JPGDSC06414.JPGDSC06403.JPGDSC06394.JPGDSC06388.JPGDSC06385.JPG
DSC06384.JPGDSC06383.JPGDSC06381.JPGDSC06359.JPGDSC06358.JPGDSC06357.JPG
DSC06491.JPGDSC06474.JPGDSC06451.JPGDSC06432.JPGDSC06399.JPGDSC06396.JPG

It would be a crime *not* to take a look at all the national political figures making their way through NH every four years. Regardless of your political persuasion.

TIL Senator John Thune is really tall.