Hello everyone.
I recently built myself a IR remote shutter release for my Nikon camera.
Here is how it works and what I want to add:
It triggers the camera with a certain series of pulses made from square waves. These IR pules is sent to te camera with an IR led.
First, it has 2 modes, first, Single Shot, and second, Timelapse Mode.
In the fist mode it just takes an image when I press the button on my remote.
In time lapse mode, it takes a photo every x amount of seconds. The startup or default time is one second for a reason. This delay can then be controlled in the field with what is no more the shutter button, but now the interval timer. So in Single shot mode, the button is used as a shutter button, simple, and in the time lapse mode, the button can be pressed and held for a certain amount of seconds and then when depressed the arduino takes that time and puts it into a variable that determines the delay or interval between shots in a time lapse.
So basically if I want to change the interval, I just press the button and hold it while looking at a timer on my phone. Really easy way and I'm not limited by presets. That is working.
But now, what I want to add is a feature where the arduino controls the shutter opening and closing therefore giving the arduino the ability to change the shutterspeed (exposure).
Let me just mention, when shooting time lapses, you always want to be in manual mode, to eliminate flickering. What happens when the camera automatically chooses an exposure. What pro time lapsers do is they use manual and when the light changes, they just manually change the exposure. And then use expensive software to even out those manual exposure updates.
But I don't have that software, but I can make my arduino control the exposure. I can set my camera to time mode, where it wants to receive one signal to open the shutter and then another one to end the exposure. (the same signal, but sent twice, it might sound like I said the camera wants different signals one for open and one for close, but it only takes one)
So I built in some new hardware to my remote, another toggle switch, and a potentiometer.
So this is the hardware that is installed:
- The on and off switch, that just cuts power to the arduino from the battery.
- The shutter button, a normal push button that controls the shutter in single shot mode, and the interval in time lapse mode.
- The mode toggle switch, that switches the arduino between interval or time lapse mode, and single shot mode.
- The manual shutter control toggle switch, that tells the arduino to use 2 delays, one for the shutter speed control (the delay between the pulses that opens and closes the camera) and then the other delay to control the interval (between shots).
- The potentiometer that I want to use to control the delay that controls the shutter speed. (at first I just want this to control the physical shutter speed, because that is what I can't get to work now, and then later I will just add some code which wouldn't be to hard, that actually makes the potentiometer control the amount of milliseconds that the arduino adds/subtracts from the shutterspeed. Basically the rate at which the arduino makes the exposure longer or shorter)
Basically I already wrote all the code, but I just can't get it to use two different delays between when the manual shutter speed control toggle switch (hardware installed nr. 4 above) is turned on.
And if I tell it to print the value it gets from the potentiometer if the switch 4. is turned on, it weirdly only prints that value if I press the button to assign a different interval, which should be totally independent of the shutter speed delay, they are totally different delays in separate places. And then on the serial monitor it only returns a 0 no matter where my potentiometer is set. So I can't get it to properly read the potertiometer with analogread. There is nothing wrong with my hardware because the example sketch that reads the potentiometer works perfectly.
Everything works, except the new feature that adds another delay to control the shutter speed also. This is just a reminder, this feature should allow me to get smooth timelapses where the exposure slowly changes to compensate for the change in lighting when the sun rises or sets.
Thanks to anyone willing to take a look.
Code attached
Nikon_IR_Remote_Control.ino (4.81 KB)