Do you intend to use the sonar unit to measure the distance between the object and the focal plane of the camera and set the focus based simply on distance or are you thinking of using image processing techniques to determine when the image is in focus? Both methods are possible, but the latter is practicably possible with the Arduino due to processing power, memory and bus, to name a few. Reading the sonar and adjusting the foucus using a simple look up table is within the capabilities of Arduino.

Using image processing techniques to perform the autofocus is possible with the processor on the Due, I am not certain that the Due hardware/software is stable enough to engage that large a project on.

Many DSLRs support a wired shutter release that has 3 wires. If you connect two wires so it makes a circuit, the camera will do the action for 1/2 press of the shutter (normally auto-focus). If you connect all 3 wires (or possibly the other wire and one of the first two wires depending on the camera), the camera will take the picture. It is fairly simple to use 2 opto-isolators on the Arduino to control connecting the two wires to make a circuit.

This of course depends on whether your DSLR will auto focus in video mode with the shutter release. For example, my Olympus E-5 will not use the shutter release to start/stop video (you need to press a different button to start/stop video), but you can do 1/2 press for auto focus. An alternative is to use a servo that is calibrated so it presses whatever button you use for auto focus when directed to by the Arduino.

Here is a picture of an earlier version of my telegraph key shutter release where I used a binary switch (telegraph key) to control both auto focus and shooting, by having the auto focus circuit turned on as long as I have the key depressed, and when the key is released, then hold both the auto focus and the shooting circuits closed for a period of time (which is controlled by a potentiometer). I then use the buzzer to signal "Fire" via morse code:

If you go to gadgetinfinity.com to their wired shutter release section (http://www.gadgetinfinity.com/wired/), if you scroll through the options you will see various cables to connect the Cactus V5 shutter release to a particular camera. If you buy the cable for your camera, it will give a 2.5mm phono cable connection that you can then connect to your Arduino via the opto-isolators.

Now when the distance is 1 meter 30 cm, the location of the servo will be at postion "1 meter" + 30 cm. How to write this code is more than I can comprehend.

then, when pressing a button, the "autofocus" is triggered, and lens is focused.

I also want to be able to manually focus with linear potentiometer. This seems to be is pretty straight forward.

Also attached a sketch.

I will pay decent to get help with this project. Give me an offer. Would be helpful if person is located in NY/ Brooklyn.

Semi urgent.

Many thanks/ Sigurd

At some point, I plan to do something similar for zooming the lens. Right now, I just use a home-made follow focus mechanism with an embroidery hoop around the zoom ring on the camera, wrapped in leather so it makes a tight connection, and then hook hook a long screw rod:

In terms of remote support, most DSLRs offer remote video using composite video and some offer it via HDMI as well. If your camera offers live view HDMI, Lilliput makes some monitors that are meant for field use on DSLRs. If you are limited to composite video (such as my Olympus cameras do), there are various options. At the high end, Lilliput monitors also take composite. At the low end, you can get various monitors meant for car backup or security cameras that you can get for $20-30 (plus you will need a battery for remote use).