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

KAP & UAV Exposure Control Intervalometer Script

  • 1068 Replies
  • 410875 Views
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #550 on: 04 / July / 2015, 21:57:59 »
Advertisements
As you have already talked to Mr. Gentles, can you please check with him if there is a minimum time for the input signal under which signals are disregarded?
Sent him another email.  He is usually pretty responsive so I expect an answer shortly.   He is probably celebrating British Thanksgivings Day,   help on July 4th every year.
Ported :   A1200    SD940   G10    Powershot N    G16

KAP & UAV Exposure Control Intervalometer Script
« Reply #551 on: 06 / July / 2015, 12:45:29 »
As you have already talked to Mr. Gentles, can you please check with him if there is a minimum time for the input signal under which signals are disregarded?
Sent him another email.  He is usually pretty responsive so I expect an answer shortly.   He is probably celebrating British Thanksgivings Day,   help on July 4th every year.
I just received a very detailed answer from James.  The gentWire-usb2 needs to see five cycles of servo PWM readings at the same value before it outputs a pulse the the camera.  So with a standard servo signal repeat rate of 20 mSec that means 100mSec of active signal.  That's right on the threshold of what you are trying to get the flight controller to do.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #552 on: 06 / July / 2015, 15:39:28 »

So with a standard servo signal repeat rate of 20 mSec that means 100mSec of active signal.

100ms = .1s.
Exactly!
Now, I did some ground testing today, but it wasn't conclusive. I will post  an update as soon as the camera battery recharges.
S110, SX200is,

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #553 on: 06 / July / 2015, 20:42:56 »
So with a standard servo signal repeat rate of 20 mSec that means 100mSec of active signal.
100ms = .1s.  Exactly!  Now, I did some ground testing today, but it wasn't conclusive. I will post  an update as soon as the camera battery recharges.
I'm starting to question the validity of trying to operate at 1 fps this way.  If the flight controller has to send servo pulses for at least 100 mSec  ( 5 x 20mSec per pulse cycle) and then the gentwire-USB2 needs to send a pulse between 30 and 180 milliseconds and then the script needs to recognize and act on that (another 100 mSec by my guess) then we have a latency of around  1/3 of second between when the flight controller says to shoot and when the actual shot happens.

Seems like it would be better to use the digital output relay mode from the flight controller and skip the gentwire all together?

If the pixhawk ArduPilot software is open source I suppose it might be worth taking a look to see what it actually does?
Ported :   A1200    SD940   G10    Powershot N    G16


Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #554 on: 07 / July / 2015, 07:53:43 »
we have a latency of around  1/3 of second between when the flight controller says to shoot and when the actual shot happens.
If that latency is constant it doesn't bother me as I can calculate with it during processing.

Seems like it would be better to use the digital output relay mode from the flight controller and skip the gentwire all together?

If the pixhawk ArduPilot software is open source I suppose it might be worth taking a look to see what it actually does?
I've been having the same bad feeling for a while, but I hoped I don't have to mess with the pixhawk source code.
can you please check and advise the minimum PWM Canon cameras can react to? Is it not possible that it could react under 2ms?
S110, SX200is,

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #555 on: 07 / July / 2015, 10:43:56 »
we have a latency of around  1/3 of second between when the flight controller says to shoot and when the actual shot happens.
If that latency is constant it doesn't bother me as I can calculate with it during processing.
It will vary some - as much as +/- 50 mSec would be my educated guess.


Quote
I've been having the same bad feeling for a while, but I hoped I don't have to mess with the pixhawk source code.
I'd (again) suggest that you try using a 3.3-to-5 V conversion device and run the pixhawk camera control in DO (relay) output mode rather than PWM mode via the genwire.

Quote
can you please check and advise the minimum PWM Canon cameras can react to? Is it not possible that it could react under 2ms?
As reported here, http://chdk.setepontos.com/index.php?topic=10822.msg123037#msg123037 my initial tests are promising.  It needs a custom build that allows the CHDK high performance timer code to run faster than the current 1mSec limit and that could have serious impact on camera performance - especially on lower spec cameras.  And it will require some level of filtering / error correction to be reliable.  Using pixhawk DO relay output camera control seems like a better option.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #556 on: 07 / July / 2015, 14:55:23 »
Getting there...just not sure where...  :-[

I successfully forced my will on the pixhawk and I got the PWM up to 32767 which is 32ms for the Canon.

I will go home in a couple days and I will buy a relay to see if the logs tell me the truth.

I also have no idea what relay I should use. Which one can work with under ms precision.

for this mission I need only 3 positions: shoot/halt/shut_down. (<10 / 10-20 / 20<).
Can you please check if your s100 can work with these ms values? 
Thanks in advance!
« Last Edit: 07 / July / 2015, 15:12:48 by netptl39 »
S110, SX200is,

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #557 on: 07 / July / 2015, 19:23:33 »
I successfully forced my will on the pixhawk and I got the PWM up to 32767 which is 32ms for the Canon.
Interesting.  Standard servo pulses only range from 1 to 2 ms in duration.  This is quite an increase.

Quote
I also have no idea what relay I should use. Which one can work with under ms precision.
It doesn't need to be under a millisecond.

Here's the DYI Drones thread on this :  using aux pins as relays for chdk.   Be careful - some of the things posted are wrong but you have to read subsequent posts to figure that out.

This device can be build fairly easily or you can purchase one from tuffwing.


And small signal NPN transistor will do - the 2N222 is pretty common if you can't find a B547.

These should work well too : SparkFun Logic Level Converter - Bi-Directional.  Let me know if you need a schematic.

Quote
for this mission I need only 3 positions: shoot/halt/shut_down. (<10 / 10-20 / 20<).  Can you please check if your s100 can work with these ms values? 
As long as the script's USB Timer Precision (msec) value is set to 1 then accurately measuring 10 mSec vs 15 mSec vs 20 mSec will not be a problem.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #558 on: 08 / July / 2015, 01:41:55 »
For the moment I will stick with the DIY version as the others will take a week to get here. I will go today and try to find the components in the nearest city.
S110, SX200is,

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #559 on: 08 / July / 2015, 06:49:11 »
For the moment I will stick with the DIY version as the others will take a week to get here. I will go today and try to find the components in the nearest city.
There are several other circuit diagram in the link I posted that will also work but the one I posted the schematic for is the simplest.  There are also some construction suggestions posted there is you have not done a lot of DIY electronics assembly.

One detail that all of the DYI and purchased solutions need is a +5V power source - typically from a BEC connected to the middle row of pins of the pixhawk.  The pixhawk will not provide the necessary +5V without this.  If this instruction is not completely clear to me, please let me know and I will elaborate.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics