New to CHDK thus some help is needed - Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes) - CHDK Forum  

New to CHDK thus some help is needed

  • 4 Replies
  • 1485 Views
New to CHDK thus some help is needed
« on: 14 / October / 2012, 09:17:31 »
Advertisements
Hi.  :)
First of all thank you all in advance for creating CHDK which is excellent and very very useful.
Now i do have a question about the remote control zoom function.
I just installed CHDK to my SX230HS and although the wiki was very helpful in achieving this
i found it hard to understand how the zoom mode remote control works.
I have tested the usb port with a simple switch and it works fine so i went ahead to write
some code for an AVR cpu in order to interface the camera to I2C bus but i don't know
what duration in milliseconds the pulses need to be in order to count as separate pulses and what
the separation in milliseconds must be between the pulses for the zoom control.
For example if i want to shoot a picture in zoom mode the wiki page http://chdk.wikia.com/wiki/USB_Remote
states that:
The following action happens for the listed pulse counts.
 1   press = zoom in
 2   press = zoom out,
 3   press = full press
 4   press = shoot ( sync action = )
 5   press = full zoom out
 6   press = full zoom in
so i need to create 4 pulses for shooting of ?ms each with a ?ms separation between them.
Also how long do i have to wait in order to give the next command (relaxation time)?
Does "switch type" need to be set to a specific mode?
What is the  "Pulse Count input mode " and how is it activated?
Thank you in advance for your time took to read this.
Chris



Re: New to CHDK thus some help is needed
« Reply #1 on: 14 / October / 2012, 10:57:08 »
I just installed CHDK to my SX230HS and although the wiki was very helpful in achieving this
i found it hard to understand how the zoom mode remote control works.
The zoom code was something I put in for fun - in part because the old code had a zoom function (that was almost impossible to use).   One request I had expected but not heard so far was to make the code work better for megazoom cameras - one step at a time takes a long time when there are 120 zoom steps.  The new code is very modular so adding a megazoom module will not be hard when the time comes.

I also updated the wiki page based on your feedback here - thanks !

Quote
I have tested the usb port with a simple switch and it works fine so i went ahead to write
some code for an AVR cpu in order to interface the camera to I2C bus but i don't know
what duration in milliseconds the pulses need to be in order to count as separate pulses and what
the separation in milliseconds must be between the pulses for the zoom control.
The pulse counting logic considers any activation of the USB port to 5V for greater than 100mSec to be a valid pulse. Minimum timing of spaces between pulses is not really specified but needs to be greater than 50mSec to ensure that the code notices it.   When counting pulses, a 500 mSecond period of the USB voltage at 0V indicates the end of the counting period and the total count at that point is made available.

Quote
For example ..
... so i need to create 4 pulses for shooting of ?ms each with a ?ms separation between them.
..  100 ms with a 60 ms seperation ...

Quote
Also how long do i have to wait in order to give the next command (relaxation time)?
1/2 second

Quote
Does "switch type" need to be set to a specific mode?
Doesn't matter - leave it at none.

Quote
What is the  "Pulse Count input mode " and how is it activated?
Sorry - obsolete documentation.  I actually wrote that page before I started coding and I guess I missed something that changed during the coding process.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: New to CHDK thus some help is needed
« Reply #2 on: 14 / October / 2012, 11:33:14 »
Hi.
I was re reading the wiki in case i missed something and suddenly i saw all the information i need...
Your post is very clear and helpful THANK YOU VERY MUCH!
One last question, since the SX230HS has a 14x zoom i guess is it considered a megazoom camera?
If it is that means that i actually need 120 zoom in commands for a full zoom?
Is there any way i can find how many zoom steps my camera has?
I guess that using a script that counts the pulse duration can override this limitation so i better start reading  :)
Chris

« Last Edit: 14 / October / 2012, 11:41:13 by hendrix »

Re: New to CHDK thus some help is needed
« Reply #3 on: 14 / October / 2012, 11:55:11 »
I was re reading the wiki in case i missed something and suddenly i saw all the information i need...
I edited it.

Quote
One last question, since the SX230HS has a 14x zoom i guess is it considered a megazoom camera?
If it is that means that i actually need 120 zoom in commands for a full zoom?
No - you can use the set_zoom and set_zoom_rel commands in your script to go to an absolute position.  How you translate from pulse counts (or pulse width!) to that is up to you.

Quote
I guess that using a script that counts the pulse duration can override this limitation so i better start reading
Yup.  You might consider using pulse width modulation rather than pulse counts if that makes things smoother in your code ?
Ported :   A1200    SD940   G10    Powershot N    G16


Re: New to CHDK thus some help is needed
« Reply #4 on: 14 / October / 2012, 12:07:13 »
Excellent, thank you very much for your patience with my questions  :)
I will try both methods since the code needed to interface the I2C to pulse(s) is essentially the same.
Chris

 

Related Topics