1. ハードウェア 2. ファームウェア 3. 下準備と使い方 4. まとめ |
1.ハードウェア
- (1)はじめに
- ハードウェアは、ウガンダで使った縦位置グリップの改造品を使います。
先に適当に作ったコンテンツはあるのですが、ダブりつつ再度掲載することとします。
- (2)回路図
- (3)部品配置図
- (4)実際のところ・・・
2. ファームウェア
- (ア) フローチャートと実際に動かしてみて
- 多段階露光は1シーケンス17秒ほどでした。継続時間は147秒なので、8回多段階露光出来ることになります。タイムチャートは以下のようになります。
- (イ) 注意点
- MPLAB X IDEのXC8コンパイラでは、delay_ms, delay_us関数がなく、delay関数のみとなりました。以下のソースではdelay関数は従来のdelay_us関数と同じに使えています。
- (ウ) ソースリスト
- ダウンロードはCameraCtrl.c へのリンク
ソースリストは最下部にあります。
3. 下準備と使い方
(1) D600のシャッター速度を1/500secに、感度をISO100に、CLモードでの連写速度を2コマ毎秒で設定
(2) 皆既10秒前のタイムスタンプでコントローラースイッチを一回押す
(3) 最初の12秒間秒2コマで連写し、のち多段階露出を8セット行う。のち再度20秒連写するシーケンス
4. まとめ
ウガンダで使ったハードウェアを使うため、実際のところはファームウェアを組んだにすぎません。ただしシャッター速度のダイヤルスイッチをエミュレートする時間に余裕を持たせることができるようになったため、ほぼ確実に指定した速度で撮像できるようになりました。皆既継続時間が十分にあって厳しくないので可能になったことです。
ただ、機材をシェイクダウンし、欠けていく過程をバーダーアストロソーラーフィルターを通して撮像するときのシャッター速度とシーケンサを動かし始めて連写をしているときのシャッター速度が同一かどうかは調べておく必要があります。異なると判断した場合は、シーケンサのプログラムに連写前、シャッター速度を増or減速させるルーチンを組む必要があります。
CameraCtrl.c |
1 /* 2 *File:CameraCtrl.c 3 *Author:shin 4 * 5 *Createdon2014/06/27,21:48 6 */ 7 8 #include<stdio.h> 9 #include<stdlib.h> 10 #include<xc.h> 11 #define _XTAL_FREQ 1000000; 12 13 14 /*****Configuration********/ 15 #pragma config FOSC=INTOSCIO, WDTE=OFF, PWRTE=ON, BOREN=ON, MCLRE=OFF, CP=OFF, IESO=OFF//, FCMEN=OFF; 16 17 int i,j,k; 18 int Time = 147; 19 20 21 22 int main(void){ 23 24 //OSCCON = 0x40; //set1MHz 25 ANSEL=0x00; //alldigital 26 CMCON0=0x07; //Comperlator off 27 WPU=0x14; //set pull up bit on 28 nGPPU=0; //pull up activate 29 TRISIO0=0; //GP1 output 30 TRISIO1=0; //GP2 output 31 TRISIO2=0; //GP3 output 32 TRISIO3=1; //GP4 input 33 TRISIO4=0; //GP5 output 34 TRISIO5=0; //GP6 output 35 while(1){ //All out off 36 GP0 = 1; //Speed down 37 GP1 = 1; //Shutter 38 GP2 = 1; //Speed up 39 GP4 = 1; //Focus 40 if(GP3 == 0){ 41 _delay(250000); //wait 42 GP4 = 0; //Focus on 43 _delay(250000); //wait 44 GP1 = 0; //Shutter release 45 _delay(11500000); //wait 12sec 46 GP1 = 1; //Shutter off 47 _delay(25000); //wait 48 GP4 = 1; //Focus off 49 _delay(25000); //wait 50 GP2 = 0; //Preconfig. 51 _delay(25000); //wait 52 for(j=1;j<=5;j++){ //Speed up from 1/500 to 1/4000+alpha 53 GP0 = 0; 54 _delay(25000); 55 GP0 = 1; 56 _delay(25000); 57 } 58 GP2=1; 59 60 61 Start: 62 63 GP2 = 1; 64 for(i=1; i<=7; i++){ //1/4000-1/60sec 65 _delay(20000); 66 GP4 = 0; //Focus on 67 _delay(20000); //wait 68 GP1 = 0; //Shutter release 69 _delay(30000); //wait 70 GP1 = 1; //Shutter off 71 _delay(20000); //wait 72 GP4 = 1; //Focus off 73 _delay(900000); //wait 900ms 74 GP0 = 0; //Preconfig. 75 _delay(25000); //wait 76 for(j=1; j<=2; j++){ //Speed Down 77 GP2 = 0; 78 _delay(25000); 79 GP2 = 1; 80 _delay(25000); 81 } 82 GP0 = 1; 83 //_delay(25000); 84 } 85 for(i=1; i<=5; i++){ //1/30-1/2sec 86 _delay(20000); 87 GP4 = 0; //Focus on 88 _delay(20000); //wait 89 GP1 = 0; //Shutter release 90 _delay(30000); //wait 91 GP1 = 1; //Shutter off 92 _delay(20000); //wait 93 GP4 = 1; //Focus off 94 _delay(1200000); //wait 1200ms 95 GP0 = 0; //Preconfig. 96 _delay(25000); //wait 97 for(j=1; j<=2; j++){ //Speed Down 98 GP2 = 0; 99 _delay(25000); 100 GP2 = 1; 101 _delay(25000); 102 } 103 GP0 = 1; //Preconfig. 104 //_delay(25000); //wait 105 } 106 107 for(i=1; i<=2; i++){ //1sec x2 shot 108 _delay(20000); 109 GP4 = 0; //Focus on 110 _delay(20000); //wait 111 GP1 = 0; //Shutter release 112 _delay(30000); //wait 113 GP1 = 1; //Shutter off 114 _delay(20000); //wait 115 GP4 = 1; //Focus off 116 _delay(1500000); //wait 1500ms 117 118 } 119 120 for(i=1; i<=5; i++){ //1/2-1/30sec 121 _delay(25000); 122 GP2 = 0; 123 _delay(25000); 124 for(j=1; j<=2; j++){ //Speed Down 125 GP0 = 0; 126 _delay(25000); 127 GP0 = 1; 128 _delay(25000); 129 } 130 GP2 = 1; 131 _delay(20000); 132 GP4 = 0; //Focus on 133 _delay(20000); //wait 134 GP1 = 0; //Shutter release 135 _delay(30000); //wait 136 GP1 = 1; //Shutter off 137 _delay(20000); //wait 138 GP4 = 1; //Focus off 139 _delay(1200000); //wait 1200ms 140 } 141 for(i=1; i<=7; i++){ //1/60-1/4000sec 142 _delay(25000); 143 GP2 = 0; 144 _delay(25000); 145 for(j=1; j<=2; j++){ //Speed Down 146 GP0 = 0; 147 _delay(25000); 148 GP0 = 1; 149 _delay(25000); 150 } 151 GP2=1; 152 _delay(20000); 153 GP4 = 0; //Focus on 154 _delay(20000); //waits 155 GP1 = 0; //Shutter release 156 _delay(30000); //wait 157 GP1 = 1; //Shutter off 158 _delay(20000); //wait 159 GP4 = 1; //Focus off 160 _delay(900000); //wait 900ms 161 } 162 for(i=1; i<=3; i++){ //1/250-1/4000sec 163 GP2 = 0; 164 _delay(25000); 165 for(j=1; j<=3; j++){ //Speed Down 166 GP0 = 0; 167 _delay(25000); 168 GP0 = 1; 169 _delay(25000); 170 } 171 GP2 = 1; 172 _delay(25000); 173 } 174 _delay(1200000); 175 k++; 176 if(k>=4){ 177 goto Multi; 178 } 179 goto Start; 180 } 181 } 182 Multi: 183 _delay(25000); 184 GP0 = 0; //Preconfig. 185 _delay(25000); //wait 250ms 186 for(j=1; j<=6; j++){ //Speed Down 187 GP2 = 0; 188 _delay(25000); 189 GP2 = 1; 190 _delay(25000); 191 } 192 GP0 = 1; 193 _delay(25000); 194 GP4 = 0; //Focus on 195 _delay(25000); //wait 196 GP1 = 0; //Shutter release 197 _delay(20000000); //wait 20sec 198 GP1 = 1; //Shutter off 199 _delay(25000); //wait 200 GP4 = 1; //Focus off 201 _delay(25000); //wait 202 } 203 //return(); 204