Emulating an EF Lens - The Beginning

This is the start of the story on my work with the Canon EF protocol, the part of the story where the idea borrowed into my brain and refused to leave.

I honestly did not intend for this project to take over my life, and yet here I sit, surrounded by half disassembled lenses, testing rigs, logic analyzers, microcontrollers and breadboards, and it’s hard to deny exactly how far down this rabbit hole I’ve fallen. I might be stuck.

By the spring of 2025 I had built up a small collection of old vintage lenses. Mostly old Nikon from the 60’s and 70’s, and some m42 lenses like the Helios 44-2 and 44M. They were fun to use, but I was pretty bad at focusing, which meant that I didn’t grab them as often as I wanted to. Around that time I bumped into the Techart TZM-02 and LM-EA9 adapters that adapt M mount lenses to Nikon and Sony cameras with full autofocus. I was captivated by the idea, but I didn’t own either of those brands of camera. And then one of those dangerous ideas popped into my head, why not just make my own?

Poking around online found some information about people interfacing with EF lenses to use them in other applications. To me this read as the protocol was already reverse engineered, should be pretty easy to just read up on it and whip up my own hardware. So I dove in. And oh boy was my assumption wrong.

There’s just enough information to make it seem like most of this is figured out. You can readily find information about the camera-lens pinout, the physical mount, the electrical details of the communication bus, and some of the commands that can be used to drive a lens. It all sounds like the pieces are there. So I ran with it. I put together a bread board with a raspberry Pi Pico and some basic circuitry to allow me to tap into the lens mount. I tore apart an EF to EF-m adapter and broke out the pins from both sides so I could wire them to the Pico, and I wrote some basic firmware that listened for the commands I’d found in my research. And it didn’t work. At all.

Then I did what I should have done first, attached a real lens and used a logic analyzer to read the real traffic. Turns out there’s way more going on. In retrospect, it’s pretty obvious that the communication here isn’t one way, it’s not just the camera shouting commands at a mute lens, the camera and lens are in a constant conversation. I could find nothing about that lens side of the conversation. This should have been the point I gave up. I am a mechanical engineer, my electrical and firmware skills are moderate at best. Reverse engineering a protocol like this is something that giants like Tamron and Sigma would have thrown a full team at back in the day. What chance do I stand?

That’s the thing about hard problems though, they borrow in deep and taunt you.

So here I sit, consumed by this new language, surrounded by parts and wires, excel sheets and code windows, oscilloscope and logic analyzer. And the craziest thing is I think I’m figuring it out. I have enough that I have a prototype functioning. I’ve taken video with a lens from the 1960’s using full modern eye tracking autofocus. The 28mm Nikon lens that took photos of me and my siblings as children now sits mounted to a camera that was released in 2022 and happily autofocuses.

I plan on using this project log to do deep dives on this journey. It’s going to be nerdy and technical, but if you want a peak into how how this problem is getting unraveled, stick around. It should be fun.