Posts Tagged ‘electronics’

Flash Trigger MkI

Saturday, May 3rd, 2008

As I previously mentioned, I have been working on a trigger for my flash gun (a Canon 580ex). The reason I wanted a flash trigger was because it is very difficult to take a picture at the exact time an event occurs,  and the exposure time is always going to be limited by the shutter speed, having a long exposure with a small aperture, means that the photo exposure is essentially determined by the length of the flash, which in many cases is faster than you can achieve with a flash attached to a camera conventionally due to sync speed limitations between flash and camera. I have been using the arduino platform to build the flash trigger.

I had some very simple requirements for my trigger:

  • The execution had to be simple
  • It had to be expandable
  • It had to be flexible
  • It had to work, and work well

The end result was a trigger with a piezo sensor to set it off, an optoisolator to protect the arduino from any voltage spikes that might occur from the flash gun, a potentiometer (variable resistor) to add a delay after the sensing and before the triggering and a cut pc sync cable to connect to the flash.

Along with this was some simple code to be loaded on to the arduino:

int piezopin = 5; int flashpin = 2; int potdelaypin = 0; int threshold = 100;

void setup(){ pinMode(flashpin, OUTPUT); }

void loop(){ int piezoval = 0; piezoval = analogRead(piezopin);

int potdelay = 0; potdelay = analogRead(potdelaypin);

if(piezoval >= threshold){ delay(potdelay); digitalWrite(flashpin, HIGH); delay(10); digitalWrite(flashpin, LOW); } else { digitalWrite(flashpin, LOW); } }

In case it is not obvious, all the code does is read the piezo value, check it against a set tolerance and, if it is above the tolerance, trigger the flash after a delay set by the value of the potentiometer.

I decided to test the system by smashing an ice cube above the sensor, in the hopes that I might get a picture of the ice shattering and flying away from the hammer. The results of this were great, but to begin with the flash was firing too quickly, and the ice did not have a chance to be thrown away from the hammer the pictures ended up looking like the hammer was just resting on some broken ice. I cranked up the potentiometer and the results were fantastic, the delay worked perfectly and allowed the pieces to fly away from the hammer.

Another shot I wanted to try was dropping a cup of water and catching the spray of the water as it was cast off. Again, it didn’t work until I introduced a delay, but once I did, it looked amazing, the flash made the water sparkle in a really beautiful way.

Arduino

Wednesday, April 30th, 2008

This weekend, I attended a two-day workshop on the Arduino platform.

Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. - Taken from the Arduino website

The Arduino platform is based around the Atmel ATmega168 chip and is very versatile. The Arduino diecimilia chip was the version we were using, it has 6 analog inputs and 14 digital pins for input or output, 6 of which support pulse width modulation. The workshop was  arranged by tinker.it led by Nick Weldin and Brock Craft who were both very helpful with projects and explaining the intricacies of the platform and its programming environment. Also present was Alexandra Deschamps-Sonsino (personal site at designswarm) who was also a big help.

We began with an introduction to interaction design, how the platform evolved and the basic concepts of the hardware (sensors and outputs). From there, we looked at making the chip do what we wanted through programming. Beginning with simply flashing an LED. We moved on to reading if a pushbutton was pressed or not and then on to analog inputs and outputs. We looked at loop structure and other programming basics.

As we worked into the more complex functions available to us, we also learned the basic circuits that we would need. We learned how to calculate what size resistors need to be where, and why. We learned that switches needed to be grounded so that the background EM would not screw with our on/off readings and we learned many other useful things. I was very impressed by the quality of the workshop and feel that I learned a lot of valuable things. Which I would soon put to use.

During the second day we were mostly left to our own devices to pursue any projects that we might have. Whilst the leaders came around class and helped us out whenever we needed it. I focused on trying to get the data out of a wii nunchuck. The wii nunchuck contains two buttons, a joystick, and a three-axis accelerometer, making it a versatile input device that only requires two analog sockets. The nunchuck uses the I²C protocol to achieve this. After a couple of hours fiddling, with an Arduino library and some help from Alex. I finally managed to pull the data out. I was out of time before I could do anything with it, but it’s fairly easy to see that there is real potential in the system.

A highlight of the workshop was Brock’s brockenspiel. A fascinating look at what’s possible with the system with some imagination and a few extra bits and bobs.

The workshop was so good that when I got home I immediately looked at the upcoming events that were arranged by tinker.it. I plan to attend the interactive lighting workshop and wireless interactions workshop, which are both in association with not only tinker.it but also ARUP, as well as a one evening event on RFID using the arduino.

I expect to be posting details of my first project (a flash trigger) within the week.

EDIT: The flash trigger