[Credits: Manoj V Mathew. Experiments were conducted at the Central Imaging and Flow Cytometry Facility (CIFF), National Center for Biological Sciences (NCBS), Bangalore, India.] For conducting the external trigger experiments on the sCMOS camera, we used the Tektronix AFG 3252 which costs about USD 12,000. I realized that the maximum frequency I required to trigger the sCMOS camera was not more than 25KHz. I could do this with a much cheaper trigger source. That is when I stumbled upon the Arduino. So what is Arduino? Let me quote from the Arduino Web Page. "Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing." The excellent thing about the Arduino is that for what it offers it is really inexpensive. We got an Arduino UNO R3 which cost us only about USD 20 ! Arduino hardware is open source. Complete documentation, electronic connection diagrams, PCB layouts etc. are available. The board offers 14 Digital Input Output (DIO) pins. Of the 14, 6 can be used to generate Pulse Width Modulation (PWM) signals to mimic an analog output. It has 6 analog input pins with individual 10bit Analog to Digital Converters (ADC). It is a tiny powerful package. Arduino can be programmed by connecting it to a computer through a USB interface. Quoting Arduino Webpage . "The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on Processing and other open-source software. A sketch is a name that Arduino uses for a program. It's the unit of code that is uploaded to and run on an Arduino board." Once a program is loaded (burned) into the Arduino ROM, you do not need not keep it connected to the computer. It can run on a 5v power supply. When you turn the power ON the code executes. You can restart the code by pushing the reset button on the Arduino Board. I used Arduino UNO R3 to create a clock to trigger the Hamamatsu Flash 4 sCMOS camera. The Arduino setup is shown in Figure B10. Two single strand wires with pin connectors on both ends were used to connect one of their ends to the Arduino board and the other end to a coaxial cable. The coaxial cable had crocodile clips on one end and SMA on the other. The SMA connector was connected to the Ex. Trig input of the sCMOS camera. The program used to generate the trigger signals is shown in Figure B11. The code works by configuring a Digital Input Output (DIO) pin to operate in the output mode. The output DIO pin is then switched between logic high and logic low for set time periods defined by Off-Time and On-Time of a PWM wave. The On time and Off time are calculated in the code from the required frequency and duty cycle. The example program in Figure B11 generates a PWM signal with frequency 1KHz and duty cycle 20%. A screen shot of a trigger signal generated is shown in Figure B12 below. The code was programmed to generate 500Hz. The oscilloscope was set to 50 Ohms impedance and infinite persistane to observe jitter. There are few things we can observe here:
- The peak to peak amplitude produced by the digital pin is about 3.3 volts
- At small frequencies like 500Hz used here the time jitter is almost negligible.
- There is an amplitude jitter of about 350V
- The generated frequency is slightly lower than 500 Hz (488.9 Hz). This because this code computer the ON and OFF delays solely based on output frequency and does not consider the internal delays.
- The sketch can generate a minimum frequency of 31.5 kHz and maximum frequency of 8MHz.
- The frequency can only be varied in discrete steps by dividing the onboard clock by integer steps ranging from 2 to 510
- The signal is output on pin 11 of the DIO pins since we used Timer 2.