Two years ago, I spoke with a film maker who told me about the problem of manual focusing with the video enabled Canon DSLRs. As the focusing sensor works only when the camera’s mirror is down, when in video mode, with the mirror up, the camera switches into manual focusing mode, via the lens focusing ring. Several solutions exist on the market, but they mainly use mechanical links to deport the focus ring to more accessible place on the camera rig.
Some electronic solutions exist, but they use the Camera’s USB input and the focusing speed is quite low.
I decided to dig into the communication protocol between the camera body and the lens.
Canon EFS lenses are connected to the body via a 7 pin connector. Three for the power supply and four for a standard SPI serial interface (including digital ground).
Then, I bought a lens extender to be able to probe the communications on the bus. First only in parallel, dumping the data and then, I interfaced a microcontroller between the camera body and the lens:
The communication is always initiated by the camera. The lens can send a busy state by pulling the Dclk pin down (what it does after every received command as an acknowledge sign). The clock frequency is approx. 80kHz. One byte length, including the busy state from the lens, is 113us.
The camera reads the Din line state on rising edges of the Dclk line it generates. If there’s no ack from the lens, the camera will display an error after two or three tries.
The Dout line is held down when the camera generates the Dclk to read a byte from the lens on the Din line.
Being (also) a photographer myself, I had several camera bodies and lenses to test and I was able to find out some of the basic commands:
I started by making my microcontroller to repeat the commands and answers, including the busy flag management. Then, I implemented a small function that allowed me to turn the focus ring using a digital encoder. It worked ok. The problem is, every lens has different number of steps for the whole focusing range. Some have like 800, for others, it’s more 2500. It’s clear I had to increase the number of steps of the focusing ring for each of the encoder’s steps. That’s where the problems started to appear. The only solution I could come up with was to calibrate each lens at power-up by making it go across the full range of focus, counting the steps so I could use this number in my firmware.
Another problem was to make the camera generate the power supply for the lens motor when I was sending commands to it with my microcontroller, as the motor power is only generated by the camera when it has to send focus commands.
The protocol data speed is quite fast, so a powerful micro must be used, as it has to translate the commands on the fly and transmit the correct answers to the camera body (if not, the camera displays an error and stops filming). But the biggest problem was to figure out how to fit and connect my circuit to the lens. There must be an input for the command (digital encoder or potentiometer). The power supply can be external. Adding a lens extender is the easiest solution, but it changes the lens parameters (depending on its focal length, it becomes more or less a macro lens)
I settled on two cables coming from the lens, one from the camera side connector, the other from the lens circuit side. For still pictures mode, the two cables would connect together, without the interface circuit. For video shooting, the interface circuit containing the microcontroller, user input and probably a battery for lens motor drive would be connected. Each lens has to be modified to be plugged to the Follow Focus circuit.
Unfortunately, I had to stop working on this project. It was taking me too much time and I didn’t have the appropriate measurement equipment (a good digital oscilloscope with a big memory). It’s obviously a big project, especially if the result is supposed to be sold to video makers, with rugged and bug-free design. Canon could change its protocol, or increase the data speed, making the new lenses or cameras incompatible. The development requires a lot of testing, with all the possible lens/camera combinations. (whereas the price don’t come so much into account, the mechanical follow focus systems are extremely expensive and this electronic follow focus would be for the professional market).
Even if this project left me a bit disappointed, it was still interesting to try to reverse engineer the protocol and understand how the Canon lenses work. If you’re interested in taking it over, just leave a comment and I’ll be glad to help you.