The M42 "universal screw thread" lens mount was used on film cameras from Pentax, Praktica, and others for decades... so a lot of great old lenses are available at modest prices. A lot of people are buying adapters (usually $5 to $30) that allow M42 lenses to be used on modern DSLRs made by Canon, Olympus, Pentax, Sony, etc.
Physically mounting an M42 lens on your DSLR is easy with an appropriate adapter, and of course the lens will have to be focused manually, but there is also a little matter of how one controls the lens aperture. The aperture is the thing shown in the photo; a diaphragm consisting of a set of blades that allow the amount of light passing through the lens to be reduced to the desired level, which also allows a controlled increase in the depth of field.
There are three basic types of M42 aperture controls , listed here in chronological order. The catch is that all three types can have no response to turning the obviously marked aperture ring -- without being broken. This little instructable is about how to make aperture control (f/ number setting) on each of these types of lenses work on your DSLR.
Step 1: Preset Aperture Control
Before the middle 1960s, M42 lenses typically had preset aperture controls, as does the Soligor 135mm f/2.8 shown here. Preset lenses typically have two separate aperture control rings near the front of the lens.
One of the rings is used to set the smallest aperture (minimum opening and largest f/ number) that you might like to use for taking a photo. This ring is usually marked with f/ numbers and often will have detents that allow it to hold its setting. Turning it usually doesn't get any response from the aperture blades.
The second ring may also be marked with f/ numbers, or sometimes simply with the letters "o" and "c," or it may be entirely unmarked (as in the photo). It usually doesn't have any detents, but turns smoothly. Turning this second ring toward "c" (close) allows the lens aperture to actually be closed to the f/ value set on the first ring, whereas turning toward "o" opens the aperture.
A few preset lenses (e.g., Volna-9) actually use a single ring at the front of the lens for both functions. Pressing that ring toward the camera body allows setting the stop.
Because preset lenses were completely manual, they still work precisely as intended on modern DSLRs. Actually, they are the easiest to use on a DSLR. You focus with the lens wide open and then twist the second ring to stop-down to the desired aperture just before taking the photo.
These lenses often will have the aperture blades far out on the lens body, away from the camera body. More significantly, there are often many aperture blades, giving a very circular openning. Unlike other lenses, a little oil on the blades generally is not a problem for a preset lens. Friction is pretty high, but your hand turning the second ring can provide plenty of force.
Step 2: Switchable Automatic / Manual Apertures
Historically, switchable automatic / manual aperture controls came next. They have a single aperture ring, a separate "AUTO/MAN" switch, and a little pin on the rear (camera side) of the lens. The photo here shows a Pentax Super Takumar 28mm f/3.5 lens which is of this type.
The "Automatic" operation is the automatic closure of the lens to the set aperture when the shutter is pressed -- the lens is intended to remain wide open for focus until that moment. The aperture ring is usually set close to the camera body because closing of the aperture needs to be able to be triggered by the body pressing in the little pin protruding from the back of the lens. Incidentally, this has to happen fast with little force, so the number of blades in the aperture is typically 6-8 to reduce friction, unfortunately making the stopped-down aperture not exactly circular.
The "Manual" mode is available largely to support older bodies that cannot press the pin. An external slide switch selects "AUTO" or "MAN" operation. This also can serve as a "depth of field preview" button, in which case the switch may be spring loaded to return to the "AUTO" position.
To use this type of lens on a modern DSLR, which also cannot press the pin, the lens is simply put in "MAN" mode and the aperture ring is used rather like the second ring on a preset. There is no first ring and hence no preset stop. The best way to get around this is to get used to knowing how many detents you pass to go from wide open to each of the other f/ numbers. For example, if f/5.6 is 5 detents away from wide open, you would focus wide open and then turn the aperture ring 5 detents to take the photo at f/5.6. This is a little confusing at first if you have multiple lenses with different detent intervals, etc., but it really works well with practice.
Unfortunately, the "AUTO/MAN" switch typically is a little piece of plastic sticking out on the side of a solid metal lens barrel, so it is not unusual to find the switch broken off, leaving the lens permanently in "AUTO" mode. If that's the case, try to switch it one last time into "MAN" mode. Failing that, you essentially have the third type of lens....
Step 3: Automatic Only Lenses
Camera manufacturers eventually began dropping the "AUTO/MAN" switch... after all, the SLRs that needed manual mode were long out of production. In many cameras, the switch was redundant because the camera body provided a "depth-of-field preview" button that works by hitting the pin on the back of the lens. For example, the Zenit Helios 44M-4 58mm f/2 shown has a rear pin, but no switch and is thus automatic only.
These lenses are problematic for DSLRs that don't have a way to press the pin on the rear of the lens. They work fine wide open, but cannot stop down.
The key to making these lenses useful without major surgery is that pin on the back. Basically, you need to keep it depressed all the time to make the lens behave like a manual lens. This can be done any of the following ways (but I recommend #3):
1. Use an adapter that holds the pin down. There are some that have a little built-in ledge for this purpose, but most don't (as shown in the fourth photo here). Aside from adapters with ledges being hard to find, the extra thickness of a ledge could interfere with the mirror box in some DSLRs. As of May 2011, I have found that some M42 lenses cannot focus to infinity because the rear element hits the edge of a slightly too-wide ledge; I found this problem using an M42-NEX adapter with a 50mm f/1.4 SMC Takumar -- this lens worked fine with some other ledged adapters.
2. Cut a tiny piece of metal foil duct tape and use it to hold the pin down. Be careful not to cover the M42 thread nor interfere with the movement of the rear lens group during focus.This method is trivially reversible, but unfortunately is often self-reversing... i.e., the tape becomes loose enough for the pin to pop up part way. This is a good way to quickly test a lens.
3. Use a dab of strong glue to hold the pin down. This is what worked best for my Helios 44M-4. I took a plastic straw and used it to hold the pin down while I placed a tiny drop of glue on the edge of the pin. After holding it in place for 30 seconds, it was easy to leverage the straw free, leaving the pin glued in place. This glue is not trivially reversible, but the glue is only at the tip of the pin, so it is possible to restore the pin to operating condition by either picking the glue off using a needle or opening the rear of the lens and using a temperature change or pushing the pin from the inside to break the glue bond.
4. Perform a little surgery on the lens. Typically, there is a little spring inside the lens that keeps the aperture blades open... you can remove that spring. A variant that works on some lenses involves simply slipping something over the pin on the inside so the pin cannot go through the rear plate, holding it down much as if it had been glued. I don't recommend any surgery unless you've taken apart lenses before -- some lenses have tiny parts inside that can fall out of place.
EboneezerG made it!