Skip to main content
shopping_basket Basket 0

Interfacing a 1967 Paper Tape Reader: Part 3

Bill Marshall

PT3 1

Close-up of the TRM250 in action with the capstan roller visible under its plastic finger guard. To the right of the capstan, the lamp illuminates the tape as it moves over the photosensors beneath: it’s just about possible to make out the bright bar of light directly over them. The passive friction brake lies under the lowered flap over the tape on the right of the illuminated area.

In Part 1 of this series, I introduced a piece of computing history – data storage on paper-tape – and announced my intention to interface a 1967 vintage paper-tape reader to a modern microcontroller system. I gave various reasons for this seemingly pointless task in that article. Nostalgia is a factor, but I also wanted a vehicle for demonstrating how a product can be engineered for long-term reliability and easily repaired when bits do break. It adds up to what we might call Sustainable Engineering. Part 2 described the interface circuits necessary to make the signals from the reader’s photosensor amplifiers compatible with a modern microcontroller. The recommended design for the clutch solenoid driver from the original technical manual was considered. I decided to work on a less complicated design based on less obsolete components and that’s what I’ll talk about in this article – amongst other things.

Clutch (Pinch-Roller) solenoid driver

PT3 2

The recommended design in the technical manual required twelve components and three different power supply voltages. The new one requires only four, with a single supply rail (Fig.1). Three transistors are replaced by two configured as a Darlington pair and packaged in a single device. A Power Darlington is really useful as an interface between a low-current (mA) GPIO output, and a current-hungry (A) actuator such as a solenoid or motor. I selected the BD677A (485-9985) with its 4A drive capability and current gain of 750. This particular device has a built-in ‘Flyback’ diode to protect it from high reverse voltages when switching highly-inductive loads such as the clutch solenoid. The solenoid requires about 1A to operate, supplied by a 12V power supply via a 10Ω 25W wire-wound resistor (015-7550) . I kept the varistor from the original design as a kind of ‘belt and braces’ approach to protecting the transistor.

The Microcontroller

After considering a number of nano-format microcontroller modules including the Raspberry Pi Pico, I decided to design a custom board based on a DIP-packaged Microchip PIC24 device I found in my chip collection. Readers familiar with my FORTHdsPIC projects will spot my laziness here: the PIC24 is essentially a dsPIC shorn of all its DSP functionality. In other words, the PIC24 has a subset of the dsPIC’s instruction set, and a reduced version of its hardware architecture. I have a PICkit 3 debug/programming tool (now available as PICkit 4 (171-7762) which works with MPLAB X, the IDE used to develop FORTHdsPIC. The In-Circuit Serial Programming (ICSP) interface between the PICkit and chip itself is about as simple as you could imagine, so what’s not to like? The circuit of the microcontroller section is shown in Fig.2. The specific device I used is the PIC24HJ128GP502. There are just enough GPIO pins available to the job and only a handful of resistors and capacitors need to be added to create a working control system. The only component requiring more explanation is the quad 2-i/p NAND chip IC1; its four gates are wired to form a pair of set-reset flip-flops used to ‘debounce’ the Run-Out pushbutton (RO) and the Tape-Out sensing microswitch (TO) signals. The flip-flop circuit only works with changeover switches and that’s what we have here. The pole of each switch is connected to 0V while the N/O and N/C contacts drive the set and reset inputs of the flip-flop respectively. It’s important not to forget the 10kΩ pull-up resistors otherwise operation could be at best erratic. There is a third sense input monitoring the 9V lamp power side of the Motor/Lamp toggle switch on the front panel. It looks like this signal was a later addition to my machine – probably because operators frequently commanded a tape read without realising the lamp and motor were switched off. A simple potential divider circuit takes this 9V signal (M/L) down to the 3V acceptable to the MCU.PT3 3The basic function of the MCU firmware will be to convert the parallel data from the photosensors to a serial format using one of the chip’s UART modules. Serial Tx/Rx data signals are brought out to a 3-pin header, and initial testing will involve a direct connection to the host processor’s UART pins with proper RS-232 drivers being added later.

Finally, I mustn’t forget the essential ‘Hello World’ LED. Although it might be given a permanent role later, the main reason for its inclusion is to allow the whole programming/debug system to be checked out with just a few lines of code.

PT3 4

The finished interface board. The nine level-changers are on the left, with the PIC24 MCU in the centre, and the solenoid driver on the right. The chip in the heatsink, top centre, is an LD1117A voltage regulator providing a +3.3Vdc rail from an incoming +6Vdc supply.

PT3 5

Close-up of the clutch solenoid and pinch-roller mechanism. When energised, the solenoid pulls down one end of a see-saw arm, so rotating the other end with pinch-roller attached upwards. The tape is thus pushed into contact with the rotating capstan roller. The spring under the pinch roller ensures rapid disengagement when the solenoid is de-energised. Note the operating arm of the Tape Out microswitch peeking out from the deck next to the open friction brake cover.

The LED Saga

It was such a simple idea: replace the old 48W automotive filament bulb with an equivalent LED version using the same P35s lamp base. I tried several different products with different numbers of LED chips, but none of them produced a reaction from the photosensors. I got some response with a home-made effort but nothing like enough. What’s so frustrating is that the filament lamp works perfectly – even when underrun with 9V instead of 12V and emitting a distinctly yellow light. I’ve come to the conclusion that the optics were designed around light emission from a continuous, vertically mounted filament about 7mm long. A line of discrete LEDs just won’t cut it. So, it’s back to the old lamp, for now. Even when underrun it still takes 3.5 amps and I’m running it off a 9V 4A mains SMPSU.

Using a mains PSU to drive a low-voltage filament lamp had an interesting effect. When switched on from cold, the filament began to glow then slowly faded out. It repeated this a few times, getting dimmer each time until it remained dark. Turning the power off then on again led to full brightness immediately. It did take me a few seconds to remember that the tungsten filament has a resistance characteristic that increases with temperature. When cold, its resistance is near zero so a sudden application of voltage causes a very large ‘inrush’ current to flow. The filament rapidly heats up, and starts to glow ever more brightly until the rising resistance brings the current down to its running value of 3.5A. A normal ‘mains’ bulb will come to full brightness almost immediately because the mains supply can handle the brief but heavy overload. It explains why old, end-of-life bulbs with thin, eroded filaments tend to ‘blow’ just as they’re switched on. It also explains the odd behaviour when powered from a low-voltage power supply, with automatic current limiting. Cycling the power switch immediately afterwards works, because the filament is still fairly hot, causing a much lower surge current. The plus side of this phenomenon could be that current limiting helps to increase the life of the bulb.

Power Supplies

Not long ago, building the power supply was an essential part of any electronics project. Nowadays, most projects based around a microcontroller board will probably work off the 5 volts from a USB link to a laptop. This one though, needs five different supply voltages: +3.3V, +6V, -6V, +9V and +12V! The MCU/Logic +3.3V supply will be obtained by regulating down from the +6V rail, but the others will need independent mains inputs. The +9V rail supplies a current of 4 amps to the lamp alone and needs to be kept separate. Similarly, the +12V rail will see pulsed 1A current demands from the solenoid, so again I wouldn’t want to drive anything else from it. I decided the prospect of cramming multiple power supplies into the case involved far too much effort. Instead, I am using four mains plug-in adapters. This approach does have significant advantages:

  1. No design required.
  2. No space taken up in the case.
  3. If current consumption is increased because of modifications, just plug in a beefier unit.
  4. Unless the equipment is destined for continuous operation, its supplies can be used temporarily on other projects.

Here is a list of the PSUs I propose to use:

(197-1171) GEM06I06-P1J 6V 1A power supply (2 off)

(136-0435) ACM24US12 12V 2A power supply with (124-1938) UK plug adapter

(172-0721) ACM36US09 9V 4A power supply with (124-1938) UK plug adapter

Next Time

I hope to report on the wiring of all the links between the PTR and its interface box, and the successful testing of the core firmware.

If you're stuck for something to do, follow my posts on Twitter. I link to interesting articles on new electronics and related technologies, retweeting posts I spot about robots, space exploration and other issues.

Engineer, PhD, lecturer, freelance technical writer, blogger & tweeter interested in robots, AI, planetary explorers and all things electronic. STEM ambassador. Designed, built and programmed my first microcomputer in 1976. Still learning, still building, still coding today.

Recommended Articles


November 29, 2021 14:58

@Bill Marshall
I'd be tempted to put the LEDs in a horizontal strip across the bottom of the lens on the outside of the housing. You could easily fit 9 of RS # 173-348 side-by-side on 0.1" protoboard. The mockup I've attached shows the cones of IR light from such a spacing, based on the viewing angle spec I also included from the data sheet. At the plane of the paper tape the cones have plenty of overlap, so intensity should be quite uniform. You could probably get by with half as many LEDs, and could use through-hole if you chose. I drew the cones with 20 degree (10 either side of perpendicular) angle. Hopefully the mockup shows how to think about illumination in terms of the viewing angle characteristics of the emitter.

If you have an orphaned tv/vcr remote control, you could scavenge the IR LED from it, driving it at a non-pulsed 20ma or so, and move it around over a single channel of the tape while monitoring the output of that channel's amplifier to gauge whether you have adequate intensity.

Re: your test with visible red LEDs:
Other than white LEDs (which typically incorporate phosphors), most LEDs emit in a relatively narrow bandwidth - typically 20-50 nm centered on the peak wavelength. So your visible red LEDs (around 640 nm) emitted next to nothing in the IR band where silicon photodetectors are most sensitive.

0 Votes

November 30, 2021 08:04

@BradLevy Thanks for that! I'll give it a try with some IR LEDs I have in stock, although I think the SMT types will prove to be the best option.

November 29, 2021 08:27

The problems with using an LED replacement for the incandescent bulb may be due to wavelength rather than filament alignment. The photosensors may be filtered to only allow infrared to help eliminate the influence of ambient light. The attached image shows the spectrum of a white LED (top) vs the spectrum of an incandescent and human eye response (bottom). As you can see, the incandescent puts out a lot of energy in the infrared portion of the spectrum (to the right of the visible light portion of the spectrum in the graphs), while the LED puts out almost none.

Infrared LEDs are readily available, though not typically in an incandescent replacement package.
Something like RS Stock No. 860-9591 L-7113F3BT Kingbright, 940nm IR LED, 5mm (T-1 3/4)
is well matched to silicon photosensors. They are far more directional than the incandescent bulb. I'd try 3 or 4 of them lined up in a column on a piece of perf board, facing the opening to the optics. At the distance from the bulb to the optics, I think you'll get adequate overlap in the beams from the several LEDs and decent uniformity. They have low forward voltage (1.2 v), so you could run them four of them in series (along with a 62 ohm dropping resistor) off the 6 volt rail, pulling 20ma.

0 Votes

November 29, 2021 08:25

Here is a link to a typical photodiode response curve:
As you can see, it is far more responsive to infrared wavelengths than visible wavelengths, even without an external filter.

November 29, 2021 08:18

@BradLevy I had considered the wavelength and tried some high intensity red LEDs with no success. But I think you're right, so I'll have a go at constructing a 'filament' with IR LEDs. I may need to use a lens-less SMT type to keep the energy concentrated in a line.

November 29, 2021 08:14

@Bill Marshall The lensed LEDs (through hole or surface mount) will give you a more concentrated beam, if you think it needs to be narrow. You could put a piece of dark paper where the paper tape would be to explore the projected illumination pattern of the incandescent light post-lens. Then try the same thing with one of your visible LED sources. That should give you a feeling for whether light geometry is much of an issue, or just the wavelength issue. 5mm through-hole IR LEDs are generally available in viewing angles from 15 to 50 degrees. Surface mount IR LEDs are available in wider viewing angles as well. Remember any portion of the beam from the LED or bulb that misses the collimating lens is just going to be wasted light, so won't really improve the situation. A diffusing film in front of the collimating lens could help even out the intensity from multiple LEDs.

November 29, 2021 08:35

@BradLevy The collimator is actually a prism whose main task is turn the light beam through 90 degrees. The side next to the bulb is curved, but not so as to concentrate the light into a single narrow bar. It seems to 'stretch' the 7mm tall image of the filament into a 25mm bar across the tape. I first tried a bulb consisting of a group of LEDS mounted on each of the four sides of a square support. Only one side faced the prism. The LEDs are arranged in 3 columns of 4, and resulted in 3 parallel light bars across the tape!

DesignSpark Electrical Logolinkedin