Super-fast DIY Slide Scanner

17,498

155

21

Introduction: Super-fast DIY Slide Scanner

About: I play with electronics and stuff. Also manager of the electronics workshop at the Royal Academy for Arts (KABK) in The Hague.

Before digital photography entered our lives and became ubiquitous, people had their photos printed on paper, and they made slide shows. From the 1950s through to the 1970s, boring friends and family with slides of vacations or weddings was an accepted pastime. There was no internet, people didn't know any better.

Although we now have Facebook and Instagram to share family photos (I'll leave it for you to decide if that is an improvement), the remnants of the Kodachrome era are still in a lot of people's attics. Boxes full of 35 mm slides are still taking up space.

To remedy that, people buy a slide scanner, only to find out that scanning a big collection is a *lot* of work. That's mainly because you need to manually put in the slides and scan them, one by one. One of my family members calculated it would take him at least 50 hours of mindnumbing labour to process the collection of 2.000 slides his father-in-law left him. Nobody wants that. There are companies of course that offer to digitalise all those boxes for you, but their services are far from cheap. Nobody wants that either.

So why not hack an old slide projector and use a Raspberry Pi to turn it into a super-fast slide scanner? The Pi can switch slides automatically and store the images online in one go. It's fast, cool, massively useful and you'll reclaim all that space in the attic. Everybody wants that.

Note: this was a project I built and wrote about a couple of years ago. I didn't publish the Instructable because I wanted to improve the scanner first, but I finally realized perfection should not get in the way of progress :-)

Step 1: Materials

Here's all you need to build your own automatic slide scanner:

  • An old slide projector
  • Raspberry Pi with SD memory card and power supply
  • Raspberry Pi Camera Module V2
  • TIP120-transistor and a 1 kilo-ohm resistor (both are dirt cheap)
  • Wire, breadboard, duct tape and/or a rubber band
  • Neutral Density (ND) gel sheet (buy it at Amazon or your local camera store)

A little soldering may be required, a multimeter will come in handy and you may want to order one or two 3D printed parts.

You'll need an old slide projector. After I started the build, I found out that my projector had some impractical features. So I bought a new one, Voigtländer Spezial PM 35 A. 150 dollars on eBay, but I bought it for 17 euros in the thrift shop. I made sure it had these features:

  • autofocus
  • push button or remote control (so it needs a mechanism to automatically change slides)
  • easy to open
  • slide mechanism not incorporated in the case
  • made for universal slide trays

As a bonus its case is a cool-looking sturdy metal, and the slide mechanism works consists of sturdy metal push bars instead of loose plastic parts.

Older projectors look even nicer, but they don't work with the universal trays.

Step 2: Using an Old Projector As a Scanner

Slide projectors have a pretty, shiny set of optical elements. From back to front there are a concave mirror, a halogen lamp and two condensor lenses that focus the light and spread it out evenly. Between those two is a heat filter, a glass square that blocks the infrared radiation of the lamp.

After the convex lens comes the frame that holds the slides and the projector lens. I took out the projector lens by just unscrewing the cylinder until it came out.

The 24 volt, 150 watt Tungsten light bulb is insanely bright, and it produces a lot of heat. The Pi Camera should be able to handle the bright light on its chip, but heat is not very good for sensitive components. Taking out the plano-convex lens reduces the light and the heat that reaches the camera considerably. We don't really need all that light anyway because the image does not need to be projected onto a large screen on the other side of the room.

Even without it though, the light still is so bright that the pictures you take with the Pi Camera will mostly be overexposed, especially the brighter parts of the image. To block some more light, I put in a bit of ND sheet. This is what photographers use to block light to their cameras to create long-exposure shots even with bright daylight (for examples, see this excellent video).

Before I thought of the ND filter, I tried sticking white plastic sheet, acrylic and even paper on the slide holder, but those materials did not reduce the light enough and it didn't help the quality of the images. I also was worried about heating the plastics up to the point of vaporizing them into unhealthy gasses.

To digitize slides or negatives, you can also just use a panel of superbright LEDs. The great advantage of this setup however, is that we can use the projector's mechanism for slide transport to scan a lot of slides fast.

Step 3: 'Pushing' the Button

The slide projector I initially bought at a thrift shop is a Braun Novamat 515 AF. It had a remote control (with a wire) so you could operate the projector from the couch. I want the Pi to automatically advance every slide in a tray, and the remote's wires are a perfect way to do that.

I cut the wire and my multimeter showed that the projector sends 31 volts through the switch (on the Voigtländer it's 38 volts). The Raspberry Pi can't handle a voltage that high just by itself, so it needs a little help in the form of a TIP120 Darlington transistor. These transistors are a little old-fashioned; MOSFETs are more efficient than Darlington transistors and they don't get hot as fast, but many of them can switch 30 volts at most. The TIP120 can handle up to 60 volts and it only needs to close the circuit for a short moment, so for this application it's fine.

Connect the left pin of the TIP120 to GPIO pin 24 on the Pi. To limit the current through the transistor, put in a 1K Ohm resistor (see the schematic). Connect the middle pin with the switch wire from the projector, and then the right pin with both a ground pin on the Pi and the ground wire from the projector. After testing the circuit on a breadboard to see if it works correctly, solder the components in place permanently.

Step 4: Attaching the Camera to the Pi

You need to find a way to put the camera in the projector firmly but preferably in a way that you will also be able to move it a little afterwards.

I had a small case 3D-printed. The strong plastic case makes it easier to attach the camera module. The print quality was very good, and the case had a nice and shiny surface. Normally that would be fine, but now we need to make sure no light bounces back onto the slide. To prevent that, I sanded the case a little.

Placing the camera inside the projector at the right distance and focussing it is quite a challenge. I used a rubber band to wrap around the camera case and the now empty housing of the projector lens. That makes it easy to rotate the camera when it is tilted in reference to the slides, but it would probably be better to build it so it won't wiggle out of position again when I move the projector. What can I say, it's a work in progress.

I cut a small opening in the top of the projector where the camera is to bring out the flat cable of the camera module to the Pi. The Pi has a CSI connector which is there especially for the Pi Camera. Pull up the bracket (the wider part of the connector) and you can stick in the flat cable, with the blue strip facing the USB connectors. Push down the bracket and the cable is connected. Make sure the flat cable is not resting on anything conductive (such as the ethernet port) because that can cause interference in the data transfer.

Attach the Pi and the soldered components to the projector.

Step 5: Taking Photos With Python

Now we can start taking pictures.

I use Raspbian on a Raspberry Pi 2 with monitor, mouse and keyboard connected. In the Raspberry Pi config you have to enable the use of the camera.

In the desktop environment you can do this via the Preferences menu, Raspberry Pi configuration, and then enable the camera on the Interfaces tab. Then restart. A fresh Raspbian-installation already has an up-to-date version of the software for the camera, but on other OSes you can install it with this command from the terminal:

sudo apt-get update && sudo apt-get install python-picamera python3-picamera

To take a picture, all you need to do in the terminal is raspistill -o foto.jpg, but we first need video to help us with focussing the camera and testing.

Create a new Python file, either from the terminal or using the Python IDE via application menu > Programming > Python 3 (IDLE).

from picamera import PiCamera
from time import sleep
camera = PiCamera()
camera.start_preview()
sleep(60) # turn off the camera after one minute
camera.stop_preview()

Save this script as camera.py and then run it. You should now have video from the camera.

Step 6: Turn Your Raspberry Pi Camera Into a Macro Lens

Now that you can see what the camera is registering, you can use that to get the focus of the camera right. The Pi Camera unfortunately doesn't have autofocus. It is the same image sensor which is used in millions of mobile phones (Sony IMX219). In the factory it is set to infinite depth of field and it delivers wonderful crisp photos... but only from a minimal distance of 50 to 75 centimeters (19.7" to 29.5"). In our slide scanner that is not going to work, because at that distance the slides would be way too small which means we wouldn't be using all of the 8 megapixel goodness of the camera to capture them. Also, the camera module would have to be half a meter (20 inches) outside the projector, which is impractical.

One way to solve this, would be to buy a macro lens like the ones made for mobile phones, but that probably would not give the optimal results. Fortunately, the Raspberry Pi Foundation discovered something about its own hardware. With a bit of effort, it is possible to unscrew the lens a little in order to change the focus.

When I got my Raspberry Pi Camera, a plastic knob was included for this purpose. I used it to turn the lens about two turns counterclockwise. It's a bit fiddly, but the result is quite impressive: really sharp images at about 4 centimeters (1,5").

Now the camera can be close enough to have the slide almost in full view! By getting the focus so much closer, the depth of field is also a lot smaller. That means you will really have to carefully make sure the camera is at a right angle and at the right distance from the slide.

Don't use pliers!

Didn't get a focus tool with your camera? Whatever you do, don't go trying to turn the lens with pliers. You'll barely have grip and you can easily damage the lens. Thingiverse.com has several designs for a 3D printable focus tool.

Before turning, you could make a small pencil line next to the lens and its holder, so that you can turn the lens back to its original position should you want to.

Step 7: Taking a Lot of Pictures

Create this folder on the Raspberry Pi: /home/pi/scanned_sllides/. Put a text file in it /home/pi/serialnumber_slides.txt with just '0' in it. Then create the file diascanner.py (see attached below).

The script pushes the projector's button as it were, by sending a signal through the GPIO port to the transistor. It does that for 0.05 seconds (50 milliseconds), which is about the minimum duration for a human button press.

Start the script at the command line with python diascanner.py 1 if you want to insert and photograph just one slide. If you want to take in fifty slides in one go: python diascanner.py 50

Step 8: Speeding Things Up

To be honest: my scans are not as good as professional scanners. To get photos that approach their quality, you'll have to invest quite a bit of time in perfect focus and light measurement. Even then the results may not be satisfactory: professional slide scanners use real scanning instead of taking photographs of slides. This results in digital photos with a lot more dynamic range – and that is what you pay for. A result that is just as good as most home slide scanners should be attainable though.

Our modified slide projector has one big advantage over the from-the-store slide scanners: it's crazy fast! You can scan thousands of slides in no time. Even if the quality is not the best, I'm thinking I could still have the best photos scanned professionally. Not having to scan every antique vacation photo or out-of-focus photo of flowers saves a lot of time and money.

--

So how much time could an automatic slide scanner save us? To have a benchmark, I asked a family member about his efforts. His father-in-law left him a collection of over two thousand slides. Using the slide scanner he bought, it holds just four slides, which doesn't make life any easier. He manually has to take four slides from the slide tray, put them in the small scanner's tray and then push a button on the scanner's software on his computer.

That way, scanning and saving takes 1.5 minute per slide. To scan 2,000 slides would take him 50 hours. Even if he'd want to spend two hours every weekend with a slow slide scanner, it would still take him six months to digitize all the old photos. I suppose this is why all the slides are still in their boxes untouched.

The speed of my scanner is mainly determined by how fast the projector can change slides: 2.4 seconds. This means a whole tray of fifty slides can be digitized within two minutes. Two thousand slides can be photographed within 1.5 hours instead of having to sit down with a store bought slide scanner for fifty hours.

It could even go faster if you use camera.exposure_mode = ‘off' to skip the automatic light measurement. That requires you to get the settings exactly right. All settings for the Pi Cam can be found at http://picamera.readthedocs.io. Showing the preview on the monitor can also be switched off. In theory, scanning would only need to take 1.8 seconds, which means we could be done with the entire collection in less than an hour.

Step 9: Things to Do

Even this awesome slide scanner could be improved upon. It needs a conveyor belt that inserts slide trays into the projector one after the other, wouldn't that be cool? In that case, it also needs sensors to detect when a new tray starts (for the numbering of photos) and when all trays are done and the system can stop.

I would love to use OpenCV to use image recognition which could add a description to every photo, categorize them (mighty useful with a large collection of photos) and maybe even auto-rotate them.

I would also like to make it easier to focus and rotate the camera. I am thinking of cutting a long slot in the top of the projector, and use a nut and bolt attached to the camera case to be able to move if back and forth, and then screw it tight.

The main thing that could be improved, is the lighting. I have been experimenting with a 3 Watt LED, but diffusing such a bright light and striking the right balance with the camera settings is pretty hard. Combining multiple different exposure to get a photo with the highest dynamic range seems necessary.

Any suggestions you might have are welcome!

Automation Contest

First Prize in the
Automation Contest

Be the First to Share

    Recommendations

    • Cold Challenge

      Cold Challenge
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Block Code Contest

      Block Code Contest

    21 Comments

    0
    Diez66
    Diez66

    1 year ago

    Going to give this, or something like this, a go thanks. I will let you know.
    I found a 9€ auto projector and I have a Pi B and a camera V1.3 module to start with.

    0
    tjaap
    tjaap

    Reply 1 year ago

    Great!

    0
    tjaap
    tjaap

    Reply 1 year ago

    Very nice, love the control box.

    0
    vincentvidal
    vincentvidal

    1 year ago

    It seems that all the photos are overexposed, the use of the original bulb is critical, sorry not convinced!

    0
    tjaap
    tjaap

    Reply 1 year ago

    I think I admitted this is a work in progress :-) I still think using an LED is better though, it's just a matter of finding the right diffuser.

    0
    Wild-Bill
    Wild-Bill

    1 year ago

    Super-fast you say. I have every slide and every negative of every picture I have taken in my life, except for some work I did as a professional photographer. They are all in a big box. I picked up a used Nikon Cool Scan where I managed to get through a few slides but it was daunting. I already use a RPi (2B) as a media centre for play music through my stereo and as I have play list on my music collection I thought I could have slide shows on my TV. All my files of course are on my personal computer. Thus your project piques my interest plus I have a Kodak Carousel around here somewhere. I thought of creating programs to look through a collection to add, change, manipulate and extract photograph metadata (along the lines of Exif tools but with a GUI front end (https://awesomeopensource.com/projects/exif & https://sourceforge.net/directory/graphics/graphics/graphics-editors/metadata/os:linux/)) as I also have a huge collection of digital photos. Thank you very much for your project as you have reignited my imagination for some of my own projects.

    0
    tjaap
    tjaap

    Reply 1 year ago

    Thank you!

    0
    JLMalaquias
    JLMalaquias

    Question 1 year ago on Step 9

    I had a similar idea with a Reflecta projector (it uses those 100 slides' trays that can be turned upside down without losing the slides).
    However, I intended to use it with a Nikon D780 Full Frame camera.
    I managed to get al the alignment and focusing right, but I was disappointed that the lamp did not illuminate the slide evenly. The center of the slide was a lot brighter than the edges. So, I had horrible vignetting. I found this odd, since the projected slide seems about even. No vignetting on the screen. Any thoughts? I even considered replacing the projector's slide with some sort of led light that might be more diffuse. Any thoughts?

    _DSC7896.JPG
    0
    doompie
    doompie

    Answer 1 year ago

    Add some diffuser between light and camera.

    0
    tjaap
    tjaap

    Reply 1 year ago

    Awesome setup, thanks for showing it.

    0
    FilipW
    FilipW

    Answer 1 year ago

    A diffuser is needed because the condensor system is designed to project the lamp's light into the entrance pupil of the objective lens, which probably sits way closer to the slide than your camera lens can do. You could also try removing one of the lenses in the condensor to increase its focal length to suit the distance to your camera.

    1
    dlebryk
    dlebryk

    Answer 1 year ago

    This is a question that brings back memories. The problem you are having is the same as darkroom enlargers - trying to print larger negatives and not changing the condensers.

    There are a few possibilities here. One could be, you are too far away from the projector, and that is the projector's lens barrel doing the vignetting. You could troubleshoot that by moving your camera much closer or farther away (don't worry about focus, just is the image evenly lit all the way across). Move a lot closer or farther away from the projector.

    The other possibility, you've changed something after taking off the projector lens. The condensers in the projector lamp are focused on evenly lighting exactly the 35mm area at precisely that location in the projector. If you move the slide farther away or closer to the condensers, then the light won't be even. Or one of the lenses is missing in the light box - one of those big heavy glass lenses. That would for certain cause this problem.

    My guess, it is the lens barrel of the projector getting in the way. You'll need to be closer or farther away for this to work.

    https://www.flickr.com/groups/84061069@N00/discuss...

    Sorry about the link below - it is specific text in that wikipedia article about condensers:https://en.wikipedia.org/wiki/Enlarger#:~:text=A%2...
    https://en.wikipedia.org/wiki/Enlarger

    0
    lacovara
    lacovara

    1 year ago on Step 9

    A very nifty project! A couple of thoughts:
    1) It might be interesting to replace the lens with a pinhole. Focus would be automatic.
    2) You could replace that halogen lamp with the bright LEDs, and possibly adjust brightness via the LEDs.
    3) Bell and Howell used to make a slide cube projector. It was auto-loading from a cube in which you loaded 40 slides. Very fast, no handling of slides into trays. It had auto-focus. I am thinking that I might to convert mine.

    Now a sermon: do not through away your original media. Unless you live in a camper's tent, find the room. Once the originals are gone, then you are dependent on your electronic storage.

    Again: very cool project.

    0
    tjaap
    tjaap

    Reply 1 year ago

    Thank you!
    Trying a pinhole would be a fun experiment, thanks for the idea. I did try a 3W LED, but still was not satisfied with the diffusion so that still needs work. It is more pleasant to work with a light source that does not get so bloody hot anyway :-)
    I only want to throw out the ones that are out-of-focus shots of flowers and stuff :-)

    1
    doompie
    doompie

    1 year ago

    Really cool to use the RPi camera.
    Had that in mind to digitize negative film strips or even 8mm motion film.
    But that'll need some special rig to advace and feed the strips.

    Shameless plug,😁 :
    My slide scanner based on Arduino controller made 7years ago.
    https://youtu.be/SZ_IhsHgTTI

    0
    riff raff
    riff raff

    1 year ago

    Came for the video of it in action.
    Left dissappointed, lol.

    0
    AdrianaG
    AdrianaG

    1 year ago on Introduction

    Make this compatible wit Kodak carousels to eliminate double handling!

    1
    soundbrigade1
    soundbrigade1

    1 year ago on Step 9

    I have been into this VERY GOOD idea too, but instead of a Pi or something similar I wanted too hook up my Canon EOS M3 with a macro lens. Using Arduino Nano to step thru the slides and send the SHOOT command wireless to the camera (had found the code on the internet).
    I almost worked, but needed a 70-100mm macro lens instead of the 22mm I had.
    What seemed to be a good idea was to take three shots of each slide with different shutter settings (there's a function for that in my camera).
    Got a 70mm macro and should restart my project.