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

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

SmaTrig

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.

lighting

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.

pop

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

SmaTrig

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.

SmaTrig

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.

PCB

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.

Parts

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.

Enclosure

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

Assembly

  • 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

Software

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!

Download

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
smatrig.zip - All files zipped together

Gallery

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

Links

http://www.atmel.com/dyn/resources/prod_documents/doc2543.pdf
ATtiny2313 datasheet

http://download.savannah.gnu.org/releases/avrdude/avrdude-doc-5.5.pdf
Avrdude documentation

http://www.lancos.com/prog.html
PonyProg, AVR programming tool

http://www.maxell.co.jp/e/products/industrial/battery/cr/index.html
2032 lithium battery discharge curve


Comments

SmaTrig - The smart 15-in-1 trigger for RICHO GX 100
Hello,
can I buy this mashine from you ????
.... how much will it be and can you ship to Germany ???
KR
Michael
#56 - Michael Lukowski - 04/13/2016 - 19:20
Thank You!
Very goog project! Thank You work!
Best regards!
#55 - attila - 11/30/2013 - 12:17
Buy trigger
Gday luk

is it possible to purchase units from you pre-made ?

Cheers for any reply in advance..

Cameron
#54 - Cameron - 12/03/2012 - 08:44
Buy trigger
Gday luk

is it possible to purchase units from you pre-made ?



Cheers for any reply in advance..

Cameron
#53 - Cameron - 12/03/2012 - 08:43
Project
Hi,
Do you think this project could be built with a Ardunio Nano board?
Thanks,
Jim
#52 - Jim - 08/24/2012 - 00:23
SmaTrig2
.ist der SmaTrig 2 denn noch bestellbar? Was kostet der SmaTrig 2 denn zusammengelötet eigentlich?
#51 - gdangl - 06/24/2012 - 17:35
Proszę o kontakt
Witam,
Panie Łukaszu proszę o kontakt w sprawie SmaTrig-a. Mam kilka pytań.
Pozdrawiam
Dziękuję :)
#50 - Grzesiek - 06/09/2012 - 11:35
Thank You
I started to build this device.
I THANK YOU FOR YOU HARD WORK !!!
#49 - K.Iosif - 05/18/2012 - 09:39
Buy trigger?
Hi all
I'm also very impressed and would like to have one.
For I don't know how to program the uC nor do I have the possibility to print the PCB, I would also be interested to buy one. Could you tell me if this is possible and how much it would be?
Another question: I would like to trigger the flash on on a voltage change event. E.g. when the connection of two wires is broken. Is that also possible with the device?

Best Regards Ralf
#48 - Ralf - 01/28/2012 - 22:45
I want one
Hello, I'm really interested in this beautiful 15:1-Trigger, is it possible to buy it? I'm absolutely not into building such a small electronic thing, but I'm into taking beautiful pictures with it. please send me a mail with informations how, or where to become one finished trigger.
best regards
ms
#47 - ms - 01/02/2012 - 20:15
About Smatrig 15:1
Hi, from Portugal.
Congratulations!
Smply the best trigger and i want one!
Tell me how.
#46 - Nelson - 05/12/2011 - 11:11
Czy to to?
A zatem to jest to o czym opowiadałeś że różne sposoby wyzwalania, dźwięk, światło itd. Ale nie mogę tu znaleźć tego co ma się nazywać AJAX. Czy to właśnie to jest ajax?
#45 - Tomek od Iwonsien :-) - 02/26/2011 - 10:09
SmaTrig
I want one for my self, and second for my friend. Tell me how much I must pay :-)
Maciek from Poland
#44 - Maciek - 06/03/2010 - 23:14
I want one. How much????
#43 - Jesse - 05/26/2010 - 19:15
Great work
Hi,

I am very impressed with this project and would like to own one. Do you have a finished one that I can buy? This parts are not readily available here in the Philippines and my electronic skills is mediocre at best.

Thanks

Florante
#42 - Florante - 05/13/2010 - 12:29
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.
#41 - Melvyn - 04/10/2010 - 04:39
Or maybe you purchased it possible to have this device that pabaminta and without N3 connection? She is so happy as she will be happy to Buy a.
#40 - Aurelijus - 04/02/2010 - 21:02
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.
#39 - luk - 03/26/2010 - 14:01
Does this device will work for canon 50d
This is going to Prompt wanted klausimėli.Ar who tried to use this device a Canon 50D? Understands the need to change the connection from N3
Grateful for the detailed explanation.
#38 - Aurelijus - 03/26/2010 - 11:23
Nice toy!
I like to have it! But I have difficult with icboard, did you sell the product ? Even on kit ?

Thanks from Italy!
#37 - capzicco - 03/20/2010 - 00:52
Would it possible to buy one from you? If so, let me know by emailing me. Thanx and good luck!
#36 - Joe - 01/17/2010 - 17:32
Opamp replacements
I've just added a table with replacement types for the OPA2349, see above. Good luck!
#35 - luk - 01/14/2010 - 11: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.
#34 - Alternative parts - 01/13/2010 - 18:16
D300
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.
#33 - luk - 01/11/2010 - 10: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.

Wildside
#32 - wildside - 01/09/2010 - 11: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.

Luk
#31 - luk - 01/06/2010 - 11:31
Attiniy2312-xx
Hello.
I could found attiniy2313 today. When I come home I chacked my chip so it is attini2313-20SU also attiniy2313-20PI has...
Can I use that chip?

Thanks.
#30 - Fatih - 01/06/2010 - 01:27
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.
#29 - luk - 12/29/2009 - 22:04
Why website doesn't working with IE?
Why website doesn't working with IE?
I checked 4 computer. in firefox everything normal.
But in internet explorer website doesnt working well. only left side works inside is just black.

#28 - Fatih - 12/26/2009 - 17:23
Do you sell a device
Hello,

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
#27 - Martin - 12/21/2009 - 20:43
Great stuff!

I would like to have one, too!
Preferrable a finished one, but I would take a kit too.
#26 - frank - 11/19/2009 - 13:15
i want one too - let me know when you've fixed a price!
#25 - free wallpapers - 10/19/2009 - 17:40
New version
I'm hunting the last bugs... The PCBs recently arrived.
#24 - luk - 10/19/2009 - 14:43
Any news on the new smart trigger?
#23 - Grozea Ion - 10/17/2009 - 22:32
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
CrSh
#22 - CrSh - 10/05/2009 - 10: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.
#21 - Nico - 07/16/2009 - 15:47
i would love one but i dont have a clue how to make a circuit board or how to read one.i would like to know how much you charge for them? and do you have one just for light as well?
thank you
dave l
#20 - wow this is so cool i want one!!!! - 07/01/2009 - 22:38
My e-mail address can be found in the "ABOUT" section of the page. Feel free to contact me.
#19 - luk - 04/24/2009 - 10:15
Hi Luk, I know the pullup-solution ist not very good. I didn't measure anything until now. I will do it at weekend. I used an other photo-diode, I don't know the type (because I tested a lot). I just ordered at Farnell all components including the OPA, the V-type of ATtiny and the SFH213. Then I will test again and tell you the result. Thanks. (is it possible to catact you by email?)

Nino
#18 - turi - 04/23/2009 - 23:24
Hi Nino,

What type of photo-diode did you use? Be sure to use a daylight type. The correct polalrity is also essential. Did you try to trigger the SmaTrig with a photoflash or weaker light sources?
I didn't try the pull-up solution. The only concern I have is the permanent current flow. Did you measure the supply current with and without the pull-up?
With two lithium cells I'd recommend to use an additional diode in series to reduce the supply voltage below the spec'd max of 5.5V.

Luk
#17 - luk - 04/22/2009 - 10:40
Problems with light trigger
Hi, I built this great trigger with one little problem. The lighttrigger didn't work. I just added a 3,3k resistor to V+ like the mic-input does. And it worked. As the OPV I used the OPA2344 (and the LM358) and I addes one additional CR2032. Is this the right solution?

Nino
#16 - turi - 04/15/2009 - 12:40
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

suliman
#15 - suliman - 04/08/2009 - 20:16
Is it possible to purchase one already made from you? You can email me if you would like to.
#14 - Jesse West - 04/07/2009 - 22:23
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

Ap
#13 - Ap - 04/07/2009 - 18:08
Flash adapter
I used a PC sync cable with a jack connector at one end (DIY) to fire the flash. Because my Canon 430EX has no PC connector I had to buy a flash+umbrella holder with a PC sync contact (about 10 Euro). There is no way to connect the SmaTrig directly to small flash like the Cannons.

Luk
#12 - luk - 03/06/2009 - 10:29
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.
#11 - Neal - 03/05/2009 - 20: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!
#10 - R. Adolph - 01/28/2009 - 10:20
For sale?
I'm working on it. I have to simplify the construction a little bit. I also have some ideas for new functions...
#9 - luk - 01/13/2009 - 17:47
For sale?
Just wondering if there was any chance you could sell finished versions of this trigger? I'd love to use this but not sure I can build it myself!
#8 - Pete - 01/10/2009 - 01:09
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!
Luk
#7 - luk - 12/26/2008 - 20:16
Start Previous Page
Name
E-mail (Will not appear online)
Title
Comment
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.