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

KAP & UAV Exposure Control Intervalometer Script

  • 1068 Replies
  • 410833 Views
Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #630 on: 18 / September / 2015, 11:41:04 »
Advertisements
Quote from: waterwingz
Is this actually going to take a shot once per meter?  The S100's maximum shot rate (when not in continuous mode) is about one shot every two seconds.   That would mean the aircraft needs to be moving slower than 30 meters/minute  (or 1.8 kph).  Can a fixed wing fly that slow over the ground without a huge headwind?
This is only to test if his APM hardware outputs 5v on the relay pins, to start troubleshooting. I used 1m to take advantage that the GPS drifts when inside, so the relay fires without need to move the platform.

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #631 on: 21 / September / 2015, 16:09:23 »
Hello folks, new here (well I joined at the start of the summer flying season but dont recall posting yet)...

I'm using KAP&UAV on 3 different cameras, a pair of NDVI modded A2200's and [my main drone camera] an A2300.

I have just built myself a USB switch using an arduino nano (accepts the radios ch9 servo output and toggles the USB plug on when the servo PWM pulse is <1500uSec). This all tests fine using other devices (also using the USB plug on pin D13 so I have visual confirmation of it switching on / off). The issue is I cant figure out how to make KAP&UAV do what I'm after using the USB remote.

I have read the wiki several times, I've also done a lot of experimenting (including getting the camera stuck in "waiting for USB" mode so bad I had to format the card and do a full reinstall lol).




Let me tell you how I want it to work and you can tell me if it's even possible:
(Please see my edit below)

1.I'd like to set it up on the ground, camera on but lens retracted. I dont mind manually starting the script but I'd like the lens to stay retracted during take off till power is applied.

2. I'd like it to monitor for USB power, once power is applied I'd want it to immediately extend the lens and start snapping pictures. I have time limit and number limits both set to zero.

3. I'd like it to take pictures (at the interval defined in the setup [I prefer 2sec]) untill I switch the USB power off via radio command, at this point I'd like it to retract the lens. I dont mind if the camera stays on as long as the lens is retraced for protection during landings.

*I would also like to be able to have the display off to save battery power, my 27" motor to motor tricopter is capable of staying in the air for >20 minutes and I often make 4 or 5 packs worth of flights per job. I see this setting in the script setup menu but when I tick it to turn the display off I get even more confused about what it is [or isnt] doing.


So far [when manually starting the script) I'm able to get it to wait for USB power to begin taking the pictures however it extends the lens right away. I can not get it to stop taking them when power is removed. It also doesnt retract the lens (I would assume that's obvious but just want to post as much info as I have).

I have tried all three USB trigger options, I have also tried it with the main remote box checked and unchecked. The instructions (please no one take this as offensive, they are written very well) are written for someone who already knows how to use CHDK and makes several assumptions that the user already knows how to do some stuff. I do not, I am totally new to programmable cameras and using CHDK and this kind of stuff... If someone could walk me threw what I need to setup / change / enable / disable to get it to function how I'm wanting I would be extremely greatful! Thanks in advance and thanks for everything so far!


Edit:
I have done some reading, I've now got the A2200's functioning exactly as I describe wanting them to behave above. The issue I'm having now is that the A2300 will NOT retract it's lens after I remove USB power. It stays in the script running and "waiting for USB power" phase. It doesnt power down and retract the lens. This is the most important part as I need the lens to be protected during landing.

The A2200 does this, it takes about half dozen more pictures after I cut the power but it does shut down and retract the lens. I have copied all settings from the A2200's over to the A2300 yet nothing I do get's it to shut all the way down and pull the lens in.
« Last Edit: 21 / September / 2015, 16:47:03 by Cereal_Killer »

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #632 on: 21 / September / 2015, 16:53:40 »
Here is a video I took of it not working. Maybe I'm just making some basic mistake...

http://youtu.be/wY9VxTUdO-U

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #633 on: 21 / September / 2015, 18:01:51 »
The issue I'm having now is that the A2300 will NOT retract it's lens after I remove USB power. It stays in the script running and "waiting for USB power" phase. It doesnt power down and retract the lens. This is the most important part as I need the lens to be protected during landing.
Lens retraction requires that the Lens Retract time in the Canon menu be set to 0 sec.  Do you have it that way on your A2300? (I'm guessing it is set that way on your other cameras).

I read the rest of your post but can't tell if you have any other issues?   If so,  post here and please attach a copy of the KAP.LOG file from the top level folder of your SD card.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #634 on: 24 / September / 2015, 19:53:06 »
Naccio,
OK I've run the test you suggested. On the "Full Parameters List page, I've set all of the parameters as you instructed, EXCEPT, I can't find the "CAM_RELAY_ON:" parameter. See attachment for my options in the "CAM" and "RELAY" section of the "Full Parameters List" page. I hit the "Write Parameters" button to save these selections. I then hooked up a voltmeter directly to the Signal ("S") and ground (-) pins of A9 on the APM.

Periodically, I did get a 5 volt reading as the GPS coordinates bounced around. So, it appears that I have all the parameters set correctly (even without the "CAM_RELAY_ON" parameter).

Next step is to hook up the camera. With the KAP_UAV script set up as previously instructed, I depress the shutter release. When I do so, the lens does not open but on the LCD on the back of the camera, I get a message in red that says "Waiting on USB, Press Menu to Exit".

So, this suggests to me that I've started KAP_UAV correctly but no signal is reaching the camera right? Or is there something else that needs to be done with the settings or buttons on the camera? The only other thing I can think of is that perhaps I did not make the cable correctly. To test this I'd need to hook up the voltmeter to the pins on the mini-USB but doing this is challenging due to the tiny size of everything and, I'm not sure which pins are supposed to have this 5 volt signal. Any ideas?

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #635 on: 24 / September / 2015, 20:12:37 »
With the KAP_UAV script set up as previously instructed, I depress the shutter release. When I do so, the lens does not open but on the LCD on the back of the camera, I get a message in red that says "Waiting on USB, Press Menu to Exit". So, this suggests to me that I've started KAP_UAV correctly but no signal is reaching the camera right?
Correct.

That's exactly what is supposed to happen.   

You have succesfully loaded, configured, and started the script.  And the script is waiting intently for something (pretty much anything) to happen at the +5V power pin on the USB port.  If it sees that, it will continue and new messages will appear on the LCD.

Quote
Or is there something else that needs to be done with the settings or buttons on the camera?
Nope.  Nothing at all.  Assuming you have still used the settings reported earlier :

Shot Interval: Fast
USB Shot Control: One Shot

Quote
The only other thing I can think of is that perhaps I did not make the cable correctly. To test this I'd need to hook up the voltmeter to the pins on the mini-USB but doing this is challenging due to the tiny size of everything and, I'm not sure which pins are supposed to have this 5 volt signal. Any ideas?
I have a really simple script that simply reports the state of the camera USB +5V on the camera LCD.  Nothing to setup, nothing to configure, nothing to go wrong. Pretty much a "poor man's" voltmeter but if it does not see anything happening,  either your cable or flight controller setup is wrong.   I'll try to find and post it here.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #636 on: 24 / September / 2015, 20:49:14 »
Naccio,
OK I've run the test you suggested. On the "Full Parameters List page, I've set all of the parameters as you instructed, EXCEPT, I can't find the "CAM_RELAY_ON:" parameter. See attachment for my options in the "CAM" and "RELAY" section of the "Full Parameters List" page. I hit the "Write Parameters" button to save these selections. I then hooked up a voltmeter directly to the Signal ("S") and ground (-) pins of A9 on the APM.

Periodically, I did get a 5 volt reading as the GPS coordinates bounced around. So, it appears that I have all the parameters set correctly (even without the "CAM_RELAY_ON" parameter).
Excellent. Your APM is configured correctly, and as it outputs 5v you only need your custom USB cable to connect your APM to your camera.

Quote
Next step is to hook up the camera. With the KAP_UAV script set up as previously instructed, I depress the shutter release. When I do so, the lens does not open but on the LCD on the back of the camera, I get a message in red that says "Waiting on USB, Press Menu to Exit".

So, this suggests to me that I've started KAP_UAV correctly but no signal is reaching the camera right? Or is there something else that needs to be done with the settings or buttons on the camera? The only other thing I can think of is that perhaps I did not make the cable correctly. To test this I'd need to hook up the voltmeter to the pins on the mini-USB but doing this is challenging due to the tiny size of everything and, I'm not sure which pins are supposed to have this 5 volt signal. Any ideas?
Your cable is probably not built correctly. If you look at the mini USB plug in such a way that you see the connectors, you must build it so that the "S" pin on relay A9 is connected to the leftmost USB connector (pin 1 on the attached image), and the "-" pin on relay A9 is connected to the rightmost connector (pin 4 on the attached image). I would suggest using a continuity tester (most digital voltmeters have them, the voltmeter buzzes when its two contacts are shorted) to check.

If you can verify that your cable is built correctly but still can't get it to work, you will have to ask WaterWingz for further assistance, as he probably knows a bit more than I do about the KAP/UAV script. :lol

PS: WW, is troubleshooting APM and Pixhawk hardware too off-topic for this thread? I don't want to break rules, just trying to help...
« Last Edit: 24 / September / 2015, 20:59:00 by Naccio »

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #637 on: 25 / September / 2015, 19:01:38 »
Naccio,
Success! The idiot who made up the cable (me) did a lousy soldering job. The ground wire broke. I redid the cable and everything seems to be working great! I plan to fly tomorrow. I can't wait to give it a try and I'll let you know how it works.

Thanks very much for all of your help and patience in trouble shooting this issue.

Sincerely


KAP & UAV Exposure Control Intervalometer Script : release v3.6 is available
« Reply #638 on: 26 / September / 2015, 11:20:33 »
I've decided that the beta phase of release 3.6 of this script is over. 

As such,  I've updated the file from the script download link with the official v3.6 release.

Principal changes are the addition of exposure bracketing, continuous shooting modes, and USB remote support for a direct pixhawk / flight controller sync to position over the ground.

I've updated the script's wiki page and am adding a new section to describe all the USB modes.

Next release of this script other than bug fixes will await the official release of 1.4.0 (so I can take advantage of all of the new scripting goodies).
Ported :   A1200    SD940   G10    Powershot N    G16

Re: KAP & UAV Exposure Control Intervalometer Script
« Reply #639 on: 28 / September / 2015, 20:42:39 »
WW, I can't believe how advanced this script has gotten. I cannot thank you and the other CHDK developers enough.

 

Related Topics