Sunday, December 25, 2011

Laser trigger for high speed flash photography

My little pet project:  I wanted to experiment with high speed photography, capturing for example, the moment a water droplet hits the surface of water, so I started researching online for various solutions.  Just look for "Arduino" and "flash".

A few weeks ago, I ordered a number of a electric and electronic components on eBay.  Well, I could no longer wait for the orders I made to arrive.  Only the photo-resistor arrived this past week.  Everything else is still finding its way to my home.  Thus, I went to a local electronic store yesterday to purchase most of the components I needed to build the laser trigger.  The night before though, I had built my circuit on a Logic Gate Simulator (http://www.kolls.net/gatesim/) first but because it did not have the electric components I needed, I then used the Quite Universal Circuit Simulator (QUCS) downloadable for Linux and Windows platforms from http://qucs.sourceforge.net/.  The QUCS simulator still lacked one or two components I wanted to try but it was good enough.  It allowed me to test a few different ideas and see what the results would be--I must say my Grade 11 electrical course was helpful but I really needed a refresher on the basic electrical properties and laws.  The following original design was not exactly what I implemented but was close enough:


With "DC Simulation", I can run a simulation by hitting F2 in the software.  On another page, I created a table that displays voltages at different points on the circuit (where the labels are).

From the simulator, I was confident my design would work so I compiled the list of electric and electronic components from it.  Note that the Arduino is not in the design.  In all other implementations I have seen, an Arduino microcontroller ($30-$40) is used to sample some analog 5V input and generate some output for a brief 100ms or so.  Instead of the Arduino, I decided to use an OR gate ($0.50) and feed its output back into its input so that if a 5V current comes into the OR gate, it will be maintained until I shut down the circuit manually.  (An alternative is to use a timer chip with some resistors and capacitors in combination with some NOT and AND gates to zero out the OR output after some 100ms....)

Anyway, my shopping cart consisted of a HEF4071BP chip (CMOS quad 2-input OR gate), an NTE3041 opto-isolator (with an NPN transistor output), a bag of 1Kohm resistors, a bag of 62Kohm resistors, a bag of five LEDs, one switch, one breadboard, and a 5V power adapter.  Everything was a $1 or less each except for the breadboard ($6.75) and the power adapter ($2).



I ran a test.  When I depress the manual switch, current flows through the circuit.  The LED is only there as visual evidence that current is flowing through the opto-isolator.  That is, if I have the flash gun wired up, the opto-isolator should pass current from the collector to the emitter pin, causing the flash gun to fire.  (BTW, I could have used a PN2222A transistor instead of the opto-isolator but this opto-isolator will protect the circuit from any potentially high current from the flash.)

The photo-resistor has a resistance of 1Mohm in the dark and 10-20Kohm in bright light.  I designed the circuit such that when a laser beam hits the photo-resistor, its resistance goes down to 10 ohms.  Most of the current would then flow to ground.  If the laser beam is broken, the photo-resistor's resistance goes up to 1Mohm and current would then flow to the OR gate.  Once the current hits the OR gate (at 4.7 volts or so), it will raise the OR output to 5V.  The 5V OR output is fed back to the OR input pin, so that even if the laser beam is restored and most of the current flows to ground through the photo-resistor, the OR gate will maintain a 5V input and output.  In the implementation, the 5V output of one OR gate is passed to another OR gate.  The output of the second OR gate is then fed to the opto-isolator.  This is needed because if the output of the first OR gate is passed directly to the opto-isolator, most of the current will flow through the opto-isolator to ground--only 1V would remain, not enough to feed back to the input of the OR gate.

Well, now, I just need to wait for the PC sync cable and the laser pen to arrive, unless there is a local store that carries them ... and it's Christmas day.  The stores must be closed today, or are they?

Merry Christmas!

P.S.  I thought I would redo the circuit design so it comes as close to the actual implementation as possible:



QUCS does not have an opto-isolator so the npn transistor is actually the opto-isolator with npn output.  The FlashPowerSource is the positive cathode of the PC sync port on the flash gun.  It connects to the Collector pin of the opto-isolator.  The negative anode of the PC sync port connects to the Emitter pin of the opto-isolator.  The voltage of the FlashPowerSource was set to 3.7V as per some information I gathered about the Nikon SB-25 that I will be using for this project.

And here are the simulation results after changing the resistance value of the photo-resistor to 1Mohm (i.e. as when the laser beam gets broken): 



2 comments:

  1. Wow - you seriously have way too much time on your hands... You need to get a hobby, like Photography or something. :-)

    ReplyDelete
  2. Now I know why every other solution uses an Arduino microcontroller. The flash goes off way too fast! It's a lot faster than it takes for water to drop from a height of even 30cm.

    I think I'm going to build a delay switch with a capacitor and a potentiometer.

    It's been fun so far! :)

    ReplyDelete

Invasion of What?

What are these bugs? I've never seen them before. I saw them at my parents' place the other day. Lots of them in soil or grassy areas.