How to read the data from a Nikon lens

Hi everyone!

I'm new here and ready to learn and experiment!

FYI, I did search this site and did a general google search and did find some good info, but most of it was for Canon lenses.

This is what I want to try doing (or if it has been done, let me know and share the link!): I want to do two things:

  1. I would like to use an Arduino to attach to the pins on a Nikon AF lens to be able to:
  • a) read the lens data
  • b) control the aperture and focus
  1. I would like to then save the lens data so that I can then communicate to the camera body by the pins on the lens mount. I want to do this because I want to build my own experimental lenses and then have the camera control them as if they were native Nikon lenses.

Here's what I know:

  1. The pinouts used on both the lens and camera body. (F-Mount - Nikon Hacker)
  2. That the communication protocol is very close, if not identical, to the SPI protocol.
  3. About 7 years ago a guy in Russia showed a video claiming to have done this with a Canon lens on a Sony body, so that he in effect fooled the camera into thinking it was connected to a Sony lens; he has done no update in all that time so it may not have been true or he gave up.

So, can anyone tell me if such an Arduino project already exists, or can steer me in the right direction?

Thank you all in advance that give constructive feedback!

Provided that the hardware protocol is SPI, you have to handle also the software protocol, which actually can be anything.

You can start listening to the communication between a camera and lens and try to decode the commands and messages. Here a logic analyzer can help a lot. Good luck!