On 3/31/10, Tony Duell <ard at p850ug1.demon.co.uk> wrote:
Making an 8 or
9 channel papertape reader from scratch is not an
impossible exercise (witness the ancient Byte article referenced here
It's actuially fairly simple. The complicated bit of most commerical
readers is having to stop reliably on _this_ chracter, after reading at
full speed.
Indeed.
For archiing tapes, assuming the machine you're
using for the
archiving can keep up with the reader, you don't need this at all. Just
start the tape moving and grab the characters as they come.
Yep, and the Byte article design has the phototransistor for the
sprocket track installed "backwards" with respect to the 8 data tracks
such that the sprocket track fires later (due to mechanical asymmetry
in how phototransistors are manufactured) which enables it to
trivially work as a latch pulse (since the data channels were exposed
to light earlier and have had a chance to settle/allow the holes to
more completely match the sensitive spots of their phototransistors).
every so
often). Making a punchcard reader from scratch is a very
different level of effort, so back then I figured that it'd be easier
Yes. The main problem is that there is no 'clock track' on a punched card.
On paper tape you can use the smaller sprocket holes as a timing
reference. on cards you have nothing like that, there will be blank
columns with no holes punched at all. The way my reader (A Documation
M200) does it is to move the card at constant speed using known-diamter
rollers, then to detect the leading edge of the card.
Yep. I think that's a common approach for optical sensors. For my
TIFF/GIF-based "reader", I did edge detection of a snapshot of the
entire card to check for scale and orientation so that once the
leading edge was identified in software, it shouldn't be difficult to
scan along the long axis, looking for a dark spot or the absence of a
dark spot every so many pixels (depending on the scan resolution). It
doesn't matter if you scan at 75 dpi, 300 dpi, or more - it's all
proportional to the detected height and width of the outer edges of
the card image. You do have to keep the card mostly perpendicular to
the edge of the scanner or there needs to be smarter code than I wrote
to detect the silhouette of the card (it starts at each edge of the
image and works its way to the middle, looking for active pixels in
the high-frequency-filtered version of the card scan - it should still
work if you are not 100% square to the scanner, but not if it's more
than 1-2mm off-axis).
My other card reader is mechancial (not optical) and
partly home-made. I
got a reading head from some surplus plave. It has 480 (40 columns of 12)
mechancial contacs and a solenoid to lift the card against these
contacts. It reeads half the length of a stanard 80 column card and then
you put the card i nthe other way round to read the other half.
That's an interesting approach. It might not be so expensive these
days to make a PCB-based mechanical scanner, but I would personally
rather work on an optical column-at-a-time scanner than a
multiple-hundred-mechanical-connection electrical scanner. If I had a
reader head to start with as you did, I might feel differently.
It's an interesting approach, though.
-ethan