• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

Canon EF lenses - focal length reporting

Doug Kerr

Well-known member
In the course of my recent (and earlier) work on beamwidth control on the Canon Speedlite EX series of flash units, I became interested in the way in which Canon EF-series lenses (and compatible lenses made by other manufacturers) reported their focal length (current focal length, for zoom lenses).

The focal length is of course reported from a set of discrete values. But, for most of the lenses I have looked at, the list is a curious one indeed.

For example, for the Canon EF 24-105mm f/1.4L IS USM zoom lens, the repertoire seems to be (in mm):

24, 28, 32, 35, 40, 45, 47, 50, 55, 58, 60, 65, 67, 70, 73, 75, 80, 82, 84, 85, 88, 90, 92, 93, 95, 96, 97, 98, 99, 100, 105

There is a great contrast between the rather large spacing between certain sets of values (e.g., 35-40-45, 75-80) and "tight" sequences such as 58-60 or, more dramatically, 96-97-98-99-100.

Do we know the premise(s) for this curious set of values?

I note, for what it is worth, that for this lens, the list includes:

- The seven traditional lens focal lengths for which (if we consider operation with a full-frame format) Speedlite flash units with zoom heads have corresponding head positions: 24, 28, 35, 50, 70, 80, and 105 (itself a curious sequence).

- The three focal lengths for which (if we consider operation with a full-frame format) some newer Speedlite flash units (430EX, 580EX II) have "supplementary" head positions (used in automatic zoom control if sensor size accommodation is in force, but not available for manual selection by the user): 40, 60, and 90.

Regarding compatible lenses by other manufacturers, for my EF-mount Sigma 18-200mm OS the repertoire of reported focal lengths is:

18, 21, 24, 28, 31, 35, 42, 51, 63, 78, 96, 115, 134, 154, 173, 200
 

Ray West

New member
Hi Doug,

Why can't you find a simple problem?

How do you slice something up?

Choose a single lens, or flash, or whatever, and I may join you in hammering it to death, if you wish. Not being a woman, I find it difficult to think of more than one thing at a time.

Best wishes,

Ray
 
Do we know the premise(s) for this curious set of values?

I could only guess. However, many values in the EXIF are stored as rational numbers, i.e. ratios of 2 integers (usually 'bytes' or 'words', sometimes 'longs'), which allows for simple math and comparisons, but with high binary accuracy. Maybe the jumps in precision happen where the denominator gets smaller and the numerator reset to 'some value'.

Bart
 

Doug Kerr

Well-known member
Hi, Bart,

I could only guess. However, many values in the EXIF are stored as rational numbers, i.e. ratios of 2 integers (usually 'bytes' or 'words', sometimes 'longs')

Actually, there are only two types of rational numbers used in the Exif metadata. One ("RATIONAL") is the ratio of two 32-bit unsigned integers; the other ("SRATIONAL") the ratio of two 32-bit signed integers

. . . which allows for simple math and comparisons, but with high binary accuracy. Maybe the jumps in precision happen where the denominator gets smaller and the numerator reset to 'some value'.

I doubt if these lists are creatures of the data type in the Exif metadata. There, the focal length is carried as the ratio of two 32-bit unsigned integers. It is up to the manufacturer how to set up the fractions. They could choose make the denominator always "1" and thus be able to represent focal lengths of 0 to about 4.3E9 with a precision of 1 mm! Or they could make the denominator always 1024 and thus be able to represent focal lengths up to about 4.2 million with a resolution of about 0.001 mm!

I'm sure the lists are creatures of the lens and its focal length encoding scheme.

I have no idea in what format the focal length is sent by the lens to the body.

I don't think it is in a simplistic coding of a small number of bits into a standard table, since for other lenses the list has mostly different entries.

I could imagine some kind of binary floating point representation. Perhaps. If we had a 7-bit mantissa (offset, so its range would be 1-128, since "0" is not needed) and a 3 bit exponent (a range of 0-7, thus multipliers of 1,2,4, 8, 16, 32, 64, and 128), we could pass in those 10 bits focal lengths of 1-16384, with ones up to 128 having a granularity of 1 mm and those from 129 through 265 having a granularity of 2 mm.

But I really have no idea.

Best regards,

Doug
 
Hi Doug,

If the mechanism to return focal length (as the user zooms the lens) is in any way similar to the mechanism for returning focus distance, then this is not an analog device.

It is a set of discrete contacts that, when the lens barrel and rings move, close certain circuits, and the patterns of closed contacts represent specific discrete distances for the distance info. (if you've never taken a lens apart before, this can be seen in Steve Weixel's "Tour" of a disassembled lens.

I would imagine the focal length work on the same basis, and that the odd focal lengths are simply the ones they could "fit in" to the hardware constraints, i.e. the readable values based on different patterns of contacts being closed. They can only fit in so many contacts, and it's possible that, in the case of your Sigma lens, there are closed (readable) circuits at the 18mm setting, but not 19 and 20mm. However, at the 21mm setting, there is again a different set of contacts forming a circuit.

Similarly, with your 24-105 lens, maybe there are no properly aligned contacts (closed circuits) anywhere between 100 and 105mm?

This is just all speculation on my part, but I think it makes sense. I eagerly await confirmation or to be proven wrong :)
 

Doug Kerr

Well-known member
Hi, Dawid,

If the mechanism to return focal length (as the user zooms the lens) is in any way similar to the mechanism for returning focus distance, then this is not an analog device.

Almost certainly.

It is a set of discrete contacts that, when the lens barrel and rings move, close certain circuits, and the patterns of closed contacts represent specific discrete distances for the distance info.

Sure.

I would imagine the focal length work on the same basis, and that the odd focal lengths are simply the ones they could "fit in" to the hardware constraints, i.e. the readable values based on different patterns of contacts being closed. They can only fit in so many contacts, and it's possible that, in the case of your Sigma lens, there are closed (readable) circuits at the 18mm setting, but not 19 and 20mm. However, at the 21mm setting, there is again a different set of contacts forming a circuit.

Similarly, with your 24-105 lens, maybe there are no properly aligned contacts (closed circuits) anywhere between 100 and 105mm?

That is all very reasonable speculation. Still, it is curious that Canon would be "able to fit" encoder contacts to give discrete readings for 95, 96, 97, 98, and 99 mm, but not choose a similar resolution in, for example, the range 35-40-45.

Thanks for your thoughts.

Best regards,

Doug
 
My thinking, was (assuming this is a radial / rotational device) that there is maybe not one contact per focal length reading, but, rather, say 20 contacts in total. As the zoom barrel rotates, these 20 contacts or so are in different opposition to one another (across different focal lengths), and might make contact in various "combinations".

If this is the case, I can imagine scenarios where you will have somewhat irregular focal-length spacing based on the inability, or even duplication, of certain patterns of contacts being formed.

But who knows... Again, only speculation. I am hopefully visiting my friend who is a canon technician next week, maybe he can clarify / even show me. If this happens, I will surely share what I learn.

Either way, Dough, this is an interesting topic I have never considered before, and may turn out to be yet another of those fascinating insights into Canon equipment which so few other forums are able to collectively provide!

Thank you
 
Top