The TU-170 works very well, even with noisy signals and through fading. To see about duplicating this in DSP, I ran some LTSPICE analysis on the TU-170 circuitry. spiceman.net has nice tutorials on LTSPICE.
A progression of tests were run on portions of the TU-170 circuitry. Reviewing the schematic, we see that the demodulator section consists of the following: Input AmplfierQ1 and Q2. A common emitter amplifier followed by an emitter follower. It's intereting that a simple op amp amplifier was not used instead.Clipper or LimiterD1 and D2. Though limiters are common in FM detection, I wonder about the application here. What if there is a strong interfering carrier on a frequency other than mark or space? Would "capture effect" cause the interference to be the dominant output of the clipper, thereby masking the mark and space signals? However, the limiters does guarantee that both tones will have the same level allowing us to just use the center of the envelope detectors for a threshold.Mark Channel Voltage DividerR8 and R7. This drops the clipped signal level further to allow for the gain in the filters without the op amp outputs hitting the power supply voltage limit. Note that the Thevenin equivalent of R8 (2.2k) and R7(560 ohms) is pretty low compared to the input resistor of the bandpass filter (R13, 39k). It would probably be possible to combine all these into one resistor, but separating them out isolates their functions making it easier to analyze the circuit. Note also that the filter input resistor (R13) has the same value in all the bandpass filters (both mark and space).Space Voltage Divider and LPFR9 (330 ohms) and R10 (1k) form a voltage divider with a Thevenin reistance of 248 ohms (assuming the emitter follower has a very low output resistance). A two stage passive RC LPF (R11, C5, R12, C6) is driven by the voltage divider. Because of the loading of one RC by the next, analysis is a bit complex. A SPICE analysis and further discussion is below. It appears this filter compensates for the clipper. It's interesting that the LPF is only used on the space channel and not the mark channel.Mark and Space Band Pass FiltersBoth mark and space each drive a three stage active bandpass filter. More analysis of these filters is done below.Mark and Space Envelope DetectorsThe output of the mark BPF is rectified by D5 and filtered by C20 to provide a negative voltage proportional to the mark signal amplitude. Similarly, D3 and C9 provide a positive voltage proportional to the space signal. These are combined by R31 and R32 to form a bipolar signal that is negative for mark and positive for space. If we assume the outputs of each rectifier is zero when that tone is not present, each envelope detector consists of a rectifier followed by a parallel RC with C = 5 nF (C19, C20) and R = 200k (R31 + R32). The capacitors charge very quickly, limited only by the dynamic resistance of the diode and the output resistance of the BPF (very low). When the tone goes away, the capacitor is discharged through the series resistors. The RC time constant (5 nF and 200k) is 1 ms. This is substantially shorter than a bit time of 22 ms. The bipolar signal then passes through a voltage follower (IC4B).Inverting Data LPFThe bipolar analog signal (negative for mark, positive for space, and each level corresponding to the tone amplitude) then passes through the data low pass filter formed by R33, R34, R35, C22, C23, and IC4A. This removes noise and any remaining tone from the signal. I'd expect the cutoff to be 3 or 5 times half the bitrate but will analyze later. Note that this filter inverts the signal so mark is now positive and space is negative.Data SlicerThe still analog output of the data LPF is "squared up" by an inverting Schmitt trigger formed by R36, R37, and IC5B. At this point, space is about +12V (positve voltage limit of op amp output), and mark is about -12V. The Schmitt trigger input thresholds are ±1.9 V.Continuous Space RejectionThis circuit (R38, C24, R39, D7, D8, IC5A, R40, R41) limits the length of time a continuous space is passed to the machine. This is different from "mark hold", discussed later. Mark hold sends a mark to the printer on the absence of either tone. This circuit, instead, limits how long a space tone can cause a space output. The rail to rail output of the data slicer is AC coupled and clipped before driving an inverting analog comparator (IC5A). Dynamic data is passed through. However, if there is continuous mark or space, the inverting input of IC5A is eventually pulled to ground by R39. Since R40 and R41 put 1.1 V on the non-inverting input of IC5A, the output of IC5A will be the positive rail under this stable condition. With normal data, IC5A inverts the data once again making mark positive rail and space negative rail.Mark HoldBack where the tone enveolope detectors are, there are two more envelope detectors. D4 and D6 put a negative voltage on C21 when either tone is present. This voltage is amplified by the inverting amplifier formed by R45, R46, and IC6B. At the output of IC6B, there is a positive voltage proportional to the amplitude of the higher level tone. This signal drives the front panel meter. It also drives inverting comparator IC6A. When the level at the inverting input of IC6A is higher than the voltage developed by the voltage divider formed by R48 and the front panel threshold control, the output of IC6A goes to the negative rail.Mark Hold DataWhen the tone amplitude detected in the Mark Hold circuit (output of IC6A) is below the threshold, the output of IC6A goes to the positive rail. D4, D5, and D13 form a "wired OR" circuit. If any of the three inputs are positive, the output is positive forcing the combined output to the mark (positive) condition. The anode of D4 is positive if we are in mark hold due to insufficient tone amplitude. The anode of D13 is positive if we are transmitting since we do not want the demodulator to key the loop during transmit. The anode of D9 is the demodulated data. If it is positive, we are receiving a mark tone. If it is negative, we are receiving a space tone. If we are not transmitting and tone level is not below the mark hold threshold, the received data is allowed to pass through the voltage divider formed by R42 and R43 to the Demod Output (PCB terminal H).Loop KeyerThe Demod Output is normally jumpered to the Loop Control input (PCB terminal T). At this point, mark is a positive voltage, and space is zero (we lost the negative space in the diode OR of D9, D13, and D14). This signal is inverted by Q4. On the collector of Q4, mark is low, and space is high. It is inverted again by Q5, so on the collector of Q5, mark is high, and space is low. The collector of Q5 drives the base of Q6, which keys the loop. In the mark condition, there is about 11.7 V on the base of Q6 (assuming 300 mV CE voltage on saturated Q5). That places 11.0 V on the emitter of Q6. There is 182 ohms between the Q6 emitter and ground (R58, 100 ohms, and R59, 82 ohms). 11 V across 182 ohms causes an emitter current of 60.4 mA, our desired loop current. When Q6 is turned off (space), there is no current through Q6. The TU-170 uses this active current sink instead of a voltage source and resistor to set the loop current. A high voltage is still required due to the inductance of the printer selector magnets (and T1, D16, D17, C33 provide a loop voltage of about 84 V). The loop current will be independent of the resistance in the loop over a large resistance range. However, a high voltage and series resistor also provides a relatively constant current if the resistance variation is small compared to the current setting resistor. It's an interesting design decision to use the active current sink instead of just using a resistor. The loop current would not be quite as precise using a resistor, but a lower cost transistor could be used since its dissipation would be low in the mark condition (transistor saturated).AutostartRecall that the output of IC6A is at the negative rail when signal is present and at the positive rail when no signal is present (tone levels below threshold). When tone is present, the inverting input of IC7B is pulled towards the negative rail through R49 and D10 in parallel with R50. The transistion time to the negative rail is is determined by the RC time constant of the parallel combination of R49 and R50, and C25. Since R49 and R50 are in parallel for this transition, the transition from no signal detected to signal detected is relatively quick. Going the other way thought (voltage going positive for signal to no signal), R49 is not in the RC, so it takes longer to detect no signal. The timing starts the motor relatively quickly on signal detection (but not too quick to avoid motor starts on noise bursts). The longer delay on loss of signal detection keeps the motor from turning off during a fade or during the receive to transmit transition. IC7B forms an inverting Schmitt trigger, so the output is positive rail on signal present and negative rail on no signal. This signal passes through a diode OR formed by D11 and D12 to emitter follower Q3. The emitter of Q3 goes high (closing the motor control SSR) when we have a signal above the threshold set by the front panel control OR when we are in transmit (it would not be good to have the motor stop whenever we transmit due to loss of tones because the transceiver mutes its audio output in transmit).Loop Current DetectionWhen there is loop current (Q6 conducting and no open keyboard in the loop), 5V is developed across R59 due to Q6 emitter current. If the loop current is interrupted by a keyboard opening or by Q5 turning off (receiving a space), the voltage across R59 drops to zero. The voltage across R59 is sent to the Loop Monitor output and is +5V when there is loop current and 0V when there is not.AFSK GeneratorIC8 is a 555 timer operating as an astable multivibrator. With pins 2 and 3 connected together, a 555 acts as an Schmitt trigger with the output on pin 3 and an open collector version of the output on pin 7. When in the mark condition, C26 charges through the series combination of P8, R64, and R65 until the voltage on pins 2 and 6 reaches the upper threshold (normally 2/3 of the supply voltage). Pins 3 and 7 then go low and C26 discharges through R65 until pins 2 and 6 reach the lower threshold (normally 1/3 supply). Pin 3 then goes high and pin 7 (the open collector version) goes open, allowing C26 to charge again. The resistors are adjusted such that the mark tone of 2.125 kHz is generated. When a space signal (zero volts on the base of Q7) is to be transmitted, Q7 turns off allowing R62 to pull the gate of Q8 high. This pulls the source of Q8 high, putting P7 and R63 in parallel with P8 and R64 causing C26 to charge more quickly, increasing the output frequency. P7 is adjusted to give the desired space frequency of 2.295 kHz. The 555 timer uses a series string of three 5k resistors to set the upper and lower thresholds at 1/3 and 2/3 supply. The junction of the top two resistors is brought out on pin 5. When the CW ID input is pulled low by a key, the 2/3 threshold is pulled down by R66 through D15. This reduces the voltage of the upper and lower threshold and reduces the voltage difference between them. The reduced voltage threshold difference allows C26 to charge and discharge faster, resulting in a higher frequency tone. The CW ID shift is small compared to the normal 170 Hz shift.Transmit Tone Balance FilterThe output of the 555 timer is a rectangle wave (square wave but not 50% duty cycle due to the different charge and discharge times). This passes through an RC low pass filter of R68 and C29 to make a first pass at removing the harmonic components. IC7A and associated components form a bandpass filter. It further removes harmonics of the generated tone and allows for adjustment of the balance between mark and space tone levels. The resulting near-sine wave output goes to a voltage divider (R72 and R73) to the transmitter audio input. | |
Mark Bandpass filter AnalysisTo get an idea of the characteristics of the mark bandpass filter, an LTSPICE analysis was run on one stage of the three stage filter. The LTSPICE file is here, and the schematic to the right. R7 represents the series combination of R15 and P1. The value was adjusted to get the center frequency extremely close to the desired 2.125 kHz. | |
The image at the right shows the frequency response of one stage of the mark bandpass filter. From this, we determined the filter characteristics shown on the schematic:
| |
A transient analysis was run on the single filter section. The first image shows the output of the filter when the input tone starts. It takes about 1.5 ms for the tone to reach half its final value. The second image shows the output when the input tone stops. The output drops to half value in about 1.5 ms. Excessive ringing can lead to data smearing and intersymbol interference. However, since the rise and fall times are about the same, it appears that the ringing and slower rise time would just delay data without distorting it. |
|
Three Cascaded Bandpass Filters- Three of the above bandpass filters were combined to duplicate the overall mark filter in the TU-170. The resulting schematic is shown at the right, and the LTSPICE file is here. | |
The frequency response of the cascaded filters is shown at right. Note that the bandwidth decreased from 163 Hz to 89 Hz. | |
These images show the transient response of the three stage filter. The top image shows the output of the three stage mark filter with a 22 ms tone input (one bit time). The green trace is the tone input, and the blue is the tone output. On both tone start and tone stop, it takes about 5 ms for the output to change to 50% of the peak value. The two next images zoom in on input tone start and input tone end. | |
Space Audio Low Pass FilterAs mentioned above, for some reason there is an RC low pass filter in front of the space bandpass filter. The schematic of the LPF, including a voltage divider in front, is shown at the right. Below that is the frequency response of the filter. It has a gentle rolloff with a -3 dB frequency of about 700 Hz. A further discussion of this filter is in the No Clipper discussion below. |
|
Data Low Pass FilterAfter envelope detection the mark and space tone levels are sent to the data low pass filter. The schematic is shown at right. below the schematic is the frequency response of the filter. The cursor is set at the -3dB point with a frequency of 45 Hz. The data is received at 45 bps, so alternating bits would be a square wave with a frequency of 22.5 Hz. This cutoff on the filter will attenuate the odd harmonics that make a square wave square. For example, 67.5 Hz is down about 10.3 dB. The final image shows the output of the low pass filter when driven with a square wave with a period of 44 ms, an on time of 22 ms, and rise and fall times of 1 ms. Note that this is an inverting low pass filter, so the output is negative. Further, the square wave is rounded towards being a sine wave due to the attenuation of the higher harmonics. The blue trace is the pulse input, and the green trace is the filter output. |
|
No ClipperTo look at the effect of the clipper, the circuit was modified as shown at right. Note that the clipper was removed by breaking the connection to ground for D1 and D2. Further, the space audio low pass filter is bypassed by connecting the input to the space BPF (left side of R22) to the output of the mark audio voltage divider (top of R7). The gain of the input amplifier is reduced to unity by setting R5 = R4. The white noise circuit is minimized by increasing R6 to 100G.The second image to the right shows the output of the mark audio BPF (red trace and IC2b output) and the keying signal to the FSK generator (blue trace). Note the relatively slow rise and fall time of the audio waveform. The third image shows the output of the space audio BPF and the FSK generator keying signal. The fourth image shows the output of the envelope detector summer (left side of R33). The rise and fall times are pretty quick here since the rise of the mark tone coincides with the fall of the space tone. The fifth image shows the output of the data low pass filter (output of IC4b as green trace) and the FSK keying waveform (blue trace). Note that the 22.5 Hz square wave (corresponding to 45bps) has been smoothed to a sine wave by the LPF that has a cutoff frequency of 45 Hz. This filter has also removed what remained of the 2 khz audio. The sixth images shows the output of the data schmitt trigger (green) and the FSK keying waveform (blue). Note that the green trace goes high 13.43 ms after the blue trace goes low, and the green trace goes low 13.97 ms after the blue trace goes high. This indicates a slight bias distortion. The mark audio BPF has a maximum output of 9.95V peak, while the space BPF has a maximum output of 10.07V peak. These are relatively small errors and can be measurement errors (exactly where the LTSPICE cursor is located) and slight differences in the filters. Note that the filters are tuned using only the input resistor to ground. This resistor indeed affects only the center frequency without affecting gain or Q (see Active Filter Design Techniques, page 16-31). Variation in tone level through, for example, selective fading would introduce additional bias distortion To see the effect of selective fading, the schematic was modified to drop the space tone level by about 18 dB. The input levels to the bandpass filters (left side of R13 or R22) are 84 mV peak for mark and 10.11 mV peak for space, a difference of 18.4 dB. The signal never gets above 33.6 mV. After going through the data LPF, the signal never goes below -850 mV, and the thresholds for the schmitt trigger are ±1.9 V. This could possibly be dealt with by having the thresholds change, but a simpler method of dealing with uneven tone levels is just to clip the input such that the tone levels are always the same. Finally, the input to the space BPF was connected to the same point as the mark BPF yielding the last image. The blue trace is the FSK keying waveform. The bright green is the output of the envelope summer. The dark green is the output of the data LPF. And, finally, the red is the output of the schmitt trigger. |
Schematic modified to remove clipper. Output of mark audio filter (red) and FSK keying waveform (blue) Output of space audio filter (green) and FSK keying waveform (blue) Output of envelope detector summer (green) and FSK keying waveform (blue) Output of data low pass filter (green) and FSK keying waveform (blue) Output of data schmitt trigger (output of IC5b, green) and FSK keying waveform (blue> Schematic modified to drop space tone level by about 18 dB Envelope detector summer output (left side of R33, green trace) and FSK keying waveform (blue trace) with mark tone about 18 dB above space tone. Circuit without clipper, mark and space BPF driven with same FSK signal. The blue trace is the FSK keying waveform. The bright green is the output of the envelope summer. The dark green is the output of the data LPF. And, finally, the red is the output of the schmitt trigger. |
No Clipper with NoiseIn this section, the mark and space BPFs are driven from the mark audio voltage divider, driving both filters with the same signal. The signal to noise level is adjusted by adjusting the mixing of the FSK signal and the white noise source.The first image shows the schematic modified to use a random data source so we can generate an eye diagram. Also, the transient analysis end time was increased to 10 seconds so the eye diagram shows a reasonable amount of data. The LTSPICE file is here. Documentation on LTSPICE can be sparse. The next image shows the settings for the eye diagram. To bring up this menu, right click on the horizontal axis on the plot plane and click Eye Diagram. The next image is an eye diagram with no noise injected. The green trace is the output of the data LPF. The next series of images show the results with injected noise. First, the schematic. Second, the signal plus noise waveform. Third, the spectrum of the signal and noise. Note that the mark and space tones are still about about 10 dB above the noise. Providing the signal and noise one at a time, we find on the output of U9 that the FSK signal is 693.58mV RMS. The RMS of the noise is 1.2211V. The RMS of the combined signal is 1.4053V. The eye diagram shows a fair amount of randomness due to the noise, but the eye is still pretty open and should be decodable. The final eye diagram shows the resulting with the noise increased another 6 dB (R6 reduced from 2k to 1k). The eye opening has pretty much disappeared. This signal would not be decodable. |
Schematic modified to use random data source. Eye diagram configuration Eye diagram with no injected noise. The green trace is the output of the data LPF. Schematic adding noise to FSK signal. The AFSK signal is about 2 Vpp, while the white noise signal is about 5 Vpp. However, the noise is very wide spectrum, so at the mark and space frequencies, the FSK tones are above the noise. Waveform of signal plus noise (U9 output) Signal plus noise spectrum. Eye diagram with 693.58mVrms of FSK signal and 1.2211Vrms of white noise. Eye diagram with noise increased another 6 dB (693.58mVrms signal, 2.422Vrms noise) |
Adding Audio ClipperAs discussed above, clipping the incoming audio ensures that both tones will always be at the same level. The schematic at right shows how the clipper has been added. It is driving the mark voltage divider which then drives both bandpass filters. The output of U9 is 10Vpp. The next image shows the clipped waveform driving both bandpass filters. This is at the output of the mark audio voltage divider, top of R7. However, it was found that by the time the signal got to the output of the third stage of the mark filter (output of IC2b), the signal was hitting the op amp voltage rails. To prevent this, R7 was reduced from 560 ohms to 220 ohms. The resulting waveform peaks at about 9V. Clipping in the filters may have been done on purpose. While both tones leave the diode clipper at the same level, minor variations or mistuning of the mark and space filters would resulting in different tone levels at the outputs of the filters. Having the filters themselves clip guarantees that the mark and space tones generate equal outputs from the envelope detectors, eliminating bias distortion due to minor filter variations. |
Schematic with clipper and both BPFs driven by same signal. Clipped waveform feeding bandpass filters (top of R7). Mark filter output (IC2b) with R7 reduced from 560 ohms to 220 ohms to eliminate clipping in filter. Outputs of mark and space filters with 220 ohm R7 and mark voltage divider driving both filters Eye diagram with no injected noise with mark and space filters driven from the mark voltage divider with R7 reduced from 560 ohms to 220 ohms to avoid clipping in the filters. Schematic with noise injected. Signal and noise (output of U9, blue) and clipped (green, top of D1) Input signal and noise (green), clipped signal and noise (blue), data LPF output (red) Resulting eye diagram. |
Allowing BPFs to ClipAs mentioned above, the voltage divider in front of the mark bandpass filter provides a high enough signal level to make the last stage of the three stage filter clip. Here's a look at how the system behaves. The first image is the schematic. The second images shows the mark and space filter outputs approaching the power supply rails. The third image is an eye diagram. It is similar to the one shown above with no clipping, so it appears minor clipping is not an issue. It may also remove some bias distortion present due to slight filter mismatch. Ideally the tone levels into the filters are the same due to the clipper. |
Schematic with original mark BPF voltage divider causing last stage to clip. Mark (green) and space (blue) filter outputs showing voltages reaching power supply rails (±12V). Resulting eye diagram |
Original TU-170 DemodulatorThe schematic was returned to the original TU-170 design which includes an LPF in front of the space BPF as shown in the schematic at the right. This still has the noise generator so it can be compared with the previous design where the mark and space BPFs were driven with the same signal. The eye diagram is similar to that above, so it is unclear what the purpose of the LPF before the space BPF is. The rolloff is pretty gentle, so there is probably not much difference in how it handles the mark and space tones. The LTSPICE file is located here. Finally, an eye diagram out of the original design with input noise removed is presented. |
Schematic of TU-170 demodulator as designed and driven with FSK and noise. Eye diagram of original design with noise. Eye diagram with no noise. |
Adding Input Filter As discussed above, the input clipper ensures that tone levels are equal despite selective fading. However, the clipper also causes out of band signals to create signals that land on the mark and space frequencies. Subharmonic tones will have harmonics that land in the mark and space filters. Further intermodulation will also create signals that land in the filtes. In this section we look at how a filter before the clipper can improve performance. Note that the clipper output has a lot of unexpected signal reversals while that with the filter is more regular. Also, the eye diagram with the input BPF looks a lot better (fewer traces "closing" eht eye.). The final LTSPICE file is here. Have fun experimenting with it! |
Schematic without input LPF. Clipper output without input BPF. Eye diagram without input BPF. Schematic with input BPF. Clipper output with input BPF. Eye diagram with input BPF. |
Thanks for reading! I look forward to comments.
harold@w6iwi.org