|
4.9 Remote control 67In scripted mode, the camera is in the state and is running ascript. A signal at the USB port is recorded as a button click under the but-ton name “remote”, or can be intercepted with a special command. We willdiscuss these scripts in section 5.7.5.4.9.2 Building a simple remote controlIn the USB specification, each pin has a special purpose. While electricalground is assigned to Pin 4, Pin 1 is used for the supply voltage. The CHDKinterprets the presence or absence of the supply voltage as a signal. You cantest this easily even without a proper remote control. First, enable theRemote function, then connect a USB cable to the camera and quicklyconnect-disconnect-connect the other end to the USB port of a PC. Becausethe PC delivers supply voltage at Pin 1, the CHDK will interpret this as asignal from a remote control and will fire:USB PinsPin Purpose Wire Color1 VCC (+5V) Red2 Data – White3 Data + Green4 Ground BlackA USB cable release is relatively easy to build. A small battery is needed tosupply a voltage of not more than 5V (Warning: the USB specification al-lows for a maximum of 5V. Your camera might be damaged if you use ahigher voltage.) The minimum voltage required depends on the camera.You may find it on the CameraFeatures reference page of the CHDK wiki(http://chdk.wikia.com/wiki/CameraFeatures). Some cameras are happywith 3 volts (or even less), but other cameras require up to 4.5 volts.+ BatterySwitch1 red4 blackType A USB receptable3 x 1.5 VFigure 4-44Wiring diagram for a USB remoteswitch. The battery here delivers 4.5volts, which should be sufficient forany camera. This voltage is safe even ifthe camera operates at a lower voltage.The USB specifications require thecamera to tolerate a voltage of 5V orless at Pin 1. But be sure to get thepolarity of the battery right: wrongpolarity could damage your camera! PreviousNext |