|
This article describes how to create a device that is triggers an external flash when an object passes through a beam of light, thus making it possible to take pictures of objects (or events) that are otherwise too difficult to capture because of their speed. The device uses an Arduino microcontroller board which is ideally suited for prototyping, and a handful of general purpose electronic components that are fairly cheap. They are also not critical, meaning that they can be easily substituted by equivalent components. A separate article has been written on how to set up and use this device. Some of the photographs I made with it are posted in the Photography section.
I wanted to capture the splash that objects make at the moment they fall into a liquid, but this is pretty hard to do if you operate the camera yourself. The drop itself only takes a few milliseconds and you have to take into account the delay of the camera, light, etcetera. I figured there would have to be too much luck and too much time involved, doing this without electronic assistance. So I took to the drawing board and used a combination of hardware and software to help me out.
The principle of operation is easy: - set up the camera (use a tripod), flash, a bowl of liquid and the objects you want to drop into it
- create an optical 'gate' consisting of a small laser directed at a photo transistor
- darken the room
- open the camera shutter
- drop the object through the laser beam
- trigger the flash at the right time with the Arduino and associated electronics, capturing the drop
- close the shutter
The time it takes for the object to travel from the point it interrupts the laser beam till it drops in the liquid depends on the shape of the object and the material it's made of (think: drag) as well as the distance between the beam and the surface of the liquid, so it should be easily adjustable. It should also be easy to align the laser and the photo transistor, without triggering the flash unnecessarily. Electrical schematic
Here is the electrical schematic (click it for the full size version), created with Eagle. I shall discuss its parts below. 
Laser and detectorThe laser is a DLU02 red laser module which needs just 7-18 mA to operate, so it can be driven from a digital output. Resistor R2 is used to limit the current through the laser.  The detector is a BPW40 'Silicon NPN Epitaxial Planar Phototransistor'. This think looks just like an LED, so don't throw it in with the other unsorted parts because you will not be able to distinguish it anymore...Initially I thought about using an LDR,but I had my doubts since they appear to react a little sluggishly. Moreover, my electronics vendor told me that LDRs are on their way out because of the Cadmium used in manufacturing. The phototransistor is hooked up to analog input 1, which is held low by R4 when the phototransistor is not illuminated. When illuminated, analog 1 will go high because the phototransistor conducts. This is the normal situation. When an object interrupts the beam, analog 1 goes low, which is detected by the Arduino software. Flash control The external flash is controlled through a 'hot shoe' adapter which I modified to bring out the leads to the flash contacts. The voltage on my Bauer E436 flash contacts is much to high to switch it with the Arduino directly: 260 Volts. To keep the high voltage as far away as possible from the Arduino, I separated it electrically using a TIL111 optocoupler. Basically, a control signal fro digital pin 8 switches on an LED inside the optocoupler. The light from the LED hits a phototransistor (also inside the optocoupler) which then creates a path for the +5V from the collector (pin 5) to the emitter (pin 4). Pin 6 of the optocoupler is not used. The TIL111 cannot deal with the high voltage of the flash either, so it in turn switches on the TIC106D thyristor. The thyristor conducts, the flash is triggered, and when the voltage over the thyristor is zero (flash ended), it isolates again. TIC106 come in various versions (the 'D' can switch 400 V), pick the one that works best for your flash voltage. Drop delay To counter for the time between an object crossing the laser beam and it appearing at the proper position in front of the camera's lens, a delay function was built into the software. Because it's not very convenient to change and upload the software any time a delay adjustment needs to be made, I added an external potentiometer, R9. Its wiper is connected to analog input 0 and the other contacts to 0 and 5 V, so the voltage on the wiper is proportional to its position and varies between 0 and 5 volts. In the software this is then mapped to a delay that varies proportionally between predefined minimum and maximum values. ARM switch I want to be able to mess with the laser beam without triggering the flash all the time. For example to align the laser and the phototransistor and to determine where an object must be released to cross the laser beam. Digital input pin 2 is normally kept logically high through R5, but when the switch P1 is pressed momentarily it goes low. This triggers a software interrupt in the Arduino, which 'arms' the flash circuit. Now when the laser beam is interrupted, the flash will fire. After that the circuit is disarmed automatically. Status LEDsLED1 (green) and LED2 (red) serve to indicate the status of the system. When LED1 is on, the laser and the phototransistor are aligned properly. If the beam is interrupted, LED1 will be off. When LED2 is on the system is armed for operation: beam interruption will cause the flash to fire. LED2 can only come on if LED1 is already on: proper alignment is a prerequisite for the circuit to operate. Hardware integration I gambled that all components would fit onto a proto shield - a circuit board that rides piggy-back on the Arduino and onto which I had glued a mini bread board. I almost won the gable: the potentiometer for the trigger delay had to move because there were not enough free rails. The resulting prototype looks like spaghetti...
The flash's high voltage wires are loosely stuck into the bread board and I did not want the risk of one of them coming loose and frying the circuitry. So I bound the Arduino to a bigger bread board with some rubber bands and run the external wires (flash, laser, phototransistor) from there. This is also where the potentiometer has to live due to the lack of real estate on the proto shield. The codeThe code to go with the hardware was written for arduino-0013. It can be downloaded here. This so-called sketch is a .pde file, a plain text file that can be opened in any text editor and which your browser should be able to open as well. The comments in the code should be sufficient to understand what is going on.
|
Great job, thank you for sharing it! One question: when using a newer flash unit with a lower voltage, do I still need the optocoupler?