Thursday 29 October 2015

timer - Use USB as an on-off switch


I'm looking for a way to build a zero(ish) cost intervalometer for my Canon SLR using only stuff that I have or can get very cheaply (my budget is about $4). I've already managed to "build" a wired remote for the camera, which is basically two wires connected to the ground and shutter release pins of the Canon remote connector. Touching the two wires (manually or via a switch) causes the camera to click.


I also have an old Android phone lying about that I'd like to repurpose for this project, since the phone is fully programmable. A requirement for this project is that neither the camera nor the phone can be modified in hardware (i.e., no soldering to or dismantling either).


Since the only wired interface in and out of the phone is USB (mini-USB on the phone, if that matters), I was wondering if a modified USB cable could be built that can be controlled via the phone's software, such that the circuit with the camera is completed or broken. Mutilating or otherwise modifying the USB cable itself is OK.


I'm willing to modify the software on the phone, so if this is possible, but the software doesn't support it, I'll figure it out.


Can this even be done? If not, is there an alternative way of doing this without buying a microcontroller, board and other associated stuff? I'm not a hardware guy, so please be gentle ;).



Answer



There's pretty much no chance you'll get all this for $4, it is not a realistic budget for this. But that's not to say it's not possible. You do need a microcontroller with USB functionality (or have it bit-banged, but USB ones are cheap enough) to talk to the Android phone. Then the Android phone could use its USB API in the SDK to talk to it and issue a command. When the USB microcontroller recognizes the 'take picture' command or whatever, it could flip a transistor on/off to toggle those wires you have and tell the camera to take a picture.



But you mentioned an 'old' Android phone, that could be a problem because only newer ones running Android OS 3.0 and up have the ability to expose the USB API to talk to it. If your target phones don't run that, this isn't going to work.


In that case, to accomodate most Android phones, even older ones, you could do this over Bluetooth. But that's going to raise your costs even more because you'll need a bluetooth module and power source for the Bluetooth, probably a battery, on top of the micro. But Bluetooth modules can be very cheap, here's one for $5.50 USD and they're even less in larger quantities: http://imall.iteadstudio.com/prototyping/basic-module/im120723010.html


Otherwise an even simpler approach with no micro could be making a circuit with a photosensor such that it triggers the camera wires to cross when it detects some amount of light, you could vary that with a pot/resistor. Then tape/connect the photosensor somehow to your phone and program it to light up the LCD or the flash on the back (if it has one) when it wants to trigger the photo. That might be do-able for under $4 but it's not very elegant.


Good luck!


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...