Turning the camera on or off using USB and CHDK? Gphoto2 Webcam Remote Capture - page 2 - Creative Uses of CHDK - CHDK Forum

Turning the camera on or off using USB and CHDK? Gphoto2 Webcam Remote Capture

  • 25 Replies
  • 36432 Views
Advertisements
So you could remotely, or periodically, cycle the camera on and off by turning its external power supply on and off, with the power button held in the down position.  And then the Script Autostart - ON setting could be used to automatically take a picture, or whatever.  So you could do really, really extended timelapse sequences - over days or longer.

What about the lens extending and retracting?  If you shut off power, the lens can't retract.  But when you power back up, it may do a full retract/extend cycle.


What about the lens extending and retracting?  If you shut off power, the lens can't retract.  But when you power back up, it may do a full retract/extend cycle.

That's exactly what happens. I think  the retract and extend cycle is used by the camera to determine a datum of lens position for zoom / focus. For that reason I expect it'll be very difficult to circumvent. I think trying to implement / exploit a low power mode in the camera may be a better approach.

(But that's somewhat away from the topic of this thread) :)

What about the lens extending and retracting?  If you shut off power, the lens can't retract.  But when you power back up, it may do a full retract/extend cycle.

That's exactly what happens. I think  the retract and extend cycle is used by the camera to determine a datum of lens position for zoom / focus. For that reason I expect it'll be very difficult to circumvent. I think trying to implement / exploit a low power mode in the camera may be a better approach.

Is there a way in CHDK to set the zoom and focus (i.e. always at it's widest angle and focused to infinity)?
I am trying to make a remote device that will take a picture every 3 hours for a month. Power is the big problem, so making the camera shut down between shots is ideal. Anyone have insights?

*

Offline fudgey

  • *****
  • 1705
  • a570is
Is there a way in CHDK to set the zoom and focus (i.e. always at it's widest angle and focused to infinity)?
I am trying to make a remote device that will take a picture every 3 hours for a month. Power is the big problem, so making the camera shut down between shots is ideal. Anyone have insights?

At least my cam always starts up at wide angle. CHDK has subject distance override in its menus (you can leave it enabled, just disable "clear overrides at power on") and alternatively script commands you can use to set focus.

*

Offline Paco

  • **
  • 77

well, certain cameras have a "wake-up on USB signal" which should help.

See the last column of this page:
CameraFeatures - CHDK Wiki

I am looking for the same functionality for an A530. I went to the page and found for that camera: Wake-up: {}. Am I correct in assuming that the {} means 'to be determined'?

*

Offline Paco

  • **
  • 77
well, certain cameras have a "wake-up on USB signal" which should help.

See the last column of this page:
CameraFeatures - CHDK Wiki

I am looking for the same functionality for an A530. I went to the page and found: Wake-up: {} for that camera. Am I correct in assuming that the {} means To Be Determined? I only found 2 instances of Wake-up: Yes.

I enabled CHDK to remote trigger with OnePush and Quick and it does trigger when I plug in a USB cable to my monitor but this does not turn the camera on. Is there another setting needed to supply this functionality or does this mean my camera does not support this feature? :( I can find no documentation about this feature. I tried it with Autostart ON and OFF.

*

Offline srsa_4c

  • ******
  • 4451
I am looking for the same functionality for an A530.
The availability of this feature depends on the camera's hw design, it's not a setting you can change. Cameras known to wake up on USB connection are: S1IS, S2IS, S3IS, S80. All these cameras have an always working low-power auxiliary CPU (subCPU) that also makes their time lapse feature possible.
The PowerShot N also wakes up on USB connection. No other models with USB wake up are known.

*

Offline Paco

  • **
  • 77
The availability of this feature depends on the camera's hw design, it's not a setting you can change. Cameras known to wake up on USB connection are: S1IS, S2IS, S3IS, S80. All these cameras have an always working low-power auxiliary CPU (subCPU) that also makes their time lapse feature possible.
The PowerShot N also wakes up on USB connection. No other models with USB wake up are known.

Yeah, I was afraid that would be the caseā€¦ :(
« Last Edit: 29 / September / 2014, 17:47:59 by Paco »

The PowerShot N also wakes up on USB connection.
To clarify slightly, applying +5V to the Powershot N's USB power pins is not enough to cause the camera to power up. 

However, plugging its USB cable it into a USB "master" like a PC does wake it up. As the camera's battery is charged via the USB port, that suggests the application of 5V causes some kind of "wake-up" and the Canon firmware then looks for a host on the data lines.  If it does not see anything there, it powers down.

I validated this using the "LED flasher" code that I left in boot.c.   That tells me that when +5V only is plugged in, the CHDK code gets a chance to run before something else shuts the power off.  It seems possible that the boot code hack to "allow proper power on"  could also fake a "power button press" such that CHDK would allow the camera to start with only the application of +5V.

Time for some more experiments.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline Paco

  • **
  • 77
To clarify slightly, applying +5V to the Powershot N's USB power pins is not enough to cause the camera to power up. 

However, plugging its USB cable it into a USB "master" like a PC does wake it up. As the camera's battery is charged via the USB port, that suggests the application of 5V causes some kind of "wake-up" and the Canon firmware then looks for a host on the data lines.  If it does not see anything there, it powers down.

OK, this sounds a lot like the problem I had when I bought a cheap 3m long Apple dock connector--USB cable on eBay. It worked fine with my iPhones but the iPad gave a "Not Charging" message. I did quite a bit of online research and found out that iDevices in general have a USB battery charger detector chip, which complies with a USB battery charging standard, that performs what is referred to as "port detection" and "enumeration". It detects the current a USB charger is capable of supplying by polling the voltages on the two data lines. These values are apparently custom hard-coded into the detector chip for a given manufacturer's device and must be present on the data pins of the charging device if the full current is to be utilized.

For iDevices, it turns out that the following voltages on the D+/D- data lines correspond to the given current capacity of the charger:

  • Default
    • 2.0/2.0 - 0.5 A
    • ?.?/?.? - 0.5 A
       
  • iPhone 5W charger
    • 2.0/2.7 - 1.0 A
       
  • iPad 3 10W charger
    • 2.7/2.0 - 2.1 A
       
  • iPad 4 12W charger
    • 2.7/2.7 - 2.4 A

My measured voltages of the D+/D- pins of all these chargers were within millivolts of the specs. My measured voltages of the USB port on my monitor were 0.0/0.0.

If none of these voltage combinations is detected, charging proceeds at the default current of .5 A, corresponding to the capacity of a standard USB port on a computer even if there is the "Not Charging" error. Otherwise the full current, determined by the voltage combination, is deployed. The problem with the long cable (I am pretty sure) was that it had thin enough stranded wire that the resistance was high enough to drop the voltages on the data lines to the point where the detector chip would only allow charging at the default 0.5 A current and not the 2.1 - 2.4 A the iPads can handle. I'm not sure about the iPhone not reporting an error but maybe it's specs are more lenient.

From what you said, your camera may very well have one of these chips and so is looking for certain voltage combinations on the data lines. If you use a triggering device that only supplies +5V and GND, the data lines are floating. The USB port of your computer, on the other hand, is supplying some voltage values on the data lines and those voltages are apparently the ones needed for remote power on. Find out what those voltages are and you can then modify your device to supply the same voltages. It may be that they are 0.0/0.0 like mine are. Then all you'd have to do is tie both pins to GND.

You can read more about the detector chip here:

MAX14578AE
USB Battery Charger Detectors


The Basics of USB Battery Charging: A Survival Guide

 

Related Topics


SimplePortal © 2008-2014, SimplePortal