I've been working with ND filters lately, and decided to explore the D20. The D20 uses the ND filter as an Aperture adjustment, so there are really only 2 apertures. The D20 automatically sets the ND filter IN or OUT based on the measured light level. All it has is "P" mode, so there's no way to manually set the Aperture (no Av mode).
To get the camera to switch the ND filter to IN, you can point it at a light bulb. Doing this zoomed out I get:
av96=387 for a low light scene
av96=579 pointed at a bright light bulb
So the ND filter density is 192, or 2 f-stops. For each zoom step, you can just add 192 to av96 if the ND filter is IN.
http://chdk.setepontos.com/index.php?topic=9722.msg100580#msg100580I looked at the log data mentioned in this post, and it looks like the ND filter was always OUT. set_nd_filter() doesn't work, because the camera just overrides it to set aperture.
Here's the script I used: The script takes a picture every time av96 changes. I looked at the pictures in play mode on the camera, and added the displayed Aperture to the log every time it changed.
--[[
@title Aperture Test
@param p Log File
@default p 1
--]]
function press_half()
press("shoot_half")
repeat sleep(10) until get_shooting()
end
function release_half()
release("shoot_half")
while(get_shooting())do sleep(10) end
end
print_screen(p)
print(os.date())
bi=get_buildinfo()
print("platform: ",bi.platform,bi.platsub)
nzoom=get_zoom_steps()-1
print("nzoom=",nzoom)
set_zoom_speed(100)
av0=0
repeat
for z=0,nzoom do
set_zoom(z)
press_half()
av=get_av96()
if(av~=av0)then
click("shoot_full_only")
av0=av
print()
end
release_half()
print(z,av,get_exp_count())
end
print("set repeats, menu exits")
wait_click()
until is_key("menu")
Here's the log data, with [added explanations]:
Tue Sep 24 19:16:04 2013
platform: d20 100b
nzoom= 128
[pointed at low light scene so ND filter is OUT]
[zoom step | av96 | IMG_xxxx | Displayed aperture (in play mode)]
0 387 748 [F3.9]
1 387 748
2 387 748
3 387 748
4 387 748
5 387 748
6 387 748
7 387 748
8 387 748
9 388 749
10 388 749
11 388 749
12 388 749
13 388 749
14 388 749
15 388 749
16 388 749
17 388 749
18 389 750
19 389 750
20 389 750
21 389 750
22 389 750
23 389 750
24 389 750
25 390 751
26 390 751
27 390 751
28 390 751
29 390 751
30 390 751
31 391 752
32 391 752
33 391 752
34 391 752
35 391 752
36 392 753
37 392 753
38 392 753
39 392 753
40 393 754
41 393 754
42 393 754
43 393 754
44 394 755
45 394 755
46 394 755
47 394 755
48 395 756
49 395 756
50 395 756
51 396 757
52 396 757
53 396 757
54 397 758
55 397 758
56 397 758
57 398 759
58 398 759
59 398 759
60 399 760
61 399 760
62 399 760
63 400 761 [F4.5]
64 400 761
65 401 762
66 401 762
67 401 762
68 402 763
69 402 763
70 403 764
71 403 764
72 404 765
73 404 765
74 405 766
75 405 766
76 406 767
77 406 767
78 407 768
79 407 768
80 408 769
81 408 769
82 409 770
83 409 770
84 410 771
85 410 771
86 411 772
87 411 772
88 412 773
89 413 774
90 413 774
91 414 775
92 415 776
93 415 776
94 416 777
95 416 777
96 417 778
97 418 779
98 418 779
99 419 780
100 420 781
101 420 781
102 421 782
103 422 783
104 422 783
105 423 784
106 424 785
107 425 786
108 425 786
109 426 787
110 427 788
111 428 789
112 428 789
113 429 790
114 430 791
115 431 792
116 431 792
117 432 793 [F5.0]
118 433 794
119 434 795
120 434 795
121 435 796
122 436 797
123 437 798
124 437 798
125 438 799
126 438 799
127 439 800
128 439 800
[Pointed at bright light bulb so ND filter is IN]
set repeats, menu exits
0 579 801 [F8.0]
1 579 801
2 579 801
3 579 801
4 579 801
5 579 801
6 579 801
7 579 801
8 579 801
9 580 802
10 580 802
11 580 802
12 580 802
13 580 802
14 580 802
15 580 802
16 580 802
17 580 802
18 581 803
19 581 803
20 581 803
21 581 803
22 581 803
23 581 803
24 581 803
25 582 804
26 582 804
27 582 804
28 582 804
29 582 804
30 582 804
31 583 805
32 583 805
33 583 805
34 583 805
35 583 805
36 584 806
37 584 806
38 584 806
39 584 806
40 585 807
41 585 807
42 585 807
43 585 807
44 586 808
45 586 808
46 586 808
47 586 808
48 587 809
49 587 809
50 587 809
51 588 810
52 588 810
53 588 810
54 589 811
55 589 811
56 589 811
57 590 812
58 590 812
59 590 812
60 591 813
61 591 813
62 591 813
63 592 814 [F9.0]
64 592 814
65 593 815
66 593 815
67 593 815
68 594 816
69 594 816
70 595 817
71 595 817
72 596 818
73 596 818
74 597 819
75 597 819
76 598 820
77 598 820
78 599 821
79 599 821
80 600 822
81 600 822
82 601 823
83 601 823
84 602 824
85 602 824
86 603 825
87 603 825
88 604 826
89 605 827
90 605 827
91 606 828
92 607 829
93 607 829
94 608 830
95 608 830
96 609 831
97 610 832
98 610 832
99 611 833
100 612 834
101 612 834
102 613 835
103 614 836
104 614 836
105 615 837
106 616 838
107 617 839
108 617 839
109 618 840
110 619 841
111 620 842
112 620 842
113 621 843
114 622 844
115 623 845
116 623 845
117 624 846 [F10]
118 625 847
119 626 848
120 626 848
121 627 849
122 628 850
123 629 851
124 629 851
125 630 852
126 630 852
127 631 853
128 631 853
set repeats, menu exits
*** FINISHED ***
Here's the current aperture table in shooting.c for D20:
//TO DO: Is this right? http://chdk.setepontos.com/index.php?topic=9722.msg100580#msg100580
const ApertureSize aperture_sizes_table[] = {
{ 9, 387, "3.9" },
{ 10, 399, "3.9" },
{ 11, 431, "4.5" },
{ 12, 439, "5.0" },
{ 13, 575, "8.0" },
{ 14, 600, "9.0" },
{ 15, 618, "10.0" },
};
I don't think these table values are correct. Maybe reyalp can help me understand where the table comes from? This is reyalp's table from the D10:
// These F-numbers are the "mock" values shown by the cam.
// They're linked to FL (zoom) and ND filter.
// aperture_sizes_table[].id is just a serial number.
const ApertureSize aperture_sizes_table[] = { // PROPCASE 23
{ 9, 292, "2.8" }, // zoom 1.0
{ 10, 308, "3.2" }, // zoom 1.2
{ 11, 326, "3.2" }, // etc.
{ 12, 348, "3.5" },
{ 13, 375, "4.0" },
{ 14, 409, "4.5" },
{ 15, 449, "4.9" },
// The rest are the same physical apertures as above, but with ND:
{ 16, 575, "8.0" },
{ 17, 591, "9.0" },
{ 18, 609, "9.0" },
{ 19, 631, "10.0" },
{ 20, 658, "11.0" },
{ 21, 692, "13.0" },
{ 22, 732, "14.0" },
};