loading
Picture of Build a Camera Shutter Speed Timer
Photogate Timer-23 (Custom).jpg
Photogate Timer-27 (Custom).jpg
If you're into film photography using vintage mechanical cameras, you might expect that after 50 years of existence they don't often work as well as they might have originally.  Lubricant dries out, dirt seeps into the mechanisms and eventually things start to go wrong. 

When the delicate timing mechanisms of the shutter begin to deteriorate, the shutter times can change, and this results in incorrect image exposures.  Sometimes  the inaccuracy iis substantial and clearly noticeable, but at higher shutter speeds, it is difficult to tell the difference between 1/500th of a second and 1/1000th of a second.  However, to the film that difference is substantial.

When doing camera shutter repair, having a way to measure the timings can help give you insight into what might be wrong, and also lets you test as you tinker with things to see if you're making things better or worse, and how close you are getting to your desired shutter accuracy.  It's an invaluable tool for any aspiring camera repair tinkerer to have.

This project is based on the PIC18F2525 microcontroller, and an HD44780 16x2 character LCD.  It uses an OPT101 photodiode with integrated trans-impedance amplifier for the sensor, and a 1 watt red LED for the light source.
 
Remove these adsRemove these ads by Signing Up

Step 1: Tools and Materials

Picture of Tools and Materials
Photogate Timer-1 (Custom).jpg
Photogate Timer-2 (Custom).jpg
For this project I had access to some pretty elaborate tools, but its nothing that can't be done with simple hand tools, it just takes longer.

Materials:
- 6.5" x 4.5" x 2" Aluminum project enclosure
- Chemistry bolt-down retort stand base
- 8" stainless steel retort stand rod
- Retort stand clamp  x 3
-1/4" thick aluminum plate
- 1" length of 1/4" aluminum or steel rod
- 1.5" length of 1/8" steel rod  x 3
- 1/2" hole rubber grommet x 2
- Various screws, nuts, washers
- Epoxy


Circuit Components:
- 16x2 character HD44780-based LCD
- PIC18F2525 microcontroller
- 28 pin IC socket
- 10k trimpot
- 7805 voltage regulator
- 100nF capacitor x 3
- 10k resistor
- 4.7 ohm 2 watt resistor
- 8MHz crystal
- 15pF ceramic capacitor x 2
- Male header pins
- Female header pins
- Various lengths of wire
- OPT101 photodiode IC
- 8 pin IC socket
- 1W red LED
- SPST toggle switch
- Panel-mount pushbutton
- Panel-mount DC jack
- Heatshrink

Tools:

- Drill
- Various drill bits
- Mill (if possible)
- Soldering iron
- Solder
- Wire stripper
- Wire cutter
- File
- Center punch
- Hammer
- Tap and die set

Step 2: Schematic and Code

Picture of Schematic and Code
Below is the schematic, it is also available in the attached PDF in high resolution.  The C files and a pre-compiled .hex file are also included.

The files:

flex_lcd_photogate_final.c A modified HD44780 LCD driver with the LCD pins set up as shown in the schematic.  Simply modify the location at the top of the program to match the location of this file on your hard drive.
photogate_final.c   The program code.
photogate_final.hex   The compiled code for the PIC, just waiting to be programmed into it with a USB or serial programmer.

Code explanation:

The code is fairly simple.  The sensor is connected to a hardware interrupt pin.  When the unit turns on, the external interrupt register is prepared to look for a LOW-TO-HIGH change.  When the sensor receives light, the voltage increases until it is in the logic HIGH range.  This triggers the interrupt, and the interrupt routine enables a 100us overflow timer.  It also sets the external interrupt register to now be looking for a HIGH-TO-LOW change. 

While the state is high, every 100us the timer increments a counter.  When the HIGH-TO-LOW event occurs, the external interrupt routine disables the timer, and the timer's count value is converted to milliseconds and sent to the display.


Step 3: Build the Circuit

Picture of Build the Circuit
A good place to start is building the circuit.  I built mine on stripboard, but perfboard or your preferred circuit assembly method is absolutely fine.  An important thing to keep in mind is that the wires running from the crystal to the PIC need to be as short as possible so that the timing signal is not subjected to excessive signal noise.

I used various connectors on the board to make assembly easier.  I would very highly recommend using male/female header pins as a board connector for the LCD, it makes it much easier to assemble and debug the circuit.

The circuit includes a 5V regulator, so the input power to the circuit can be between 6V and 24V without issue.  Any DC wall adapter should work without trouble. 

The schematic for the OPT101 sensor and LED are also included in the top left corner of the schematic.

How to know it's working:

When power is applied, the screen will display "Film Shutter Speed Timer" and waits for you to press the ready button.  When ready is pressed the screen displays "Ready" and the sensor is waiting for light!

Step 4: Preparing The Enclosure

Picture of Preparing The Enclosure
Photogate Timer-6 (Custom).jpg
Photogate Timer-8 (Custom).jpg
Photogate Timer-7 (Custom).jpg
The enclosure is a 6.5" x 4.5" x 2" aluminum project box.  A good way to mark the locations for drilling is to stick masking tape on the surface of the box and draw on top with pencil.  After marking the locations for drill holes, mark them with the center punch. Once all the locations are punched the masking tape can be peeled off.

A good way to mark the square for the LCD is to draw a rectangle on the masking tape, take a sharp knife and use a straight edge to cut along the lines you drew, and peel away the tape.  The razor blade will have marked the surface of the box directly.

If using a mill to cut the rectangle, begin by drilling a hole and inserting a cutter through the hole, then make your way around the perimeter of the rectangle.  After the rectangle is clear, remove the tool radii from the corners of the cutout with a file.

If using a drill to cut the rectangle, start by punching closely-spaced markings 1/4" apart all the way around the inside of the rectangle.  Drill with a 1/4" bit so that almost no material remains to hold the center material in place.  Break the center out with a hammer or file.  Then, file the jagged edges smooth and square the corners.

Step 5: Assembling The Sensors

Picture of Assembling The Sensors
Photogate Timer-3 (Custom).jpg
Photogate Timer-30 (Custom).jpg
DSC05792 (Custom).JPG
To have a range of freedom for the sensor and LED so that cameras of different size and shape can be accommodated, I made two aluminum segments to have a number of sensor positions.  They could also be made of wood if you prefer.

To make sensor mounts, cut and file two strips of 1/4" aluminum plate, 1/2" wide by 2" long.  Drill five holes spaced 1/4" apart down the center, and drill with a 3/16" drill bit. Drill a 1/8" hole into the edge of the piece as shown in the picture below.  Epoxy a 1.5" long 1/8" steel rod into  the hole on the edge.  The mounts are now complete.

To prepare the LED, solder + and - wires to the LED's star base so that it won't need to be heated again.  Heat might damage the epoxy if it hasn't fully cured yet.  Then, epoxy a screw on the back. 

To prepare the sensor, I protected the circuitry from the screw head with some hot glue.  After the hot glue cooled, I glued the screw on top of the hot glue with some epoxy, and coated everything else with epoxy.


Step 6: Camera mount

Picture of Camera mount
Photogate Timer-10 (Custom).jpg
To mount the camera to a stand clamp, I decided to thread the end of a 1" segment of aluminum rod and screw it into the bottom of the camera mount, then it would be placed into the clamp and held by a set screw. 

Take the 1" length of aluminum rod and thread the first 1/4" with a 1/4-20 die.  This is the industry standard camera tripod mount thread.  It should screw tight into the camera bottom.

The retort stand clamps that I had required 3/16" diameter rods, so the hole has to be expanded.  This is done by simply drilling out the 3/16" hole with a 1/4" drill bit.  The camera mount is now ready.

Step 7: Assembly

Picture of Assembly
Photogate Timer-27 (Custom).jpg
I started with the electronics.  First, place a little bit of tape on the inside of the enclosure where the LCD connector pins will be, to make sure they don't touch the enclosure.  I used hot glue to hold the LCD in place, but nuts and bolts could be used too.  Place the switch and button and solder them to the board.  Make some sensor cables out of wire, female header pins and heat shrink tubing.  Insert the grommets in their holes and pass the connectors through them.  Connect them to the PCB pin headers.  Since the PCB is on a connector, its easy to work on it and then attach it to the LCD when finished. 

Use some bolts, tooth-washers and nuts to attach the retort stand base to the top of the enclosure.  Insert the retort stand rod into the base and put the clamps in place.  Insert the sensor holders and sensors, and connect the sensor cables.

Step 8: Finished!

Picture of Finished!
Photogate Timer-16 (Custom).jpg
Photogate Timer-17 (Custom).jpg
Photogate Timer-25 (Custom).jpg
Photogate Timer-20 (Custom).jpg
Photogate Timer-24 (Custom).jpg
To set the device up for camera testing, first, position the sensor at the base of the stand. Next, insert the threaded rod into the camera and then the rod into the clamp. Move the camera into alignment just above the sensor and clamp it tightly. If you are testing an SLR without the lens, make sure that the sensor will not collide with the mirror as it flips up. Open the back of the camera and move the LED into position just above the shutter. Turn the device on and cock the camera lever. Set your shutter speed. Press the ready button and fire the shutter. I recommend doing at least 10 tests on each speed to make sure that the speeds are consistent and accurate.

From concept to completion this project took about 5 weeks.  If anyone has any suggestions, questions or comments I would love to hear them.  Thanks very much for reading and I hope that this Instructable was helpful, informative and interesting to you.

Please turn to the next page to see the results of my first test run!

Step 9: Results

Picture of Results
K1000 Chart.png
Below are the results generated my my Pentax K1000.  You can see there is an issue on the last line of the data, the shutter speed is much much faster than it is intended to be.

What does this mean?

I know from additional investigating that there is a problem with this camera.  at 1/500th of a second the shutter only opens 80% of the way before closing, this means that the time measurements are correct, but in actual fact you would only produce 80% of a picture using this speed.  At 1/1000th, the shutter only opens 20% of the way, so the light getting to the sensor was cut off quite quickly, resulting in a reading of 400us instead of the expected 1ms.  This problem is likely due to dried lubricant in the shutter mechanism making it open incorrectly at high speeds.
giocad2 years ago
hello ... very nice and well done. I also thought I build something like that, but I have no time.
How much did it cost?
you want to sell it?
Thank you.
mattthegamer463 (author)  giocad2 years ago
It didn't cost me much since I had a lot of the parts on hand, it might cost $60 if you had to buy everything. I don't want to sell it as I use it all the time. The design would need some improvements if it was to be commercialized. It is not accurate for faster than 2ms (1/500) shutter speed.
ok ... thank you.
very interesting.
KenHunter2 years ago
Why did you use such a bright LED?
diy-ftw2 years ago
Nice project!

I thought I'd ask about a discrepancy between the parts list and the schem that's confusing me:

Is the cap that goes from the Ready switch to ground supposed to be 1 nF or 100 nF? The parts list calls for three 100nF (0.1uF) caps, but the schematic only uses two of them, and the 1 nF cap in the schem isn't in the parts list.

I'm wondering whether the parts list or the schem is correct.

Thanks!
mattthegamer463 (author)  diy-ftw2 years ago
Sorry about that. Its a 100nF.
Any recommendations on a suitable PIC18F programmer, C compiler, and IDE environment? I'm a total PIC-newb. I'm going to miniaturize my build, using an 8x2 display to make the device pocket-sized. That means I'll have to make some changes to the code and re-compile before burning a hex file to the pic.

I spent the day trying to get the Microchip XPLAB X IDE up and running, but it's C18 compiler for the PIC18F seems to be quite finicky -- it's throwing all sorts of errors with the supplied code, and the build keeps failing. I'm wondering whether this IDE might just be buggy.

Would you mind discussing what type of environment you used to develop & implement the supplied code, as well as what sort of hardware you used for debugging and burning to the PIC?

thanks again!
mattthegamer463 (author)  diy-ftw2 years ago
Sorry about that, its not going to work in MPLAB. I wrote the code in CCS and it is not directly compatible with MPLAB.  If you feel up to the task you can rework it to get it to run, but I am not a very good programmer and can't offer much help.  I use CCS because it spares most of the setting up of the chip's resources, or at least makes it easy and more plain-text than MPLAB does. 

I've learned quite a bit about RTC circuits and timekeeping since this project was done, there are some pretty easy ways to make it way more accurate.
Konican3 years ago
This looks like a very interesting project and will be worth trying for all film camera users. I have attempted to make electronic timers based on infrared diodes as emitters and detectors, but without any success so I resorted to making a purely mechanical set-up based on the famous Leica Drum Tester. It uses a slotted drum rotating at a constant speed, and is still a quick method of spotting shutter bounce and fade.
mattthegamer463 (author)  Konican3 years ago
A quick google finds some interesting information on that method of testing, it's quite similar to a method I saw using the scanning electron gun of a CRT television for the same effect. Quite interesting, thanks for sharing.
This is absolutely amazing, great work. I created a far simpler version that uses a flashlight or laser pointer, phototransistor, 1.5 volt battery, a resister, and a mini-stereo audio plug to connect to a computer via the line input port. Then I use audio recording software to record the signal generated by the light hitting the phototransistor as a wave file that is very accurate. It's not nearly as good as this design because computer audio ports are not designed to read DC current so the signal gets dropped if it is too long, but it is accurate for most shutter speeds above 1/20 second. I should post an instructable for my simple version anyway because even though your design is far better, it may be a bit much in the way of electronics and programming for most people to tackle (including me).
mattthegamer463 (author)  seerixprojex4 years ago
I read a number of guides doing it your way, it's about the only other reasonable way to do it. I built this thing because I felt nothing available cut it for me.
Yes, I know the guides you are referring to, and most of them are pretty thin on instruction or even misleading. Besides, the whole computer / audio method is very weak compared to your design. If I find the time I may even try to build your design because I think I have the skills to pull it off and I'm way, way, way into using old cameras, I have several of them. In addition, if you saw my instructable, you know that I made a home made camera so a shutter speed tester is a "must have" for me. Best, Rick
mattthegamer463 (author)  seerixprojex4 years ago
Thank you very much :)
alanstarkie4 years ago
This is really good. I used to be a camera repairer and the Kyoritsu shutter testers were in the thousands of $$$. Well done!
Nyanman4 years ago
will this device be able to check the timing for opening, full open, and closing on an iris shutter?
mattthegamer463 (author)  Nyanman4 years ago
It will measure the time the camera takes for opening, full open, and closing, and display the total time. It cannot measure the time it takes to open, the time spent open, and the time it takes to close. You could measure that possibly by connecting the sensor to a digital acquisition oscilloscope and recording the pulse in an analog form. This pulse is only recorded in digital form, but the sensor delivers it as an analog voltage.
nomadigin4 years ago
The shutters not fully opening isn't an error. Mechanically shutters can only move so fast so to get "faster" shutter speeds, only a portion of the frame is exposed at a time simulating a faster shutter speed. Read more here:
http://en.wikipedia.org/wiki/Focal-plane_shutter
mattthegamer463 (author)  nomadigin4 years ago
I have taken the camera and looked through the shutter at a bright white wall in sunlight, when the shutter fires at all other speeds it is clear the entire frame lights up, but at 1/500 only 80% lights up and at 1/1000 it is clear that about 20% lights up. Even with this "scanning" exposure method, I should still see the entire frame light up.

This is a common problem with old shutters, it is a result of dried lubricant in the mechanism preventing faster motion. The first shutter is slow due to a malfunction, so the second shutter overtakes it mid-exposure, resulting in a partially-exposed image.
Nano_Burger4 years ago
Wow, this beats the crap out of the shutter speed tester I cobbled together (the plug into your soundcard variety). You should go into business building and selling these things on Esty.com. I get the sense that photography with vintage SLR's is getting trendy with the young hipster crowd and there are enough DIYers to make this a high demand item. Reserve one of your first production runs for me!
mattthegamer463 (author)  Nano_Burger4 years ago
Thanks. I would but the build time is too long, I wouldn't make any money and still sell it for a price that someone would actually pay, and wouldn't have time to build anything else. Plus it would be pretty expensive. Most of the stuff here I had lying around.
Phil B4 years ago
This is very impressive. I believe the Pentax K1000 has a cloth focal plane shutter. I have a camera repair manual a guy published privately in the early 1970s. His method for testing shutter speeds was to photograph the screen of a cathode ray tube television set. It scans 528 lines per second. The user had to have the film developed to evaluate the test, but the percentage of the screen visible in the frame compared to how much was still black gave a pretty good idea of the speed of the shutter. It was low tech, but it worked. A lot depends on the requirements of the user. I had a Zenit SLR and did some work on its shutter. I was able to get it well enough adjusted by means of this television test that I got good exposures with Kodachrome II (ASA 64).
mattthegamer463 (author)  Phil B4 years ago
Thanks, I'm glad you like it.

I have read that and tried it myself once, didn't seem to work, all I saw was a blur of screen, not as it was demonstrated on the internet.

This method also works for any shutter type, such as leaf shutters.
colin3534 years ago
This is too amazing, well done.