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

KAP & UAV Exposure Control Intervalometer Script

  • 1068 Replies
  • 449013 Views
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #330 on: 19 / January / 2015, 20:06:26 »
Advertisements
My question would be:  For the RC PWM control what kind of cable do I need?
gentWIRE-USB

Quote
I would prefer to use all 6 options.  Also where should I set my "don't do anything PWM"?
I understand the "6 options" part.  But what do you mean by "don't do anything PWM"?

Quote
I have a gentWIRE-USB which converts the PWM to Pulses for the script below but using that wire I was getting random actions and many errors in-between .
What camera are you using?  After a lot of fussing and worry last year, it turned out that some cameras are have better accuracy measuring PWM data (in shooting mode) than others.  I emailed with George at Gentles and he indicated not having run into this problem but my testing leads me to believe it will happen. 

Fortunately, there is a solution in the 1.3.0 version of CHDK (or newer)  - a new function called  set_remote_timing().  Using this causes CHDK to use a camera internal high precision timer to measure pulses, giving much better accuracy.  For your code snippet,  you need to do something like this :

Code: [Select]
   set_remote_timing 1000
   while 1
   do
      k = get_usb_power
   until k>0
   if k < 5 then gosub "ch1up"
   if k > 4 and k < 8 then gosub "ch1mid"
   if k > 7 and k < 11 then gosub "ch1down"
   if k > 10 and k < 14 then gosub "ch2up"
   if k > 13 and k < 17 then gosub "ch2mid"
   if k > 16 and k < 20 then gosub "ch2down"
   if k > 19 then print "error"
wend

Try that and let us know how it works out?  If it's good, I guess I should add this option to the next release of kap_uav.lua.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #331 on: 22 / January / 2015, 23:26:22 »
Hello waterwingz, I wanted to say thanks for making this script. I was originally going to ask about an error I was having, but it turns out it was due to being on a developmental 1.4 version of chdk. Two other questions though. (I'm using an S100 for reference)

A) are there any other camera settings I need to set up before starting the script? GPS is on, and I had some custom settings in the C mode prior to installing / configuring the script - does it matter what shooting mode my s100 is dialed to?
B) is there any way to disable to automatic rotation of images / orientation sensor in the s100? this is not really a script specific question, but you seem knowledgeable of the s100

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #332 on: 22 / January / 2015, 23:44:21 »
Hello waterwingz, I wanted to say thanks for making this script.
A lot of CHDK people have helped to make the script happen.  I'll say thanks for all of them.

Quote
I was originally going to ask about an error I was having, but it turns out it was due to being on a developmental 1.4 version of chdk.
So was it an error or just a message about the version of CHDK you were using?  I'll be fixing that in the next update regardless.

Quote
A) are there any other camera settings I need to set up before starting the script? GPS is on, and I had some custom settings in the C mode prior to installing / configuring the script - does it matter what shooting mode my s100 is dialed to?
Hmmm .. well, the script will use CHDK to override Canon exposure settings so that is gets the Tv, Av, and Sv settings it thinks is needed.   To be safe,  P mode should work for most cameras but you can probably use your C mode stuff - CHDK will override the settings it needs to.

Quote
B) is there any way to disable to automatic rotation of images / orientation sensor in the s100? this is not really a script specific question, but you seem knowledgeable of the s100
AFAIK,  the camera will take the image it sees - full sensor resolution.  Any automatic rotation you see is only happening to the image displayed in the camera's LCD.  The final result you get from the SD card should be the full sensor resolution with something in the image EXIF information that tells PC software about the camera's rotation at the time the image was taken.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #333 on: 23 / January / 2015, 07:42:33 »
It warned me about not being able to detect the version of chdk I was using, and then when attempting to run, it would flash repeatedly in the corner the script title, but not actually start doing anything. At that point, the camera became very laggy / unresponsive until I turned it off. I dont remember the exact build of 1.4 I was using unfortunately - it was my first time installing it, and the 1.3 build was temporarily not available either via ACID or direct download for some reason.

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #334 on: 26 / January / 2015, 14:07:28 »
Hi there, this is my first post to the CHDK forum...I have been reading the advice and using the scripts for a while, and thought I should say hi...especially as I have some questions!... I was hoping I could get some help here....I added this script to my scripts folder in chdk and used it on the weekend with a canon s100 suspended below a kite.....

I don't know where I went wrong, but after a few seconds of it working it went from taking pictures every few seconds, to taking video! I'm sure I am doing something very obviously wrong, but I cant work it out!...the video option appeared to be switched off?

I also started playing with some of the parameters, and when I tried to revert the parameters back to defaults it didn't seem to want to do anything....it just held onto my settings I had put in myself!

I have been worrying a lot recently that my S100 may be a bit of a dud...and the focus seems very soft, and I have been advised that this script will get the best out of my camera, so now I just have to work out how to use it properly!

I was speaking to Dave Mitchell and he said that I could use it with my autokap rig, but couldn't remember which of the options to select for the usb shooting mode, i.e. on/off, none, oneshot or pwm?

Finally I was wondering if I can use the script if I want to just take shots with it on my remote controlled rig, where a servo arm comes down and presses the shutter?

Thanks in advance for any help!

Cheers!

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #335 on: 26 / January / 2015, 17:26:54 »
I don't know where I went wrong, but after a few seconds of it working it went from taking pictures every few seconds, to taking video! I'm sure I am doing something very obviously wrong, but I cant work it out!...the video option appeared to be switched off?
Cheers!
Strange.  I can test tonight on my S100 to see if I can reproduce this.

What version of CHDK are you using ?  (the complete name of the downloaded zip file if possible).

Do you have the CHDK USB remote settings disabled while using the script?  Was the camera mode dial in P mode (rather than video) ?

Quote
I also started playing with some of the parameters, and when I tried to revert the parameters back to defaults it didn't seem to want to do anything....it just held onto my settings I had put in myself!
How did you attempt to do that?

Quote
I have been worrying a lot recently that my S100 may be a bit of a dud...and the focus seems very soft, and I have been advised that this script will get the best out of my camera, so now I just have to work out how to use it properly!
We have had issues with focus at infinity with several user's S100's so I bought one to try it our.  Naturally mine works properly without issues.   Are your images soft without CHDK loaded?


Quote
I was speaking to Dave Mitchell and he said that I could use it with my autokap rig, but couldn't remember which of the options to select for the usb shooting mode, i.e. on/off, none, oneshot or pwm?
You'll have to tell me what you are hooking up to the camera before I can answer that.

Quote
Finally I was wondering if I can use the script if I want to just take shots with it on my remote controlled rig, where a servo arm comes down and presses the shutter?
No.  If you press the button with the shutter script running,  the script will simply stop.   The script does a lot of complex exposure calculations and then takes each shot itself.  You could modify the script so that it disables the shutter button from shooting and then monitors the state of that button and shoots when you press it.  Not sure that gets you much though?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #336 on: 27 / January / 2015, 16:57:21 »
Hi,
thank you for this wonderful script.
I try to set it up with my quadcopter and a canon ixus 70.
So far it works fine. But as i wanted to get more control i soldered some wires an added a USB switch that i trigger with my rc (taranis). I used this tutorial: http://youtu.be/69V5F0iRtIY
Here is my question: When i use the USB Shot Control option On/Of I have to use the switch of my radio twice to start shooting. After the first time i only get the message "waiting for USB..." and it needs the second push to start shooting pictures. Is that ok ? And if it is, why is it better not to start immediately...
The second question ist more important. In the chdk settings "Enable Remote" won't stay checked after on use of the script - that means i have to check this option everytime before start otherwise my rc switch won't start the script at all.
Do you know why that is?
Hope my questions aren't to stupid...

Thanks a lot
Ferdix 

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #337 on: 27 / January / 2015, 17:32:43 »
When i use the USB Shot Control option On/Off I have to use the switch of my radio twice to start shooting. After the first time i only get the message "waiting for USB..." and it needs the second push to start shooting pictures. Is that ok ? And if it is, why is it better not to start immediately...
I think your issue here (and below) is not understanding how the USB Shot Control options work.

Documentation for this script can be found here :
http://chdk.wikia.com/wiki/KAP_UAV_Exposure_Control_Script

In your case,  the use of On/Off control mode means that the script's built-in intervalometer will start shooting when the USB remote is active (+5V) and wait when it is in active (0v).  If you want to shoot each time the USB voltage goes active,  use the "OneShot" setting.

Quote
The second question is more important. In the chdk settings "Enable Remote" won't stay checked after on use of the script - that means i have to check this option every time before start otherwise my rc switch won't start the script at all.
The script sets the "Enable Remote" setting to "Enabled" when it starts.  It resets it to not enabled when it completes.  I had not though about people actually trying to start the script with their remote as well.   Thank you for finding this and reported it!

To fix this,  I'll add some code to detect if that setting is already enabled when the script starts and then not disable it when the script exists.

If you want to fix this on the current 3.2 version of the script,  delete line 298 with a text editor where it says :

Code: [Select]
set_config_value(121,0)                                             -- USB remote disable
« Last Edit: 27 / January / 2015, 17:37:22 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #338 on: 28 / January / 2015, 02:16:25 »
Thanks a lot for your quick reply waterwingz

One of my problems is my poor english  - at least when it comes to technical expressions...   :)
As far as i understand i need the initial USB 5v not till then the script starts with the second impulse.
My problem with that is that i don't get a feedback of the actual stat and therefore I am never sure if the camera is shooting when my quadcopter is in the air. Yes, with only one needed push i wouldn't know that either...
Probably there won't be a perfect solution for me...

As I read in some post above - if i want to use the PWM function I need this particular cable you mentioned.
I there some micro controller inside to transform the signal? I tried some funny time changing the script to get some longer lasting 'windows' for the pulse and tried to emulate it by hand - just got error messages. You see I am not a tech guy (in fact a gardener) and need a lot of try and errors.

Anyway a great script - already got some good photos !

ferdix

« Last Edit: 28 / January / 2015, 08:25:46 by ferdix »

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #339 on: 28 / January / 2015, 21:06:08 »
As far as i understand i need the initial USB 5v not till then the script starts with the second impulse.
My problem with that is that i don't get a feedback of the actual stat and therefore I am never sure if the camera is shooting when my quadcopter is in the air. Yes, with only one needed push i wouldn't know that either...
Probably there won't be a perfect solution for me...
The "normal" sequence with this script is :

  • When you are ready to fly,  press the camera's On/Off button.
  • Press the CHDK <ALT> button.
  • Fully press the shutter button to start the script.
  • Observe the camera's LCD screen to be sure the script is running.
  • Launch your UAV.
  • When you wish shooting to start,  enable the script to start shooting by setting the USB input to +5V
  • When you are ready to stop,  set the USB port to 0v.  The lens will retract in preparation for landing.
  • Land your UAV and use the On/Off button to turn off the camera.

Quote
As I read in some post above - if i want to use the PWM function I need this particular cable you mentioned.
That's probably the easiest way to do it.   You could build your own with a small microcontroller but why bother?

Quote
I there some micro controller inside to transform the signal?
I assume so.

Quote
I tried some funny time changing the script to get some longer lasting 'windows' for the pulse and tried to emulate it by hand - just got error messages. You see I am not a tech guy (in fact a gardener) and need a lot of try and errors.
I can't help here unless you post your modified script and the exact error messages you saw.
« Last Edit: 28 / January / 2015, 21:11:20 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal