Film Negative Viewer and Converter

by Random_Canadian in Circuits > Raspberry Pi

12150 Views, 85 Favorites, 0 Comments

Film Negative Viewer and Converter

DSCN2728.JPG
DSCN2727.JPG
raw.jpg
print.jpg
DSCN2731.JPG

I found an immediate need to be able to quickly view and record old film negatives. I had several hundred to sort through...

I recognize that there are various apps for my smart phone but I was unable to get satisfactory results so this is what I came up with...

I wanted to be able to view them in real time as actual pictures. I can manually sort through the negatives and record only the ones that I want.

I made a crude box for 3D printing to house the electronics.

I also used my LCD TV to view the images

Supplies

30mm arcade buttons

Raspberry PI 3B better price than Amazon (at time of writing)

RPi Camera

White LEDs

Connector - I used what I had. There are better options available

Connector pins

Screen I used for testing

#4 screws

2-56 screws

Water Clear Acrylic Adhesive

The Camera Adapter

DSCN2636.JPG
DSCN2637.JPG
DSCN2638.JPG
DSCN2639.JPG
Housing.jpg

I chose to design an enclosed camera adapter that works with a Raspberry Pi camera module to isolate each negative for quick viewing.

I began by taking various measurements of the film negatives as well as the approximate focal length.

I then modelled a simple horn that is to be printed from Black plastic. The focal length I used is 44mm.

The critical measurements were the size of the negative and the mounting holes for the camera.

The Pi camera is mounted to the circuit board with squishy foam. Not ideal. I had to make some shims from card stock to correct this. The images are not perfect rectangles otherwise.

I used ABS which when printed on my machine has a flat to semi flat finish which will reduce reflections which in turn could have a bad influence on the print quality.

Downloads

Light Panel

DSCN2640.JPG
DSCN2641.JPG
DSCN2642.JPG
DSCN2643.JPG
DSCN2644.JPG
DSCN2645.JPG
DSCN2646.JPG
DSCN2647.JPG
DSCN2648.JPG
DSCN2649.JPG
DSCN2650.JPG
DSCN2651.JPG
DSCN2657.JPG
DSCN2658.JPG
DSCN2660.JPG
DSCN2663.JPG
DSCN2668.JPG
DSCN2669.JPG
DSCN2670.JPG
DSCN2671.JPG
DSCN2672.JPG
DSCN2674.JPG
DSCN2675.JPG
DSCN2676.JPG
DSCN2677.JPG

I tried to make a panel fro printed materials but this had poor performance

I then used a 6mm piece of Lexan with LEDs attached to the edges to make a light panel.

The light panel is fairly critical for optimum photographs.

It needs to have uniform light with no hot spots.

IMPORTANT: Surface imperfections in the Lexan will refract and reflect light. The scratches from sanding mut be a fine as possible for an even glow.

The panel is sized to fit the bottom of the negative viewer, 50mm per side. Mounting holes are marked for secure fitment to the bottom of the viewer, 3.5mm from the edges. The holes are drilled with a step bit to prevent cracking the plastic.

The holes are sized for #4 screws

It needs to have the side away from the film strip frosted. The imperfections in the surface will reflect light to create a uniform lighted panel.

I used increasing grit numbers of sheet sand paper on a smooth surface to get the frosted look. It is important o have no scratches of groves in the surface as this will show as scratches or marks on the desired photograph.

I went gradually from 150 grit to 800 grit.

I had no top hat LEDs so i made my own by touching the surface dome to a belt sander. it is important to not expose the internals, I left at least 1mm of acrylic covering the top.

These were then balanced on the edge of the Lexan and a drop of water thin acrylic adhesive was used to adhere the parts together. The bond is fairly instant and the adhesive fills the imperfections so that the LED appears to be part of the Lexan.

I used 6 per side.

I soldered them in 2 parallel strips of 6 to a 100 Ohm current limiting resistor on the positive side then this has a wire to a connector which attaches to Pin2 (+5V) of the GPIO expansion on a Raspberry Pi board

The negative side has a wire that goes directly to ground via Pin6 on the GPIO expansion.

Selector Buttons

DSCN2694.JPG
DSCN2695.JPG
DSCN2697.JPG
DSCN2699.JPG
DSCN2709.JPG
DSCN2706.JPG
DSCN2711.JPG
DSCN2713.JPG
DSCN2714.JPG
DSCN2717.JPG

There are only 2 operations needed from this device.

The first is to allow the operator to view and record images.

The second is a way to exit the program when done.

I chose to use a green button for record and a red button for exit.

Programming wise I chose to use GPIO 23 and 24. This is wired on the header pins 14, 16,18, and 20. The wires are coded to the switches.

I had a bunch of button boxes left over from a customer build so I used one as a test fixture.

I printed the wrong file which didn't have the cutout for the camera so I had to do mine manually. I have included the proper files in the following step.

Protective Case

CaseTop2.jpg
CaseCone.jpg
Cover.jpg
DSCN2725.JPG
DSCN2716.JPG
DSCN2718.JPG
DSCN2719.JPG
DSCN2722.JPG
DSCN2723.JPG
DSCN2724.JPG

I modelled this for function over form. The lines are simple and easily printed on most machines.

The case was printed with sparse interior but it still has quality feel. The thickness provides stability and the size is easy to use.

Ideally I would have mounted the viewing horn horizontal, I had hardware limitations which prevented this.

Simple Code for Testing

TestPython.jpg
DSCN2687.JPG
DSCN2692.JPG
DSCN2705.JPG
DSCN2707.JPG
DSCN2720.JPG

I sampled the code from RaspberryPi.org to get this operational.

"By default, the image resolution is set to the resolution of your monitor. The maximum resolution is 2592×1944 for still photos"

This was used to find the optimal focal length of the camera. I used a needle nose to adjust the lens on the module. A macro lens would be ideal but I couldn't get one delivered in time.

The top of the focus housing is sized for the Raspberry Pi V2 camera. it is held in place with 4 - 2/56 screws.

The following code is what I used for testing...

from picamera import PiCamera
from time import sleep

camera = PiCamera()

camera.start_preview()

camera.awb_mode = 'auto'

camera.image_effect = 'negative'

sleep(150)

camera.capture('/home/pi/Desktop/negative.jpg')

camera.stop_preview()

Program Code

Pr3.jpg
pr1.jpg
Pr2.jpg

First open a terminal window and make a new directory, type "mkdir conversions"

Open a python IDE

Enter the following code:

from picamera

import PiCamera
from time import sleep

from gpiozero import Button

button = Button(23)

button1 = Button(24)

camera = PiCamera()

camera.awb_mode = 'auto'

camera.image_effect = 'negative'

camera.start_preview()

image = 1

while True:

try:

if button1.is_pressed:

camera.stop_preview()

break

if button.is_pressed:

camera.capture('/home/pi/conversions/Convertion%03d.jpg' % image)

image += 1

except

KeyboardInterrupt:

camera.stop_preview()

break

Downloads

DSCN2721.JPG
DSCN2729.JPG
DSCN2730.JPG

Run the code in the IDE

The green button will take a still image of the negative and save it to the internal memory.

The images are saved in the conversions directory.

I moved them to a USB drive then onto my computer for processing in photoshop.

The red button quits the program. A keyboard kit will also do it.

Program Tweaks

I have adjusted the program so better image quality saving

from picamera

import PiCamera
from time import sleep from gpiozero

import Button import datetime

import time

#date code for saving images date = datetime.datetime.now().strftime("%d_%H_%M_%S")

# green button

button = Button(23)

# red button

button1 = Button(24)

camera = PiCamera()

# camera image adjustment and viewing on monitor

camera.resolution = (2592, 1944)

camera.awb_mode = 'auto'

camera.image_effect = 'negative'

# display image to monitor

camera.start_preview()

# image saving increment

image = 1

while True:

try:

# red exit button

if button1.is_pressed:

#camera shutdown

camera.stop_preview()

break

# green button capture

if button.is_pressed:

# save image location and formatting

camera.capture('/home/pi/conversions/conversion'+ date + '%03d.jpg' % image)

# image saving increment

image += 1

# keyboard program exit

except KeyboardInterrupt:

#camera shutdown

camera.stop_preview()

break