I really appreciate your suggestions and have downloaded and perused your latest and greatest Ultimate_4-8 script and it looks very promising,
Ultimate_4-8 is probably overkill if you are going to use your low power uController to run the show. If I understand what you are doing correctly, you just need a simple script that automatically runs each time the camera starts, takes one photo, and then shuts the camera off? Unless some special condition tells it to wait for PTP transfers of images, followed by a power off sequence.
I see in your Ultimage Intervalometer options there is both a Shoot on USB Pulse option AND a Pause when USB connected toggle. So I'm guessing and hoping that the camera can tell the difference due to the action on the two different sets of USB pins. As I understand it it's the power pins that are used for the Remote shutter and the two inner data pins for CHDKPTP. Am I right?
You are correct about the pin usage.
And CHDK can tell if an active USB connector is plugged in because it can detect +5V on pin 1. So when
Pause when USB connected is enable, the script checks for that +5V and if found it pauses, enables PTP communications, and waits for the +5V to go away.
The caveat here (undocumented sadly) is that you can't do both USB triggered shooting and selectively enable USB ptp communications. Sorry.
The missing item in question is the initiation of a Camera Shutdown, to save power between shots ie.
- A super low powered microcontroller (Arduino or similar) with a programmable timer, switches a relay to supply power to the camera which turns it on (because the physical button is constantly depressed)
- The Arduino then initiates one or more image captures over USB Remote
- The resulting image/s are saved locally onto the camera SD card
- The camera powers down until the next Arduino initiated schedule
- This continues until a second schedule initiates a relay to wake up of the linux box for file handling and network tasks such as moving images from the SD card to the Raspberry Pi storage and subsequent resizing and uploading of thumbnails images
Seems straight forward.
Do you think it might be possible (for a novice like myself) to copy the camera shutdown segment of another script, like the KAP UAV script which features a setting to shut down once a user set number of images have been taken?
That's one approach. But a new script to do what you really want would be easy to code and thus probably more reliable. If you can program Arduino's and Pi's, I could pretty easily give you a functional starter script that you could tune to your hearts content or tweak and ask for help if it stops working.
I suspect this would be easier to implement than a USB Remote function initiated by a set of pulses.
I would probably suggest implementing this with a variable pulse width signal from the Arduino. One pulse length for "shoot", a different one for "shutdown", and a third for "switch to USB transfer mode".