camera trigger using an optoisolator

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
justjay
 
Posts: 121
Joined: Sat Dec 06, 2014 7:43 pm

camera trigger using an optoisolator

Post by justjay »

Can someone maybe help with this issue? I've created a circuit to trigger my camera using an optoisolator and defined the pin in the code as follows

//define trigger pin
const int trig = 2;

Code: Select all

    //at end of each step
    if (currentStep % intervalDistance == 0) {    //if current number of motor steps is divisible by the number of motor steps in a camera step, fire the camera
      Serial.println(trig, LOW);
      delay(750);
      digitalWrite(trig, HIGH); //trigger camera shutter
      delay(525);
      digitalWrite(trig, LOW);    //reset trigger pin
      delay((shutterDuration * 1000)-80); //delay needs changing to timer so stop button can be polled
    }


the circuit is as the picture. It isn't triggering at all, I have an LED in place of the jack for the camera just for test purposes.
  }
Attachments
Screenshot 2015-04-16 23.26.54.png
Screenshot 2015-04-16 23.26.54.png (94.6 KiB) Viewed 225 times

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: camera trigger using an optoisolator

Post by adafruit_support_mike »

How is it doing that you don't want, or not doing that you do want?

User avatar
justjay
 
Posts: 121
Joined: Sat Dec 06, 2014 7:43 pm

Re: camera trigger using an optoisolator

Post by justjay »

adafruit_support_mike wrote:How is it doing that you don't want, or not doing that you do want?
Hey Mike. Sorry I think I omitted to post what it should do but isn't. I don't seem to be getting any voltage across the opto. I've just left the LED in place and am testing it using a 3.7v battery, but no light. This was after I couldn't make it work with the arduino.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: camera trigger using an optoisolator

Post by adafruit_support_mike »

The diagram shows the LED wired in parallel with the optoisolator's output transistor.

The transistor is basically a switch, and is either open or closed. If it's open, current will flow through it. If it's closed, no current will flow through it.

With an LED in parallel with it, having the transistor open will basically short the ends of the transistor together. If you're trying to turn on the LED, you want to connect it between the signal marked 'left' and the upper terminal of the transistor.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”