Talking to the camera

One of the best things about designing hardware yourself is that you have full control over exactly what you want the devices to do. Lately we’ve been figuring out what to do with the one piece of complex hardware that we didn’t design – the Canon SX100IS digital camera. Let’s just say that Canon’s engineers never imagined that anyone would be controlling the camera remotely from a normal PC, let alone an embedded board within a capsule that’s going up into the edge of the atmosphere.. Lucky for us, there’s a really dedicated group of Canon camera hackers out there that run an open-source project called CHDK, which sits on top of the Canon camera firmware and executes scripts that you write beforehand. These scripts can do a lot more than what you can normally access on the camera’s front panel. For instance, you can write a script to take pictures at certain intervals, choose flash settings, ISO, shutter speed, monitor the battery voltage – basically anything you want.

It sounds amazing, but the only problem with the CHDK is it still expects users to be able to press buttons on the camera and turn the scripts on and off! Obviously up at 100,000 feet there’s not going to be a human up there to press buttons, so we need some way to get our flight computer to talk to the camera. Unfortunately the camera won’t accept commands over the USB cable (we were hoping the CHDK would support this, but unfortunately it doesn’t). The other option, ripping off all the buttons on the camera and soldering wires connected to GPIO pins on our board, requires a lot of work to implement and means that we have to physically program in the button presses that correspond to the right menu options. Not fun. So we found a third solution…

There’s a function you can call from within the scripts called get_usb_power. Interestingly, it returns how long (in ms) power was applied to the USB port on the camera. Now, even though we can’t actually communicate over USB, there’s nothing stopping us from sending bursts of “power” on the Vcc line over the USB cable… and transmit data as a sort of “morse code” based on the pulse length! Old-fashioned, sure – but it works, and it’s elegant enough that it doesn’t require us to do things like dismantle the camera and solder wires to every button on the camera’s front panel. So to test this, we threw together a quick circuit with the trusty 555 timer chip to generate pulses which we’ll send to the camera:

555 timer circuit for "Morse code"

It goes to show that no matter what, there’s always some way to get a message through, even if it means using the USB power wire as a serial data cable. :)

  1. #1 written by motorcycle insurance May 3rd, 2013 at 01:04

    Generally I don’t read article on blogs, but I would like to say that this write-up very pressured me to check out and do it! Your writing taste has been surprised me. Thanks, very nice article.

    RE Q
  2. #2 written by cannonInikonIphotographyIPhotography equipmentInikon dslrIslr cameras December 7th, 2013 at 13:25

    I used to be recommended this web site by my cousin. I’m not certain whether this put up is written by means of him as nobody else recognize such designated about my trouble. You are incredible! Thank you!

    RE Q
  3. #3 written by big bang March 9th, 2014 at 18:15

    We are not confident the place you will be taking your information and facts, nevertheless good theme. We ought to shell out a long time finding out much more or understanding more. Thanks for excellent data I’d been looking for this info for my quest.

    RE Q
  4. #4 written by Http://Pinterest.Com/Pin/243687029807640209 June 6th, 2014 at 16:26

    Random Pictures from 2010

    RE Q
  5. #5 written by Plati September 6th, 2014 at 12:46

    Plolific の Web サイトを見ましたら、 が最新版ですね。ドライバは32bit/64bit 両方対応しているようですね。なので大丈夫かと。File NameRelease DateVersionFile SizePL2303_Prolific_DriverInstaller_v1.7.0.zip2012/08/011.7.04039.81KBWindows Driver Installer Setup Program(For PL2303 HXA, XA, HXD, EA, RA, SA, TA, TB veosirns)Installer veosirn Build date: 1.7.0 (2012-8-1)Windows XP (32 64-bit) WDM WHQL Driver: v2.1.35.211 Compatible with Windows 2000SP4 Server2003Windows Vista/7/8 (32 64-bit) WDF WHQL Driver: v3.4.36.247 Windows 8 Certified WHQL Driver Compatible with Windows Server2008/Server2008R2/Server2012 Driver also available via Windows Update (Vista, 7, 8). Refer to User Manual.

    RE Q
  6. #6 written by October 22nd, 2014 at 19:23

    At long last, factors to neutralize Sunny Beach obviously comes with

    RE Q
  7. #7 written by Beavis Butthead October 27th, 2014 at 18:38

    The guys that run this website are total fart knockers.

    RE Q
  8. #8 written by January 11th, 2016 at 17:21

    I go to university in Canada and we just now are learning
    about this in class. Thank you for helping me with the final part of my report.

    RE Q