Okii Quick Menu

Canon USB Protocol

This article describes certain characteristics of Canon's USB protocol that directly affect the performance of the Okii Systems USB Focus Controller. It is necessary to understand how Canon's implementation works so that you can utilize the USB Focus Controller to the extent of its capabilities.
Canon EOS Digital SLR cameras use a combination of two protocols called Picture Transfer Protocol (PTP) and Media Transfer Protocol (MTP) to send and receive commands, data, and images to and from a computer using USB.
Various projects, such as gPhoto (http://www.gphoto.org/) and Canon’s own EDSDK, have documented both the packet structure and many of the USB commands that Canon uses. Okii Systems has also reverse engineered many of the commands specific to the USB Focus Controller.
When development initially began, the easiest comparison to the features we wanted to include in the USB Focus Controller were recognizable in Canon's own EOS Utility. While the camera is tethered to a computer running the EOS Utility, you are able to manipulate the focus in Live View mode, start/stop recording, set camera parameters, and so forth. One major drawback of the EOS Utility is that it does not allow you to make continuous, smooth focus adjustment, as you are limited to rapidly clicking the focus control buttons on the interface. Continuous focus control is one of the most important goals.
To remedy this, the USB Focus Controller has a rotary encoder, which can be turned infinitely in either direction. Combined with the proper software, the USB Focus Controller will send focus commands at regular intervals to the camera, overcoming the biggest problem with using the EOS Utility to control focus (besides the obvious fact that the EOS Utility requires you to lug a computer around).
Electronic Does Not Equal Mechanical
One extremely important thing to keep in mind is that the Okii USB Focus Controller can not have the exact same feel as a mechanical follow focus. Canon's USB implementation provides the camera with the ability to move the focus using the lens motor in three different sized steps. Each command that is sent from the USB Focus Controller to the camera has a parameter that specifies the step size, be it small, medium, or large. What those step sizes equate to are different for every single model of lens. Additionally, zoom lenses vary between focal lengths. For instance, if you are using the 24-70mm f/2.8L, a "small" step size focus command at 24mm will cover more distance than the same command at 70mm.

Furthermore, there are additional characteristics that make focus control even more complicated:

  1. When a focus command is sent to the camera, a success packet is always returned, even if the command is ignored. The controller can repeatedly send focus commands, but if the camera is performing another action, the focus will not change.
  2. There is no way to detect an ignored focus command other than seeing that the focus did not move on the lens or in the live view image. No USB feedback is given when focus commands are ignored.
  3. If the rate that commands are sent to the camera is too fast, it can cause the camera to temporarily pause and ignore further commands. The maximum reliable rate is about 15 commands per second, assuming the particular lens in use is mechanically capable of moving between focus positions at this speed.
  4. The time it takes for each lens model to change focus from one position to another varies, depending on the type of lens motor, the focal length, and the focus step size.

Based on the above, it is necessary to be able to cap the maximum rate at which focus commands are sent. This setting can be easily modified on the USB Focus Controller , making it possible to have reliable and smooth focus control.

Too Fast
So what happens if commands are sent too fast? As mentioned before, they will be dropped. This leads to jerky or slower moving focus adjustment. As an example, if a lens takes 100 milliseconds to move between focus steps (which is 10 commands per second), then sending commands to the camera at 11 commands per second will result in just about every other command being ignored. The first command will execute, moving the focus, but the second command will come too early, only waiting 91 milliseconds, rather than 100 milliseconds. This means it is ignored. It will then be another 91 milliseconds before the next command is sent.
So why not spam the camera with a constant stream of commands to ensure that ignored commands don't matter? In theory this isn't a bad idea, but in reality you can overflow the command buffer on the camera, which causes it to stop accepting any commands for a short period of time. This results in lengthy pauses while trying to control the focus.
Trade-Off: Speed Versus Smoothness
As mentioned above, the specific lens in use, along with the focus step size and focal length, will dictate the maximum speed that focus commands can be sent. The speed at which focus commands are sent also determines how fast the focus can move between different distances (i.e. rack focus).
A smaller focus step size results in a smoother focus transition, but at the same time, it also means it takes longer to move the focus from one distance to another.
The opposite is true when you increase the step size; the focus transition will not be as smooth, but the speed at which the focus can move is much faster.
Keep in mind that there is a balance between speed and smoothness, and you will have to choose appropriate focus step size and focus command rates depending on your needs.
Why no marking ring?
Most mechanical follow focus units have some kind of marking ring, which allows you to more easily return to specific focus distances. This works because the knob is linked to the focus ring of the lens with direct gearing.
This isn't possible with the Okii USB Focus Controller for a number of reasons. The maximum rate that commands can be sent is limited due to Canon's USB implementation and lens design, so during development we had to choose whether or not focus commands would be queued.
If you queue commands there is an unfortunate side effect, which causes the control of the focus to feel detached from the knob. This happens because of the maximum rate that commands can be sent. For example, if the controller is set to send a maximum of 10 focus commands per second, but you turn the knob fast enough to generate 20 focus commands per second, then the additional commands will be queued up, causing the focus to continue moving even after you have stopped turning the knob.
To prevent this, focus commands are not queued. This way the focus stops immediately when you stop turning the knob. This allows for precision and accuracy in focus adjustment, and gets rid of the detached feel when queuing focus commands. For the same reason this makes it impossible to use a marking ring, because any time you surpass the focus command send rate by turning the knob too fast, the knob would no longer be accurate to the marks.

Focus Points
One of the extra features of the USB Focus Controller is the ability to save and return to focus points. Due to the previously mentioned problem of there being no feedback from an ignored focus command, the ability to save and return to focus points must be done on a command count basis. This means that each focus point is remembered by knowing how many focus commands it takes to get it to it when compared to the current location. If you relied on spamming the camera with a continuous stream of focus commands, this would make it impossible to return to a saved focus point since you would have no way of knowing how many commands it took to get there.

For the same reason, it is imperative that the focus command send rate is adjusted properly when attempting to use focus points. If the rate is too fast, the command count will be thrown off by ignored focus commands, resulting in inaccurate focus points.

Focus Shift
Unfortunately not all lenses are created equally. This makes certain lenses unreliable for focus points, even if the focus command send rate is set properly. This unreliability stems from the mechanical design of the lens causing it to have different focus distance coverage depending on which direction the focus is moving. For example, sending a single command to move the focus towards infinity may turn the internal focus element 15 degrees counter-clockwise. Then, sending another command to move the focus towards the minimum focus distance may turn the internal focus element only 10 degrees clockwise. Only a single command was sent in each direction, but the focus is not at the same location that it started!

The severity of focus shift depends from model to model of lens. Some have a very slight shift, so they will work fine for multiple focus transitions. Even if the shift is very large, you can also recalibrate it before you begin filming. This is done by pressing the button for a saved focus point and waiting for the focus to stop moving. You can then grasp the focus ring on the lens with your hand and turn it until the lens focus corresponds with the saved focus point.
Since there are far too many lenses on the market to test for focus shift, every Okii Systems USB Focus Controller includes a 30 day return policy. This allows you to fully test the controller with your gear.