How I Fixed My Autofocus by Turning it Off

· don's blog

It is possible to configure Pentax lenses to not use their SDM autofocus. And instead let cameras fall back to the screw-drive autofocus.

After a few years of light use, the autofocus of my DA 16-50mm F2.8 lens started to become unreliable and then failed completely. Replacing the failed autofocus component would have cost a few hundred euros and I mostly used other lenses at the time, so didn't investiate further.

Fast forward to last weekend, I though about selling the lens so looked up prices for ones with broken autofocus. To my surprise, most hits were forum posts of people with similar issues. And to my even bigger surprise, they were getting help and their lenses fixed.

The most complete instructions I found were in video form, so I decided to write this post; both for future me and others.

Research #

Around 2007 Pentax released a range of lenses with an autofocus they called "Supersonic Drive Motor" or SDM for short. The SDM technology seems to have terrible reliability, as there are lots of posts of other Pentax lenses with the same issue as mine.

Fortunately, these lenses also had a "screw-drive" autofocus as a fallback to support older cameras. There, the autofocus motor is in the camera body and turns a screw on the lens to move the focus.

Unfortunately, that autofocus is not used on cameras that support the new SDM autofocus. But we can change that.

Development Menu #

There was quite a bit of cargo culting around accessing the debug/development menu. Several sources claimed that a special tethering software is required to enter the development menu. In my experiment, the only thing necessary was an SD card with two magic files that differ by camera model. For the K-5, the two files are:

To enter the development menu:

  1. Power off your camera
  2. Insert a SD card containing these files (See resources at the end for the files for your camera model).
  3. Keep the SD card door open. On the K-5, there seems to be a tiny switch that detects whether the door is open.
  4. Power on your camera
  5. Now the display should show the development menu. You can navigate using the direction buttons.

My SD card was FAT formatted, but I don't know whether this matters as long as the camera is able to read it normaly. But if the development menu does not show up and your card is formatted differently, you might want to try formatting it as FAT.

Lens EEPROM #

The dump of the lens EEPROM is given as a tabular text format. The data is separated into 8 pages of 256 bytes (16x16 grid). Each byte is displayed as two hexadescimal characters. For my lens, the last 4 pages were all FF.

Instructions #

DISCLAIMER: The debug/development menu probably has functions to brick your camera and/or lens. I'm not responsible for any damage!*

Prerequisites #

Checklist #

  1. Copy the two files to enable the debug menu to your SD card.
  2. Insert the SD card into your camera, but leave the card door open.
  3. Power on your camera.
    • You should now see the development menu showing Development Menu1 at the top of the screen.
  4. On the direction keys, press down until you see LENS ROM DAT CAMERA=>SD, which was on Development Menu4 on my camera.
  5. Select LENS ROM DAT CAMERA=>SD and press OK. This will write the Lens EEPROM to the SD card.
  6. Power off your camera.
  7. Copy LENSEEP.LNS from the SD card to your computer.
    • Ideally, copy it twice into separate folders so you have a backup of the original settings.
  8. Edit LENSEEP.LNS
    • In column 03, replace all instances of C0 with 80.
    • If your text editor has search and replace, be careful, to not modify other columns.
    • Ideally compare the original and modifed file to check that there are no unexpected changes.
  9. Copy the modified file on the SD card.
  10. Insert the SD card into your camera, but leave the card door open.
  11. Power on your camera. You should now see the development menu showing Development Menu1 on the top of the screen.
  12. Select LENS ROM DAT SD=>CAMERA, which was on Development Menu4 on my camera, and press OK.
    • The display should first show Wait..., and afterwards the verification of all addresses in the file Verify Adress: 0000 were the number counts up quickly.
    • Different sources mention that this could sometimes fail and show a verification error. If this happens, turn of your camera and try again from 11.
    • In my case it worked on the first try.
  13. Once completed successfully the display shows Development Menu4 again.
  14. Power your camera off; remove the SD card; power your camera on and test your autofocus.

Wrap Up #

I now have another lens with a working autofocus.

I still have a few open questions:

But I got the idea to look into this, because I want to get back into photography. So I'd like to avoid bricking my lens or camera, at least for now.

Resources #