Ideas for outputting "script finished" signal to external microcontroller? - Script Writing - CHDK Forum

Ideas for outputting "script finished" signal to external microcontroller?

  • 5 Replies
  • 2085 Views
Advertisements
Hi all,

I am using a home made time lapse panning head which is constructed around a microcontroller (arduino) and a stepper motor.  Thanks to the brilliant work of several forum members (fudgey, fbonomi, outslider, ...) I am getting some reasonable results (from an engineering standpoint if not a artistic one) using a bracketed variable Tv script.  Unfortunately at the moment my frame rate is quite limited.  I have to be careful to give the camera time to finish the bracketed sequence before the arduino commences the next move, shoot sequence.  Ideally I would like the camera to be able to tell the microcontroller that the script has finished.

I can think of a few ugly solutions, for example using an ldr to detect that a viewfinder led has been switched on.  However, is there anything else I could do?  Perhaps by monitoring pins on the usb port?

Yours hopefully,

Colin

*

Offline srsa_4c

  • ******
  • 4229
Re: Ideas for outputting "script finished" signal to external microcontroller?
« Reply #1 on: 01 / February / 2013, 10:19:25 »
Hi,

some ideas:
- you could use the AF LED (if you don't need it for your application), disable it in the Canon menu then control it from the script.
- you could experiment with the play_sound script command.

The USB port pins can't be used for output (we can't control the data lines directly).

Re: Ideas for outputting "script finished" signal to external microcontroller?
« Reply #2 on: 01 / February / 2013, 10:24:30 »
The USB port pins can't be used for output (we can't control the data lines directly).
Would the write_usb_msg() call make something happen on the USB pins or is there a connection sequence of some sort that has to happen first?  If so,  is that triggered by +5V input on the power pins and could you fake that out?   I assume at some point you could hack low enough in the code to create some activity on the data pins (as you are only looking for the first edge, the content would not matter).  Unless the USB controller chip needs to be connected to another controller chip before it will talk. 

I guess the question is how much work that would be vs just rigging up a photocell/phototransitor against the lens of one of the camera's LED ?


« Last Edit: 01 / February / 2013, 10:33:13 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4229
Re: Ideas for outputting "script finished" signal to external microcontroller?
« Reply #3 on: 01 / February / 2013, 10:42:25 »
Would the write_usb_msg() call make something happen on the USB pins or is there a connection sequence of some sort that has to happen first?
It needs an active PTP connection, so it's out of the question for an Arduino.
Quote
I guess the question is how much work that would be vs just rigging up a photocell/phototransitor against the lens of one of the camera's LED ?
Reverse engineering the DIGIC USB hw (or its driver) can take some time  ;)


Re: Ideas for outputting "script finished" signal to external microcontroller?
« Reply #4 on: 01 / February / 2013, 10:49:14 »
There are some SDM users who take fast-action sequences from a camera mounted on a model aircraft and flying in a straight line.

The AF led is pulsed to indicate to a microcontroller that an image has been captured.

Works fine, even in the bright sunlight of Tahiti.


David

*

Offline lapser

  • *****
  • 1093
Re: Ideas for outputting "script finished" signal to external microcontroller?
« Reply #5 on: 01 / February / 2013, 14:32:18 »
What script are you using for bracketing? How many bracketing shots are you taking? What interval between panning steps are you looking for?

http://chdk.setepontos.com/index.php?topic=9188.msg95599#msg95599

We were able to get some of the changes I'm making for time lapses in continuous mode to sync via usb. I think it could do 3 bracketing shots in 2 seconds. Would that be fast enough for you? I assume you're doing exposure bracketing with shutter speed in good light?
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

 

Related Topics