[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  Electronics
. -> [Folder]  Microprocessors
. . -> [Subject]  Freeze-frame flash photography
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Freeze-frame flash photography

Postings by administrators only.

[Refresh] Refresh page


Posted by Nick Gammon   Australia  (19,534 posts)  [Biography] bio   Forum Administrator
Date Tue 05 Jun 2012 03:43 AM (UTC)  quote  ]

Amended on Tue 05 Jun 2012 05:57 AM (UTC) by Nick Gammon

Message
I was inspired by Matt Richardson to make a high-speed "freeze frame" flash device. His video:

http://www.youtube.com/watch?v=R8_dAgaBBdI


The device has two basic parts:


  • A sound detector, so you know when to fire the flash
  • An interface with your flash to make it fire


Of course you need a camera, and a flash which takes an external trigger.

The circuit is here:



The top part of the circuit uses both sides of a LM358 op-amp. The first side is used as an amplifier with a gain of 101. This amplifies the small levels from the microphone.

The second side is set up as a comparator, where the small potentiometer can be turned to set the "cut-off" level of the sound. An LED on the board shows when it is reaching the threshold, so you can adjust that until it only flashes on louder sounds.

The lower part of the circuit uses a opto-isolator chip to isolate the flash unit from the circuit.




I used a cheap "breadboard" microphone:



And got a "flash sync" cable from the camera shop:



I chopped the cable in two, and soldered on pins to the bare wires so they could go into the breadboard. This is what it all looks like:



The "sound detector" output is the orange wire, which goes into D2 to cause an interrupt.

The sketch waits 5 milliseconds, and then tells the flash to fire for 50 mS.

You can tweak the delay a bit. I initially thought it was too low, when I saw this photo on the camera, but it turned out that the balloon was in fact half popped:




A close-up of the breadboard:



The sketch:


// High Speed Flash
// Author: Nick Gammon
// Date:   5th June 2012

const byte CLAPPER = 2;
const byte FLASH = 12;
const byte LED = 13;

const unsigned long DELAY_BEFORE_FLASH = 5;
const unsigned long FLASH_TIME = 50;

volatile boolean tick;
unsigned long start_tick;

unsigned long when;
boolean got_tick;
int ticks;

void isr ()
{
tick = true;  

// accurately remember when we got a tick
if (!got_tick)
  when = millis ();
}  // end of isr

void setup ()
{
  pinMode (LED, OUTPUT);
  pinMode (FLASH, OUTPUT);
  attachInterrupt (0, isr, RISING);
} // end of setup

void loop ()
{
  if (tick && !got_tick)
    {
    digitalWrite (LED, HIGH);  
    got_tick = true;
    ticks++;
    start_tick = when;

    if (DELAY_BEFORE_FLASH)
      delay (DELAY_BEFORE_FLASH);
    
    digitalWrite (FLASH, HIGH);
    delay (FLASH_TIME);
    digitalWrite (FLASH, LOW);
  
    }
    
  if (millis () - when >= 100)
    digitalWrite (LED, LOW);  

  if (millis () - when >= 200)
    {
    tick = false;
    got_tick = false;
    }
          
}  // end of loop


Example photos:



(The flash fired twice in that one). We cranked back the sensitivity a bit for the next one:






How to take the photo

You need a dark room (eg. at night) and set up the camera for a time-exposure (I used 10 seconds). Get everything focused and positioned, and test the flash operation by clapping your hands and seeing if the flash fires.

You may need an assistant ... someone to burst the balloon, and someone to operate the camera. A torch is handy in your pocket so you don't trip over the camera tripod or something.

When you are ready, turn off the lights, have your balloon and pin ready, and get your assistant to press the shutter (if you have a remote shutter gadget you should be able to do it alone). Once you hear the shutter open, burst the balloon, and then wait for the shutter to close before turning on the lights.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


2,517 views.

Postings by administrators only.

[Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]