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:
00077430.505
, which contains[OPEN_DEBUG_MENU]
DEVELOP.MOD
, which is empty
To enter the development menu:
- Power off your camera
- Insert a SD card containing these files (See resources at the end for the files for your camera model).
- Keep the SD card door open. On the K-5, there seems to be a tiny switch that detects whether the door is open.
- Power on your camera
- 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 #
- SD Card (any size, mine was 2GB formatted as FAT)
- Computer with SD reader
- Text editor
- Camera, fully charged, turned off
- See the Debug Menu Files to find the right files for your camera.
- Compatible lens, mounted on the camera
- I used a Pentax K-5 and a DA 16-50mm F2.8 lens.
- I have not researched for which cameras and lenses this operation works.
Checklist #
- Copy the two files to enable the debug menu to your SD card.
- Insert the SD card into your camera, but leave the card door open.
- Power on your camera.
- You should now see the development menu showing
Development Menu1
at the top of the screen.
- You should now see the development menu showing
- On the direction keys, press down until you see
LENS ROM DAT CAMERA=>SD
, which was onDevelopment Menu4
on my camera. - Select
LENS ROM DAT CAMERA=>SD
and press OK. This will write the Lens EEPROM to the SD card. - Power off your camera.
- 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.
- Edit
LENSEEP.LNS
- In column
03
, replace all instances ofC0
with80
. - 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.
- In column
- Copy the modified file on the SD card.
- Insert the SD card into your camera, but leave the card door open.
- Power on your camera. You should now see the development menu showing
Development Menu1
on the top of the screen. - Select
LENS ROM DAT SD=>CAMERA
, which was onDevelopment Menu4
on my camera, and press OK.- The display should first show
Wait...
, and afterwards the verification of all addresses in the fileVerify 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.
- The display should first show
- Once completed successfully the display shows
Development Menu4
again. - 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:
- Is it possible to just leave the development menu files for all camera models on a single SD card to allways have a general development access card?
- What are there any other interesting functions in the development menu?
- Is it really necessary to replace all
C0
with80
in column03
or would specific lines be enough for specific cameras?
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.