KAP & UAV Exposure Control Intervalometer Script - page 49 - Completed and Working Scripts - CHDK Forum supplierdeeply

KAP & UAV Exposure Control Intervalometer Script

  • 1068 Replies
  • 410886 Views
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #480 on: 20 / June / 2015, 16:47:57 »
Advertisements
both KAP and ROMLOG are attached.
The ROMLOG shows that the last crash was on June 12th.  The dates in your KAP log are correct (i.e today's date) so the ROMLOG is old.  Meaning that whatever else is happening,  its not CHDK crashing the camera.

Meanwhile. the last sequence in your ROMLOG shows a perfect run :

2015Jun20 20:20:56    KAP 3.6 started - press MENU to exit
2015Jun20 20:20:56    CHDK 1.3.0-4132 s110 102b Mar 31 2015
2015Jun20 20:20:56    Mode:PLAY,Continuous_AF:0,Servo_AF:0
2015Jun20 20:20:56     Tv:1/1000 max:1/2000 min:10 ecomp:0.0
2015Jun20 20:20:56     Av:4.0 minAv:2.8 maxAv:8.0
2015Jun20 20:20:56     ISOmin:100 ISO1:400 ISO2:800 M:800
2015Jun20 20:20:56     Focus:MF  Video:0 USB:3 Tmo:0
2015Jun20 20:20:56     AvM:3 int:0 Shts:0 Dly:0 B/L:0
2015Jun20 20:20:56    Warning : camera ISO not in AUTO mode
2015Jun20 20:20:57    waiting on USB signal
2015Jun20 20:21:09    USB start signal received
2015Jun20 20:21:12    Mode switched to M
2015Jun20 20:21:15    Loggger : log file updated.
2015Jun20 20:21:16.620 1) IMG_0226.JPG
2015Jun20 20:21:17.980 2) IMG_0227.JPG
2015Jun20 20:21:19.070 3) IMG_0228.JPG
2015Jun20 20:21:20.160 4) IMG_0229.JPG
2015Jun20 20:21:21.260 5) IMG_0230.JPG
2015Jun20 20:21:22.360 6) IMG_0231.JPG
2015Jun20 20:21:23.460 7) IMG_0232.JPG
2015Jun20 20:21:24.560 8  IMG_0233.JPG
2015Jun20 20:21:25.660 9) IMG_0234.JPG
2015Jun20 20:21:26.760 10) IMG_0235.JPG
2015Jun20 20:21:27.860 11) IMG_0236.JPG
2015Jun20 20:21:28.960 12) IMG_0237.JPG
2015Jun20 20:21:30.060 13) IMG_0238.JPG
2015Jun20 20:21:31.160 14) IMG_0239.JPG
2015Jun20 20:21:32.260 15) IMG_0240.JPG
2015Jun20 20:21:33.360 16) IMG_0241.JPG
2015Jun20 20:21:34.460 17) IMG_0242.JPG
2015Jun20 20:21:35.560 18) IMG_0243.JPG
2015Jun20 20:21:36.660 19) IMG_0244.JPG
2015Jun20 20:21:37.760 20) IMG_0245.JPG
2015Jun20 20:21:38.860 21) IMG_0246.JPG
2015Jun20 20:21:39.960 22) IMG_0247.JPG
2015Jun20 20:21:41.060 23) IMG_0248.JPG
2015Jun20 20:21:42.160 24) IMG_0249.JPG
2015Jun20 20:21:43.260 25) IMG_0250.JPG
2015Jun20 20:21:43     * usb pulse = ch1down
2015Jun20 20:21:44.360 26) IMG_0251.JPG
2015Jun20 20:21:45.460 27) IMG_0252.JPG
2015Jun20 20:21:45     * usb pulse = ch2up
2015Jun20 20:21:46.560 28) IMG_0253.JPG
2015Jun20 20:21:47.660 29) IMG_0254.JPG
2015Jun20 20:21:47     * usb pulse = ch2down
2015Jun20 20:21:48.760 30) IMG_0255.JPG
2015Jun20 20:21:49.860 31) IMG_0256.JPG
2015Jun20 20:21:49     * usb pulse = ch1mid
2015Jun20 20:21:49    MENU exit key pressed.
2015Jun20 20:21:49    script halt requested
2015Jun20 20:21:50    Loggger : log file updated.



Quote
I hooked it up to the autopilot so I can give the "wire" precise PWM input.
I have an Arduino clone that generates servo type PWM signals that I used to write the USB pulse width code.  I'll hook it back up and do some testing too.

Quote
there is a small issue.  I commented out all commands for PWM control so when I modify PWM input it should have only printed the commands on the screen, but it triggers the continuous shooting then it freezes
Well,  the way the logic works in USB modes,  the script waits for the first pulse and then just starts shooting.  That makes sense in the first two USB modes but probably not in the PWM mode.   I'll work on that.

Meanwhile,  congratulations on getting close to 1 shot per second!
« Last Edit: 20 / June / 2015, 16:51:13 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #481 on: 21 / June / 2015, 00:22:59 »
Got my Arduino clone working and generating PWM signals.  Tuned up the kap_uav.lua PWM code to work the way we discussed and made a few other clean-ups.   

I have not tested all modes yet but the PWM mode you need seems to be running smoothly (famous last words).

Updated script version is here :  kap_uav.lua r3.6 b5

I also played with a custom CHDK build that allows me to run the high precision timer faster so that I can attempt to measure a raw servo pulse ( 1mSec = -90 deg,  1.5mSec=0 deg,  2.0mSec=+90 deg).   It actually looks quite promising.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #482 on: 21 / June / 2015, 03:17:22 »
Hi WWZ!
Nice work!  KAP.log attached.

PWM inputs are now correctly identified. Actions are taken correctly.

occasionally I get an invalid PWM input at 210 but I think that is due to the gentlewire.
so far the testing has been done only on the ground but tomorrow morning I will fly the mission. 
Many many thanks! I could have not done it so fast without your help!

I will get back on final results tomorrow after the flight.
S110, SX200is,

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #483 on: 21 / June / 2015, 09:34:19 »
KAP.log attached.
Looks really good!  I can see that the gentwire sends the same pulse repeatedly?  But they are mostly ch2up? I assume that is due it simply repeating the servo command pulses from the RC receiver and ch2 up is something you leave active ?   I guessed that might happen when I rewrote the PWM logic but  I'll probably want to filter the log entries that result from that.

Quote
occasionally I get an invalid PWM input at 210 but I think that is due to the gentlewire.
Might be the gentwire but I've seen the same thing with my arduino test rig.  I'm pretty sure it will happen if CHDK gets two pulses too close together and misses the gap between them.  But it could be something else. 

If the gentwire can actually sending continuous pulse streams at each lever position (up, mid,down) then it would be easy to add error correction by requiring three valid pulses in a row before taking any action.  Also, it's probably worth looking for really short pulses and generating an error when that happens too.  Right now they will be treated as ch1up.

Quote
so far the testing has been done only on the ground but tomorrow morning I will fly the mission.  Many many thanks! I could have not done it so fast without your help!  I will get back on final results tomorrow after the flight.
Thanks for all your testing.  I can simulate things all I like with my test rig but there is nothing like taking the script out into the real world.   I'll keep plugging away looking for glitches and "bumps in the night".    I also want to take a look at shooting in Canon continuous mode.  On some cameras, that might be even faster!

Also,  it will be interesting to see how well the locked focus & exposure setting works.   Do you plan to fly multiple passes and set the camera into idle mode (ch1mid) between passes?
« Last Edit: 21 / June / 2015, 09:37:33 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #484 on: 22 / June / 2015, 07:25:28 »
Depending on how risky is the mission I pu shut_down on ch2. if something goes bad I shut the camera down. That way it has higher chances of survival. Today I didn't use it.

Genlewire gets 1100/1500/1900 PWM from the autopilot on each channel.  From gentlewire we have the pulses you are familiar too. I feel too that the pulse error comes from the missing gap.
I mainly get that when the system is desarmed. GW gets 5 volts, but no signal. I can live with it for now.

kap log is attached. pictures turned out a little blurry.
S110, SX200is,

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #485 on: 22 / June / 2015, 07:42:13 »
WWZ,
please see attached the KMZ for today's flight.
there were actually 2 flights but this is the important one.
I have uploaded the pics to google drive, I will PM you the link.
I think, that due to the speed of the aircraft and the wind turbulence  we need higher shutter speed, but I am not sure what the speed was now.
Can you please advise the shutter speed used?
Thanks! 
S110, SX200is,

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #486 on: 22 / June / 2015, 07:51:49 »
On a deeper look I got a little puzzled.
The pictures from earlier flights were 6.xxMB, these are around 4.5MB.
can this script modify the resolution?
S110, SX200is,

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #487 on: 22 / June / 2015, 18:31:09 »
please see attached the KMZ for today's flight.
My version of 'marble' doesn't want to open your file.  Is there another program I should be using?

Quote
I think, that due to the speed of the aircraft and the wind turbulence  we need higher shutter speed, but I am not sure what the speed was now. Can you please advise the shutter speed used?
I tried to setup the logging so that complete exposure information is included with the first shot.  Looking at the log, I failed to get that right.  I'll fix it in the next update.

Meanwhile, the exif information in your images tells us the shutter speed was 1/1000.  You might want to bump up the target shutter to 1/2000 and raise the 2nd ISO limit to 1600 or so.   But as I have pointed out before,  shutter speed cannot really compensate for any vibration of the UAVs motors.  Only good vibration isolation of your mount will do that.   That might be causing you problems?

On a deeper look I got a little puzzled.  The pictures from earlier flights were 6.xxMB, these are around 4.5MB.  can this script modify the resolution?
To the best of my knowledge, that has nothing to do with the script.  Are you sure you did not change anything in the Canon menus?   Also, these pictures are mostly green trees - they might compress better than your whatever you were previously shoooting?  Just a guess.

Edit :  looking again at some of your picture,  there is a strong smearing from the upper left to lower right on many of them.  Here a screen shot of a full zoom of some tree :

This suggests motion blur due to camera movement.  Is the direction of blur consistent with the UAV direction?
« Last Edit: 22 / June / 2015, 22:11:11 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #488 on: 23 / June / 2015, 04:01:49 »
WWZ,

let me add numbers to the issues as I believe it is more efficient than quoting.

1.) KMZ is best opened with Google Earth.

2.) I will do the modifications: shutter speeed to 1/2000, ISO to 1600, focus is already at infinite so if you can get the aperture to adjust on the fly we are there  :D

3.)the airspeed was 25m/s, sidewind was 6-12m/s gust at 45-60deg to flight line from the mountain top side. as a result ground speed varied between 16- 30m/s.  with the low shutter speed and the heading correction of the plane we might have the explanation to the smearing direction.

4.)vibrations:  this is a foamy burned, dropped, crashed and revived more times than I can count. Today is raining, so flight is cancelled. I will do the vibration test on the ground and get back to you with the results.
S110, SX200is,

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #489 on: 23 / June / 2015, 06:36:20 »
5. bug: I cannot get out of the script by pushing menu button once script is started.
« Last Edit: 23 / June / 2015, 07:13:08 by netptl39 »
S110, SX200is,

 

Related Topics