CHDK firmware hack discussion (11)

Started Jun 9, 2007 | Discussions
microfunguy Regular Member • Posts: 234
Re: Distance numbers

I tried a little experiment today that might help Richard's investigation of the lens-focusing model.

ALT+DISPLAY now gives you access to four focusing modes, depending on the menu setting.

They are focus to infinity, focus to hyperfocal distance, focus to manually-entered distance and increase current distance by a 'chunk'.

Basically, the increment that you change distance by is increased until CHDK reports the distance has indeed changed.

Very rough values of the 'chunk' for the A620 7.3mm are :-

distance chunk

62 - 170 1mm
300 5mm
400 9mm
600 25mm
700 40mm
800 46mm
1500 200mm
3500 1200mm
4700 2200mm
7900 black screen, camera 'hung'.

David

zdravko Junior Member • Posts: 48
Re: CHDK firmware hack discussion (11)

I have created the sequel thread, because this one will get full in about 8 posts. Here is the link to the new thread (12):

http://forums.dpreview.com/forums/readflat.asp?forum=1010&thread=23643715

OP donmorris Regular Member • Posts: 155
Re: documentation for distributed scripts

Russel_Sprouts wrote:

CHDK is BIG NEWS and the userbase is certain to keep growing.
We need our own an english-language forum, with:
-- separate threads for each individual script
-- ability to distribute ready-to-run .bas files as post attachments
-- benefit of having the availability of a private messaging system

There's an established Powershot user forum, running vBulletin, here:
http://forums.canonphotogroup.com
If someone inquired, I expect the sysop would add a CHDK subforum
(or even a section, of multiple subforums) for us.

OR,
http://photography-on-the.net/forum/

It appears to have many more users.
Canon Digital Photography Forums Statistics
Threads: 327,359, Posts: 3,354,932, Members: 106,498
Don

rlx
rlx Senior Member • Posts: 1,365
Re: Distance numbers

microfunguy wrote:

ALT+DISPLAY now gives you access to four focusing modes, depending
on the menu setting.

I guess that this works on you own version of the CHDK and not on GrAnd's.
I will be happy to try it if you let me know how I can get a copy.

Very rough values of the 'chunk' for the A620 7.3mm are :-

David

I have tried my model ( movement of the lens (x) = a0 + a1/s with 's'
being the distance number and 'a1' a number around f^2) on your numbers
and that tells me that the lens moves by steps roughly 5 microns (0.001mm)
each.

Vitaly has confirmed to me that the focusing is driven by a stepping motor
on the A610.

'There's a "dead end" sensor so camera knows that this
particuliar lens position is the one that is most close to the
sensor.'

Vitaly assumes that the camera autocalibrates by associating a distance
number to the stopper position. I assume that that number is 63535.

Changing the subject slightly, I loaded the following script to see how
the distance numbers on the camera change after setting the focus. I run
the script while I am in manual focus mode.

rem Sets focus directly

@title Set focus
@param a Focus value
@default a 1000

set_focus a

end

The result is that ODS/misc/F changes to 1020 but the PropertyCase 65 does not
move at all, and I am a bit puzzled. Any idea?

Richard

Richard
the stopper.

Russel_Sprouts Regular Member • Posts: 300
Re: documentation for distributed scripts

donmorris wrote:

OR,
http://photography-on-the.net/forum/

It appears to have many more users.

Thanks, Don.
I think POTN has the best & biggest "macro" forum...
(FWIW, there are also many Flickr.com macro discussions)

...and I visit the POTN site weekly, but the "Canon small cameras forum" is a tiny minority of the "big numbers" in the statistics you quoted. There was a CHDK thread there; after about 100 posts across 6 weeks or so, it has petered out.

microfunguy Regular Member • Posts: 234
Re: Distance numbers

rlx wrote:

I will be happy to try it if you let me know how I can get a copy.

Just spellout a suitable email address.

I have sent final version based on changeset 171 to the person with the website but have disabled the focus-incrementing.
I will enable it on yours.

Vitaly has confirmed to me that the focusing is driven by a stepping
motor

These are beautiful little mechanisms driving a leadscrew and fitted with position and rotation sensors.

The mechanism is delicate and if you hinder it's movement you get an E18 message and power-down without lens retraction.

The result is that ODS/misc/F changes to 1020 but the PropertyCase
65 does not
move at all, and I am a bit puzzled. Any idea?

Afraid not.

I know from studying your code that you know far more about programming than I do ............ honestly

The lenses on these cameras are such a short focal-length that the tiniest linear movement gives a large step to the next focused position in object-space.

Of course, you have assumed a single thin lens moving in a simple linear fashion.

We don't know if those assumptions are justified.

What may be of practical use, is to use the new feature to move the lens to a certain position and then find-out what distance it really corresponds to by using magnified centre of screen and moving subject.

That should be very repeatable, it only depends on the precision of the stepper and leadscrew not some easily-fooled autofocus system.

David

GrAnd Regular Member • Posts: 325
Build #129

Build #129

+ uBasic: Added commands - "wait_click" and "is_key". To be able to write interactive scripts. The usage as the following:

-- hide signature --

rem Key tester

@title Key tester

:loop
wait_click

is_key k "left"
if k=1 then gosub "k_left"
is_key k "right"
if k=1 then gosub "k_right"
is_key k "up"
if k=1 then gosub "k_up"
is_key k "down"
if k=1 then gosub "k_down"
is_key k "set"
if k=1 then gosub "k_set"
is_key k "shoot_half"
if k=1 then gosub "k_end"
goto "loop"

:k_left
print "Pressed 'left'"
return

:k_right
print "Pressed 'right'"
return

:k_up
print "Pressed 'up'"
return

:k_down
print "Pressed 'down'"
return

:k_set
print "Pressed 'set'"
return

:k_end
print "Pressed 'shoot_half'"
end

rlx
rlx Senior Member • Posts: 1,365
Re: Build #129

Andrei,

Very good addition.

Shifting subject, I find that I sometimes loose the CHDK settings. I don't
know if the config file becomes corrupted. I noticed that the date of the
config file is sometimes 1/01/00 and sometimes the correct one.

Then I have a hard time reentering all my settings: I enter them, then turn the
camera off, then turn it back on again and none of my changes were registered.
After doing it a number of times, I finally get a config file with all my
settings.

Of course I made a backup copy of my settings yesterday so I don't have to go
through this again.

One reason I would be the only one having this problem may
be that I am compiling my own copy and maybe my cross compiler setting
is not correct (I have been using this for a number of months though).

Richard

Marty Too Senior Member • Posts: 1,219
RAW update?

Andre,

Is there a new RAW implementation? I took a few test shots this morning and the RAW seemed absolutely great (or grand if you wish).

I did notice something that others might want to comment on. I saw purple fringing in the Cam2PC browser that was not present with Picasa and the Gimp.

Fragglerock Forum Member • Posts: 68
Re: RAW update?

Hi all,

The last post !
Just a simple question. I convert all my RAW to DNG.
Since the beginning of the hack i keep all my originals RAW (CRW_XXX.JPG).
Now it began to be very heavy in my hard drive.

Do you think it's usefull keep them or i just need to keep DNG ?

Thanks

Keyboard shortcuts:
FForum MMy threads