yaboPP电子
项目

Flash Freeze摄影与Arduino

November 14, 2016经过raymond Genovese

及时冻结时刻,可以轻松地使用数码相机,Arduino和这些简单的电路来制作非凡的特写图片。

及时冻结时刻,可以轻松地使用数码相机,Arduino和这些简单的电路来制作非凡的特写图片。

I have always been impressed by high-speed photography. The photographic capture of what normally goes unseen, or at least unnoticed, is intriguing and oftentimes beautiful. High-speed cameras, however, are expensive and beyond the reach of many of us.

You can, however, get close to high-speed photography using a simple and inexpensive technique. In this project, we will build two simple and inexpensive circuits that, along with your DSLR camera, a slave flash, and an Arduino Uno, can reproduce some of the characteristics of high-speed photography to capture unusual moments in time.

requirements:

  • 具有手动焦点的数码相机和设置长时间曝光时间的能力
  • 外部(从属)闪存单元(请参阅文本)
  • 具有外部终端功能和电缆的热鞋(请参阅文本)
  • Arduino Uno
  • One or both of the circuits presented here (see Bill of Materials for each below)

基本技术

The “secret” to this technique is simple. First, manually focus your camera. Then, set your camera exposure to a relatively long value, say 4-6 seconds, and in complete or nearly complete darkness, take a picture. Ordinarily, these conditions will produce a totally black picture. During the long exposure period, however, the flash will fire and provide the only illumination during the exposure. A brief moment captured by the flash.

面包板

带有Arduino Uno的面包板上的完整FSR接口电路

关键是控制闪光灯的触发。在此项目中,我们将使用Arduino Uno在感知特定的外部事件时发射外部闪光灯。几乎所有外部传感器都可以用作闪光灯的触发事件。在这里,我们将使用两个传感器,一个力传感器和一个声音传感器来检测感兴趣的外部事件。

Camera

我用于此项目的相机是佳能EOS 400D(数字叛军XTI)。这是一款相对较低的(现在,现在相对旧的)数字SLR(单镜头反射)相机。任何具有手动焦点和设置长时间曝光能力的相机都应起作用。与任何特写摄影一样,您需要一个可以集中在所需距离的镜头。

Flash Unit

Slave Flash

PL-ASF18从属闪存单元

我们希望Arduino触发闪光灯,因此我们需要外部闪存单元。我用了宝丽来PL-ASF18slave flash unit, pictured above. This is one of the lowest-priced slave flash units around and it works quite well. One particular advantage is that it can be triggered with a relatively low voltage (<6 V). (Other triggering standards use higher voltages.) For the circuit that follows, it is critical that you use an external flash that accepts a low-voltage flash trigger.

PL-ASF18对于特写工作非常强大,但它来自两个1.5 V AA电池。您可能需要将闪光灯反弹到目标,而不是将其直接瞄准目标。对于本文的镜头,我没有直接将闪光灯指向目标。相反,闪光灯直接指向远离目标,光线通过反射一块黑色纸板来达到目标​​。此外,我使用了一个光扩散器(白色尼龙板帐篷)进行一些镜头。如果您的单元具有可变的闪存功率,可以在外部配置(PL-ASF18具有该功能),则可以通过降低功率来实现相同的效果。

热鞋

热鞋

Hot shoe with 3.5 mm socket

The external flash unit connects to ahot shoe,这是闪光灯单元的标准化“套接字”。我使用了上图(可用的)在这里), which contains multiple shoes. More importantly, this hot shoe has a convenient 3.5 mm socket where you usually see the common PC Sync connector. That connector externalizes the center contact and the shoe mount—when shorted, the connection will operate the flash. Most any hot shoe with the "standard" PC Sync connector (example在这里)也会做同样的事情。但是,这款热鞋的优点是3.5毫米插座和交配插孔都很普遍。

无论您使用哪种类型的连接器,您还需要用热鞋中的两条线条制作一根电缆才能连接到我们的电路上。您需要使用电压表进行正确连接来识别正线和负线。您还需要测量这些触点之间的电压,以确保用于操作闪光灯的电压在我们电路的范围内(请参见下面的进一步说明)。带有闪光灯单元的热鞋可以安装在迷你小脚架上,以促进定位。

力传感器电阻

FSR

互联406力传感器电阻

Arduino需要监视一些外部事件,以便在所需的时间操作闪光灯。该版本的项目的外部事件是力,我们将使用一个互联406力传感器电阻(PDF)。The force-sensing resistor (FSR) is pictured above and is available fromAdafruit和其他来源。您可以下载链接的集成指南this pagefor additional information on the sensor.

The resistance between the leads of this sensor varies according to the force exerted upon its surface. That is, if you drop a small object on the surface or tap on it, the resistance will change. The Arduino will use this characteristic to sense an external event and trigger the flash.

FSR的导线应附着在电缆上,以连接到我们的电路。如上面链接的集成指南所述,为了避免损坏FSR,请不要直接焊接到线索上。取而代之的是,使用雌性跳线铅,可以稍微卷曲以提供紧密的贴合。

Schematic for the FSR-Based System

电路示意图

Arduino接口的示意图,与FSR和Flash单元。Click to enlarge

上面的示意图是针对整个电路,允许Arduino Uno监视FSR并触发外部闪光灯。该电路具有三个不同的部分:顶部,中和底部。

Top—External Flash Unit

顶部允许Arduino控制外部闪存单元。引脚D2上的逻辑高信号将激活LED4N25光溶剂。然后,4N25中的NPN晶体管将打开。

The collector and emitter terminals of the 4N25 are connected, respectively, to the positive and negative terminals of the flash trigger (the flash-trigger connections come from the cable plugged into the hot shoe socket). Thus, when the LED is energized by the Arduino, the flash will be triggered.

请注意,闪存单元与Arduino电气隔离,这是可取的。您必须首先测量闪光灯端子的电压(即来自热鞋线的线索上的线索),以识别正端和负端子,并确保您不超过最大收集器对发射器的限制光叠剂。如果导线反转或电压超过指定的最大值,则可能会炸光弹器。

For the Motorola 4N25 that I used, the maximum collector-to-emitter voltage is 30 V, but not all optoisolators marked 4N25 are the same, and you should consult the manufacturer’s datasheet to determine the limit for your component. I measured this voltage for the PL-ASF18 unit with fresh batteries and it was ~5.5 V, which is well below the maximum. But, as already mentioned, different flash units can use different trigger voltages, so measure the voltage first.

Middle—Force-Sensing Resistor and Op Amp

The middle of the schematic contains the FSR interface and uses anMCP601P OP放大器(PDF)。绝对不需要使用此精确的操作放大器;之所以选择MCP601P,是因为它是为单供应操作而设计的,并具有轨道轨道输出。MCP601P用于比较器配置中,因此它可以用作阈值开关。

The inverting input to the MCP601P is fed by a voltage divider formed by R3 and the FSR. R3 is 47 kΩ and was chosen to function well in the circuit over the low end of the force–resistance curve, as shown in Figure 10 of the aforementioned FSR integration guide.

Image courtesy ofInterlink Electronics

对MCP601P的无反转输入也由R4的雨刮器(200kΩ多转静电计)的电压分隔器喂养。调整电位计会改变从OP放大器生成触发信号所需的力量。

The output of the MCP601P goes to an Arduino digital input port (D3). When no force is exerted on the FSR, the output of the op amp should be 5 V—read by the Arduino digital input as a logic high. When force is exerted on the FSR, its resistance will decrease, causing an increase in the output voltage of the FSR/R3 divider. Eventually the voltage at the inverting input will exceed the voltage at the non-inverting input, and this will drive the op amp's output voltage to ground. When the Arduino detects this logic-low signal on pin D3, it triggers the flash unit.

R2是磁滞电阻,这意味着它有助于抑制虚假的输出过渡。这不是严格必需的,因为当检测到单个触发器时,激活了闪存单元,并且需要几秒钟才能再次触发闪光灯。但是,通常将此电阻包括在内,这是一个很好的做法。看this design note(PDF)对于比较电路中的滞后更完整的描述。另外,请注意,该项目的电路面包板能够在没有C1的情况下有效地发挥作用,但是最好将模拟和数字IC的功率供应解耦电容器包括在内。

底部 - 输入开关

The bottom of the schematic simply contains a momentary switch connected to a digital input (D4) of the Arduino. The input will be read by the Arduino as logic low when not pressed and logic high when pressed. We will use this switch input in the software to “arm” the flash unit; after this, the program will wait for the trigger event.

BOM for the Arduino Interface to the FSR and Flash Unit

Component 描述
C1 0.1μF电容器
R1 330 Ω resistor
R2 470 kΩ resistor
R3 47 kΩ电阻器
R4 200 kΩ multi-turn potentiometer
R5 10kΩ resistor
IC1 4N25光溶剂
IC2 MCP601P OP放大器
FSR1 FSR 406电阻值电阻
SW1 瞬时开关

软件

以下包括用于操作电路的Arduino软件,如下所示。它相对较短,应该易于理解。

本质上,软件等待SW1被按下。发生这种情况时,Arduino的载板LED被点亮,表示“武装”状态。然后,该软件在触发输入上等待从“高”变为“低”。

When a trigger signal is received, the flash unit is operated. If you'd like, you can insert a short delay after the trigger and before the flash is operated. Sometimes your photographic objective will require a few milliseconds of delay. After flash operation, the onboard LED blinks for a programmable period of time, during which the flash unit recharges. After that interval, the code again waits for SW1 to be pressed.

您可以将变量调试设置为1,以便将文本输出输出到程序中的各个点。默认情况下,调试= 0,因为该程序可能以独立的方式使用,但是串行监视器输出可以帮助您熟悉该程序或更改某些参数后测试程序。

代码

download the program files below.

FlashFreeze.rar

使用说明

糖果薄荷

To further illustrate operation, here are the steps used to take the shot above, which captures a cluster of candy mints falling. When one of the mints hit the FSR (which is under the paper), the Arduino software detected the event and triggered the flash, capturing the moment.

  1. Set up your "studio," including connecting the flash unit and the FSR to the circuit and switching the flash unit on. Aim the flash away from the target area and, if necessary, use a diffuser (as stated earlier).
  2. Position the FSR under a thin piece of paper. Note exactly where the FSR is located because that is the target area for impact detection.
  3. 将相机设置为长时间的曝光 - 例如,4到6秒。
  4. Manually focus your camera. If possible, first place the objects that you are going to capture near the target area, so that you can set the focus for that spot.
  5. Shut off all lights—the darker the better.
  6. 按下SW1武器。请注意,Arduino上的船上LED点亮了。
  7. Operate the camera’s shutter.
  8. 将物体放在目标区域。
  9. 当对象影响FSR时,闪存单元将运行。请注意,现在的板载LED现在闪烁,表明闪存单元需要充电。
  10. The shutter closes and the picture has been taken.

Here are some more examples.

匹配棒

Gum balls

万圣节糖果洒

如果您厌倦了放弃东西,您总是可以开始破坏东西,但要小心。

以前是灯泡

Using a Sound Sensor

尽管上面的镜头是使用FSR作为传感器拍摄的,但您不必将技术限制在力触发器上。另一个选择是将声音用作触发器。

Many microphone amplifier circuits have been published, so you really don't need to design your own from scratch. A particularly convenient and relatively inexpensive option is a sound sensor module built specifically for interfacing to an Arduino.

Sound Sensors

Arduino声音传感器模块

上面显示了三个这样的声音传感器模块。第一个(从左到右)来自dfrobot; it uses anLM358op amp and has an analog output signal. The second, from简单地,使用555计时器and has a digital output. The third, from钥匙,使用LM393比较器,并具有数字和模拟输出。所有三个模块均具有用于调节灵敏度的电位计。

Here, we will use the first module to illustrate the technique.

Sound Sensor Interface

Schematic for the Arduino interface to the sound sensor and flash unit.Click to enlarge

上面的示意图是使用声音传感器作为触发器的完整电路。它与FSR示意图相同,除了声音传感器模块取代了FSR和Op-Amp电路。声音传感器的输出连接到Arduino模拟输入引脚(A0)。

BOM for the Arduino Interface to the Sound Sensor and Flash Unit

Component 描述
R1 330 Ω resistor
R2 10kΩ resistor
IC1 4N25光溶剂
SW1 瞬时开关
Sound Sensor dFR0034 (see text)

更多软件

上面的可下载文件中还包含用于使用声音传感器Soundflash.ino操作电路的Arduino软件。它的操作与Impactflash.ino程序基本相同,只是在程序中设置了阈值模拟值以确定何时声音足以触发闪存单元。

When using the circuit with very low-volume sounds, such as those made by water drops, there are additional considerations. The potentiometer on the module must be adjusted for maximum sensitivity. Additionally, ambient noise must be minimal to avoid false triggers. In fact, the usage steps for the FSR circuit should be modified so that the camera’s shutter is operated before arming the circuit because the sound of the shutter mechanism can trigger the flash unit.

A directional microphone or one mounted on a parabolic dish would reduce false triggers caused by ambient noise. Failing that, the use of a simple paper cone around the on-board microphone can help (see more on this concept在这里).

The following photographs were taken using the sound-sensor circuit and software. They illustrate some interesting “fluid dynamics.”

Elegant Simplicity

Elegant simplicity

牛奶飞溅

Alien milk

流体花

结束思想

This is mostly a fun project that is relatively inexpensive to build and is designed to be suitable for intermediate electronics enthusiasts and photographers alike. The circuits and software are somewhat bare-bones, and there are certainly enhancements that could be added.

就个人而言,我一直是对共同事件复杂性和美丽的说明。本文中介绍的示例仅刮擦您可以捕获的内容的表面。沉迷于您的想象力,您可能会对结果感到惊讶。

为自己自己尝试一下!Get the BOM.

4Comments
  • r
    拉斯·斯普鲁斯 November 26, 2016

    I would like to try this project but I am having trouble locating the MCP601P op amp. Can anyone suggest a source, or an equivalent op amp I can use instead? Thanks.

    喜欢。 reply
    • r
      raymond Genovese 2016年12月1日
      Hi, Sorry for the delay. I had seen that someone else had responded, but it is no longer there. You can get the MCP601P op amp from Mouser http://www.mouser.com/ProductDetail/Microchip-Technology/MCP601-I-P/?qs=caJrvSDHBA/mOLB5k64cCA== and other sources. I like it because it is designed for single supply operation and I have used it before. Although I have not tried them in these circuits, I would think that an LM358 or LM324 or a LM393 comparator would probably work just fine. Of course you need to get the parts data sheet and account for the different pin outs. Hope this helps.
      喜欢。 reply
  • d
    dc_kid 2018年10月22日

    I have built similar using mic/amp board fed into a Adafruit Trinket. My project was made originally designed for daylight use (no flash), but I did make some changes along the way so now it works in daylight or darkness. Not that sound matters when it comes to daylight or darkness, its just the programming changes some and thus I have a small selector switch in the case I put everything in. In my project when on daylight mode the electronics controls shutter and can still fire the flash. In night mode the electronics will open shutter 1st and then fire the flash. In all cases manual shutter settings are used and are key to getting a good pic. Even a flash will have delay.

    For daylight shooting the problem everyone will run into is exposure. You simply cannot hold the shutter open. In daylight a flash is not even used, but it can be if desired. What I found was, the electronics are very fast but there’s a delay time before shutter fires which is rather slow, msec worth. This delay is in the camera being used and varies depending of what camera you use. So even though my electronics were end-to-end magnitudes faster than the camera, I still had to account for the shutter delay.

    To accommodate this shutter delay my Trinket has a sensitivity pot so that I can somewhat call for camera shutter a tad sooner than the actual event. It’s still a tad tricky and takes much trial & error on every type of sound event to get just right in a pic.

    And I see some folks asking for fast silicon. Surely having no delay in the electronics is good, but standard “fast” switching will likely still be way faster than your flash or shutter. The rise time on a flash tube is rather long, etc. Silicon that is sub 20us should suffice for most consumer grade camera and flash gear. Fast lab style gear might demand ns silicon. But, when you get into taking pics of things that happen really fast you end up using high speed video, like 1mil fps and then picking out the frames you want to keep.

    Anyways, my project was fun, I learned a bunch of things, mainly that electronics are fast and consumer cameras and flash gear is rather slow.

    喜欢。 reply