Monday, February 13, 2012

Lil Bang (Sound Trigger for Cameras)


Introduction

Now that I can take pictures of lightning I decided that I also want to be able to trigger my camera with sound. The design I came up with has the following features:
  • Controlled by a PIC micro (PIC16F886).
  • Adjustable sensitivity
  • Adjustable delay – i.e. the user can set how many milliseconds after the sound event the picture should be taken. (My uncle says it would be a lot better if there was a setting to define how much BEFORE the event it should trigger the camera – but that’s another project – for my Nobel prize later this year…J)
  • Operated from battery and/or external power brick.
  • Completely decoupled from the camera by opto couplers, so that no harm can be caused by the circuit to the camera.
  • Can be used with any camera that has a remote control input (direct, IR or otherwise).
  • Can also be used to trigger any other electronic device, e.g. flash

Meet Lil Bang - little bro of the Big Bang :)





If you like this project and would like to build it yourself all the necessary information on it is below. If you don’t feel adventurous enough to build it yourself but still would like to have it I can prepare you a kit or a fully built unit – drop me a line for more info.



Hardware

The hardware is made up of two distinct parts: analog input circuit and digital processing.
The sound signals are picked up by a small microphone recycled from an old tape recorder I got rid of recently.
The microphone used is salvaged from an old tape recorder I discarded some time ago.

After a lot of research on the internet and some trial and error I settled with the LM386 as the input amplifier. I used the typical application circuit for maximum (200) gain from the datasheet to make sure it has enough sensitivity to pick up the smallest noise if needed.
Schematics

At the core of the circuit is a PIC16F886 microcontroller doing the rest of the work. The output of the audio amplifier goes directly to one of the comparator inputs of the PIC. A reference voltage is set using a pot (R2). The internal comparator is used to decide if there is a high enough signal coming from the microphone. If yes the shutter is triggered.

The camera is connected to this circuit through a standard 3.5 mm stereo jack. I used the same pin layout as in the lightning trigger project so that I can use the same (modified) cable release.
The camera terminal uses a standard 3.5mm stereo jack. I made the pinout compatible with my lightning trigger.

The circuit is, as always, electrically decoupled from the camera by two opto couplers.
Front of the custom made PCB


Back of the custom made PCB



Operation

A short demo of Lil Bang in action:
Unfortunately, there is a bit of latency between the picture and the sound of the video and the trigger seems to trigger before the sound event. Obviously, this is not the case. But you still get the idea, don't you?
After start-up the device is in calibration mode. Here the user can set the sensitivity of the circuit. The calibrate LED blinks every time it would trigger the camera if it was armed. This way it can be easily set to the desired level by using the pot (R2).
Once the desired sensitivity is set, pressing the Mode button (which is the built-in button of the rotary encoder) will take us to the next setting: Delay. Here the user can set up a certain delay he or she wants to have between the sound that triggers the shot and the actual shot. The delay is displayed on a four digit 7 segment display, in ms (milliseconds). At the moment, any value 0-255 ms can be selected using the rotary encoder. This is enough for my purposes, so I didn’t bother writing the code for higher numbers. If there is demand for higher numbers I will implement the necessary changes.
Once the desired delay is set another click of the Mode (rotary encoder built-in) button arms the device. In this mode the camera is put in metering mode (although it is recommended to use the camera on manual settings to avoid any unwanted delays when the triggering event happens). Any sound that is loud enough to light up the calibration LED in calibration mode will trigger the camera after the pre-set delay.
Another click of the rotary encoder button puts the device again in calibrate mode.
To save on power consumption the delay amount is only shown when it can be changed.


Some sample photographs from photographers using the above trigger

Fredric Frennessen capturing colour bounced off a speaker:



George D. capturing a "storm in the glass":


Rich Johnson creating a water hat for the family:



Claus and Christian Christensen managed to catch a bullet:





Possible applications


Note: The above links point to other people's photos that were not made with my trigger. I included them for illustration purposes only.


Update 6/8/2013

I just won Lifehacker's "Best Camera Hacks" competition with this entry!