12

Hack a Canon camera and controll it with an Arduino

Geschrieben von: SES am 20.07.2010 um 19:31 pm

For our Z-Pan-&Tilt-System I needed to controll a camera with an Arduino. My first plan was to use a servo motor to switch the snapshot button of the camera. But this approach would be very complex. So I thought of bypassing the snapshot button with an electronic hack.

At first I disassembled the camera (Canon Ixus 70). A disassmebly video can be found here: http://www.youtube.com/watch?v=ZsJAYNCPWng

At the switch there are two points we need to solder a wire to, the ground and signal terminal. They are marked in the picture below:

I used a very thin enamelled copper wire because the terminals are very thin.

I extended the enamelled copper wire with normal wire and bond it there, where the damaged lcd once was.

[Update] I found out, that the metal sheet on the back of the lcd must not be removed from the camera, otherwise the CMOS sensor is not correctly shielded and produces noise on the captured image.

So this setup will cause noise on your images:

Add the metall sheet, and the noise is gone:

For the cable feedthrough I filed a small hole in the enclosure:

Finally the fully assembled system with the camera and the pan&tilt system.

The circuit can be found here:

The Arduino connects the switch signal to GND via a npn-transistor. With the signal to GND, the camera takes a picture.
Note in the code, that the transistor is inverting.

Code for the Arduino:


//-----------------------------------------------------
int CamPin = 8; // Cam trigger connected to digital pin 8

// The setup() method runs once, when the sketch starts

void setup() {
// initialize the digital pin as an output:
pinMode(CamPin, OUTPUT);
digitalWrite(CamPin, LOW); // set the CAM trigger off
}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()
{
digitalWrite(CamPin, HIGH); // set the CAM trigger on, capture image
delay(1000); // wait for a second
digitalWrite(CamPin, LOW); // set the CAM trigger off
delay(4000); // wait for 4 seconds
}
//-----------------------------------------------------

Finally the video, don’t mind the lcd, it was broken before. The camera captures an image every five seconds.

Please note: These instructions need quite a lot of skills in mechanics, soldering and electronics. Don’t use this project to start with electronics. You may use an old or partly damaged camera, instead of an expensive new one. Use at your own risk.

12 Antworten auf “Hack a Canon camera and controll it with an Arduino”

  1. net sagt:

    Hello, nice work, from the technical side of view. But why do you not use CHDK with an timelaps script instead?

  2. SES sagt:

    @net:
    could you also use the chdk in connection to an arduino?

  3. net sagt:

    @SES:
    sure you can. Use an usb remote:
    http://chdk.wikia.com/wiki/USB_Remote_Cable
    With scripts on the Canon cam you can do everthing you want to.

  4. lolo sagt:

    HELLO!! i have tried to do the same, following your steps but to me it didnt work, could you answer me this questions please :D
    1)”Note in the code, that the transistor is inverting.” what do you mean by this?? is inverting the polarity??
    2)what resistor is the useful one? wich one did you use?
    3)what is the number of the transistor that you use??
    4)why it has to be a pnp and not a npn transistor??, i have several npn on old circuits and only one pnp that i use to follow your instructions, but i just can´t figure it out why is not working for me

    i was tryng with this transistor:
    http://www.datasheetcatalog.org/datasheet/nationalsemiconductor/DS013155.PDF

    and with two resistor one of 850 and the other of 350, as 1200 was what i believe you use from the color code on your schematic

    as i really don´t know much about circuits, i´m just a poor filmmaker
    please help me :)
    greetings from Southamerica!

  5. lolo sagt:

    and from your transistor wich legs is the base, wich one is the emitter and wich one is the collector??

  6. Sebastian sagt:

    @lolo: the base is in the middle and emitter is the left one, so the collector is then on the right (in my sketch above).

  7. Sebastian sagt:

    @lolo: the transistor is just used to short-circuit the signal at the switch to ground. a npn-transistor is inverting, cause you need a positive signal (e.g. 5V) to short-circuit the signal at the switch to ground (negativ signal: 0V).

  8. Edwin sagt:

    @lolo
    Not sure if you still have questions, coz it has been a while, but let me just answer all of yr questions
    1) When the Arduino port goes high. It opens the transistor, drawing the collector to a low
    2) I guess a 1k should be OK but if you have an 850 or a 1200 that would do fine
    3) I think any regular NPN transistor would do, like a BC547
    4) If you ask me, the description says NPN transistor, not PNP

    Your TN4033 would not work coz it is a PNP transistor.
    Get a BC547 for a few pennies and you’ll be fine

  9. Sebastian sagt:

    Recently I got the question, how does the camera circuit works and what was the “magic” behind finding the two signals, that were then connected to the arduino and a transistor?
    So here is my answer:

    basically the circuit works like this:

    http://www.seattlerobotics.org/encoder/mar97/basics8.gif

    There is a pull-up resistor (R2 in the image) in the camera circuitry.
    The part U2A is not part of the camera circuit (it’s just an inverter).
    With the pull-up, the signal at U2A (pin 1) has a voltage level of 3.3V

    I added transistor T1 to switch this signal to ground potential. So the voltage level at U2A (pin 1) changes to 0V (in real life you would measure 0.7V since it is a NPN transitor) if the transistor is activated by the Arduino.

    So the challenge is to find the two signals that are connected to the trigger switch of the camera. One signal is the ground potential, the other the logic signal (that is connected to a pull-up resistor).

    Hope that helps,

    Sebastian

  10. X-man sagt:

    How can i send the captured pictures to the computer? Pls reply soon

  11. SES sagt:

    @X-man: It’s simple. The Arduino just triggers the camera, the images are stored and captured by the camera. So just connect the camera to the PC via USB and download the images.

  12. BerndDasBrot sagt:

    hi, thanks for the tutorial. When I try the switch via the arduino, the initial red-eye reduction light comes on, but it never triggers the shutter. When i press the switch on the camera, the red-eye reduction light comes on, then the shutter is engaged..Any advice as to why it’s not completing the full process?

Hinterlasse einen Kommentar