Jump to content

Trying to build a circuit to release the shutter of a DSLR from a raspberry pi


Cisilia

Recommended Posts

I'm trying to build a circuit to release the shutter of a DSLR from a raspberry pi. Releasing the shutter is as easy as closing a circuit, the circuit is entirely contained within the camera. So, I have a camera, with two wires from a disassembled shutter release cable sticking out of it. When I touch those two wires together, the shutter fires. Great, now to do it electronically.

The schematic on the left is what I prototyped using an LED and the on the right is the same (?, we'll get to that) connected to the camera in place of the LED. The LED scenario worked fine, which was exciting, the camera... did not, regardless of the value of R4 - I started with a resistor I believed to be correctly calculated (2.6MΩ) and worked down in resistance until I was using no resistor, the shutter never fired. I've tested all the components and swapped them around diligently checking they all work and are connected correctly.

There are two major differences I can think of, if you understand these and can help confirm and explain, that'd be great. If you spot something else that is the cause of my problems, that's great too.

I can think of:

1) The grounds on the RHS aren't actually the same, one is the camera and the other is the pi. So I'm essentially connecting two circuits via the transistor, whereas on the LHS, I used the pi's + and gnd pins to create power the LED circuit, meaning this is a common ground? Does this make a difference? What should I be doing to connect two circuits in such a way?

2) The current in the camera circuit is very low, 68μA, maybe this isn't enough to cross the transistor C to E (way out of my depth here :) )? Details on the camera circuit can be found here: http://www.doc-diy.net/photo/eos_wired_remote/

Oi8CF.thumb.png.eb8f126ef74b7e1e3fbe3a91ac4c0312.png

Link to comment
Share on other sites

I have built something similar, this is a link to the topic..

I was using a BBC microbit to drive it as described here.

As an alternative to using a transistor drive you can use an opto coupler, it has some advantages in providing isolation from the drive circuit voltages in the event of a fault.

Alan

Link to comment
Share on other sites

Some comments that may help:

The transistor is not in the correct place in the circuit - you want the transistor to saturate when operating as a switch. It should be between the diode cathode and ground. Similarly between the 47k resistor and ground. In practice the 47k resistor is not required as current is limited by the camera, so shorting the resistor will put the transistor in the correct place.

When using a transistor as a switch don't use the current gain to try and work out resistance values. Just make the transistor saturate - perhaps changing the 2.6 Mohm resistor for a 100 kohm (or similar value).

As you say, the grounds of the camera and PI must be connected together to make the curcuit work.

Link to comment
Share on other sites

Speaking as someone that hasn't yet worked out the purpose of a Raspberry Pi or what you might use one for I am a little intrigued.  If you can do this to get the shutter to fire:

3 hours ago, Cisilia said:

So, I have a camera, with two wires from a disassembled shutter release cable sticking out of it. When I touch those two wires together, the shutter fires. Great

Why do you need a Raspberry Pi when, presumably, just putting a basic switch in the finished circuit to connect the ends of the shutter release cable would accomplish the same thing?

Link to comment
Share on other sites

I'm guessing from the "EOS" link in the OP's first post that the camera is a Canon model.  That being the case, if it's supported sufficiently well by libgphoto2 my first approach would have been to use a standard USB cable and some code using that library to get the shutter to fire and save bothering with the electronics.  I don't think that would work with older models such as the 350D however, in which case ignore what I've said :)

James

Link to comment
Share on other sites

10 minutes ago, JOC said:

Why do you need a Raspberry Pi when, presumably, just putting a basic switch in the finished circuit to connect the ends of the shutter release cable would accomplish the same thing?

Perhaps to get the shutter to fire under the control of software when one's switch-operating fingers are otherwise indisposed?

James

Link to comment
Share on other sites

7 hours ago, JOC said:

Why do you need a Raspberry Pi when, presumably, just putting a basic switch in the finished circuit to connect the ends of the shutter release cable would accomplish the same thing?

As mentioned by James, once you can trigger via a pulse from an electronic circuit you can use sound/light/electromagnetic waves or pretty much anything as the source. The added advantage is that you can de-bounce any input from a mechanical switch and looking at commercial units that use a bit of springy steel thats a good option to have.

Alan

Link to comment
Share on other sites

In the camera circuit the 3.3V from the Canon is via a pull-up resistor in the camera shown as 50k on your web link though is probably a standard 47k. This is there to stop the camera shutter input voltage floating to an arbituary value when there is no connection to it. This is why only 68 μA flows through the shutter switch when shorted to ground. (I=V/R, = 3.3 / 47k = 70μA). Even if your Q2 resistor was fully turned on the 47k between the emitter and ground means the camera shutter input would only drop to 1.15V and not 0V. This may be too high a voltage to trigger the shutter. As bobro says remove the 47k in the emitter and connect the emitter directly to ground. This makes the base voltage a fixed 0.6V or so when Q2 is turned on rather than a changing value depending on the current through the emitter resistor. The DC current gain (hfe) of the PN2222 is only about 35 at low collector-emitter currents so the base current needs to be at least 70μA / 35 or about 2μA. R4 needs to be (3.3V - 0.6V) / 2μA or 1.3MΩ maximum. To ensure the transistor switches fully on, put around 10 times this current into the base so R4 should be 1.3MΩ / 10 or 130kΩ. Good quick estimate at 100k bobro :wink2:. Also as bobro says the grounds of the camera and the PI need to be shorted together so that they work to a common reference.

Your LED circuit worked because the LED and the transistor are both powered by the PI so have a common reference. The emitter of Q1 can only rise to a maximum of about 2.7V as the base can go no higher than 3.3V. If the emitter tried to go higher than 2.7V the transistor would turn off. With a drop across the LED of about 2V the current through it is limited by R1 to (2.7V - 2.0V) / 680Ω or around 1mA so it will be a bit dim. Swapping Q1 and D2 over the emitter is fixed at 0V so the full 5V is available for driving the LED with R1, so it will pass 5mA and be brighter. R2 needs to be increased to around 10k as well to avoid Q1 going 'pop'. :smile:

Alan

Link to comment
Share on other sites

Alan :hello2:

That's the best bit of unintelligable techo-speak that I've read in a good long time.  Now I know why I dropped physics and electronics at school.  FWIW I'm dead impressed and that's probably because I don't understand it one iota LOL However, it sounds like a masterclass to someone that speaks the same 'language'.   I wonder if I am equally as unintelligable if I get onto my pet subject of chemical analysis techniques!

Link to comment
Share on other sites

The reason the second (camera) circuit doesn't work is that the transistor is pulling the shutter input voltage towards the 3.3v whereas it needs to be pulled to ground.  Pi output through 100K resistor to transistor base, emitter to ground, collector to camera shutter input.  And don't forget to connect camera ground to Pi ground.  HTH

5ad078a80669c_CameraShutterRelease.thumb.png.808a1bc6ad69632be9efe936e0dc4bea.png

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.