Monitoring a camera remote (switch) as input for 08M2

Jonny99

New Member
I have a really basic question, but my googling isn't providing a clear answer (I'm not good with circuit diagrams and electronics jargon) so hoping someone can chime in. I've only used my picaxe chips with digital high/low inputs, like a PIR sensor. I'm wondering how to use a switch as an input.

I've ordered a commercial product that triggers my camera based on an active infrared sensor of some sorts. The product connects to my camera with the standard shutter release cable, which has a focus, shutter, and ground wire. To take a picture, it probably touches the focus to ground, then shutter to ground. I'm guessing the wires are grounded for about 300-1000ms. So my understanding is that the product's outputs are two switches (focus and shutter).

Instead of plugging the product's shutter release cable into my camera, I want to plug it into a picaxe-controlled board (in this case the 08M2 starter kit board) and treat the output of the trigger product as the input for the picaxe board, so that I can have more control over what my camera does when the trigger product detects an object. The output of my picaxe board will be another shutter release cable which is actually connected to the camera (via optoisolators).

I need help with the inputs to the picaxe chip and how to program the 08M2 to monitor them. Specifically: how do I attach the focus, ground, and shutter wires to the picaxe; and what code would I use to detect whether a switch has been closed (i.e. s whether the shutter and ground wires have been touched together).

Thanks a lot for any help.
 

AllyCat

Senior Member
Hi,

In principle, you should be able to wire the common (Ground or perhaps screen) wire of the camera interface to the PICaxe Earth (Leg8) and the focus and shutter wires to, say, PICaxe pins C.1 (Leg6) and C.2 (Leg5).

Then enable the internal "Weak Pullups" for those pins, which would be PULLUP %00110. Then your code needs to test for "Active Low" signals inside a loop (or more advanced programmers can use an interrupt). So something like:
Code:
main:
  pullup %00110
  do
     if pinC.1 = 0 then goto  shutter
     if pinC.2 = 0 then goto  focus
  loop
shutter:   ; Do something such as LOW C.4 or HIGH C.4
    goto main
focus:     ;  Do something
    goto main
Note that C.3 is an "input only" pin so might be better for the focus or shutter input (its pullup value is %01000), if you need two outputs.

Cheers, Alan.
 

oracacle

Senior Member
What camera? the reason I ask is that canon do not require focus to be active while in manual focus mode but Nikon does. I had to test the wires on my wired shutter release to figure out which was which.
I did also do a little testing with my Nikon and found that the shortest time needed to activate the shutter was 15ms.

here is the output opto isolator setup I used for the macro rail which used a 28x2 hence the a.0 and a.1

Code:
[color=Green]#rem
Camera Sutter
-------------
       ------
a.0--->|1  6|
     --|2  5|<----Focus
     | |3  4|--
     | ------ |
     |        |
     | ------ |
a.1--->|1  6| |
     +-|2  5|<----Shutter
     | |3  4|-+---Common For camera
     | ------
     |
  Ground

using 2 4N25 opto isolators. Common refers to the commen connection to both focus and shutter circuits.

I beleive that comman would be the ground side of the camera but a prefrence to not interfering with camera
votlage and circuits would be prudent due to the cost of repairing or replacing such equipment
#endref[/color]
depending on what you plan on doing you may well be able to ignore the focus from the device you plan to interface with. after that what allycat says, I would how ever be tempted to test to see if there is voltage on the focus and shutter lines before attaching them to you picaxe as additional protection maybe needed depending on the output. most camera batteries are (at DSLR) are around 7v mark so that maybe something to bare in mind
 

Jonny99

New Member
Thanks so much for the replies. Allycat; I'll give that configuration and code a try. Oracacle, thanks for the note about Nikon/Canon and the optocoupler note.

I just realized I probably don't need to monitor both the focus and ground on the camera trigger device, because I'm using it as a yes/no input for object detection, that will free up an input pin.
This is the device I want to use as input: http://www.eltima-electronic.de/
I had been using cheap PIR sensors but I just moved somewhere very windy and I have lots of trouble with false triggers.

Oracacle: do you know if Canon requires the focus pin to meter; for example if you want to use your Canon in AV mode instead of M?







http://www.eltima-electronic.de/
 

oracacle

Senior Member
Canon would require the focus for Av as this is when the metering takes place, this is pretty standard for all cameras to stop constant metering and save battery
having a quick look though the website you posted and I think you will have to do some testing on the output side of the device as the system listed have a wide operating voltage (presume it has a built in regulator). I would presume that they use a transistor to pull the lines low, however they may keep the line high and then pull it low using whatever processor they are using, you will either need to match the voltage fairly closely (note sure what the PICAXE will tolerate on pin overvoltage) or maybe opto couple the input too
 

Jonny99

New Member
Thanks for checking out the website and providing further advice.

If you don't mind, can you advise how to decide what optocoupler to use with the Etima trigger output, and what resister to place in between the Etima trigger and the optocoupler. I've used 4N26 and 4N35 optocouplers for the output on my camera trap triggers before, with 1k and 330 k resistors, resp. if I remember right. I have trouble understanding the current/voltage/resistance calculations for optocouplers; so I've just looked at what others use or done trial and error.

Thanks again. I found a spot where a game trail crosses a washed out creek and I'm hoping to use the Etima trigger to get an animal jumping it. Don't think my usual PIR trigger setup is precise enough for the timing.
Here's the critter I'm after: https://www.flickr.com/photos/j-armstrong/14101979801/
 

oracacle

Senior Member
IIRC the LED side of the opto is calculated the same as a normal LED, so the 4n25 has a max forward voltage of 1.5 (typical 1.3) at 60mA. if was assume 5v supply from the eltima (5-1.5)/0.06=58.33 ohms. you should note that is absolute max 50mA at 1.3v would be more than enough, with that said a quick rearrange of the formula based on a 100 oh resistor and a Vf of 1.3v you would have about 37mA which should be enough.

however all this is speculation until you have the device in front of you to test it output, it would have to drive something high for the opto couple to be of use. Having a quick look thought the website I cant see anything obvious to indicate a voltage output, for all we know the eltima employs opto isolators itself and the trying to connect like that to your picaxe may well be useless.

Edit:
OK scratch that, found this one there web site
http://www.eltima-electronic.de/tl_files/eltima electronic/downloadarchiv/tipps und tricks/Schalten_von_induktiven_Lasten.pdf
on this page
http://www.eltima-electronic.de/index.php/driving_inductive_loads.html

should be able to drive the picaxe no issue providing the grounds are shared
 
Top