CHDK - what is possible? - General Discussion and Assistance - CHDK Forum

CHDK - what is possible?

  • 22 Replies
  • 8053 Views
CHDK - what is possible?
« on: 23 / February / 2014, 11:40:03 »
Advertisements
I want to use my micro controller (Atmega32 or similar) to remote control cams that use CHDK.
Does anybody know if there any similar projects to use a micro controller to trigger some actions on a CHDK based camera? I don't want to reinvent the wheel.
So the basic idea is to let the microcontroller create a pulse pattern for 8Bit transmission.
This could be high / low patterns or patterns with different pulse widths. (What is better?)
Then CHDK should translate this pulse pattern back into a complete byte. With one byte one can drive 256 different operations of the camera.
This is the basic rough idea, any support is highly appreciated.

What I want to do is to have a possibility to drive the camera completely by the micro controller.
I don't know if there are some limitations regarding what is possible.
E.g.:

1. Can I push any button by software on the camera using CHDK?

2. Can I change zoom, focus, shutter time, aperture, white balance, etc.?

3. Can I detect when a camera has finished focusing (when the small square turns to green)?

4. Can I move through the cameras menu? Play menu, Rec menu, Settings menu and change settings?

5. Can I read battery status?

6. For my special case I need to know if there is any possibility to disable the flash. I need to set the power of the flash to zero, or even better disable the flash so that it does not move out of the camera at all. Can I overwrite flash settings that was done in the cameras' menu? So if user switches the flash on, I need it to be off.
I heard about a trick in the past where the function 'bright screen' was used to turn off the flash?

7. What is not possible by CHDK, so I means things which must be done on the camera directly?

Thanks for any help.
2 x IXUS 860IS 100c
2 x Powershot S110 103a

Difference PTP and remote USB?
« Reply #1 on: 23 / February / 2014, 12:08:29 »
Hello,

can someone be so kind and explain:

1. What PTP exactly is and what is it for?

2. What is the difference between PTP and USB remote?


Thanks a lot!
 

2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: CHDK - what is possible?
« Reply #2 on: 23 / February / 2014, 12:09:18 »
I want to use my micro controller (Atmega32 or similar) to remote control cams that use CHDK.  Does anybody know if there any similar projects to use a micro controller to trigger some actions on a CHDK based camera? I don't want to reinvent the wheel.
There have been quite a few projects - many with threads on this forum - especially using raspberry pi's.

Here's an example :  http://chdk.wikia.com/wiki/Chdkptp_in_headless_linux_Dockstar_-_remote_control

Quote
So the basic idea is to let the microcontroller create a pulse pattern for 8Bit transmission. This could be high / low patterns or patterns with different pulse widths. (What is better?) Then CHDK should translate this pulse pattern back into a complete byte. With one byte one can drive 256 different operations of the camera. This is the basic rough idea, any support is highly appreciated.
Rudimentary support for this is already build-in to the two CHDK scripting languages. : http://chdk.wikia.com/wiki/USB_Remote#get_usb_power
although you mentioned in your other thread a desire to do it the hard way and code it C.   ;)

And as I mentioned in your other thread today,  you might want to try something more advanced and flexible using PTP communications if your microcontroller can act as a USB host.

Quote
What I want to do is to have a possibility to drive the camera completely by the micro controller.
I don't know if there are some limitations regarding what is possible.
E.g.:
Everything you mention wanting to do can be done from a CHDK Lua or uBASIC script.  So obviously you can hard code it in C as well.

Quote
I heard about a trick in the past where the function 'bright screen' was used to turn off the flash?
I think that's an SDM trick that actually works the other way around - turn on the flash to enable "bright screen".  Or something like that.

Quote
7. What is not possible by CHDK, so I means things which must be done on the camera directly?
You can navigate the Canon menus from a script, so anything done manually on the camera can be simulated that way.  One exception I can think of is where one of the camera buttons is not mapped in CHDK - but I don't know of an example.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Difference PTP and remote USB?
« Reply #3 on: 23 / February / 2014, 12:11:17 »
You might want to keep these questions to one thread?  Its a lot easier for us to follow things that way.

Here's a couple of links to things that should answer your questions :

http://chdk.wikia.com/wiki/USB_Remote

http://chdk.wikia.com/wiki/PTP_Extension

Ported :   A1200    SD940   G10    Powershot N    G16


Re: CHDK - what is possible?
« Reply #4 on: 23 / February / 2014, 12:13:52 »
Quote
You can navigate the Canon menus from a script,

Can I access a menu item directly by CHDK or have I to use the click-funktion to click up/down/left/right button to get where I want to? Can I access the main menus like settings, rec, play directly?

I can think of to integrate USB connection into my micro controller, but I don't know what exactly PTP is, what are it's benefits and what is the difference between PTP and classic way using USB remote, therefore I opened a new thread.
« Last Edit: 23 / February / 2014, 12:18:50 by mr.burns »
2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: CHDK - what is possible?
« Reply #5 on: 23 / February / 2014, 12:23:08 »
Can I access a menu item directly by CHDK or have I to use the click-funktion to click up/down/left/right button to get where I want to? Can I access the main menus like settings, rec, play directly?
You need to use click-functions to access the Canon menus.   CHDK menu items can be set directly from script code (or obviously from C code).

Quote
I can think of to integrate USB connection into my micro controller, but I don't know what exactly PTP is, what are it's benefits and what is the difference between PTP and classic way using USB remote, therefore I opened a new thread.
Fine .. but as I suggested,  multiple threads related to the same project quickly get confusing.  We have a lot of experience with that here but I won't link examples. 
Ported :   A1200    SD940   G10    Powershot N    G16

Re: CHDK - what is possible?
« Reply #6 on: 23 / February / 2014, 12:33:52 »
You might also be interested in this thread :  http://chdk.setepontos.com/index.php?topic=8714.0
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Difference PTP and remote USB?
« Reply #7 on: 23 / February / 2014, 12:52:09 »
Hi,

Quote
You might want to keep these questions to one thread?  Its a lot easier for us to follow things that way.

Sorry, but I thought exactly the opposite, so I created a new topic instead putting 'new' ideas in same thread.
But I know this for the future now ;-).

I read a little bit about PTP now, but have general questions.

1. Since I want to synchronize two cams for stereoscopic images, can I use PTP to shoot synchronized images as well as using the USB remote functions? The USB remote function triggers the measurement of the camera if I press the external USB button, then takes the picture if I release the USB button, can I do the same using PTP?
I mean can I do this by sending a PTP command to the camera using read_usb_msg / write_usb_message?

2. What is faster, using pulse patterns over USB and translate that pattern in CHDK to trigger an action or send a command per PTP to trigger an action?

3. I also don't know the effort to create one ore the other. For the USB option I have to develop code to read pulse patterns over USB and translate it into a byte code which finally triggers an action.
For PTP I have to do more effort on microcontroller side to make it able to deal with PTP. I don't know how much work this would be
2 x IXUS 860IS 100c
2 x Powershot S110 103a


Re: Difference PTP and remote USB?
« Reply #8 on: 23 / February / 2014, 13:23:01 »
1. Since I want to synchronize two cams for stereoscopic images, can I use PTP to shoot synchronized images as well as using the USB remote functions?
You will not get the same sync accuracy using PTP instead of the USB remote sync mode.  As a guess,  using PTP will likely involve sync differences greater than 50 mSec while CHDK USB remote sync can usually get to within 1 mSec.

Note that there is a forum thread about doing a hybrid PTP and USB remote interface.  Its buried in one of several threads the original poster started about the same project, so its hard to find.

Quote
The USB remote function triggers the measurement of the camera if I press the external USB button, then takes the picture if I release the USB button, can I do the same using PTP? I mean can I do this by sending a PTP command to the camera using read_usb_msg / write_usb_message?
Yes & yes.

Quote
2. What is faster, using pulse patterns over USB and translate that pattern in CHDK to trigger an action or send a command per PTP to trigger an action?
Sending a command to trigger an action will be faster.

Quote
3. I also don't know the effort to create one ore the other. For the USB option I have to develop code to read pulse patterns over USB and translate it into a byte code which finally triggers an action.  For PTP I have to do more effort on microcontroller side to make it able to deal with PTP. I don't know how much work this would be
Like I've mentioned before,  its only a couple of lines of script code to do what you want with either USB pulses or PTP packets.   If you want to work in C,  your learning curve will be a lot longer and the code more complex.  And on the microcontroller side,  sending pulses is almost certainly going to be less work that implementing PTP.

Update : found the thread I mentioned above :  http://chdk.setepontos.com/index.php?topic=8769.msg105488#msg105488   there are multiple references to actually implementing that hack but as I mentioned,  they are spread across multiple threads.
« Last Edit: 23 / February / 2014, 13:32:50 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Difference PTP and remote USB?
« Reply #9 on: 23 / February / 2014, 13:53:38 »
Hi,

OK to not confuse anybody, I will stop this topic here and continue discussion in my original thread:

http://chdk.setepontos.com/index.php?topic=11257.0
2 x IXUS 860IS 100c
2 x Powershot S110 103a

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal