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

KAP & UAV Exposure Control Intervalometer Script

  • 1068 Replies
  • 356979 Views
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #400 on: 02 / May / 2015, 07:07:35 »
Advertisements
With this script running does it take "total" control of the camera?
I know you obviously set the shutter speed / aperture etc so it controls those but if you have things in the camera set like photo stabiliser and choosing colour preferences for various scenes like highlighting blues for sky and sea pictures will they still work depending what mode the camera's in or are they overwritten??

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #401 on: 02 / May / 2015, 07:31:49 »
With this script running does it take "total" control of the camera?
I know you obviously set the shutter speed / aperture etc so it controls those but if you have things in the camera set like photo stabiliser and choosing colour preferences for various scenes like highlighting blues for sky and sea pictures will they still work depending what mode the camera's in or are they overwritten??
The script only controls the shutter speed, aperture, ISO sensitivity and ND filter position.  And obviously the shutter button.   It attempts to disable the built-in flash and the "flash assist" lamp.  Other than that, everything else is controlled  by the Canon menu settings.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #402 on: 02 / May / 2015, 11:39:20 »
Thanks again waterwingz, is appreciated, really can't wait to go give this a proper try, am just waiting for some parts to be shipped from abroad ... and the sunshine to come back again  :D

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #403 on: 02 / May / 2015, 14:55:01 »
Script updated to 3.4b (minor update) so that the LCD is turned off when the user defined startup delay is enabled (if the Backlight Off option is also enabled).

Background in this thread :  http://chdk.setepontos.com/index.php?topic=12353.msg122044#msg122044

Ported :   A1200    SD940   G10    Powershot N    G16


I keep getting "* USB Pulse Width Error".
Be aware that the "stock" USB PWM code is just something I threw together as a demo of how you can add PWM input to the script. It has not exactly had a lot of user testing in the real world.

In the demo,  the error message is displayed when the script checks  the CHDK USB PWM control code for the width of the most recent pulse received and is told it's 20 mSec or more.  This is an oversight on my part - when the demo code was added,  the CHDK high speed timer option was not available so the pulse width values in the demo code are off by a factor of 10.  The original intent was for that error to trigger if a pulse of more than 200 mSec was received.

Quote
I am utilizing an Arduino Nano to convert from an RC PWM output to the required USB power pulse. I have tested the output on my oscilloscope and it's outputting the correct pulse widths.
To confirm what I have written above, it will help a lot  if you tell me what pulse widths your Arduino is producing !

Quote
I have been looking through KAP 3.4 and noticed it's using get_usb_power(2), i tried changing this to get_usb_power(0), and now i get one correct pulse width before the error.
Not really sure what is happening here.   

Using get_usb_power(0) gets the most recent pulse width but it's unbuffered.  You could lose pulses.   

More info about all that here :  USB Remote Scripting Interface

Quote
I am very much a newbie when it comes to CHDK programming, so just wondering if anyone has solved this or could hep to solve it?
I think we can probably drag up someone who is somewhat familiar with that script  ::)   Once I know what pulse widths you are actually using,   modifying the PWM detection code in the script should be trivial.  Sorry for not catching that sooner.

Thanks WaterWingz.

I am using standard values from the CHDK tutorial on Arducopter. I have attached a JPEG of their specs.
http://copter.ardupilot.com/wiki/common-optional-hardware/common-cameras-and-gimbals/common-chdk-camera-control-tutorial/

The Arduino Nano is outputting 4.85 Volt pulses of 30, 60, 90, 120, 150 and 180 milliseconds. I did look at the script to make sure they would be suitable. I read somewhere the script values were in centi-seconds.

Thanks again.

I did look at the script to make sure they would be suitable. I read somewhere the script values were in centi-seconds.
When I updated the script to use precision timing,  I also increased the resolution to milli-seconds.   That was probably a mistake.

If you want to revert to the timing described in that article,  change line 573 in the current script from :
Code: [Select]
set_remote_timing(1000)to
Code: [Select]
set_remote_timing(10000)
Update :  for backwards compatability, and with some reluctance,  I've updated the downloadable version of the script to use centiseconds rather than milliseconds  (while still using the new high precision timing)

« Last Edit: 03 / May / 2015, 08:39:50 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #406 on: 04 / May / 2015, 06:01:13 »
Awesome!

I personally don't mind either way, as long as it's noted somewhere in the wiki.

Thanks WaterWingz.

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #407 on: 04 / May / 2015, 08:22:01 »
I personally don't mind either way, as long as it's noted somewhere in the wiki.
I'm testing the next script release now.  In that version there is a new user parameter that lets you specify the USB remote precision to use (defaults to centiseconds).   And the PWM code adjusts to that setting so the you always specify the pulse lengths in milliseconds (with defaults set for the fight controller article you linked).
Ported :   A1200    SD940   G10    Powershot N    G16


Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #408 on: 05 / May / 2015, 17:20:03 »
Hello Waterwingz ,

During my trials I have tried also the 3DR EAI script : https://github.com/diydrones/ardupilot/blob/master/Tools/CHDK-Scripts/Cannon%20S100/3DR_EAI_S100.lua

but I received a weird error (picture attached).

Could you please help me to solve this issue ?

Thank you.

*

Offline srsa_4c

  • ******
  • 4450
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #409 on: 05 / May / 2015, 18:11:36 »
but I received a weird error (picture attached).
char(239) is the first character of the UTF-8 BOM. Try saving your script files as plain text (ANSI, ASCII), not UTF-8 or Unicode.

 

Related Topics