Pic Driven Camera Shutter Delay

Thread Starter

merc07

Joined May 6, 2009
17
I have now built the above to try and get 2 different cameras with different shutter lags to release at exactly the same time and ultimately share 1 external flash. I need about 33 milliseconds delay.

I have written the code and built the timer module and display that delays the output for 0 to 99.99 milliseconds before releasing the shutter of the camera.

I am using a wireless transmitter. The fast camera has the receiver connected to the PIC 16F690 via a LOW input, then via a HIGH output through a 270 ohm resistor, it switches an optocoupler (4N25) to release the shutter.

The slow camera has the receiver plugged straight into its remote socket.

I am using the supply from the receiver, 3v to run the whole system.

The problem I have is that even with the delay on the PIC turned off it is delaying the output by about 83 milliseconds. I know this as I took a picture of a digital stopwatch on screen that runs in milliseconds. The difference was 47ms + the original lag makes about 83 ms.

It can't be from the PIC programming side as I took out all the code untill I had a 3 line loop that is just waiting for an input - this gave the same result. I even doubled the clock speed - no difference. It must be either the speed of the optocouplers or the time it takes to see the LOW from the receiver ?

I am no expert in electronics, I just pick up ideas from sites like these.

Any ideas where this delay might be or does this sound normal ?

Cheers
Adam
 

bertus

Joined Apr 5, 2008
22,277
Hello,

There is a smal delay in the optocoupler.
This has to do with building up charges inside.



This delay is dependend on the load resistance.
In the graph it is upto 1 mS.
Do you have a load resistance?

Greetings,
Bertus
 

Attachments

Thread Starter

merc07

Joined May 6, 2009
17
The opto pins are

1 PIC High output via 270 ohm
2 Ground
4 Camera Common
5 Camera Shutter or Expose

See pic below. It shows the inards or a Canon EOS SLR with it's focus/shutter button and a remote focus/shutter button. There is a resistor in the camera but I have no idea what it is. I don't have one in my circuit.

Thanks
Adam



 

bertus

Joined Apr 5, 2008
22,277
Hello,

I think the current through the transistor of the optocoupler is to low.
Did you also try other optocouplers?
Did they react the same?
You could try a optocoupler with a fet as output, like the h11f1.
(see datasheet)

Greetings,
Bertus
 

Attachments

Thread Starter

merc07

Joined May 6, 2009
17
I'll see if I can get some of the FET type and give them ago.

I haven't tried any others, I found a circuit that was using a 4n26 to set off a camera - not a critical timing circuit, so I assumed these would be ok.

Would I need the same 270 ohm resistor on the input when using 3v on the FET type. Not really sure how you work out the value ?

Thanks,
Adam
 

bertus

Joined Apr 5, 2008
22,277
Hello,

The resistor needed in series with the led is dependend on the output voltage of the pic and the voltage accross the led and the current wanted through the led.
Example:
Pic output voltage 5 Volts.
Led voltage drop 1.2 Volts (typical for IR led, see also datasheet).
Current wanted 15 mA ( the pic can deliver a max of 20 mA, so 15 mA is safe).
R = (pic output voltage - led voltage drop) / wanted current
R = (5 - 1.2) / 0.015 = 253.33 Ohms.
The nearest higher E-series value is 270 Ohms.

Greetings,
Bertus
 

hgmjr

Joined Jan 28, 2005
9,027
Can you post the schematic of your circuit complete with the opto-isolator that you are currently using?

hgmjr
 

CDRIVE

Joined Jul 1, 2008
2,219
The opto pins are

1 PIC High output via 270 ohm
2 Ground
4 Camera Common
5 Camera Shutter or Expose

See pic below. It shows the inards or a Canon EOS SLR with it's focus/shutter button and a remote focus/shutter button. There is a resistor in the camera but I have no idea what it is. I don't have one in my circuit.

Thanks
Adam



You can use the Black Box method to find the values of those internal resistors. One method would be to use your DVM on the current scale and measure the current from the switch contact to GND. This will return Rx= (E/I).
 

hgmjr

Joined Jan 28, 2005
9,027
One of the factors that governs the switching speed of opto-isolators is Vce of the phototransistor. When the phototransistor is connected up as a common-emitter or common-collector, the Vce changes as the phototransistor is alternately driven in and out of saturation.

There is a means of avoiding the saturation by introducing a current mirror. This circuit holds the voltage across the phototransistor virtually constant while the current developed in the phototransistor is mirrored over to the output transistor. There is an inversion that results so hopefully you and accommodate that in the PIC.

hgmjr
 

bertus

Joined Apr 5, 2008
22,277
Hello,

Is your pic is running at 3 Volts?
Then the current through the leds is to low.
Change the resistors from 270 to 120 Ohms and see what is happening.
The H11F1M is ok to try, but try the other resistors first.

Greetings,
Bertus
 

Thread Starter

merc07

Joined May 6, 2009
17
Originally it was running on 5 volts from the usb power of the pic programmer, that is why I had 270 ohms. After you told me how to work out the required value, I actually changed it to 150 ohms - 12 ma.

This made no difference to the lag time.

I have come to the conclusion that it is going to be virtually impossible to get them to sync at exactly the same time to share a flash just 1 ms in duration. I think the easiest way would be to have radio flash triggers on both cameras with one receiver on the flash. I could then use my delay system to delay the slow camera just enough time for the flash to be ready and the first camera to have finished. This would be a minimum of 8 milliseconds (1/125) - probably alot longer

I still need to get the delay on the output sorted. I'll try other Optocouplers next week.

HGMJR - can you give me an example on my circuit how I could implement 'current mirror', I looked at the link but to be honest it's a bit over my head

Cheers
Adam
 

hgmjr

Joined Jan 28, 2005
9,027
HGMJR - can you give me an example on my circuit how I could implement 'current mirror', I looked at the link but to be honest it's a bit over my head

Cheers
Adam
Now that I have seen your schematic, I don't think my suggestion is valid for your particular application.

I do wonder if there is a possibility that your connection of the phototransistor into your triggered device is proper. The phototransistor is an NPN type so you would want to make sure that the collector is connected to the most positive input terminal of your triggered device and the emitter is connected to the most negative terminal of the triggered device. You could check the polarity of the terminals of your triggered device by measuring the voltage across the open input terminals of the triggered device with a voltmeter.

hgmjr
 

CDRIVE

Joined Jul 1, 2008
2,219
You know 83mS of unexplained delay is a very, very long time. I can't imagine a large collector resistor causing that kind of delay. Are you sure there's no capacitor in the circuit somewhere? It's either that or maybe something is mis-wired.
 

Thread Starter

merc07

Joined May 6, 2009
17
I checked the 4n25 wiring, it is correct.
Yes, I agree, 85ms is a very long 'lost time'
I have found a better way to chek the delay using an audio program to record the sound of the shutter button and then the shutter itself . You can then see the time difference.
This way I can see the individual camera delays rather than the difference between them.I'll give it a go tomorrow.
CheersAdam
 

Thread Starter

merc07

Joined May 6, 2009
17
Well, got it all running in the end, by having a complete rethink. Instead of trying to get both cameras to sync together and use the same flash which I found was virtually impossible, I now run them with a set delay of around 150ms and let them use the radio remote flashes as they need them.

Using 3x 4n25 optos, the pic sets off the focus, then the shutter, changes the transmitter channel to the 2nd receiver, then sets off the focus and shutter again. I am using a 4 line LCD (HD44780) that enables me to set the number of cameras - 1 or 2, delay between cameras, shooting interval and TX pulse value. All fits nicely on a double sided board the same size as the LCD and with a PICkit2 connector on the back for programming.

Cheers
Adam
 

GetDeviceInfo

Joined Jun 7, 2009
2,196
Sounds like a similar project that I've been working on. Using the USB port, I select different shutter speeds / arpeture settings, and fire the cameras (4) using time delays based on object velocity. The original project was 'always on', but now I've been implementing various triggers to sense approach (turn on), and beam trips to resolve velocity and position, to fire shutters. Canon does not publish thier USB command protocol, but there is enough reverse hacking on the web to fully command those models that employ remote capture.
 
Top