I am trying to copy Matt Richardson’s project on making a sound trigger to activate a Nikon flash. I am using an Arduino Micro, with LED on Pin 10, Button on pin 5, Flash trigger on pin 12, and a piezo sensor, to A0, and ground. The sensor has a 1meg ohm resister across both wires. The optoisolator is a Panasonic AQW280EH. A 10K ohm resistor from pin 12 @5v of Arduino, to pin 1 of opto and pin 2 of opto to ground. Arduino 5v and ground are used on outside rail of breadboard.
I can get an LED to light up, so I know the circuit works as planned, up to the opto. But I cannot get the opto to close the circuit on the other side. The Nikon flash has a trigger voltage of about 5.5V as close as I could measure it, without a scope.
Here is a video of me struggling to show that the circuit works, up to the isolator. http://www.smugmug.com/gallery/29474655_Vw9LzD
The AQW289EH data sheet @ http://datasheet.seekic.com/datasheet/Panasonic_AQW280EH.html
Here is the code. It was slightly modified from Matt Richardson’s, eliminating the camera trigger, and work lights.
/* Audio camera trigger by Matt Richardson
This is a basic sound-detecting camera & flash trigger for Arduino.
Use a piezo element for sensor (see http://www.arduino.cc/en/Tutorial/KnockSensor)
Use optoisolators (aka optocouplers) for the flash and camera triggers
Camera must be in BULB mode for shutter release to work
*/
#define BUTTON_PIN 5
#define FLASH_TRIGGER_PIN 12
#define SENSOR_PIN 0
#define LED_PIN 10
#define STANDBY 0
#define ACTIVE 1
#define SENSOR_THRESHOLD 0
int mode = STANDBY;
// For best results, set flashDelayMS according to what type
// of shot you're doing. 0 seems best for balloon burst while
// 10 seems best for shattering glass. YMMV.
long flashDelayMS = 10;
void setup() {
pinMode(BUTTON_PIN, INPUT);
pinMode(FLASH_TRIGGER_PIN, OUTPUT);
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, HIGH);
}
void loop() {
if (digitalRead(BUTTON_PIN) == HIGH)
{
mode = ACTIVE;
digitalWrite(LED_PIN, LOW); // show we're ready
}
if ((mode == ACTIVE) && (analogRead(SENSOR_PIN) > SENSOR_THRESHOLD)) //
{ //If we're in ACTIVE mode and we sense a pop:
delay(flashDelayMS);
digitalWrite(FLASH_TRIGGER_PIN, HIGH); // fire flash
delay(50);
digitalWrite(FLASH_TRIGGER_PIN, LOW);
mode = STANDBY;
digitalWrite(LED_PIN, HIGH);
}
}
Thanks for any help. Sorry I am more mechanical then electrical in my background, but I am learning...
Steve