OP-80A-rpi Paper Tape Interface

1. Overview

A simple project to interface an old paper tape reader to a Raspberry Pi 3B. I find the C language easiest for me, and the libraries needed, were already installed in my version of raspbian. The Oliver Audio Engineering paper tape reader runs on 5V, but the Raspberry Pi runs on 3.3V.

2. Circuit

circuit.png
Figure 1. Circuit

3. Parts List

4. Component Arrangement

img_2604s.jpg
Figure 2. Hookup

My chosen location of the components could have been a bit better. If the rainbow coloured lead of the OP-80A was plugged into the prototype board between the power supply and the level shifters, then the jumper leads to the GPIO extension board would have been a bit shorter.

The top power rail is strapped for 5V and the bottom power rail is strapped for 3.3V.

img_2623s.jpg
Figure 3. Wiring

5. Software

The program was typed in with the raspbian GUI program geany. The building of the executable however, was done externally to the geany environment, using GNU make.

alan@raspberrypi:~/src/raspberry pi paper tape $ make
gcc -Wall -o OP-80A-rpi OP-80A-rpi.c -pthread -lpigpio -lrt
alan@raspberrypi:~/src/raspberry pi paper tape $ 

A few tapes gave me a bit of trouble, because the paper tape used on the ASR33 teletype, did not need to be opaque, since that teletype used mechanical fingers to read the holes of the tape. Some of the paper tapes I wanted to read, were more translucent than opaque, and were quite difficult to read. The light had to be just right. Programs cut with the dark paper tape, meant for optical readers worked just fine.

I was worried about all the bit suffling that I used in the program, but the ARM processor certainly runs fast enough for that not to be a problem. The width of the acknowledge (GPIO17) coming from the Raspberry Pi was almost too narrow for my old Tektronix oscilloscope to pick up. I was amazed.

I chose to build a simple image of the tape, rather than delve into the various protocols for binary and ASCII formats. This meant that the data file produced, would normally need to be processed by another program to get the data in an useable form. This suited my need to digitise the tapes so their content was not lost.

The libraries that enable C to interface with the GPIO need superuser priviledges. Due to the crudeness of my code the paper tape program will require a <ctrl>C to terminate the program, after feeding the paper tape through the OP-80A.

alan@raspberrypi:~/src/raspberry pi paper tape $ sudo ./OP-80A-rpi BASIC4K.bin
[sudo] password for alan: 
^C2018-08-28 18:10:05 sigHandler: Unhandled signal 2, terminating

alan@raspberrypi:~/src/raspberry pi paper tape $ ls -al BASIC4K.bin 
-rw-r--r-- 1 alan alan 10337 Aug 28 18:11 BASIC4K.bin
alan@raspberrypi:~/src/raspberry pi paper tape $ 

Happy with the outcome, and a bit of documentation as well.

6. Rules for the Paper Tape Reader Light Source

  1. Don't use alternating current (AC) to the light source!

    If you believe than the heat inertia of a tungsten filament in an incandescent bulb light source is enough to attenuate 60Hz or 50Hz domestic supply - incorrect

    If you believe the persistence of the phosphor on efficient flourescent light source is enought to attenuate 60Hz or 50Hz domestic supply - incorrect

    Direct current (DC) is the only suitable light source power that is suitable for reading Paper tapes.

  2. Don't use nine light emitting diodes (LED) for the nine photo-transistors!

    The cone of light from each of the LEDs spreads enough to hit the neighbours of the photo-transistors, however bit0 and bit7 will miss out on some light and trouble reading those bits occurs.

    Ten LEDs works better and aim between the photo transistors.


    Bits 0 and 7 less light than the others


    More even light distribution

7. Circuit for the Paper Tape Reader Light Source

Two strings of LEDs, each of five LEDs seems to give the best combination. My LEDs had about 1.94Volts accross them at 18.6mA, and this gives a string of five about 9.7Volts, leaving 2.3Volts accross the resistor. Each string draws about 19milliAmps.