Retrochallenge Update: Comparator vs. Zero Crossing Detector

Published Friday, January 4 2013

I managed to get a bit of experimenting in last night, and the first thing I learned was that my decision to crib the cassette input circuitry from the Apple II was not going to work.

Here’s the relevant bit of the Apple II schematics:

img

This is a very simple op-amp configuration called a Zero Crossing Detector. Unfortunately, this kind of circuit relies on the op-amp having both a positive voltage and a negative voltage source (pins 7 and 4, respectively) in order for it to work. The Apple II has a -5V supply, but my 6502 SBC does not. I only have +5V available.

So, scratch that. I can’t just use a zero crossing detector. But I can do something very close to that, and use an op-amp as a comparator. And it turns out there’s a vintage 6502 system that did exactly that, the Synertek SYM-1. Here’s how Synertek did it:

img

At first glance this looks more complex than the Apple II circuit, but in reality there’s not much more going on. The part before the primary decoupling capacitor (C16) is just a low-pass filter composed of R128 and C15, presumably to try to reduce tape hiss and high frequency noise from the cassette. Following that, R95 and R126 form a voltage divider that provide a reference voltage of +2.5V to the non-inverting input of the LM311 comparator, and (through R93) a +2.5V biasing for the audio input. CR28 and CR29 are just protection diodes to prevent too great a differential voltage from being applied to the LM311 inputs. When the inverting input is above 2.5V, the output of the comparator will be held low (close to ground). Conversely, when the inverting input is below 2.5V, the output of the comparator will be high (close to 5V). That’s really all there is to it.

I don’t happen to have an LM311 handy, but I do have a bunch of LM358s in my junk box. I did a little breadboarding tonight, and found that these should work just fine as comparators in this application. Tomorrow I’ll throw a circuit together onto a little protoboard and wire it up to the 6522 on my SBC. I think that will largely take care of the hardware side of this project.

Comments