I am wiring and testing a camera firing system, and it works fine. However, when I first put the 2.5mm stereo plug (hooked up to Arduino outputs with a 10k resistor in between) in to the camera, the shutter fires. Then, when I open the serial monitor to check out my timing, the shutter fires again. Again when I close the serial monitor. Any ideas on why this might be happening?
I posted in this forum because I'm not sure if this is hardware or software, and there is no general help forum.
It sounds like your code fires the shutter after reset (opening/closing the serial monitor will reset the Arduino) OR because the pins are configured as inputs on reset the hardware takes that as license to trigger the camera.
don't worry about all that other stuff. The sequence runs when active is 1. Active starts off as zero, but Shutter and Wake are already written as HIGH. I've tried having stuff like
if (active == 0)
{digitalWrite(shutter, LOW);
digitalWrite(wake, LOW);}
During a reset the pins are set to be inputs. Then your code sets them to be outputs.
When they are inputs they float and do not drive your circuit, hence you are triggering on each reset.
One way round this is to use a pull down resistor on the output you are using to prevent it from floating high.
I've tried it like this
Transistor
Pin 6 --- |base |
Vcc --- |collector|
|emitter | --- 10k resistor --- shutter (etc.)
Never connect the base of a transistor directly to an arduino pin always go through a resistor.
don't think so. the reason I don't think it is is because when the Arduino pin isn't connected, the shutter doesn't fire as I insert it. And it doesn't happen with my other intervalometer
Turns out it was a problem with the way I was triggering the plug.
Instead of sending voltage, the ideal way is to connect the plug's tip-ground/middle-ground.
I just plugged in a couple of transistors and it's working dandily. Thanks for all of your willingness to help