Notes on the Minolta SR-1 (Model A)

The SR-1 is a model of 35mm film SLR camera made by Minolta (Chiyoda Kogaku) from 1959 onwards. It was the second SLR that Minolta released. As was typical at the time, their first was a more expensive model, the SR-2 in 1958, which they then cut down for a  cheaper alternative by removing the fastest shutter setting1. The resulting SR-1 remained in production for the next 12 years, but with incremental changes, which mean that the designation SR-1 actually covers at least five different models.

This first SR-1, unofficially the SR-1 model 1 or model A, is — in its style — surely the finest looking 35mm SLR camera ever made.

In 1962 Minolta spoiled its good looks by adding an industrial-looking bracket on the front for an optional light meter, and in 1965 they redesigned the body in an altogether squarer style. Later models are far more common, at least in the UK, and there is not so much information online about the earlier ones.

Early SR-1s still say SR 2 beneath the bottom plate.

This article hopes to remedy that. Read on for everything I could learn about the workings of the SR-1 model A.

Given the similarity of the two cameras, this probably almost all applies to the SR-2 as well, although actual SR-2s are expensive enough that I’m not sure I would dare to open one.

Standard disclaimer

This is all just the findings of an amateur poking about and making notes. Please don’t follow anything I say and ruin your lovely camera.

This will be a very long article, and unlike my previous post, there’s no story arc for the contemporary reader — I did solve the problem that set me off on this chase, but I did it in a way that would have been unexceptional 50 years ago, and old hands will just tut at my ignorance. The expected audience for this post is pretty much me, re-reading it the next time I need to fix something.

Background

I bought an SR-1 (the one shown above) from a charity shop in non-working condition, thinking it would be nice to get to grips with the workings of a camera with no electrical components at all.

Its second shutter curtain ran very slowly and made a sort of zipper noise, and the shutter mechanism seized up after firing and winding it a few times. I later found other things wrong with it: the slow shutter speeds (1/4 second and slower) didn’t work, and there were various cracks and tears in the second shutter curtain, which needed to be replaced.

I tried to find a maintenance manual for it. I couldn’t find any freely available for download, so I looked around for copies for sale.

I tried a company that sells paper copies of old manuals; they listed two repair manuals for the SR-1, identified as “older version” and “newer version”. I emailed asking whether this referred to the version of the camera or of the manual, and they replied that they couldn’t tell me because they had lost the older one: it existed only on microfiche, to be digitised on demand, but their reader had broken down before anyone had ordered it.

I ordered the version of the manual they could supply; it turns out to cover the later boxy revision that shares a basic body style with the SR-7 model. It is gorgeous to look at, being a negative scan from microfiche of a manual with hand drawn diagrams:

I would happily hang the first of those pages on my wall. But that’s about all I can do with it, as there were a great many changes between the model I have and the one shown here. Fundamental differences in the picture above include:

  • In the picture, both sets of shutter curtain barrels and the whole timing gear are attached to the sides of the mirror box. In the earlier model, all of this stuff was attached to the diecast camera body, and the mirror box had the mirror mechanism and nothing else.
  • In the picture, the second shutter curtain and its tapes are guided directly around the first-curtain barrels. In the earlier model, the second curtain had separate guide pins and never touched the first-curtain barrels.

There are also many omissions, for example the page shown above is the only appearance in the manual of the slow-speed gear (parts numbered 2301-2327), and it’s drawn from below as a single unit so you can’t see any of the details.

Given the lack of an accurate manual, before diving in I bought a second camera of the same model in unknown condition to use as a reference. It was cheaper and in a worse state on the outside, and I had to beat out a dent in the top cover with a small hammer wrapped in a cloth before the winding lever turned smoothly, but otherwise it turned out to be in really good working order.

All of the photos that follow are of the first SR-1 I bought. Most are snaps taken beneath a task light during disassembly. In most cases I have used the same names for the parts as appear in the maintenance manual for the later SR-12.

Survey of features

The Minolta SR-1 model A is a mechanical single-lens reflex camera with pentaprism viewfinder, taking 35mm film and using interchangeable lenses with Minolta’s bayonet lens mount. It has a self-timer, a thread for a mechanical remote in the shutter button, and flash X and FP sync terminals. There is no light meter, no battery, and nothing electrical inside except the wires and contacts used for the flash sync.

It has a semi-automatic aperture (when used with Minolta lenses) and automatic mirror return. That is, focusing is done at fully-open aperture and then the lens stops down automatically to its selected aperture to take the photo; after taking, it doesn’t re-open until you wind on the film. The mirror however does return to its lowered position as soon as the photo is taken, so you can see through the viewfinder again immediately, just not at full aperture. As in any similar camera of the age, this is achieved through cunning arrangements of gears, springs, and levers.

The camera uses a horizontal-travel cloth focal-plane shutter with speeds from 1/500 to 1 second, selected using a dial that must be lifted up in order to turn it. There are three timing mechanisms: the slowest speeds use a governor mechanism with a clockwork escapement, intermediate speeds use the same governor but bypass the escapement, and fast speeds offset the second shutter by a measured distance from the first.

The SR-1 is made almost entirely of metal, weighing about 730g without a lens. It’s not that easy to take apart and work on, as the design is not particularly modular and it uses a large number of different slot-headed screws, but at least there’s no risk of shearing off any threaded pieces of plastic.

P7120012.jpg

In use, the camera is a little wide and heavy, not that easy to grip, and the pointy end of the metal winding lever can put a dent in your forehead. It’s prettier than it is ergonomic. The shutter and mirror are loud (being totally undamped) but with a satisfyingly crisp sound, and not heavy to operate. The viewfinder is bright and easy to focus with.

How to tell a Model A apart from later models

Referring to this page for the model types, the most obvious distinguishing feature is the speed selection dial.

If the speeds are unevenly spaced on the dial (as in the picture to the right), and you have to lift up the dial to turn it, then it’s a model A.

If the speeds are equally spaced and the dial turns directly with a satisfying click, but there is no mount point for a light meter on the front of the camera, then it’s a model B or C. These also have a chrome ring on the viewfinder eyepiece, where the A has a black one. I don’t know how to tell the difference between B and C from the outside.

If it has a mount point for a light meter on the front, then it’s a model D or later.

Top and bottom covers

The bottom cover is simply held on by two screws.

The top cover is more involved. These pieces must be removed before it can be lifted off:

PB290369.jpg

  • The rewind knob can be unscrewed by hand (open the film door and put a screwdriver across the film engagement fork to hold it still while unscrewing it), but there is a circular plate beneath it that ideally needs a tool such as a spanning wrench to unscrew.
  • The eyepiece is in three parts. The black ring is used to hold on the optional flash cold-shoe, and can be unscrewed by hand. The glass eyepiece in a chromed ring also “simply” unscrews, but I found it maddeningly hard to do — some grippy rubber material may help. The sealing ring then lifts off.
  • To remove the speed selection knob, loosen (but not so far as to remove) the three small grub screws set into its perimeter at regular intervals, then lift it off.
  • The shutter button surround can be unscrewed by hand, and the shutter button then lifts out. The brass ring holding the winding lever in place has notches for unscrewing using a spanning wrench again; once it’s gone, the lever lifts off.
  • Finally three screws hold the cover on.

Don’t mess with the exposure counter window: it’s attached to the top cover.

You can put the winding lever and its brass ring back on after removing the cover — not a bad idea for testing things. No need to put on the shutter button, as all it does is push down a small plate that is now accessible directly just behind the winding gear.

What’s under the top cover

sr1-top.pngThe viewfinder pentaprism is in the middle, beneath a black plastic cover, with the eyepiece next to it.

The parts on the right are organised onto two separate chunky metal plates, the speed change base plate and the winding base plate. In both cases the user-accessible controls are attached on top of the plate, and the gears that do the work are hidden beneath it.

The two plates’ mechanisms are separate, but are connected underneath by a pair of gears in a stack attached to the shutter button plate. You can just see a few of the teeth of one of these gears in the picture, above the exposure counter pulley. When the shutter button is pressed, the first thing that happens is that these gears are detached from one another, disconnecting the two plates, so that the winding gear is not involved in the shutter release action.

Neither plate is easy to remove and replace. The winding plate is easy to remove, but it takes some trial and error to replace it with the right orientations for the gears beneath. The speed change plate can’t be removed without detaching the lever at the top of the slow-motion axis, which I think then can’t be re-attached at the correct angle without access to the lever at the other end of the axis, which is down where the slow speed gear lives, under the baffle at the bottom of the mirror box.

What’s under the bottom cover

sr1-bottom

In this picture the tripod mount has been removed (it is screwed into the three larger holes arranged in a triangle in the middle), and so has the slow-speed gear within the camera, leaving its two attachment holes empty of screws.

Note that the ratchet gears and the attachment screws for their pawls (the little hooks that hold them in place) are threaded backwards — turn right (clockwise) to loosen, left to tighten. This makes sense visually for the pawls because turning left pushes the pawl against the ratchet through friction from the screw, which is what you want to happen. For the ratchets it just has to do with the direction the shutter curtains move.

I didn’t label the flash sync contact mounting block or contacts, which the green and white wires are soldered to. The contacts are attached to a small plastic block which is screwed to the shutter spring base plate at its left end, and directly to the diecast camera body at its right.

Front plate, lens mount, and leather wrap

To get at the mirror box, shutter curtains, shutter springs (but not their tensioning ratchet gears, which we saw above) and barrels, and self-timer, it’s necessary to go in through the front. This means peeling off the leather cover.

First remove the self-timer furniture from the front — the lever cover unscrews with a spanning wrench or similar, and the knurled knob can be unscrewed with small pliers — as well as the lens release knob at the top of the lens mount, which also just unscrews. The top cover of the camera overlaps the lens mount, so it has to come off as well before the front plate can be removed.

The leather is thin in comparison to later cameras, tears easily, and is well stuck down with both glue and tape. It’s not that easy to lift, and it wouldn’t stick back down again without new adhesive, but I did find the texture quite good at hiding mistakes afterwards.

The best bet seemed to be to go in with a small sharp flat-headed screwdriver where the leather meets the lens mount, dig in and lift, and keep chipping away underneath and gradually pulling the cover out as you go. The leather is stuck so tightly up against the lens mount that I was convinced at first that it must have been nosed in under it, but no, it does just sit on top.

The front plate consists of the entire lens mount and two metal “wings” either side of it, beneath the leather, one of which (in picture) has the self-timer attached to its back. The plate is held on by four screws, one at the top and bottom of each wing. Remove these and the front plate then lifts off.

(The two “inner” screws visible in the picture, close to the self-timer lever/switch attach points, hold the self-timer on to the front plate. The self-timer isn’t attached to anything behind it, only to the front plate, so these don’t need to be unscrewed to remove the front.)

When replacing the front plate, put it gently in place first and then press the shutter button a couple of times to make sure the self-timer lever settles into place in the cutout of the shutter release shaft (see picture under the self-timer section below) before trying to fasten it down. Don’t tighten the screws without being sure the self-timer lever is properly settled, or you might damage it.

Shutter speed selection

speed-control-settings

The speed control knob on top of the camera rotates a collar with a pin in it that pokes down through a hole in the plate beneath. The position of the pin is visible from the top of the collar, so the current speed can be read off even though the knob has been removed. The sketch to the right shows the speed corresponding to each position of the pin.

Under the speed control knob is a stack of three eccentric discs which rotate along with the speed setting, serving to set the positions of these three sprung control arms:

sr1-speed-baseThe shutter lever is engaged at fast speeds. It is sprung so as to push against the high-speed lever which is attached to the first-curtain gear, and it has a hook that keeps the second-curtain gear in place. At the appropriate point in the rotation of the first-curtain gear, it gets pushed aside, releasing the second curtain. The screw on top of the lever adjusts an eccentric which controls its sensitivity and thus the shutter spacing.

The slow motion axis is engaged at the slowest speeds. It communicates to the slow speed gear in the base of the camera that its escapement mechanism should not be bypassed.

The slow speed control shaft is used for intermediate and slow speeds. It communicates to the slow speed gear the extent of deflection to use and therefore how long to delay for.

Speed setting Shutter lever position Slow motion axis position Slow speed control shaft extent
B Engaged
500 Engaged
250 Engaged
125 Engaged
60 1/8 approx
X 1/8 approx
30 1/4 approx
15 1/2 approx
8 Engaged 1/8
4 Engaged 1/4
2 Engaged 1/2
1 Engaged Furthest extent

Slow speed gear

The slow-speed gear or governor is a self-contained module that lives beneath a black-painted metal baffle at the bottom of the mirror box. You can see it at the bottom of the picture above, which shows the landscape with the mirror box removed.

You don’t need to remove the whole mirror box to have a look at it — you can just take out the baffle. But I found I had to remove the pentaprism and focusing screen from the top of the mirror box before I could get a screwdriver in vertically enough to undo the two screws at the front that hold the baffle in place.

Slow-speed gear module

The purpose of the slow-speed gear is to allow a lever to rotate a certain extent and then be returned by a spring to its original position, at a speed controlled by an escapement mechanism. In the picture on the right, the lever that is being controlled is engaged with the sprung wheel on the left side, and the escapement consists of the star gear and pallet on the right side. The inertia of the pallet determines the speed at which the wheel is allowed to return to the position set by its spring. An additional lever on top of the module optionally pushes the pallet away entirely, removing this control and allowing the mechanism to run much faster.

Two vertical shafts, visible in the picture at the top of this section, connect the slow-speed gear to the speed control mechanism above. These are referred to as the slow motion axis and the slow speed control shaft. The slow motion axis (the right-hand one of the two in the picture) has the job of pushing the lever on top of the slow-speed gear that deactivates the escapement mechanism for faster speeds. The slow speed control shaft (on the left) is the one that is controlled by the slow-speed gear, being pushed out to an extent fixed by the speed setting and then allowed to return when the shutter is fired. See the following section for more about how these are set for the different shutter speeds.

In my camera the slow-speed gear initially didn’t work, it just got stuck. I removed it, air-dusted and brushed it, and applied a pinpoint of sewing machine oil to the outside ends of the bearings, which was enough to get it moving again. (I believe one doesn’t oil the gears themselves, in a clockwork mechanism.) The escapement runs correctly now, but the intermediate shutter speeds with the escapement disengaged are a bit too fast, so perhaps oiling the bearings was a bad idea too. Though I’m puzzled by how the mechanism is ever expected to time anything accurately in the case when it doesn’t have the escapement engaged. Comments welcome.

Winding gear

Beneath the winding base plate

The base plate which the winding lever attaches to is, unsurprisingly, the winding base plate. The winding lever itself is fixed to the top of a sprung rotating cylinder with a stay at the return point, and this drives the gearing below the plate. I believe the only purpose of the spring in the cylinder is to make the lever flip back when you let go of it.

Winding the lever turns the film advance spool, and also turns the first and second curtain gears, pulling the shutters across to this end of the camera against the pull of the shutter springs at the other end.

Since the shutter curtain gears must spin back again when the shutter is fired, there has to be a mechanism to decouple them from the winding gear while the shutter button is pressed. This consists of a stack of two linked gears, shown in the picture.

The gear sitting at the front of the picture has a hole in it, and it goes on top of the slightly smaller gear just left of centre in the picture — which gets pushed down when the larger gear is added, so that it engages with the winding gear on the right.

This smaller gear has a pin that fits the hole in the larger, so that the two gears normally turn together. The smaller gear is driven from the winding gear, and the larger then drives the gears on the left. When the shutter button is pressed, the smaller gear is lowered and detaches from the larger, leaving the larger one free to spin without any connection to the winding gear.

The small gear also has a cutout in the bottom (not visible here) which fits over the head of a screw jutting from the camera body. The gear can only be lowered when this cutout is aligned over the screw. That’s what prevents the shutter button from being pressed before the film has been fully wound on. It also prevents the winding lever from turning while the button is pressed.

In hindsight there was no good reason other than ignorance and curiosity for me to remove this plate. There were no faults here, the actual fixes I ended up making didn’t require it, and it took some trial and error to fit again. To do so, make sure the small gear is oriented so that the button can be pressed, then fit the larger one over it, push the plate over, and screw down — but it took me several tries before I got the angle of rotation just right so that the shutter could be wound and fired again without jamming because the cutout in the lower gear hadn’t been properly aligned over the screw head.

(It’s also necessary to make sure the disc at the other end of the winding gear, on the bottom of the camera, is at the correct point in its phase of rotation before replacing the winding plate. That is, the pin that pushes the winding charge plate needs to be at roughly the angle shown in the picture at “What’s under the bottom cover” above.)

Shutter firing order

  1. Shutter release shaft

    The shutter release shaft is pressed down, either by the shutter button or by the self-timer lever.

  2. At the top of the camera, lowering the shutter release shaft disengages the winding gear from the transmission and makes space for the fast-speed shutter lever to move in against the first curtain gear if an appropriate speed is selected.
  3. At the bottom of the camera, the pointed end of the shutter release shaft pushes aside a lever that releases the aperture slider at the base of the lens mount, allowing the aperture on the lens to spring closed.
    This picture shows the aperture slider in its cocked position, with the various levers around it. (Cocking the slider is done by the thing I have labelled the winding charge plate, which pushes it along during winding until it latches as below.)
  4. sr1-bottom-detailThe travel of the aperture slider trips a catch I have labelled the mirror lever catch, which holds back the mirror lever on the side of the mirror box. This releases the mirror, which is sprung so as to flip into the upward position.
  5. The gears that control the first and second shutter curtains: first on top, second beneath

    At the end of its travel, the mirror lever strikes a lever I have labelled the shutter trip lever, which I believe is connected to the transmission shaft (this is one part I haven’t actually uncovered). This releases the first curtain gear, firing the first shutter curtain and releasing the slow speed control shaft to begin the slow timer if appropriate.

  6. The first curtain gear spins back to its un-cocked position as the first shutter moves. If a fast speed is selected, then the high-speed lever attached to it pushes aside the shutter lever at the appropriate moment, releasing the second-curtain gear and firing the second shutter curtain. Otherwise it has to wait until the slow speed control shaft has finished its travel.
  7. Mirror kick gear

    At the other end of the second curtain, there is a gear at the bottom of the curtain spring barrel, which rotates the mirror kick gear next to the base of the mirror box. At the end of its rotation a pin on it knocks the mirror hook aside, reversing the direction of spring for the mirror operation lever and pulling the mirror back into lowered position.

Most of these steps are triggered by the completion of the prior step, so guaranteeing that the timing works out. For example, the shutter can’t normally open before the mirror has flipped up, because it is triggered by the mirror lever itself at the end of its travel. But there are some minor timing-related weaknesses:

  • There is no means of synchronisation with the lens aperture itself, only with the aperture release slider. If the aperture takes too long to close, it may be still closing when the shutter begins to travel. This can happen with some lenses whose aperture blades tend to get oily. Yes I mean you, Minolta W.Rokkor-HG 35mm f2.8.
  • It is just possible to press and release the shutter button so quickly that the winding gear (disengaged in step 2) has re-engaged before step 5 is reached, preventing the transmission gears from turning and leaving the mirror flipped up but the shutter still closed. Pressing the button again will fire the shutter and complete the process.
  • The winding gear is re-engaged at the end of the first shutter’s travel in step 6; it doesn’t wait for the second shutter. So there is nothing preventing you from winding the film on in the middle of a long exposure.

Some of the working of this depends on the angle at which the eccentric control that I’ve labelled the mirror lever catch eccentric is set. This is partly hidden by the tripod mount and is shipped with its adjustment screw secured with a blob of shellac to prevent it from coming loose. If this is wrongly set, then either the mirror lever won’t hook up on winding (so the mirror will remain up and the viewfinder will be useless) or the mirror lever won’t reach the shutter trip lever (so the shutter button will close the aperture and flip the mirror, but not fire the shutter).

Pentaprism and viewfinder

The pentaprism (see the middle of the “under the top cover” pic earlier) is held on by two springs hooked over screws on the sides of the mirror box. Unhook the top ends of these, and you can lift off the plastic cover and pentaprism. Then three screws around the edges release the focusing screen.

(The manual I have suggests that you can take the whole thing off by unscrewing the screws without unhooking the springs first — that’s definitely not true for this model. If you try it, you’ll find the screws very hard to put back in.)

I don’t have a photo of any of these bits, as I forgot immediately picked them up with a cloth and put them in a box to avoid getting fingerprints on them. I should have taken some, because both of my cameras showed a typical problem: corrosion of the mirror coating of the pentaprism where the dust seals were glued on to it. The result is a rough dark line across the bottom of the image as you look into the viewfinder.

As far as I can learn, there is no way for an ordinary person to re-silver a mirrored prism like this. I left the less seriously damaged prism from the two cameras alone, and in the other one I scraped off the thin corroded strip of silver (making that part transparent) and then wrapped a strip of aluminised plastic, cut from the inner wrapper of a pack of tea-bags, around it to add a bit of reflection. There is no problem so serious that it cannot be mitigated by a good cup of tea. The result is much less intrusive in the viewfinder than it was, making the bottom part of the image vaguely accurate in colour rather than solid black, but it isn’t possible to see detail there and it wouldn’t work at all for damage in the middle of the frame.

Exposure counter

This is nudged along by a hook drawn by a pulley connected to the winding gear on the other end of the camera. The counter is sprung so as to return to zero, but it is on a ratchet and is latched under pressure from the camera back while the back is closed. When the back of the camera is opened, the counter springs to zero.

The thin aluminium surround on top of the counter is easily bent and I suspect could snap, so it seems like a good idea to unscrew it when working on the camera for any length of time. There are a couple of hazards, though.

The first is that the surround, or the washer beneath it, holds the counter down on its axis. If you remove it and the counter gets lifted up too far, there are two different rotations in which it can be pushed back down — the correct rotation, or 180° out from it — and under pressure of its spring it will prefer the latter. So if you find your counter is resetting to somewhere around 20 instead of to zero, that’s why: you need to lift it, rotate half a turn against the spring, and push it down again.

The other little problem is that I found this the most bizarrely troublesome screw to put back in in the entire camera. I don’t know why, it just doesn’t want to sit right.

Mirror box

There doesn’t seem to be a great deal to say about the mirror box, from my standpoint of ignorance, except to marvel at the lever and spring mechanism, which I imagine to be essentially the same as in all SLRs. The box is attached with four screws, two at the top by the eyepiece and two at the bottom (whose locations are marked in the “under the bottom cover” picture further up).

The two metal shafts also visible in the central picture above are the slow speed control shaft (top) and slow motion axis (bottom) of the slow-speed gear.

Note that after removing the mirror box you can no longer fire the shutter in the normal way, because the mirror lever on the side of the box is what triggers the shutter release. To fire the shutter, push the shutter trip lever on the bottom of the camera yourself while pressing the shutter button.

Flash sync contacts

Attached to one side of the mirror box is the little electrical contact board shown to the right, which provides the contacts for the flash X- and FP-sync terminals on the side of the lens mount.

The wires are soldered here and to a switch block on the base of the camera, passing through a small hole in the diecast body in between. This is a surprisingly frustrating arrangement, as the board gets in the way and can’t be removed without un-soldering and subsequently re-soldering it.

I tried to work without removing the board, then broke one of the wires near the contact point, gave up and removed it, didn’t have enough wire left to strip and re-solder, and so had to replace the wire as well. I found the data cores of a USB cable to be a good replacement, with the proper insulation colours (green and white). Of course you have to feed the wires back through the hole before you can solder the ends on, so you’re waving your hot iron rather close to the camera. I am not a confident solderer and had hoped to avoid soldering with this project, but no such luck.

This is the only part of the job that I haven’t tested — I see no reason why it shouldn’t work after being rewired, but I don’t know for sure. If it doesn’t, I think I would probably rather not know.

Shutter curtains and barrels

The cloth focal-plane shutter consists of two opaque fabric curtains with tapes attached to revolving barrels at both ends. With the shutter cocked, the first curtain covers the film. When the shutter is fired, the first curtain is pulled aside to expose the film, and then the second curtain follows it to cover up the film again.

The barrels at the rewinding end of the camera are metal with a central spring, and it is these springs that power the motion of the shutters and consequently everything else about the shutter firing sequence. I’ve read that it’s common for the springs (or the grease they are packed with) to seize up through age or disuse, but this wasn’t a problem in either of the cameras I have.

The picture on the right shows the spring barrels with the shutter cocked. The first shutter’s barrel is on the left. Its cloth is glued to this barrel, and it has tapes glued to the un-sprung barrel at the other end. The second shutter is the other way around: its cloth is glued to the barrel at the other end, with tapes attached to this one.

The spring barrels can be accessed by removing the cover plate on the bottom of the camera. This is fiddly and means losing the spring tension, so having to “re-program” the shutters afterwards by re-tensioning, but it’s necessary to do this as well as remove the mirror box if you want to actually take out either shutter curtain.

Here’s the other end, with the un-sprung barrels (seen from the top). These ones are plastic sleeves surrounding metal shafts, held in place by two screws that go all the way through the barrel. You can just about see one of those screws in this photo, where I’ve pulled the (old, cracked and torn) shutter cloth away from the barrel. The holes in the cloth are useful to insert a screwdriver and unscrew the screws to slide the central shaft out of the top of the camera and extract the barrel.

This picture shows the central shaft of that second curtain barrel, and the screws that attach the barrel to it.

The second shutter curtain also passes around two guide pins, which keep it away from the first curtain barrels. These are just to the “film side” of the first curtain barrels at either end. The pin at the spring end can be removed along with the spring barrels, but I couldn’t discover how to remove the other pin, and since the second curtain passes behind it, that means the only way I know to remove that curtain is to un-glue it from its barrels at one end or the other. (The tape end is easier.)

The curtains themselves are made of an inelastic fabric with some sort of opaque black paint-like finish. They don’t appear to have a separate coating layer.

Where the tapes meet the curtain cloth there is a rigid metal lath, formed from a thin strip folded in half around the end of the cloth and crimped and glued down. The tapes pass through slits in the ends of the lath, and are sewn to the cloth.

A detail of the original second shutter curtain is shown to the right.

I needed to replace the cracked and torn second curtain, so I ordered new cloth, tapes, and glue from Aki-Asahi. The cloth (silk with an opaque rubber coating on one side) is more flexible than the old and feels very high quality, though it’s also a little more elastic even when cut with the warp. I cut it to size, glued and sewed the tapes down at the corners, then prised the lath off the old curtain and wrapped, glued, and crimped it with pliers. Here it is being glued on to the plastic barrel, waiting for the glue to dry:

The result is visibly amateur in comparison to the original. I used a little too much glue, the lath is bumpy after being forcibly prised from the old one, and I left the curtain not lying completely flat when not under tension. Fortunately it’s not at all obvious when installed, and the shutter does actually run well, but I’d hope to do better next time.

Tuning the shutter speeds

Tricky this. After replacing a shutter you have to adjust everything. The tensions of the first and second curtain spring barrels affect the timings of all shutter speeds, and have to be both sufficiently accurate and sufficiently similar to one another. Then the slow speeds depend on those tensions and on how well the slow-speed gear runs, and the fast speeds depend also on the adjustment screw on the shutter lever.

I started out by setting the speed dial to B and adjusting the shutter spring tensions, using the ratchets at the bottom, until the shutter curtains seemed to be moving at similar-ish speeds to those in my reference camera. (They are supposed to traverse the width of the film negative in 1/60 second, about 13ms.)

I found the escapement-timed slow speeds were OK, but the intermediate speeds, using the slow speed gear without the escapement, ran too fast. I have no idea whether anything can be done about that.

Then I adjusted the screw on the shutter lever so as to get it to a good middle point. If this screw is turned too far one way, it makes the fastest speed (1/500) behave like bulb mode — the button opens the shutter and doesn’t close it until you let go. If it’s turned too far the other way, then the slowest of the fast speeds (1/125) does the same thing. There isn’t an enormous range in between, and I don’t know how much difference this control makes, so I just picked a point somewhere in the middle.

Then I happen to have a CRT TV among my apparently increasing collection of obsolete stuff, so I was able to use Rick Oleson’s method to test the fast speeds, using the spring ratchets to fix inconsistencies between the two curtains’ speeds (shown by the bright region being wider at one end than the other) or gross timing errors (bright region taking the wrong proportion of the whole field).

Self-timer

The self-timer is a cute little clockwork module that’s fun to operate and watch outside the camera. The arm winds the spring, the slider button releases it, and when it comes back to a point close to the origin, a lever pokes down the shutter release shaft to fire the shutter.

The picture on the right shows how the module sits within the camera and the position of its lever over the shutter release shaft, although in practice the module is attached to the front plate and is installed and removed with it.

The self-timer of course uses an escapement mechanism. I believe that, as in the slow-speed gear, the gears themselves should not be oiled, but a pinpoint of light oil on the outside ends of the bearings may be acceptable. Corrections welcome.

Dust and light seals

There are not that many of these — nothing in the film area and no mirror damper — and those there were in my camera had largely crumbled into a red dust which took quite a bit of cleaning out.

The main seals are a big wide one within the curved base of the lens mount, edge seals along the bottom edge behind the front cover, and edging around the top of the back of the mirror box. A 3mm thickness open-cell foam from Camera Light Seals seems like a fair replacement.

What the problems were with my camera, and their solutions

At the top of this article I listed the problems I had with this camera:

Its second shutter curtain ran very slowly and made a sort of zipper noise, and the shutter mechanism seized up after firing and winding it a few times. I later found other things wrong with it: the slow shutter speeds (1/4 second and slower) didn’t work, and there were various cracks and tears in the second shutter curtain, which needed to be replaced.

I’ll close with a breakdown of those, with what I think were their causes and the solutions:

Second shutter curtain ran very slowly and made a sort of zipper noise

Caused by friction in the running of the second shutter curtain gear, the lower of the two stacked gears in the picture to the right.

I didn’t get as far as working out how to remove these gears entirely for cleaning, but air-dusting them and squirting the underside of the lower one with light oil (then mopping up the excess) fixed this problem surprisingly quickly, for now at least.

Shutter mechanism seized up after firing and winding it a few times

I’m fairly sure this was just a consequence of the above. The shutter spring has to have enough energy to return the gears to their “home” positions; the friction was enough to prevent them from getting all the way there.

The slow shutter speeds (1/4 second and slower) didn’t work

Fixed by cleaning the slow-speed gear module and applying a tiny quantity of sewing-machine oil to the outer ends of its bearings.

Cracks and tears in the second shutter curtain

Fixed by replacing the second shutter curtain!

This goes something like the following. (I’m writing this from memory — wonder if I’m forgetting anything):

  1. Remove the eyepiece, top controls, top and bottom covers and the front plate; put the winding lever back on
  2. Unhook and remove the pentaprism, undo the screws holding on the focusing screen, remove the focusing screen
  3. Remove the baffle from the bottom of the mirror box (I can’t actually remember whether this is essential, but it’s fairly easy so might as well)
  4. Remove the tripod mount from the base, unscrew the fixing screws at bottom and top of the mirror box, and delicately ease out the mirror box (first unhooking the mirror lever from below, and removing the little metal screen to its left if it gets in the way)
  5. Detach the lever from the top of the slow motion axis and remove the speed control base plate
  6. Remove the two control shafts for the slow-speed gear
  7. Remove the four screws holding in the two shutter blinds at top and bottom of the shutter by the film window and detach the blinds
  8. Make a note of the positions of the screws threaded through the barrels at the un-sprung ends of the first and second shutter curtains when the shutter is not cocked, so as to replace them at the right rotations again later
  9. Loosen the pawls beneath the shutter spring barrels (losing their spring tension), undo the ratchet gears around the barrel ends, unscrew the retaining screws for the covering plate, and remove the plate with the mirror kick gear and guide pin
  10. Unscrew the two screws threaded through the barrel at the un-sprung end of the first shutter (the shutter whose barrels are closer to the film plane), pull out the central shaft for that barrel, and remove the whole of the first shutter curtain with both barrels still attached
  11. Unscrew the two screws threaded through the barrel at the un-sprung end of the second shutter, by poking a screwdriver through the holes in the second shutter curtain, and pull out the central shaft for that barrel. Observe that you can’t just remove the curtain because it runs behind a guide pin for which access is not obvious
  12. Detach the second curtain’s tapes from the spring barrel by lifting them away with a sharp tool, and remove the second curtain and both of its barrels
  13. Detach the second curtain from the unsprung barrel as well by lifting it away
  14. Obtain some shutter cloth and cut a rectangle of it to match the original, cutting along the warp of the cloth so as to have the least stretchy direction along the length of the shutter. (I think the rubbery coating should go on the lens side rather than the film side, though I didn’t find an authoritative source)
  15. Obtain some shutter tape and cut two lengths to match the originals; I think these can be a bit too long without problems, but not too short
  16. Prise the metal lath away from the original shutter curtain
  17. Glue the tapes to the corners of the shutter cloth using a contact adhesive (I had the Japanese Super-X glue) and allow to dry for a while
  18. Sew a small strong square of black cotton through each of the tapes’ contact areas (I did it by hand but you could do it with a machine if you knew how)
  19. Apply some glue to the very edge of the cloth, push the lath from the old shutter over the edge of the cloth, square it up carefully, and crimp it tight with pliers
  20. Glue the end of the curtain cloth to the un-sprung barrel following the positioning of the previous curtain, and let dry
  21. Re-fit and screw into place the un-sprung barrel of the second curtain, following the positioning noted before removing it earlier
  22. Make sure the second curtain is routed behind its guide pin, but don’t accidentally route it behind the nearby shaft from the shutter gears! I stupidly did this the first time and then had to un-glue it and fit it again
  23. Glue the tapes at the other end of the second curtain onto the spring barrel, matching the original positioning and being very careful not to get glue in the spring
  24. Re-fit and screw into place the un-sprung barrel of the first curtain, following the positioning noted before removing it earlier
  25. Introduce the two sprung barrels and the other guide pin for the second curtain into the appropriate holes in their bottom plate through their metal collars, ensure the mirror kick gear has the right orientation (as in the picture in the “Shutter firing order” section above, when the shutter is un-cocked) and screw down the plate
  26. Tighten the spring ratchets enough to pull the curtains tight and check their positioning and overlap (they should overlap by about the thickness of the lath)
  27. Test winding and firing the shutters — you’ll have to hold back the shutter trip lever yourself (see note in “Mirror box” above and picture in “Shutter firing order”) and there is no control over timing, but the shutters should work at this point
  28. Replace the blinds at top and bottom of the shutter area
  29. Replace the two control shafts for the slow-speed gear. The slow speed control shaft engages with the slot in the wheel, and the slow motion axis sits next to the lever end (see picture in “Slow speed gear” above)
  30. Replace the speed control base plate, put the lever back on the slow motion axis, and arrange it so that when it is pushed out by the appropriate cam on the speed control base, it pushes the lever on the slow speed gear so as to deactivate the escapement. Tighten the set screws on this lever
  31. Wind the shutter a little bit so as to move the pin on the mirror kick gear out of the way, then put the mirror box back in (may take some patience to get the mirror lever through the base properly) and screw down
  32. Replace the baffle at the bottom of the mirror box
  33. Replace the front plate
  34. Tune the shutter speeds
  35. Replace the focusing screen and pentaprism, hook the cover back on
  36. Remove the winding lever again, replace the top and bottom covers, re-attach the top controls and eyepiece.

And that is the end of this post. Phew.

The repaired SR-1 (left) and its stunt double (right)

1. The most cynical example of this came from Pentax, whose cut-down S1a model simply had the label for the 1/1000 shutter speed removed from the dial – the setting itself still worked fine.

2. One exception is that I refer to the “first-curtain gear” and “second-curtain gear” when referring to the roles of the large transmission gears in the timing order. In the manual these gears are called the “change speed gear” and “transmission gear” respectively, and the names “first-curtain gear” and “second-curtain gear” are used to refer to the small gears at the ends of the curtain shafts that are connected to them.

Repairing a Minolta XG-9 camera

This is the story of how I repaired, broke, and repaired again a Minolta XG-9 35mm SLR film camera.

It will be long, and of niche appeal, but I’m writing it up in case anyone else finds it as useful as I would have done before I started. Here’s the plot summary:

  • The camera’s shutter was sometimes sticking open when fired in Auto mode
  • I set out to fix this by cleaning the electrical contacts of the film-speed selection switch, beneath the camera’s top plate
  • That appears to have been the correct fix, but when reassembling the camera, I broke a fragile plastic part which holds the power switch in place, rendering the camera useless
  • I modelled a replacement part using 3D modelling software, had it 3D printed, and replaced the part in the camera
  • The replacement part is good enough to use, but could probably have been better; I’ve published the model for it, and would appreciate any ideas

If that sounds in any way interesting, read on. This was my first attempt at repairing a camera and my first experience of 3D modelling and printing, so it was certainly interesting to me.

The original problem: a sticking shutter

OLYMPUS DIGITAL CAMERA

The camera is one that I wrote a happy post about last year (“A film camera“). It was made in 1980 or so, but I bought it in 2018.

It worked well, except that the shutter would sometimes stick open when fired in Auto mode, and the only way to close it was to switch out of Auto. When stuck open, it often let in enough light to ruin both the previous and following photos as well as the current one. I was keen to fix it, especially as these cameras are designed so that the light meter only works when in Auto mode.

The first hint I found online was here, in a photo.net post from 2003 by “rokkor fan” who writes: “I had this once on a XG-1, and it was as a result of the mirror slap jarring the circuitry under the shutter release. I had a friend clean the circuits and it worked a treat after that.” No more details there, but a poor electrical contact sounds promising.

There’s a 238-page service manual available for these cameras (thank you Benoît Suaudeau) and it has an electrical troubleshooting section starting at page 174 that says:

Annotation 2019-07-04 204232“AUTO… curtain is kept open” looks like our problem, and “ASA contact defective” seems worth checking. ASA refers to the film-speed selection switch, which is on the top of the camera. It makes sense that a lost contact from that switch would only affect Auto mode, since Auto needs to know the film speed to decide how long to leave the shutter open.

There’s a YouTube video here, by Florian Buschmann, which shows how to take the lid off. The top cover has three axes poking out of it, one for the rewind knob and power switch, one for the shutter button and film speed knob, and one for the winding lever. The components attached to the tops of these can all be unscrewed from their axes and removed, leaving a plastic top-plate attached via four small screws, two at front and two at the back towards the middle of the camera. Here’s the camera with the top off:

Minolta XG-9 with top plate removed

The film-speed switch is beneath the large black nubbin poking out of the top about 3/4 of the way across from the left. The smaller nubbin at the left side is the power switch mechanism and rewind axis, which is the part I was just about to break while reassembling the camera.OLYMPUS DIGITAL CAMERA

Unscrewing the parts atop the film-speed switch reveals a brush mechanism with a flat contact plate. I cleaned the plate with switch cleaner (it was quite grubby) and made sure the brushes were sticking out enough on the switch side, then reassembled the top of the camera.

After reassembly I tested the shutter in Auto mode a few times, and it didn’t stick. Flushed with success, I set out to load a film — and that’s when the power switch came loose. While screwing on the metal collar that keeps the power switch in place, I had managed to shear off the entire threaded top of the plastic part that holds it down. A problem.

The broken part

Minolta part 2006-3309-2, Rewinding axis receiverThe picture on the right shows the part I had broken. It’s intact in this photo, because this was taken during one of my initial attempts to glue it back together again — which always failed when force was applied to screw the threaded collar back on the top.

The 40-year-old plastic is quite brittle, and as you can see, I also broke one of its little lugs just unscrewing it from the body. And I am a reasonably delicate person.

Without this part, it’s impossible to use the power switch: it is left floating, switching between on, off, and self-timer modes at random. Having failed to glue it, my options seemed to be:

  1. Write off the camera. I wasn’t going to do that yet.
  2. Figure out some ingenious bodge to keep using the power switch even though the official mechanism didn’t work. Well, I did sort of do this using a piece of thread attached to the switch mechanism, but I didn’t like that very much.
  3. Find a replacement part. For an easily-broken part in a relatively inexpensive 40-year-old camera from a company that stopped making cameras over a decade ago, that seemed unlikely, and my first searches came up with nothing.
  4. Buy a non-working camera, sold for parts, and plunder it for this part. Yes, but what if it just broke in the same way again? That would be unbearable. Or if this part was already broken in the other camera?
  5. Make a new part. This takes time and money and might not work, but it puts the outcome in my own hands and hopefully teaches me something new.

My first assumption, knowing very little about 3D printing, was that this component was too fiddly to be produced that way — especially the rather fine threaded bit at the top. But reading about different 3D processes, it seemed faintly possible that a nylon SLS printer, with 0.1mm resolution, might just be able to produce a viable part, especially as the thread was required to screw into a metal collar (which could perhaps do a bit of self-tapping) rather than a plastic one.

Modelling the part

Here’s this component in the service manual, identified as “Rewinding axis receiver”. It comes in two variations with codes 2006-3309-02 and 2006-3309-04. I think mine is a 2006-3309-02.Part in maintenance manual

First I needed a 3D model.

I measured it with a vernier caliper and some close-up photos. The thread seems to be 0.5mm x 7mm and the three screw-fixing lugs are spaced at 0°, 140°, and 220°. A hole through the middle admits a metal axle of 4mm diameter. There is a cutout in the collar at the bottom, into which the mechanism to release the film door when the axle is lifted fits. There’s also a slot in the midriff which a metal clip pokes into, to meet a notch in the axle that snaps it into its usual lowered position.

Knowing nothing about 3D modelling software, I asked my kids for advice first. Their suggestion was Blender, but I’m a bit afraid of Blender. I did try Wings3D, another free application (written in Erlang using wxWidgets — interesting!) but I got stuck on how to model a screw thread, and decided I should probably start with a trial version of something expensive with extensive documentation.

I came across Autodesk’s Fusion 360 while searching for screw thread tutorials, when I found a page that basically just said “use the thread tool”, which seemed about right. Fusion 360 is a very expensive subscription product with cloud-storage lock-in, but it has a one-year trial period for “hobbyist” use. That’s me!

Annotation 2019-07-05 203934.png

I really enjoyed using Fusion 360, and I waxed lyrical about it here on Twitter. Much the appeal has to do with good interactive feedback, but the core thing is that it’s built on a very nice 2D sketching program: the expectation seems to be that you sketch in 2D and then extrude into 3D, which I find a lot simpler than trying to design in 3D. But I don’t know how other software of this kind works. Anyway, I successfully built a nice-looking model, though with a thread that I suspected wasn’t really possible to print.

3D printing

I exported the model as an STL file and sent it for nylon/polyamide SLS printing at i.materialise. I have to admit that I picked this company because they had the most anonymous, automatic-looking order page, and I felt embarrassed about having a real person look over my impossible design. I didn’t notice at first that i.materialise are actually in Belgium, and it’s slightly crazy to send your model from London to Belgium for printing when there are companies in London (digits2widgets, 3DPRINTUK) doing the same thing, but by that point I was sort-of committed.

Because of the minimum order price, I ordered three different pieces. Two were from my best attempt at the model, which I asked for once in SLS (laser) process and once in MJF (HP’s ink-based) process. The third was an SLS print with slightly different dimensions for some things I wasn’t sure of. The pieces took about a week to arrive, and the price was quite high — the nominal charge for printing each item was £11.15, but that was quoted before VAT and shipping, and the eventual total was very close to £50.

Here are the results. The black part on the left is the broken original, the white one is the SLS of the variant model, and the grey one on the right is the MJF. (The colour doesn’t matter, as the part is not visible from outside the camera.)

3D printed Minolta parts

Receiving these was a really exciting moment: a true marvel that it was actually possible to design and build this neat little component with no worthwhile expertise on my part!

Of the two processes, the MJF version came out a bit fatter than the SLS — the holes are smaller, the walls are thicker. I think the SLS copy is more true to the design size. Although the texture of the printed nylon is unpolished (they both feel a bit like paper) and looks almost crumbly, both of them feel very solid, are harder and less flexible than I expected, and seem pretty tough.

The threads are indeed pretty sketchy. The SLS one is a little too narrow, without enough depth to the thread: the collar doesn’t tighten well and can easily jump a thread if pushed. The MJF has even less visible thread, but it is a bit too fat, and it is hard to fit the collar onto it at all. In this situation that would probably be a good thing, but the thicker walls of the MJF part interfered with the film-door release disc underneath the part, so it was an SLS copy that I ended up fitting. Here it is in the camera.

3D printed Minolta part fitted in XG-9 camera

I think that the thread, although weak, may hold well enough. It isn’t the last line of defence against the power switch falling off: the rewind knob on top of it, held on with a metal-on-metal screw fitting, is there to prevent that. This thread just needs to stop the power switch from lifting and losing its position while loading or rewinding film. But it would be nice to have done better, if it were possible to do so. I’d like to know if there is some technique for making threads more “printable” at this kind of scale.

Conclusion

This feels like a successful outcome, and at least the original problem is fixed. It would obviously be better not to have broken this part at all — and although it was my fault, I did spend some time mentally railing at Minolta for using a plastic thread here in the first place. Perhaps the main lesson is just that old plastic is fragile. But I enjoyed the process and am happy with the result, which is after all a camera that works better than it previously did.

I’ve published the 3D model, in a Github repository at cannam/minolta-2006-3309-2, in case it is of use to anyone else. If you’ve any suggestions for how this could have been done better, I’d like to hear! Of course this does show a big limitation of using Fusion 360 to do the modelling: the main file in that repo is in a proprietary format and probably useless to any other tool. I’ve included a couple of exports as well, including the STL file.

 

A film camera

I take a lot of photos and I share some of them online via the antique medium of Flickr. Not many people look at them, which I don’t mind, because I imagine my audience to be (a) family and (b) myself, later. Photos I take with people in them are usually visible only to my friends and family. I’m a person who takes photographs, not a photographer.

But I do take some joy in the practice of photography. That’s partly because I can: at my level, there is very little to it: somebody else has done all the hard work. There is massive, long-term, highly technically sophisticated labour behind every functional detail of image capture and reproduction, which all culminates, for routine takers-of-photos like me, in pressing a button or tapping the screen and deciding whether you like the resulting image or not. It’s a ritual that has delivered a spurious feeling of creativity to people for decades, prefiguring the internet age.

There are four categories of potential joy in a photo, and they go in this order:

  1. Looking at whatever it is you’re thinking of taking a photo of
  2. Solving technical problems, or just fiddling with the camera
  3. Enjoying the picture itself
  4. Finding the pic again later and reminiscing

Obviously, photos of your friends in the pub can skip categories 1 (except in a social sense) and 2. Very deliberate landscape photos might have a lot of categories 1, 2, and 3 but not a great deal of category 4. Please understand that I am vaguely blathering about this category thing because it seemed to make sense while I was typing this, not because I think it’s any kind of real system.

I started out taking photos on film, then moved to a digital camera in 2003. By then a digital camera already gave you more pleasure in the likely quality and serendipity of your pictures, good for categories 3 and 4 above. I did keep a film SLR — a Zenit EM, the cheapest second-hand SLR available when I bought it in 1991 — but it’s very clumsy to use, and the category-2 joy you would imagine getting from it never really materialised.

In search of that sort of joy, I recently bought a slightly fancier second-hand film camera from someone on eBay. I wanted something still mostly manual, but more like the kind of thing I never had access to when young. I decided to buy a Minolta, and I’m not ashamed to say that was mostly because I like the old Minolta logo, before they introduced the more familiar Saul Bass-designed all-caps logotype in 1981. The older logo is verging on Comic Sans in its friendliness, and gives the camera a sweet face:

Minolta XG-9

This manual-focus, manual-aperture, automatic exposure Minolta XG-9 dates from about 1980. It was the cheaper of Minolta’s two SLR ranges at the time; the body probably cost slightly more than a 48K ZX Spectrum home computer. It would have been a nice and very practical camera. It also embodies a mind-boggling amount of mechanical complexity compared with modern equipment. To the right is a schematic of the winder mechanism, one of dozens of such illustrations found in the service manual. Winder schematic for XG-9

It was sold to me with a lens at least a decade older than the camera, a splendid-looking chunk of metal with an impressive (and apparently rather 1960s) wide front glass element.

Anyway, I bought this for my category 2, the fiddling. But so far what I’ve appreciated most is the thing I gave as category 1: just looking at the real scene more closely. Without a screen to review photos on, you have to assume that your photo will fail and you will never get to see this again. If an image should appear again, days later when you get the film processed, it’s a fresh delight.

The downside is that the economics of successful photos still apply. That is, only one in ten shots is any good. With a smartphone or digital camera you can take a hundred photos and have ten you really like. With film you buy a 36-photo roll, get three or four decent photos, but have to visit the print shop twice and spend at least £15 buying and developing the film. (Though I was surprised to find that you can still get film processed at Snappy Snaps.)

And how are the photos? Well, it’s a bit like listening to vinyl records. It’s nice for things that benefit from a bit of roughness and vigour, like this kind of thing:

Westbourne Terrace

(That one wanted a lens hood to prevent the flares in the middle and right, but I didn’t have one at the time.)

Or for snaps of people:

41329457102_3b09963088_c

I like both of those a lot, but I’ve yet to get any really successful landscape or “still-life” pics from it and I suspect I never will, now that I’m used to a cleaner, higher resolution digital image.

Will I be using it much? Am I going to carry it around everywhere, but take far fewer and more selective photos than I otherwise might? Probably not, but it might not be up to me anyway. These are fairly solid cameras, but this one is nearly 40 years old and has a few electronic bits as well as sensitive mechanical parts. They do fail in various ways and I don’t entirely trust that it’s going to be still working the next time I want to use it. That primitive but sturdy Zenit will probably have the last laugh.

 

Learning to read Arabic writing: one of my better ideas

I live in London not far from Paddington, where Arabic writing is often seen:

road

I spent my first few years in the area a bit oblivious to this (shops are shops), but eventually I started to wonder about simple things like: are these all the same language and script, or do they just look similar? And of course: what do they say? Then two years ago I took a gamble on the notion that this might be Arabic, and signed up for Arabic evening classes.

On the first day of the class, we were all asked why we had chosen to study Arabic. Everyone else had a proper explanation – planning to study in an Arabic-speaking country, dispatched to an Arabic-speaking country for business, have a parent who speaks Arabic and want to catch up, etc. I’d like to report that I said “I want to be able to read the shop signs on Edgware Road”, but I wasn’t bold enough, so I just cited curiosity.

I kept up the classes (one evening a week) for a year. Arabic is a difficult language and I didn’t excel. I learned simple introductions, some directions, some colours, a bit of grammar, and that I can’t pronounce the letter ع any better than any other native English speaker can. I learned enough that I can now recognise the odd word when I hear people speaking Arabic, but not enough to join in, and anyway I’ve always been very self-conscious about speaking other languages. But I am now able to slowly read (and write) the alphabet.

Predictably enough, it turns out the signage in Arabic around here usually says the same thing as the Roman lettering next to it. That’s the case for most of the text in the street-view photo above, for example. That could be disappointing, but I find it rather liberating. When people put Arabic text on a sign in this country, they aren’t trying to make things weird for native-English-speaking locals, they’re trying to make it easier for everyone else.

Arabic, the language, has 400-odd million speakers worldwide. Arabic the alphabet serves up to a billion users. Besides the Arabic language, it’s used for Persian and Urdu¹, both of which are quite dissimilar to Arabic. As it turns out, most of the places near me that I was interested in are in fact Arabic-speaking, but there are quite a few Persian places as well and Urdu, being the primary language of Pakistan, is widely used in the UK too.

(I have since had it pointed out to me that, for an English speaker whose main aim is to learn to read the script, going to Persian classes would have been easier than Arabic. Persian is an Indo-European language, it’s grammatically simpler, and the language you learn in classes is a form that people actually speak, whereas the standard Arabic taught to learners here I gather is different from anything spoken on the street anywhere. I have since bought a Persian grammar book, just in case I feel inspired.)

Learning the basics of how to read Arabic gives me a feeling of delight and reassurance, as if I am poking a hole for my brain to look out and find that a previously unfamiliar slice of the world’s population is doing the same stuff as those of us who happen to be users of the Roman alphabet. I recommend it.

Notes for the clueless about the Arabic alphabet

  • It’s written and read right-to-left. This is probably the only thing I did know before I started actively learning about it.
  • It is an alphabet, not a syllabary like Japanese kana or a logographic system like Chinese writing.
  • It is very much structured as a script. Each letter could have up to four shapes (initial, middle, final, standalone) depending on how it joins to the letters around it, so that the whole word flows smoothly. I think this contributes a lot to the sense of mystery “we” have about Arabic. The Cyrillic, Hebrew, and Greek alphabets are not intrinsically any more mysterious, but they are a lot more obviously composed of letters that can be individually mapped to Roman ones.
  • Short vowel sounds are not written down at all. This is unfortunate for the learner, as it means you often can’t pronounce a word unless you already know it. There is a system for annotating them, but it’s not generally used except in the Koran and sometimes in textbooks or Wikipedia where avoiding ambiguity is paramount.
  • There are 28-odd letters, but the number depends on what you’re reading – Persian adds a few over Arabic, but I think it also has some duplicates.
  • Some letters are very distinctive; for example the only letter with two dots below it is the common ي “ya”, which generally maps to an “ee” sound. Others are quite hard to spot because you have to know the joining rules to distinguish them in the middle of a word.
  • You could transliterate any language to Arabic, just as you can transliterate anything to the Roman alphabet. The result might be awkward, but there’s no reason you can’t write English in Arabic letters and have it be just about comprensible. I imagine there must be people who routinely do this.

 

¹ I know no Urdu, but I understand it’s typically written in the Arabic alphabet but with a more flowing script (Nastaliq, نستعلیق) than is typically used for modern Arabic or Persian. An interesting calligraphic distinction between languages. I first heard of Nastaliq through a fascinating article by Ali Eteraz in 2013, The Death of the Urdu Script, which lamented that it was too hard to display it on current devices. The situation has apparently improved since then.

 

Why I will be voting “in” this Thursday

Although the public debate about this week’s EU referendum in the UK has become absurdly bitter on both sides, I have had some constructive talks about the subject with people around me, even where we have disagreed. There is, or was, a reasonable debate to be had and it’s a pity we haven’t seen a sensible national discussion about it.

In the spirit of trying to be positive: here are five reasons why I would like the UK to remain in the EU, without talking about the personalities or made-up economic projections coming from the campaigns on either side.

1. The EU has a useful role in the UK in terms of long-term oversight

This country has no written constitution and has an effectively two-party parliamentary system in which each new government starts by setting out to undo whatever its predecessor did. Institutions like the European Court of Human Rights give us both longer-term continuity and a moderating influence across the various ideologies of the European states. They’re a good thing.

I might feel differently on this if I thought the Leave campaign were keen to make up for exit with better constitutional protections in the UK. Unfortunately the impression I get is the opposite.

(I think this argument holds even for lower-level things like food labelling and sourcing regulations. After all, those are also the regulations that mean a Cornish pasty is a pasty from Cornwall wherever you buy it in the EU, not just a meat pie from a factory in Denmark with Cornish Pasty printed on the pack.)

2. Our position within the EU is a great one

We have full membership of the EU without the tricky bit (the Euro) and with a membership rebate that we could never negotiate again. It’s the best of both worlds already. Any country in the world would envy that.

3. Leaving won’t give us more independence

I understand the argument that a state should strive to be self-determining as far as possible. I just don’t think that leaving the EU would have a happy outcome in that respect.

It wouldn’t change anything about who runs this country or how they run it, and it wouldn’t send a message that anybody would be equipped to act on. Our government would continue to have the same pro-business pro-international-collaboration outlook, for good or bad. We would almost certainly end up leaning more than ever on the USA, a country we would no longer have much to offer in return, while scrabbling around for other partnerships and making poorer deals with other European states.

4. Immigration is a red herring, but freedom of movement is a good thing

Immigration is clearly a subject that people feel viscerally about. But the sort of mass migration being exploited for this argument, of refugees from Syria for example, has nothing to do with the subject we’re supposed to be deciding on — we already turn those people away (Calais, remember?). I obviously have views about that (who doesn’t) but it makes no sense for it to be a pivotal subject for this referendum.

What is relevant is freedom of movement for workers within the EU. I think this is a good thing, partly because it’s how we can have world-leading research labs like (ahem) the one I work in, and partly because it cuts both ways — Britons can and do move abroad as well (permanently or temporarily) and this openness is a great part of providing opportunities and prospects for future generations.

People of my age or older may remember the 80s TV series Auf Wiedersehen, Pet, a comedy about British builders working in Germany. A central prop of that programme was that there was something ramshackle about their arrangement and that they were at the mercy of exploitative employers and tax rules as migrant workers. We’ve become unused to thinking of British migrant workers as being exploited in this way.

I know that there is also a narrative about other EU citizens coming to the UK simply to claim benefits. The great majority of people who move here do so either to work or to study, or because they are married to British citizens. Many British citizens draw benefits abroad as well. The overall balance of numbers doesn’t in any way reflect the anxiety people have about it. That anxiety is serious, but it isn’t something that this referendum can properly address with either outcome.

The question of what would happen to EU workers who are already in the UK, if we left, seems like such a massive quagmire that I don’t want to think about it. I don’t think it could be very harmonious.

5. I’d like to see positivity prevail

There’s something very British about willingly engaging in an endeavour (after a referendum!) and then whingeing about it constantly for the next 40 years.

The tone from British media and politicians for decades now has been mostly about how onerous the EU is and “what can it do for us?”, very seldom about the power it gives us or what we can do together with the other countries within it. This negative guff is forced on us by media barons who genuinely have no reason to give a damn about us in the first place, and it ends up setting a very miserable tone. Let’s resist!

 

Naming conventions in Standard ML

Many programming languages have a standard document that describes how to write and capitalise the names of functions, variables, and source files. It’s especially useful to have a standard for writing names made up from more than one word, where there are various options for how to join the words: “camel case”, which looks likeThis (with a capital letter “hump” in the middle), or “snake case”, which is underscore_separated.

I think Java in the mid-90s was the first really mainstream language to standardise file and variable naming conventions. The Java package mechanism requires files to be laid out in a particular way, and Sun published Java coding conventions which quickly became an effective standard for class and variable naming. Other languages followed. Python has had a standard that covers naming (PEP8) since 2001. More recent examples include Go and Swift.

Older languages tend to be less consistent. C++ is a mess: the standard library and most official example material uses snake_case for most names, but a great many developers, including those on most of the projects I’ve worked on, prefer camelCase, with capital initials for class names. File names are even more various: C++ source files are seen with .cpp, .cxx, .cc, and .C extensions; C++ header files with .h, .hpp, or no extension at all.

Standard ML (SML) is also a mess, and an interesting one because the language itself was standardised in 1990 and has been completely unchanged since the standard was revised in 1997. So although it is super-standardised, it’s a bit too old to have caught the wider shift in sentiment toward prescribing things like naming and file structure.

The SML standard is formal and very focused. It says nothing about coding style or naming, contains almost no examples using compound names, says nothing about filenames or file organisation, and specifies no way for one file to refer to another — the standard is indifferent to whether your source code is held in a file at all.

In trying to establish what naming conventions to use for my own code, I decided to look around at some existing libraries in SML to see what they had settled on.

The Basis library

SML has a standard library, the Basis library, which is a bit more recent than the language itself. Although it isn’t prescriptive, the library does use certain conventions itself and the introductory notes explain what they are. These cover only names of things within a program — not filenames, which are left up to the implementor of the standard. I’ll refer to them in the table below.

The Cornell style guide

Top search result for “SML naming conventions” for me is this online style guide for the Cornell CS312 course. It doesn’t cover file naming. Given the limited industry uptake for SML, an academic guide may be proportionately more influential than for other languages. I’ll mention this guide below as well.

Other code I looked at

I took a look at the following code:

  • The source of the MLton, MLKit, and SMLSharp compilers (excluding accompanying utility libraries)
  • The Basis library implementations shipped with MLton and SMLSharp
  • The SML/NJ extended library
  • The source of the Ur/Web language
  • The Ponyo library, an interesting fledgling effort to produce a broader base library than the Basis

In total, about 444,500 lines of code across 1790 SML source files. Some (presumably automatically-generated) source files are very long; while the mean file length is 248 lines including comments and blanks, the median is only 47.

Names within the language

The SML language has at least seven categories of things that need names: variables, type names, datatype constructors, exceptions, structures, signatures, and functors.

(By “variables” I really mean bindings, i.e. the vast majority of ordinary things with names: things that in a procedural language might include function names, variable names, and constant declarations. I’m using the word “variable” because it’s such a familiar everyday programming term.)

Source Variable Type name Datatype constructor Exception Structure Signature Functor
mlton variableName (mixed) DatatypeCtor ExceptionName* StructureName SIGNATURE_NAME FunctorName
mlkit (mixed) (mixed) DatatypeCtor* ExceptionName* StructureName SIGNATURE_NAME FunctorName
smlsharp variableName typeName* DATATYPE_CTOR* ExceptionName StructureName SIGNATURE_NAME FunctorName
basis variableName type_name DATATYPE_CTOR ExceptionName StructureName SIGNATURE_NAME FunctorName
smlnj-lib variableName type_name DATATYPE_CTOR ExceptionName StructureName SIGNATURE_NAME FunctorNameFn
urweb variableName type_name* DatatypeCtor ExceptionName StructureName SIGNATURE_NAME FunctorNameFn
ponyo variableName typeName DatatypeCtor ExceptionName Structure_Name SIGNATURE_NAME Functor_Name
cornell variableName type_name DatatypeCtor ExceptionName StructureName SIGNATURE_NAME FunctorName

* mostly

Here’s what I found, categorised into universal conventions, usual conventions, and “other”.

Universal

The following is the only universal convention:

Signature
SIGNATURE_NAME

The only code I found that doesn’t follow this convention is in the SML standard itself, which omits the underscore (like SIGNATURENAME).

Usual

The following conventions are not universal, but more popular than any other.

Variable Type name Exception Structure Functor
variableName type_name ExceptionName StructureName FunctorName

Camel case is clearly idiomatic for everything except type names. MLKit contains some snake-cased bindings as well, but none of the other libraries did. I like snake case in SML and I’ve written a fair bit of code using it myself; I hadn’t realised until now how uncommon it was. (It’s more common in SML’s sibling language OCaml. Ironic that, of the three very similar languages SML, OCaml, and F#, the only one not to use camel case is called OCaml.)

I spotted a handful of all-caps exception names and some camel case type names, but no library preferred those consistently.

The Ponyo library differs from the above for structures (Structure_Name) and functors (Functor_Name).

The SML/NJ library sort-of differs for functors, which are given a Fn suffix (FunctorNameFn). But you could think of this as part of the name, in which case the convention is the same.

Most type and datatype names used in public APIs are single words, or even single letters, so the convention often doesn’t matter for those.

Other

There seems to be no consensus about datatype constructors — I found DatatypeConstructor and DATATYPE_CONSTRUCTOR in roughly equal number.

Filenames

Nothing in the SML standard or Basis library cares about what source files are called, what file extension they use, or how you divide your code up among them. Some compilers might care, but most don’t. The business of telling the compiler which files a program consists of, or of expressing any relationships between files, is left up to external tools. SML has neither header files nor import directives.

This makes fertile ground for variety in naming schemes.

I’m going to consider only filenames that are associated with a primary structure, signature, or functor. Here’s the table.

Source Structure Signature Functor
mlton structure-name.sml signature-name.sig functor-name.fun
mlkit StructureName.sml SIGNATURE_NAME.sml* FunctorName.sml
smlsharp StructureName.sml SIGNATURE_NAME.sig* FunctorName.sml
mlton-basis structure-name.sml signature-name.sig functor-name.fun
smlsharp-basis StructureName.sml SIGNATURE_NAME.sig (none)
snlnj-lib structure-name.sml signature-name-sig.sml functor-name-fn.sml
urweb structure_name.sml signature_name.sig (n/a)
ponyo Structure_Name.sml SIGNATURE_NAME.ML Functor_Name.sml

* mostly

Clearly very inconsistent. There are no universal or usual conventions, only “other”.

Behind this there is a wider question about code organisation in files — should each signature live in its own file? Each structure? In many cases they do, but that is also far from universal.

If you use a scheme in which filenames are clearly derived from signature and structure names, does that mean you shouldn’t put more than one structure in the same file? What do you do with code that is not in any structure? Really it’s a pity to have to think about filenames at all, in a language that is so completely indifferent to file structure.

A Reasonable Recommendation

A plausible set of rules based on the above.

For names within the language:

Variable Type name Datatype constructor Exception Structure Signature Functor
variableName type_name DATATYPE_CTOR ExceptionName StructureName SIGNATURE_NAME FunctorName

This is the style used by the Basis library. Apart from datatype constructors, everything here was in the majority within the libraries I looked at.

For datatype constructors it seems reasonable to pick the most visible option and one that is consistent with the names in Basis. (This differs from the Cornell guide, however.) There is no confusion between these and signature names, because signature names never appear anywhere except in the declaration lines for those signatures and the structures that implement them.

For filenames:

Structure Signature Functor
structure-name.sml signature-name.sig functor-name.sml

The logic here is:

  • It’s still not a great idea to expect a case sensitive filesystem, so all-one-case is good
  • Generally use .sml extension for SML source
  • But the .sig extension for signatures seems very widely used, and it’s fair to make public signatures as easy to spot as possible
  • The .ml extension is not a great idea because it clashes with OCaml
  • The .fun extension used by MLton is a bit obscure, and you don’t always want to separate out functors (if you want to make functors more distinctive, give them names ending in Fn, as the SML/NJ library does).