Newbie guidance for dslr timelapse controller (use relay or transistor?)

Hi all,

Complete newbie warning

I have chosen to make a time-lapse controller for my dslr camera as I think it should be a useful and relatively easy thing to achieve.

To make the camera take a picture remotely I plug a 2.5mm stereo jack into the camera and short the lower and upper sections of the opposite jack and it will snap away.

I want to do this with timing of snaps controlled from Arduino which i think will actually be the easy part...

The bit im stuck on is whether to use a relay or a transistor as my switch? It is vital that I don't ruin my camera lol!

However the thing I seem to be struggling to get my head around with transistors (despite many youtube videos and googling) is regarding the voltage/current applied to the base...

Is the base voltage on a transistor isolated from the circuit running on the collector and emitter? The reason I'm quizzing it is because I don't want any voltage coming from the arduino going into the camera... I only want it to effectively short the connection not put any unwanted voltage/current into my camera.

I'm quite a newbie so I may be missing some important things but will take as long as need to get my head around it before actually trying anything. Hopefully someone can help or even point to something that might help explain what I'm getting at?

Thanks for any help!

You should use an optoisolator. That will completely isolate the camera from the Arduino.

Pete

A transistor will do just fine - or two transistors if there are two separate contacts for focus and "shutter".

A stereo jack has "tip", "ring" and "sleeve" contacts. You are unclear about which two you are using here, I will presume tip and sleeve and that the "ring" corresponds to the focus contact. Use a multimeter to check that the voltage on the sleeve is the negative and the tip or tip and ring are each positive in which case an NPN transistor (or N-FET) is appropriate, emitter to the ground (sleeve). If the polarity is otherwise, then an opto-isolator may be more appropriate, but if your Arduino ground is the same as your camera ground, it should not be a problem.

A 2k2 base resistor from the Arduino control output should be fine. If you use a FET (must be a "logic level" FET which operates with a low gate voltage), isolation from the gate is even more certain, not that it matters with the 2k2 resistor anyway.

Here's a blog post about a similar project:
http://www.glacialwanderer.com/hobbyrobotics/?p=13

As @Paul__B said, though, use a resistor between the Arduino and the transistor.

Google shines again, eh?

I successfully fired my camera flash using an opto isolator. Relevant part of circuit here:

The resistor limits current through the LED in the opto isolator.

I found a similar circuit here:

Personally I would use the isolator, then there is no possibility of introducing unwanted current into the camera.

Thanks for the help everyone.

Paul__B your exactly right the tip and sleeve are the contacts, initially I was not going to bother with the focus ring and just set the camera to manual focus, perhaps add it later once I know whats going on better. And yes the tip and ring measure + 3.xvolts.

I am somewhat torn between getting an opto-isolator, or using a transistor with a resistor on the base. I have three p2n2222a transistors that came with my starter kit.

But still think i need to get more understanding under my belt as a lot of the specs on the components baffle me to be honest.

I understand the basic idea that many of these how tos all over the net show... But blindly following them does not help me learn anything, for example I could go and do it all and may get it to work but would have no idea why a 2.2k resistor is the resistor of choice on the base why not a bigger one or smaller.... but I will try and research myself the answer to this.

I will often find what im looking for on google but its the answers to the questions about the little details that I sometimes can't find very easily.

But thanks again guys you've given me some things to work with!

maclean:
I could go and do it all and may get it to work but would have no idea why a 2.2k resistor is the resistor of choice on the base why not a bigger one or smaller...

Rule of thumb. It sounds about right to me. XD

It's a cross between providing sufficient current to turn the transistor on presuming it was switching something substantial like a relay (which it no doubt is not in a modern camera), and not "wasting" too much current from the Arduino output.

It could most probably be a much higher resistance.

Correct me if I'm wrong, but the basic calculation gives you the current out of the Arduino pin. Assuming a 0.7V drop over the base/emitter junction you have:

(5 - 0.7) / 2200 = 0.0019 A

So you are letting around 2 mA flow, which is well within spec for the output pin. One of the pages linked above suggested 1k, which would give:

(5 - 0.7) / 1000 = 0.0043 A

Still within spec for the pin.

Presumably that is enough to turn on the transistor (isn't it voltage that turns it on rather than current?).

OK, OK, I know it is well within spec. And I doubt whether the current matters anyway for a relatively short period of time. Just a matter of "no more than necessary". If we assume a beta of 100 - which should be really conservative, it can easily switch 200 mA. If it is switching logic levels in the camera as one would expect, that is immensely more than sufficient.

Eh? Transistors ("transfer resistors") are current amplifiers. FETs switch on voltage.

Oh, OK.

Also have a look at Using an Arduino and a optocoupler to activate a camera shutter | Martyn Currey

This is a simple guide on using an optocoupler to activate the camera shutter but it can also be used to fire flashes.

EDIT:
Paul__B below has added a warning about flash trigger voltages so I wanted to add that the flash guns i have ( Yongnuo YN-560IIs) have a trigger voltage of 3.75V. So I believe it is safe to use an optocoupler.
I think it is mostly old film flashes that have higher voltages but it would be wide to check.

The Botzilla Strobes Page has a list of different flash units with trigger voltages.
http://dpanswers.com/content/genrc_flash_measuretv.php talks about checking the trigger voltage.

Paul__B:

[quote author=Nick Gammon link=topic=194141.msg1434984#msg1434984 date=1382222440]
So you are letting around 2 mA flow, which is well within spec for the output pin.

OK, OK, I know it is well within spec. And I doubt whether the current matters anyway for a relatively short period of time. Just a matter of "no more than necessary". If we assume a beta of 100 - which should be really conservative, it can easily switch 200 mA. If it is switching logic levels in the camera as one would expect, that is immensely more than sufficient.

Eh? Transistors ("transfer resistors") are current amplifiers. FETs switch on voltage.

[/quote]

Yes however you can switch voltage on with a transistor (from it's high side)

Sand_HK:
Also have a look at Using an Arduino and a optocoupler to activate a camera shutter | Martyn Currey
This is a simple guide on using an optocoupler to activate the camera shutter but it can also be used to fire flashes.

The fellow goes on about using isolation in case it "could kill your several hundred dollar camera", then proceeds to describe a circuit missing out on the resistor in series with the optocoupler LED.

Give me strength!

Granted that you are competent in assembling things, there is no reason a transistor - plus the resistor will not do the job in perfect safety.

And incidentally, since basic photoflash units use a trigger voltage upwards of 100V, a 4N28 is not rated (30V) for such service. Presumably the "smart" ones may be different.

Paul__B:
The fellow goes on about using isolation in case it "could kill your several hundred dollar camera", then proceeds to describe a circuit missing out on the resistor in series with the optocoupler LED.

Give me strength!

I sent him a message and he says he will update the information.

I still haven't given up on this, my goal is to try and be completely confident in my understanding before trying it out...

I'm going with the transistor option.

I found this quite detailed and helpful tutorial and he is also using the same transistor as me which highlighted the calculations you were doing Nick:

I'm probably not understanding something here but could I for e.g. use my multimeter in amp mode - make the short with the multimeter - measure the current - then perform the calculations done in the video and by nick to select the best possible resistor for on the base? Or could that be a bad idea considering I know nothing of the camera internal circuit?

Could someone also advise me about common grounding? I find myself slightly puzzled between for example a battery with +/- terminals and my arduino with its GND pins.

Now the standard google response is its a common reference point for voltages..... but that doesn't really click in my head.

What is actually under the GND pins on the Arduino and why for example when I take my 5v to resistor to led and touch the other end to for e.g. a metal mic stand I get nothing. What is under those GND pins that make the electricity flow but not when touching a mic stand on the actual ground? (you may tell me this was a silly idea but I had to try)

This question is popping up because the camera has a battery with + and - and the arduino has +5v pins and GND and I'm just wanting some clarity on how the two layouts can mix. How does GND pins interact with batteries, is the - on bat just a GND?

Again thanks for all the input and patience. My understanding is growing and it will all click sooner or later!

Cheers!

Ground on the Arduino, is (connected to) the negative supply terminal, but only on the Arduino. Any electrical circuit must have a complete loop in which the current can flow, so unless the "ground" on one device is actually connected to the "ground" on another, there is no path for current to flow back from one to the other.

Particularly in America with its two-pin plug system, appliances - such as your mic stand or a lamp fitting - do not have a connection to ground (and the mic stand as just a lump of metal is most unlikely to be connected to anything anyway). The output from a "plug pack" (or a "wall wart") is just two connections with a voltage between the two, but not to anything else. Computers - and therefore the USB connections - usually are grounded, but a bench power supply usually has three terminals - positive, negative and ground, with the option to connect the ground wire to either as the need arises. A battery on its own has a positive and negative, but unless you connect one to the ground terminal of something else, there is no connection and certainly no "ground". As a matter of practical convention ground is usually the negative - but only to the extent that you make it so.

Electrons flow the least resistive path...

If your Arduino GND and battery GND are not connected there is no path for the electrons to flow, it's all about the voltage differential between point A and B, the greater the differential the more current will flow, the Transistor when switched on via the base controls how much current flows between the Collector and Emitter, the more current greater the current flow.

But, no current will flow IF the grounds are not tied because there's no "path" or voltage differential for the electrons to flow.

Arduino Pin Out --- [1k] ---- Base Pin (of Transistor)

  • Collector (of your Camera) (+ side of your button)
  • Emitter (of your camera) (- Side of your button)

When the transistor conducts, a path will be made and you can think of the + and - from the camera "making contact" like a push of a button.

Now, if there's no resistor your camera flash side (which i highly doubt) you could create a short... but don't worry because a "short" is what one would do everytime a button presses to trigger the flash on the camera, so there has to be a resistor there.

A relay could induce a high voltage and do something damaging to your camera.

Thanks guys,

Currently digesting your responses and will be having a good think about it.. I actually think I could put it together now by following things parrot fashion but am just taking my time to let it all sink in.

Will update the thread when I make some progress.

Thanks.