Sunday, April 22, 2012

Arduino based camera shutter release - takes lightning pictures.

Camera Controller

I breadboarded the whole thing up before I did anything else and was able to take pictures of test flashes.  This is exciting for me because it was the first complete “consumer” type device that I have ever built from scratch.  I have built kits before, but never researched, designed and built an entire complete device to control something else.

The cost was around $30-$40 so far.

In researching this device I found that someone else had started about right where I am and ended up creating a very cool project called “The Camera Axe.“  It has a lot of ideas for sensors, and if you want something similar to what I did in this project right now, then that is the place to go if you have the cash and want a finished product.

Another cool project used a 3.3v arduino board and a coin battery in a tiny case to run a camera: hmmm, fill this in later.
I created a camera controller with a Hackaduino I built myself, a 2×16 Grey Display, a 5K pot, 2 transistors, a plastic case, and a few 1/8 male and female jacks.

I found connector info for the camera here:

I had to create a cable to fit into my camera because it used a proprietary plug.  I bought a cheap two step chinese remote manual camera trigger that had the proper plug on the end and cut it back about a foot from the special connector.  I put a female 1/8″ jack on this end and a male 1/8″ plug on the end that was attached to the little box with the two stage button.  This allows me to reconnect up the manual controller to the plug if I need to do so.

I then fit the parts into the plastic case and found that it all fit.  The display fit right onto the space between the front and the battery compartment.

Similar to the display I used:×2-blue-lcd

I used the display directly, following the directions at the arduino site:

This uses up about 6 digital pins to drive the display, but still leaves a bunch of other pins to do more with.  I could have used a serial driver board to power the LCD which would have only taken a couple of digital pins.  There was not really enough room for the lcd driver board in the case I used.

I used a rotary encoder from sparkfun:

There are several examples at the sparkfun site. Rotary encoders are really cool:

I wired it up so that it controls the threshold for the flash to be triggered… for now that is all it does.  The detector uses a threshold so that it will trigger over a wide range of lighting conditions.  Instead of going off some absolute value it triggers when the current light value sudden increases over the threshold amount of the previous light value.  It checks 1000 times a second.
Close up of the Display and encoder in the case:

Display and encoder mounted in case.

I created a two stage camera relay circuit to control the focus and shutter of the camera. This was just using a couple of NPN transistors I got in a pack from Radio Shack.  The two resistors are 1K and are present in case something blows the transistors it might stop it from getting to the main chip.

Just wire this up to any two digital pins on the Arduino, trigger focus first, wait a bit, trigger the shutter, wait a bit, turn off shutter, wait a bit, turn off focus.

I am using this ambient light sensor:

The sensor seems to have a very wide range and goes from very dark to daylight brightness while giving sane values the whole time.

I have it hooked up to a 1/8″ plug and have a 1/8″ jack on the case to accept the connection.  Tip is sensor, middle ring is 5 volts, and the third is ground.

When I first plugged in the sensor it read full scale.  I found that the cord I used had 30 ohm resistors on left and right signal channels in the plug, so I cut it off and put my own jack on instead.  Then the sensor readings were what I had seen on the breadboard.

I plugged the camera cable into the second 1/8″ jack and into the adapter cable I had built, then plugged the adapter cable into the camera, turned the camera on and tested it out:

Flash detection test.

Here the camera controller is taking a picture of me quickly flashing a light at the camera. I just hit and let up on the button and it took a picture before the light died out.

Storm Weather Cover

I bought some black vinyl with fabric backing from a sewing shop. After holding the camera every which way and thinking about how to make things work I came up with the following and my mom sewed it up for me.

Weather cover on the camera.

View from the back of the camera.

Weather cover pushed forward to work on camera.

To Do

DONE! Next step is to wait for the next thunderstorm.  Got a couple of pictures.

DONE! Make a weather cover for my camera.

Build a directional black plastic tube for the sensor. Have it mount onto the hot shoe flash connector.

Research and wire up the flash circuit and a hot shoe flash cable.

Build a sound sensor to work with the unit.

Add the extra programming for the sound sensor, using the selector knob to switch between programs.  Also be able to adjust values using the selector knob.

Save settings to permanent memory of the Arduino chip.

Add programming to act as an intervalometer that is selectable from the selector knob.  The interval will be variable using the selector knob as well.

Look into having a mirror lock up mode for the flash detector.  It should be able to trigger the camera in about 1/3 the time if the mirror is already up when the shutter is triggered.  It has to trigger focus, then trigger the shutter, then release the shutter keeping focus , then wait 30 seconds. If it detects a flash in that time, then it triggers the shutter again.  If not, it releases focus, which releases the mirror lock up and starts all over again.  Research if this is bad for the camera.

Add an LED for focus, and an LED for shutter so that you can visually get feedback of what the device is doing.

Look at using this interrupt driven rotary encoder reader here:

No comments:

Post a Comment