Arduino disposable camera flash trigger circuit
2008-10-07
Arduino controlling a disposable camera flash, triggered by a air
gun
pellet breaking a thin wire. Pin 3 on the Arduino is connected to a
TIC106 thyristor, controlling the flash.
Vivitar 283 flash set to minimum duration.
The air rifle is clamped in a vise using custom milled plastic spacers.
Air rifle.
Wire.
Arduino setup.
Putting it all together in a box
2008-11-23
Electronics and display
in a box
Example pictures
2008-12-23
Exploding grape...
Exploading tomato.
Exploading tomato.
Kiwi, with 2 1/1000
seconds shorter delay than most other pictures.
Kiwi.
Banana slice.
Egg.
Small light bulb.
Code
2008-12-05
Arduino code, still in some development.
#include <LCD4Bit.h>
//number of lines in display=2
LCD4Bit lcd = LCD4Bit(2);
unsigned int fldelay = 37;
char fldelay_str[5];
int ledpin =13;
int timer1pin=4;
int flashpin=3;
int button1=6; // -pause
int button2=1; //ready button
int button3=5; //+ pause
int val = 0;
char val_str[5];
void setup() {
pinMode(ledpin, OUTPUT); //we'll use the debug LED to output a heartbeat
pinMode(timer1pin, INPUT);
pinMode(button1, INPUT);
pinMode(button2, INPUT);
pinMode(button3, INPUT);
pinMode(flashpin, OUTPUT);
digitalWrite(flashpin, LOW);
digitalWrite(timer1pin, HIGH);
lcd.init();
}
void loop() {
lcd1(); //setup delay, show arm status
meassure();
}
void lcd1(){
digitalWrite(ledpin, HIGH);
delay(500);
digitalWrite(ledpin, LOW); //light the debug LED
lcd.clear();
while(!digitalRead(button2) == HIGH )
{
lcd.cursorTo(1, 0); //line=1, x=0.
lcd.printIn("Delay:");
itoa(fldelay,fldelay_str,10);
lcd.cursorTo(1, 8);
lcd.printIn(fldelay_str);
lcd.printIn(" ms");
lcd.cursorTo(2, 0); //line=2, x=0.
//val=digitalRead(button2);
//itoa(val,val_str,10);
//lcd.printIn(val_str);
if(digitalRead(timer1pin) == LOW )
{
lcd.printIn("low ");
delay(50);
}
else
{
lcd.printIn("high");
delay(50);
}
if(digitalRead(button3) == HIGH )
{
fldelay=fldelay+1;
}
if(digitalRead(button1) == HIGH )
{
fldelay=fldelay-1;
}
delay(150);
}//knappen tryckt
lcd.clear();
lcd.cursorTo(2, 0);
lcd.printIn(".....READY...");
digitalWrite(ledpin, HIGH); //system armed and ready
//End lcd1
}
void meassure(){
//wait for trigger1
while(!digitalRead(timer1pin) == LOW ){
continue;
}
digitalWrite(ledpin, LOW); //turn off LED
delay(fldelay);
digitalWrite(flashpin, HIGH);
delay(200); //short time high om the output, to trigger triac to flash.
digitalWrite(flashpin, LOW);
}