SmaTrig 2.1
!!! Go to the improved SmaTrig 2.1 page !!!

SmaTrig - The smart 15-in-1 trigger for SLRs


The SmaTrig is a compact, AVR microcontroller based multi-function flash or camera trigger. Its 15 modes of operation make it come in handy in many situations. Besides the interval modes for time-lapse photography it is equipped with sensors for light and sound for capturing short-duration events or high-speed photography. It has a built-in sophisticated lightning trigger mode which reduces the shutter lag to the minimum by making use of the mirror lock-up function of the camera. The only connection with the camera is the external trigger plug. There is no need to modify the camera in any way. The low-power circuit is powered by an integrated coin cell.

Trigger modes

  • Manual trigger
  • Bulb exposure (switch toggles state)
  • Flash trigger
  • 2nd flash trigger (TTL)
  • Lightning trigger (uses mirror lock-up)
  • Sound trigger
  • Interval exposure 2.5 min
  • Interval exposure 1 min
  • Interval exposure 32 sec
  • Interval exposure 16 sec
  • Interval exposure 8 sec
  • Interval exposure 4 sec
  • Interval exposure 2 sec
  • Interval exposure 1 sec
  • Interval exposure 0.5 sec

Manual Trigger - This is the simplest mode of operation. The pushbutton works as an extension of the shutter button on the camera (only the fully pressed state is available).

BULB exposure - Pressing the pushbutton toggles the trigger between open and closed. Long time exposure is possible without holding the shutter button down continously. This function is practical for analog cameras where long exposure noise is not an issue.

Flash trigger - In this mode the camera is triggered directly by the photo-diode. This function can be used to trigger a servo flash or to build a light barrier with a laser pointer.

2nd flash trigger - In this mode the trigger responds to the 2nd flash in the sequence of two flashes such as the TTL flash sequence. The delay between the flashes must be less than 0.5 sec. This mode is primarily intended for servo flash control.

Lightning trigger - This function is similar to the flash trigger mode, but it's optimised to minimise the shutter lag, i.e. the delay between lightning detection and exposure begin. This is achieved by utilising the mirror lock-up mode of the camera. In the case of the Canon EOS 400D the pre-releasing of the mirror reduces the shutter lag from about 120 ms to 60 ms (see measurements) This is fast enough to capture lightnings easily. Check the gallery for reader's images.


The operation is explained in the following. It is assumed that in the mirror lock-up mode the mirror is released automatically by the camera after 30 sec if no triggering occurs (as for EOS).

  1. The camera is set to mirror lock-up mode by the user and the SmaTrig is in lightning mode.
  2. Pressing the push-button activates the lightning mode. The camera is triggered once and the mirror goes up. If a lightning is detected within 30 seconds, the camera is triggered for the second time and the exposure starts - a lightning was captured!
  3. After the exposure, for which a maximum duration of 4 seconds is assumed, the camera is triggered again and the mirror goes up as in step 2. The trigger waits again for a lightning...
  4. If no lightning was detected within 30 seconds and there was no trigger impulse to the camera, the mirror is released automatically. One second later the camera is triggered again and waits for a lightning as in point 2. During this second no lightning can be captured giving a probability of 1/31 to miss a lightning.
  5. Pushing the button again deactivates the function.

Effectively the camera is waiting for a lightning with a locked-up mirror. The SmaTrig tries to minimise the time where no capture is possible. During the second in which the camera is "reloaded" no lightning can be captured. This results in a probability of 1/31 to miss a lightning.

Sound trigger - Sound exceeding a certain pressure level triggers the camera or the flash. This mode is perfect for high-speed photography. Popping balloons or champagne bottles are the typical trigger sources. In the example below the flash was triggered with SmaTrig while the cam was in long exposure mode.


Interval trigger - As the name implies, the camera is triggered periodically with nine different time intervals. Shooting time-lapse or stop motion movies is the domain of this mode.

time lapse movie time lapse movie time lapse movie

To make the handling more convenient and save battery life most of the modes must be activated by pressing the push-button. Activation is signaled by the SmaTrig with a single beep. Pushing the push-button a second time deactivates the function again, this is signaled by a double beep.

The Circuit

SmaTrig is based on the ATtiny2313V microcontroller by Atmel. This small and versatile chip is a low power device which works down to 1.8 V. It is perfectly suited for battery operated equipment. A lithium coin cell was chosen as power supply. The schematic of the trigger circuit is depicted here


The controller is connected to a 4-bit code switch, a push-button, the triggering transistor and some sensor circuitry. The code switch allows to choose one of 16 modes of operation including power-off. The photo-diode and the mic signals are amplified via low power op-amps. The mic can be disabled by the microcontroller to save battery life.
The power supply of the circuit is a rather unusual solution. The microcontroller is supplied not through the VCC pin but via I/O pins! This untypical set-up uses the internal protection diodes of the I/O pins to source supply current to the chip and the rest of the circuit. The simplified schematic is shown in the sketch below.


The four output pins of the code switch are connected to I/O pins to allow detection of the current operation mode. At the same time a connection to the battery is provided for at least one I/O pin in all modes except for the off-position (position 0 - binary 0000) of the switch. This way the power switch could be integrated into the code switch.
I discovered this effect accidently - it ruined my first design of the trigger. It just wasn't possible to switch it off because some I/O pins were connected to the battery and supplied the uC with 'parasitic' current. Keep in mind that a voltage drop of about 0.6 V across the protection diodes must be taken into account when supplying the chip this strange way. The minimum supply voltage of the uC rises form 1.8 V to about 2.4 V, which is still ok for a lithium cell.


The one-sided board is designed with Eagle. The minimum path width of 24 mils allows for reproduction even with the crudest home-brew methods. I used a double sided FR4 0.8 mm board and left the unused side blank to provide some screening. Drilling is not necessary - the few through-hole mounted parts are mounted like SMDs.

SmaTrig board

Low power considerations

As the circuit is supplied from a lithium coin cell (2032), the power consumption should be as small as possible. Ideally the battery should last for the life time of the SmaTrig or at least for many years.
The electret mic turned out to be the main power consumer with about 200uA supply current. Therefore I used a MOSFET to disable the mic if not in use. The power consumption of the controller itself depends strongly on the operation mode and the clock frequency. I used the internal 128 kHz oscillator which is a good compromise between speed and power consumption. In power-down mode, the mode used most of the operation time, the current ranges about a few uA. In active or idle mode it can rise up to 50 uA. It's possible to control the clock of the uC dynamically at runtime using the internal dividers, so each mode reduces the clock to the possible minimum. The op-amps are negligible with its 2 uA in total. Assuming a battery capacitance of 200 mAh and an average supply current of 20 uA a battery life of about 10000 hours or more than one year of continuous operation can be expected.


I tried to use standard parts. The most exotic one is the OPA2349 op-amp. This low power amp has a supply current of just 1uA per channel. Fortunately it has the standard pinout and can be replaced by any other low voltage (<2.5V) dual channel op-amp in an SO-8 package. Possible replacements are

Type I/Chan. [uA]min. Supply [V]Bandwidth [kHz]
OPA2349 1 1.8 70 TI
LMC6442 1 2.2 10 National
OPA2379 6 1.8 90 TI
ADA4051-2 13 1.8 200AD
LMP2232 16 1.6 130 National
TLC25L2 17 1.4 85 TI
TLV2322 17 2.0 27 TI
OPA2347 20 2.3 350 TI
TLV2762 28 1.8 500 TI
OPA2330 35 1.8 350 TI

The SMD buzzer may be also hard to find and can be replaced by a wired part. The four bit rotary code switch is a rather common part, a version with a spindle may be hard to find. I found one manufactured by Hartmann. Be sure to use the "V" version of the ATtiny2313. Only this version allows to work down to 1.8 V. The photodiode can be replaced by any daylight type. A high sensitivity type is preferable. The microphone is an electret type. For triggering with bursting balloons any type will do. Mics with bigger diameters are usually more sensitive, look for a high dB number. This number ranges usually between -70 and -30 and describes the output voltage per one Pascal of sound pressure. Negative dBs correspond to attenuation, thus -30 dB means that the output voltage is higher than for -70 dB.


The circuit is mounted in a small pocket enclosure (50x38x13mm) with an attached hot shoe adapter. The mic and the light sensor are installed in the direction of the lens. The hot shoe mount is simply made of two plastic plates which are glued together. It has no electrical connection to the camera.

SmaTrig on EOS 400D
SmaTrig hot shoe mount

I designed a label for the rotary code switch with XFig. It can be found in the download section of the page as a PDF-file.

SmaTrig code wheel label


  • Solder the SMD parts
  • Solder the temporary programming wires
  • Shorten the pins of the code switch depending on the enclosure hight and solder it to the board
  • Shorten the pins of the pushbutton depending on the enclosure hight and solder it to the board
  • Solder the battery wires
  • Drill the holes in the enclosure for the code wheel spindle and the pushbutton (special care must be taken here!)
  • Drill the holes in the enclosure for the buzzer, photo-diode, mic and trigger cable
  • Thread the trigger cable through the hole in the enclosure
  • Solder all remaining cables
  • Set the code switch to '4' and program the uC
  • Test the circuit
  • If successful, desolder the programming wires and close the enclosure
SmaTrig enclosure open SmaTrig enclosure open with battery


The controller was programmed in AVR assembler. The source code and the hex file can be found in the download section of this article. To transfer the code into the uC I used a STK200 clone. The necessary wires have to be soldered directly to the programming pads on the PCB for the programming as shown in the picture below.

SmaTrig board

For programming the command line programming tool avrdude can be used. I used the following options:

avrdude -p t2313 -c STK200 -i 500 -U flash:w:smatrig.hex

Important: The code wheel must be in position '4' to allow programming. The reason is that the code wheel and the programming wires share some uC pins. The option -i 500 must be used to slow down the programmer clock to allow communication with the uC running at just 128 kHz. The software was written to run properly with the power saving internal 128 kHz oscillator. The device is shipped with the internal 8 MHz oscillator enabled, so the fuse bits must be changed correspondingly before use. They are:

  1. efuse 0xff
  2. hfuse 0xdf
  3. lfuse 0xe6

Again avrdude can be used to program the fuses. The sequence is

avrdude -p t2313 -c STK200 -i 500 -u -t (set up communication with slowed-down clock)
>>write efuse 0 0xFF
>>write hfuse 0 0xDF
>>write lfuse 0 0xE6

After writing these values, the uC won't communicate with some programming tools due to the slow clock. The microcontroller is not dead! If you need to restore the original clock settings of 8 MHz with enabled divider, set lfuse back to 0x64

avrdude -p t2313 -c STK200 -i 500 -u -t
>>write lfuse 0 0x64

Now programming tools like PonyProg will work again.

Good luck!


smatrig.sch - Eagle schematics
smatrig.brd - Eagle board
smatrig-parts.txt - Part list
smatrig-board.pdf - Eagle board as PDF
smatrig.asm - Assembler source code
smatrig.hex - Assembler hex file
smatrig-code-wheel.pdf - Code wheel label as PDF
smatrig-code-wheel.fig - Code wheel label for xfig - All files zipped together


In this section images taken with the SmaTrig are presented. Your images are welcome!

Craig and Bob from Australia used the SmaTrig to shoot these fantastic lightning photos.

lighting lighting lighting lighting lighting

Philippe Furter from Switzerland build a copy of the SmaTrig in a slightly bigger enclosure. He used a 3.6 V lithium battery (1/2AA, 1200 mAh) instead of the 2032, so he doesn't need the 'V' version of the ATtiny2313.

lighting lighting

ATtiny2313 datasheet
Avrdude documentation
PonyProg, AVR programming tool
2032 lithium battery discharge curve

Comments (28)

Thank You!
Very goog project! Thank You work!
Best regards!
#28 - attila - 11/30/2013 - 11:17
Prosz&#281; o kontakt
Panie &#321;ukaszu prosz&#281; o kontakt w sprawie SmaTrig-a. Mam kilka pyta&#324;.
Dzi&#281;kuj&#281; :)
#27 - Grzesiek - 06/09/2012 - 09:35
Thank You
I started to build this device.
#26 - K.Iosif - 05/18/2012 - 07:39
About Smatrig 15:1
Hi, from Portugal.
Smply the best trigger and i want one!
Tell me how.
#25 - Nelson - 05/12/2011 - 09:11
I want one for my self, and second for my friend. Tell me how much I must pay :-)
Maciek from Poland
#24 - Maciek - 06/03/2010 - 21:14
Brilliant Project.
Hi Luk,
Wow Luk! I too have experimented with different electronics to trigger a flash but none have the sophistication and multiple uses that your does.
Like everybody else that has commented about your project I would very much like to have one. (or more) The problem is that a lot of the components enclosures do not seem to be available in Australia. I would be very happy to purchase either kits or completed units. Please let me know if an when they become available. Thanks for all your work and great ideas.
#23 - Melvyn - 04/10/2010 - 02:39
50D compatibility
Theoretically the Smatrig should work with the 50D. All you need is a N3 connector. You have to recycle an old cable remote control.
#22 - luk - 03/26/2010 - 13:01
Opamp replacements
I've just added a table with replacement types for the OPA2349, see above. Good luck!
#21 - luk - 01/14/2010 - 10:25
alternative parts
I couldn't found OPA2349.
Can I use alternative parts. maybe you say alternative parts for it.
Some parts dificulty to found.
#20 - Alternative parts - 01/13/2010 - 17:16
Many thanks for the data. This is good news for Nikon users, as the mirror lock-up trigger function works only with Canon. The D300 seems to be a nice piece of camera.
#19 - luk - 01/11/2010 - 09:54
Shutter Lag
Just in case anyone is interested to use your trigger with a Nikon D300 I have just measured shutter lag with and without out mirror lockup and found that there is no significant difference. In 12 bit mode the delay from the triggering event is about 50ms and in 14 bit mode about 100ms. Based on this the basic flash setting of your trigger would work ok in 12bit mode.

#18 - wildside - 01/09/2010 - 10:06
According to the specs the ATtiny2313-20 needs at least 2.7 V to work. In the circuit the AVR is supplied with approx. 2.5 (3V from battery - 0.5 V voltage drop at protection diodes) so theoretically it will _not_ work. However, as the uC is clocked at a very low frequency I would give it a chance. Try it!
The ATtiny2313-10 needs just 1.8 V so it is clearly the better choice. Do some experiment.

#17 - luk - 01/06/2010 - 10:31
IE problem
You are right! The site doesn't work with IE, I just checked. I will have a look at the problem in a few days. It used to work with IE, strage.
#16 - luk - 12/29/2009 - 21:04
Do you sell a device

I just read on your page, that many people were asking to buy on Trigger. But I could not read wheter or not you sell commercialy this device nor the price.

Please let me knowif you sell such device an the price.

You do a hell of a good job! But for an electronics dumy lik me diffivult to follow.

For your reply thanks a lot!

Regards Martin
#15 - Martin - 12/21/2009 - 19:43
Great stuff!

I would like to have one, too!
Preferrable a finished one, but I would take a kit too.
#14 - frank - 11/19/2009 - 12:15
i want one too - let me know when you've fixed a price!
#13 - free wallpapers - 10/19/2009 - 15:40
New version
I'm hunting the last bugs... The PCBs recently arrived.
#12 - luk - 10/19/2009 - 12:43
Great trigger
Nice idea Luk!
Trigger works perfect on my Canon EOS450, but I make some modification. First: recompileing the source cos of different pinout on BCD switch. And second, I have replaced the photo-diode with photo-resistor (+30MOhm in dark, ~1kohm in daylight). Photo-resistor is connected between input capacitor and Vcc! Now I have extremely light sensitivity (maybe will I need some filters in front of photo-resistor ;P ).
Pics of trigger and lightning (looking for an indian for raindance!) will be soon on my site.

Greeting from Croatia
#11 - CrSh - 10/05/2009 - 08:05
Nice Trigger
I built me this trigger.
It works well, but flash trigger mode cannot be activated and lightning trigger doesn't work - tomorrow i will try it with the solution posted by nino with the extra resistor at light trigger.
Really great work this trigger.
#10 - Nico - 07/16/2009 - 13:47
My e-mail address can be found in the "ABOUT" section of the page. Feel free to contact me.
#9 - luk - 04/24/2009 - 08:15
Thank you so much for helping others. I appreaciate your efforts in making perfect things like this. Sir, it is hard to me to find the required parts to build such a thing. So, will you please make one for me and actually i will pay the price of the trigger. Thank you again for your precious information.

I am looking forward to hearing from you

#8 - suliman - 04/08/2009 - 18:16
Hello Luk

Made your design in normal parts. Used as opamp the LM358, and a 78L05 for 5 volt for the dip20 attiny. For the 3k3 in the light part from the LM358 I used a 5k potentiometer, now I can adjust the sens. from the photoled.This makes the smatrig in the flash mode very good to use for detecting wild live (birds ore animals) passing the photoled .....!!

Best regards

#7 - Ap - 04/07/2009 - 16:08
Triggering a flash unit
Hi, I like the idea of this remote, and have thought for some time of doing something similar. My question however is you describe above using this remote to trigger a flash in the "Sound trigger" section: "triggers the camera or the flash". Depending on what flash you're using, it may have a jack for your stereo plug, but if not, how did you use this unit to trigger your flash. For example I have a 580EX, and without modifying the flash unit, I don't see how this remote could trigger my flash.
#6 - Neal - 03/05/2009 - 19:01
I'd buy one as well
Yes - please consider building a series of ready triggers - or maybe pre programmed controllers plus ready to solder PCBs. I for example have the ability to solder and build it up, but no equipment to program the controller - Thank you for the work!
#5 - R. Adolph - 01/28/2009 - 09:20
Prototype on assembly picture
Hi Gor,
thank you for the hint. The assembly pictures show a prototype circuit where the switch was connected erronously to pin 5 instead of pin 6 (INT0). Don't warry, all files on the page are correct. Don't care about the connection in the pic. I'll put an advice on the page soon.

Thanks and a happy new year!
#4 - luk - 12/26/2008 - 19:16
Loved your circuit. Was easy to build and works just great. We have made four of them so far.
Have taken a few time lapse sequences and am still waiting for the right weather for a lightning shot.
This is such a great project you should submit it to Elektor or some such magazine as then it will get the recognition/coverage it deserves.
#3 - Craig - 11/29/2008 - 22:22
Wow, great. Let me know if you have some questions. I'm interested in feedback and images of course. BTW, I'm currently working on a new function for the trigger. It will allow to shoot HDR image series automatically using the Bulb mode. The hardware will not change. The new function will replace one of the interval modes.

#2 - luk - 09/08/2008 - 12:31
Just to let you know we're building your trigger at the moment . I will keep you inform ed of how it goes.

#1 - Bob - 09/04/2008 - 08:33
E-mail (Will not appear online)
To prevent automated Bots form spamming, please enter the text you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
This comment form is powered by GentleSource Comment Script. It can be included in PHP or HTML files and allows visitors to leave comments on the website.

PHP Scripts   Throwaway Email   Disposable Email