Go Down

Topic: controll camera shutter via remote (Read 19999 times) previous topic - next topic

frufru

hello

i`m new in this forum and i want to connect a camera to the arduino. IT´s a Minolta 505 si with a plug that has 3 pins. When i put all the pins of the cable together, the camera is taking a picture. How can i connect the 3 pins to the arduino (analog??digital??). I don`t want to damage the camera with electricity. Which code  do i have to write to the  arduino script?? I`m using the arduino with vvvv and a patch wich is reading the analog pins to vvvv. I`m not very good in electronics.

Regards FruFru

admin

hello

we did this for a canon camera this weekend in one of my workshops.


The canon had 3 pins going to a 2.5 mm jack

we connected a cable, connected the cable shield to ground on the arduino the we connected the red and white cables to to digital outs on arduino via 2 resistors (2200 ohm)... when the arduino pins where both HIGH the camera was taking a picture while when only one of the two was high the camera woke up from sleep and focused

dunno if this applies to your camera

massimo

Karl

Hi Massimo,

I would like to know more on your Canon camera example. Is it possible to put something up in the tutorials page about it. I have a canon 5D I would like to control using Arduino. Sounds like a great workshop - a bit far from Melbourne Australia though! Cheers.

Daniel

HI

did you notice the tutorial in the Playground? It leads to this link. They show you how to control a Canon EOS, which has a three-pin connector.

D

Karl

Hi Daniel,

No I didn't. I think this is a general problem with having so many areas to look through each day (and I include the forum in this). Shouldn't this article be in the general tutorial page?? It must drive you guys crazy trying to respond to silly questions like mine all the time. I do scan as many pages I can for changes but I got to say it's hard finding them! Thanks for the link. I'm reading now. Cheers

Daniel

#5
May 10, 2007, 01:33 pm Last Edit: May 10, 2007, 01:40 pm by Daniel Reason: 1
hi

it should be pretty easy to find... it's currently on the Playground> tutorials page, under the heading "controlling cameras". The easiest way to find infor for Arduino tutorials and interfaces is to do this: Google "Arduino" + ThingYouWant . A search of the domain Arduino.cc is also helpful. :)

D
 

PS: the optocoupler is a good idea, as it provides complete electrical separation of the Arduino from the camera.

wandrson

#6
May 15, 2007, 03:53 am Last Edit: May 15, 2007, 03:58 am by wandrson Reason: 1
I've created a library for controlling a camera's shutter.  I've tested it with a Olympus SP510UZ but it should work for any camera that  offers an electrical connection (as opposed to IR) for shutter triggering.  It supports separate triggering of the focus and shutter functions.  It also supports a camera's bulb triggering function (if it exists).  I'd love to have this tested with other camera's




//  File....... Camera.h
//  Purpose.... Encapsulate the functionality associated with triggering a Camera
//  Author..... Walter Anderson
//  E-mail..... wandrson@walteranderson.us
//  Started.... 5 May 2007
//  Updated.... 12 May 2007
//
//    This class is designed to encapsulate the functionality of triggering a
//  two-stage shutter on a camera.  The first stage triggers the camera auto-
//  focus feature.  The second stage of the trigger instructs the camera to
//  take a photograph.  Most camera's implement this as a half press for the
//  focus function and a full button press for taking the picture.  This module
//  has been tested with an Olympus SP510UZ Digital Camera using a modified
//  remote (RC-10UZ) to interface to the camera's proprietary accessory port.
//
class Camera
{
private:
     long FocusPeriod;      // Value used to determine period for triggering Camera's focus function.
     int FocusTime;            // Minimum time that this pin should be active for Focus Function on the Camera to be triggered
     long ReTakeDelay;      // Value to delay before allowing motion to trigger another shot.
     int FocusPin;            // Pin to trigger camera's focus function.
     int ShutterPin;            // Pin to trigger camera's shutter (take picture).
     int ShutterTime;      // Minimum time that this pin should be active for the shutter on the Camera to be triggered
     int ShutterStatus;      // toggle value

public:
     Camera();
     virtual ~Camera();

     Camera(int fpin, int spin);
     long getFocusPeriod();
     long getReTakeDelay();
     void setFocusPeriod(long lonValue);
     void setReTakeDelay(long lonValue);
     void ToggleShutter();
     void TriggerFocus();
     void TriggerShutter();
};



//  File....... Camera.cpp
//  Purpose.... Encapsulate the functionality associated with triggering a Camera
//  Author..... Walter Anderson
//  E-mail..... wandrson@walteranderson.us
//  Started.... 5 May 2007
//  Updated.... 12 May 2007
//
//    This class is designed to encapsulate the functionality of triggering a
//  two-stage shutter on a camera.  The first stage triggers the camera auto-
//  focus feature.  The second stage of the trigger instructs the camera to
//  take a photograph.  Most camera's implement this as a half press for the
//  focus function and a full button press for taking the picture.  This module
//  has been tested with an Olympus SP510UZ Digital Camera using a modified
//  remote (RC-10UZ) to interface to the camera's proprietary accessory port.
//
#include "Camera.h"
#include <WConstants.h>

Camera::Camera(int fpin, int spin)
{
     FocusPin = fpin;
     ShutterPin = spin;
     // Set pins as outputs
     pinMode(FocusPin, OUTPUT);
     pinMode(ShutterPin, OUTPUT);
     // Set default pin status to low
     digitalWrite(FocusPin, LOW);
     digitalWrite(ShutterPin, LOW);
     FocusTime = 100;            // Default time to activate focus function is 100 ms.
     ShutterTime = 100;            // Default time to activare the camera's shutter is 100 ms.
     FocusPeriod = 40000;      // Default: Trigger Focus function every 40 seconds to keep camera powered up.
     RetakeDelay = 30000;      // Default: Wait a minimum of 30 seconds between photographs.
     ShutterStatus = 0;            // Shutter inactive
}

long Camera::getFocusPeriod()
{
     return FocusPeriod;
}

long Camera::getRetakeDelay()
{
     return RetakeDelay;
}

void Camera::setFocusPeriod(long lonValue)
{
     FocusPeriod = lonValue;
}

void Camera::setRetakeDelay(long lonValue)
{
     RetakeDelay = lonValue;
}

void Camera::ToggleShutter()
{
     if (ShutterStatus == 0) {
           digitalWrite(FocusPin, HIGH);
           digitalWrite(ShutterPin, HIGH);
           ShutterStatus = 1;
     } else {
           digitalWrite(FocusPin, LOW);
           digitalWrite(ShutterPin, LOW);
           ShutterStatus = 0;
     }
}

void Camera::TriggerFocus()
{
     digitalWrite(FocusPin, HIGH);
     delay(FocusTime);
     digitalWrite(FocusPin, LOW);
}

void Camera::TriggerShutter()
{
     digitalWrite(FocusPin, HIGH);
     delay(FocusTime);
     digitalWrite(ShutterPin, HIGH);
     delay(ShutterTime);
     digitalWrite(ShutterPin, LOW);
     digitalWrite(FocusPin, LOW);
}


keywords.txt

#######################################
# Syntax Coloring Map For Test
#######################################

#######################################
# Datatypes (KEYWORD1)
#######################################

Camera      KEYWORD1

#######################################
# Methods and Functions (KEYWORD2)
#######################################

getFocusPeriod      KEYWORD2
getReTakeDelay      KEYWORD2
setFocusPeriod      KEYWORD2
setReTakeDelay      KEYWORD2
ToggleShutter      KEYWORD2
TriggerFocus      KEYWORD2
TriggerShutter      KEYWORD2

#######################################
# Instances (KEYWORD2)
#######################################

#######################################
# Constants (LITERAL1)
#######################################


phil007

The link for controlling a camera shutters isn't working in the Playground> tutorials page, under the heading "controlling cameras". :(  

How do I connect ShutterPin from the Arduino to the camera shutter remote cable?

Thanks,
Phil

phil007

Would this work on a Canon 30D?

Quote
hello

we did this for a canon camera this weekend in one of my workshops.


The canon had 3 pins going to a 2.5 mm jack

we connected a cable, connected the cable shield to ground on the arduino the we connected the red and white cables to to digital outs on arduino via 2 resistors (2200 ohm)... when the arduino pins where both HIGH the camera was taking a picture while when only one of the two was high the camera woke up from sleep and focused

dunno if this applies to your camera

massimo


blalor

Quote
Would this work on a Canon 30D?

Yes.  The cable internals are the same, but the connector's different.  I hacked a wired remote for my 40D (same N3 remote) to have a standard 1/8" stereo plug in-line, so I can extend the length with a standard extension cord.  You'll find the pin-outs with a Google search.  I'd put the female end on the Arduino and plug the male 1/8"-to-N3 part into it.

phil007

I ended up using an optocoupler with the Arduino to activate the shutter and it works great.

Phil

blalor

Quote
I ended up using an optocoupler with the Arduino to activate the shutter and it works great.

I got mine working last night for my 40D with two optocouplers.  One for shutter, one for focus.  I've got a very messy board at the moment, but it seems that the order needs to be:
trigger focus
trigger shutter
release shutter
release focus

If you don't keep the focus pin high, then the shutter releases instantaneously, even if you keep the shutter pin high.  Not really a big deal if you're using the built-in exposure timer, but if you want to program the Arduino to keep the shutter open for a period of time on bulb mode, you've gotta get that sequence right.

Go Up