[LogoShip]

Home

Daqarta for DOS Contents

Introduction

Downloads

Free Registration

Contact Us
Daqarta for DOS
Data AcQuisition And Real-Time Analysis
Shareware for Legacy Systems
(Use Daqarta for Windows with modern systems)

From the Daqarta for DOS Help system:
 

LPTX CONSTRUCTION AND TESTING:


Introduction - Prototype Boards:

Before final construction of any model, it is usually a good idea to first build it on a prototype board or "breadboard" to make sure your circuit design works as intended. Integrated circuits, resistors, capacitors, and other components plug directly into the board. Prototype boards allow you to construct the entire circuit without soldering, and to make changes at will. They are available from suppliers such as Radio Shack, Jameco, and Digi-Key.

Interconnections between components on the prototype board can be made with insulated hook-up wire that is stripped at both ends. A good source of wire for this purpose is the grey multiple-conductor cable used for telephone installations in large offices and at neighborhood junction boxes. Ask the installer for scraps. Inside the grey sheath are typically 50 separate wires, all individually color-coded, so even a short length of cable can provide a LOT of prototype jumpers.

However, there is one problem with using prototype boards for SAR and MUX models: To reduce propagation delays, you must keep the connection between the computer and the prototype board as short as possible. Otherwise, you will need to add large Wait delays which reduce the maximum sample rate. Since it may be awkward to arrange the prototype board to be right near the back of the computer, you may want to use a two-stage approach:

Build a very short interconnect, maybe 6 inches long. This will have a DB25 male connector to plug into the printer port and separate leads or some sort of header plug to connect to the prototype board. Ribbon cable is better than round cable here, but since the length is so short even round cable will be OK.

Then use a standard printer extension cable (preferably made with ribbon cable) to connect between the computer and the short interconnect at the prototype board. You can get the basic circuit working this way, with the prototype board in a more convenient location. The delays from the extension cable will of course require large Wait settings and slow sample rates, but you can at least track down any gross wiring errors. Then remove the extension cable for final testing, with the prototype board right near the port.

When you are satisfied with your design, you can create a printed circuit board that will plug directly onto the printer port. (See Printed Circuit Construction Techniques.)

You may wish to skip the prototype stage if you are using the pre-tested MUX board printer files.


DigOut Model:

The DigOut model is the simplest to construct, involving only wiring a DB25 male connector to plug into the printer port. Since all signals are digital, there is no "board" to perform any ADC or DAC conversions. See the connector wiring diagram for pinout connections.

Adding a few resistors can allow a digital input to use dither for linearization, giving the performance of an 8-bit ADC while retaining high digital sample rates.


DAC Model:

This is identical to the DigOut model in all respects except that the output port bits are used to drive a resistor array which performs the DAC function for STIM3 outputs. The simplest configuration would be a passive DAC using a basic R-2R ladder network:
       Pin                          DAC
 MSB    9   >---- 2R -----.-------> OUT
                          R
        8   >---- 2R -----|
                          R
        7   >---- 2R -----|
                          R
        6   >---- 2R -----|    R = 10k
                          R   (typical)
        5   >---- 2R -----|
                          R
        4   >---- 2R -----|
                          R
        3   >---- 2R -----|
                          R
 LSB    2   >---- 2R -----|
                          2R
      18-25 >-------------^-------> GND

The nine 20k resistors are all matched, and are exactly twice the value of the seven 10k resistors. Use 1% tolerance metal film resistors for best results. Higher precision is not needed here. (Carbon film resistors, even if you could find or tediously hand-match these to 1% tolerance, tend to have a greater permanent value shift after soldering.)

The actual values are not critical, only the matching and ratio. In general, using smaller values means more current demand from the port, which increases the chance for problems due to internal port drive limits. It also makes any small internal bit-to-bit resistance mismatches more significant.

On the other hand, very large resistor values are more susceptible to picking up interference from external sources. For these reasons, resistances should probably be limited to the 1k to 100k range.

This simple circuit assumes that each bit output goes to zero volts when Low, and to the same voltage when High... typically anywhere from about 3.5 V to 5 V. The no-load output range will then extend from 0 to 255/256 of the High voltage.

The output impedance is 10k (or whatever value you used for R), so you can expect the actual output voltage to be lower unless the load impedance is high. It won't damage either the DAC or port if you connect a very low impedance load like 8-ohm headphones... you'll just get a reduced output.

HOWEVER, note that this output only produces positive voltages... the lowest value it can reach is zero Volts. So if you use Noise mode, for example, or a continuous tone from STIM3, you will be supplying an average DC value equal to half of the maximum... about 1.75 to 2.5 Volts.

This may be just what you want for certain tests, but for audio work you will probably want to remove the DC via a capacitor in series with the output:

 DAC      +                   AC-only
 Out >------C-----.---------> DAC Out
                  |
                  Rload
                  |
 Gnd >------------^---------> Gnd
When this capacitor is considered along with the load impedance, it forms a high-pass filter that blocks the DC. If the load impedance is very high (like the input to an op-amp buffer or non-inverting gain stage), you may want to decrease it by adding a parallel resistor. This will reduce the settling time (time constant) so that the zero value is reached quickly on start-up.

The DC level can be eliminated without concern for settling time issues by using a level-shifting output buffer with an active DAC design.


PASSIVE DAC TESTING:

Since the exact High voltage may vary from system to system or even between different port cards in the same system, the output range will vary as well... a fact you must keep in mind if you plan to move this simple DAC between systems, or if you want to equip several systems with similar DACs.

A more serious problem sometimes arises where the output port does NOT put out the same High voltage on each bit, which can cause serious distortion of the output waveform. This may not matter if you are only using the Noise output, but for most other uses you will need an active buffer to eliminate the distortion.

The best way to tell if a port will give acceptable results with the simple DAC is to actually try it. Use the Ramp or Triangle mode and view the output on a separate oscilloscope or another Daqarta system with a known-good ADC. The slopes should be perfectly straight, with no flattening or peaking near the upper or lower peaks. In particular, there should be no discontinuities at significant bit transitions such as half-scale or at each quarter-scale step.

This test not only requires that you have an oscilloscope or other Daqarta system, but also that you have a known-good DAC ladder network already constructed. While this may often be the case in a classroom, where the instructor can provide these for the group, an alternate method may be desireable for individual use.

This alternate method requires a good (3 1/2 digit) digital voltmeter that can resolve to millivolts while reading 5 Volts, and it also requires a few more steps. Set the LPTX Start value to 255, which will turn on all bits of the port, and measure the output value of each bit in turn.

The best way to do this is to clip the voltmeter leads to a 10k resistor (or something in the range that you will be using for the DAC) and poke the ends into the proper pin sockets of the DB25 connector of the port. One end goes to the pin (2 through 9) of the output bit being tested, while the other goes to the common ground on any of pins 18 through 25. Note that the resistor leads will be a loose fit in the pin sockets... you may need to wiggle the leads, or bend kinks into them, for a good connection.

The readings should all be within a few millivolts of each other. If not, you will probably want to use an active buffer with the DAC. But even if everything looks good so far, there is another possible port problem: The output voltage on one bit may change depending upon what other bits are also high at the same time. To test for this, repeat the measurements of each bit voltage, but now set the Start value separately so that only the test bit is high. Set 128 for bit 7 (pin 9), 64 for bit 6 (pin 8) and so forth. If the values you get here aren't the same as before, particularly for the higher bits, you will need an active buffer.

There is a further port problem that sometimes arises, where the bit output voltage drifts or sags with time. So far, this has only been seen on a port that also exhibited problems with the above test, and it's cured with an active buffer.

Don't assume that a port on a brand-new board or system will be better than an old one: The worst ports seen so far have been on new equipment. This may be due to the fact that older ports used separate output buffers, while the newer ones are all integrated into a single chip. Remember, these ports were really designed for digital output only, where such minor voltage variations would be of no consequence.


PASSIVE DAC WIRING SUGGESTION:

If you determine that a passive DAC will be suitable, note that it can be wired directly to a DB25 male connector and enclosed in a standard connector shell. Use the "solder cup" style of connector rather than "wire wrap" or "PC mount" to make soldering easier. Clamp the connector in a small vise so that the solder cups are pointing up, and solder in each of the 2R resistors first.

Then use needle-nosed pliers to attach an R resistor to the free end of the 2R resistor at D7. Bend the R leads so that its body points back toward the connector and lies parallel to the 2R resistors, nestled into the groove between the D7 and D6 resistors. At the R-2R joint, add an additional wire which will later run to the output connector, and solder the joint.

Now take the free R lead and bend it back over its body and up to the free end of the 2R resistor from D6. Attach the next R resistor to this joint (again pointing down toward the connector), and solder. Repeat this "daisy chain" process until you get to the 2R resistor from D0, then connect the 2R from ground to that joint and solder it.

It's not a bad idea to connect pins 18-25 together on your connector, just in case they are not all connected right at the port.

The shell that will hold your finished DAC and DB25 connector can also hold a DAC output connector by clamping it into the hole where the cable would otherwise exit the shell. The cable hole is typically about 3/8 inch, which will clamp the threads of a standard chassis-mount BNC connector for general laboratory use.

Alternately, you can drill the body of the shell to hold a small "mini" phone jack if you locate it away from the resistors. Or you can just solder a cable directly to the DAC output.


ACTIVE DAC:

By adding an active buffer chip between the port output bits and the DAC resistors, the finished device may be used in other systems without recalibration or distortion due to bit mismatches or output drive limitations. An external 5 Volt power source, which can be derived from a small 9 Volt battery, allows the output of the buffer to provide a solid 5 Volts to drive the resistor ladder regardless of variations from the port itself.
      DB25
       Pin      .----------.
 MSB    9  -----|11      10|--- GND
                |          |                     DAC
        8  -----|12       9|--- 2R -----.------> OUT
                |          |            R
        7  -----|13       8|--- 2R -----|
                |          |            R
        6  -----|14       7|--- 2R -----|
                |          |            R
        5  -----|15       6|--- 2R -----|
                |  74HC245 |            R
        4  -----|16       5|--- 2R -----|
                |          |            R
        3  -----|17       4|--- 2R -----|
                |          |            R
 LSB    2  -----|18       3|--- 2R -----|
                |          |            R
 GND 18-25 -----|19       2|--- 2R -----|
                |          |            2R
           .----|20 .--.  1|-----.------^------> GND
           |    `---'--`---'     |
           |                     C bypass
           |                    +|
   + 5 V --^---------------------'

Either the 74HC245 or 74HCT245 chip may be used. Note that pins 1, 7, and 19 of the chip must all be tied to the common ground (pins 18-25 of the DB25 connector). The bypass capacitor can be in the range of 10 to 100 microFarads... be sure to install it with the correct polarity. If this is an aluminum electrolytic (as opposed to tantalum), you may also want to install a 0.05 to 0.10 microfarad ceramic in parallel for high frequency performance. The capacitor(s) should be as close to the chip as possible, ideally wired directly across pins 7 and 20.

Due to the straightforward pinout of the '245 chip, you could construct this by wiring a socket to 0.10" grid perfboard, but a small printed circuit would be better. Standard 1/16" circuit board will fit nicely between the solder-cup pin rows of the DB25 connector. If you use a printed circuit, you may solder the pin cups directly to it for a very sturdy assembly.

Amazingly, with a bypass capacitor of 100 microFarads or more you may be able to get away with NO power supply! The '245 will self-bias enough to provide its own power supply from the port signals, assuming they are active enough. Although the output level will not be calibrated, this circuit will nonetheless eliminate problems due to bit mismatches, etc.

However, for most uses you will want a power supply, to allow calibrated output if you move the DAC circuit between systems. You will probably also want an analog output buffer to provide a low impedance for driving loads, and that will require a power supply as well.

Since the DAC only produces positive voltages, output signals have their zero points raised to half of the supply voltage. A level-shifting output buffer can eliminate this offset without need for output capacitors.


SAR Model:

The Successive Approximation Register (SAR) model is only a minor variation on the DAC model. In the simplest form, this consists of adding only a single resistor, and connection to one of the digital inputs:
 DAC                       Ch 2
 Out >---------.----------> In
               |          (pin 12)
              Rcal
 ADC           |
  In >---------'

 Gnd >--------------------> Gnd

Connection to the Ch 2 input is shown here, but any of the inputs 0-4 can be used.

To understand how this works, note that the DAC is composed of an R-2R resistor ladder which has an output impedance equal to its R value, typically 10k. Here we are talking about the direct output of the ladder, without any capacitive coupling or analog buffering. We can thus consider this to be an "ideal" DAC voltage source in series with a fixed resistor R:

 Ideal
 DAC >---------.
 Out           |
              (R)
               |           Ch 2
               |----------> In
               |
              Rcal
 ADC           |
  In >---------'

 Gnd >--------------------> Gnd

The driver adjusts the DAC output via successive approximation until the Ch 2 (or whatever) digital input just reaches its threshold Vth and switches from low to high. Consider the case where the ADC input is 0 Volts, which is thus the same as the common ground for the digital input.
 Ideal
 DAC >---------.
 Out           |
              (R)
               |           Ch 2
               |----------> In
               |
              Rcal
 (ADC In)      |
 Gnd >---------^----------> Gnd

Then this circuit is a simple voltage divider, and the digital input will see:
 (DAC Out) × Rcal / (R + Rcal)
Since we typically would like the DAC to be able to handle both positive and negative inputs symmetrically, we want its output to be at mid-scale (128 counts) when the ADC input is zero. If the High level for the system is Vh (typically 5 Volts), we will thus get
 128/256 × Vh = Vh / 2
or typically 2.5 Volts from the DAC.

If this is going to produce a threshold input Vth at Ch 2, then we can find Rcal for a given Vth by substituting into the voltage divider formula and solving for Rcal:

 Vth = Vh/2 × Rcal / (R + Rcal)
Solving, we get:
    Rcal = Vth × R / (Vh/2 - Vth)
However, we usually don't know the value of Vth, so it is easier to simply adjust Rcal until the trace shows zero when the input is grounded. (In the unlikely event that the threshold voltage is greater than half the High level, you won't be able to find an Rcal value that will work.)

The input range will now be

 Vh × Rcal / R
with half of this in each direction. For example, if the Vh High voltage is 5.0 Volts and the threshold Vth happens to be 1.25 Volts, then with R = 10k we would get:
 Rcal = 1.25 × 10k / (2.5 - 1.25)
      = 1.25 × 10k / 1.25
      = 10k
and the input range would thus be 5.0 × 10k / 10k = 5.0 Volts or +/- 2.5 Volts.

You can thus build a totally passive SAR, just by adding Rcal to the passive DAC design... it will still fit into the DB25 connector shell, and you can even have separate DAC output and ADC input connectors.

Changing between the DAC model and the SAR model would then just be a matter of changing connections. In fact, if the DAC model only needs to drive a high-impedance load, you may be able to take the DAC output from the ADC input through Rcal and hence get away with only a single connector.

The digital input (Ch 2 here) can remain connected during DAC use, since it presents a high input impedance.

Note, however, that the passive SAR will only work on ports that can drive the passive DAC properly, with minimum bit mismatches, etc. And it will not "travel well" between ports that may have different threshold voltages and different digital High output levels from the original port, since the effective ADC input offset and sensitivity would change.

The sensitivity of this passive model can be adjusted for different threshold voltages by applying a bias voltage through a selected Rbias resistor, as shown below for the active SAR configuration. If you don't plan to use the DDisk or Averager Remote inputs, you could use one of these to supply the voltage for Rbias, since they are normally held high.


ACTIVE SAR:

Using an active DAC design for the SAR will eliminate any bit mismatches and provide a standard 5 Volt reference level via the external power supply. In order to provide a fixed threshold voltage, the digital input to Ch 2 (or whatever) should be buffered as well. This buffer can be any standard 74HC or 74HCT non-inverting buffer chip, or an AND gate with unused inputs held high, or an OR gate with unused inputs held low, etc. (Good results were obtained with a 74HC32 OR gate.)

There is another advantage to an active SAR design, in that the input sensitivity can be adjusted independently of the threshold voltage. Rcal is now selected to give the desired input range, which is 5 × Rcal / R. A separate resistor, Rbias, is used to adjust for the threshold voltage Vth.

               Vs = +5 V
                   |
                   |
 Ideal           Rbias
 DAC               |           Ch 2
 Out >-----(R)-----o----------> In
                   |           (Vth)
                  Rcal
 ADC               |
  In >-------------'

 Gnd >------------------------> Gnd

The proper value for Rbias can be computed to give Vth at the digital input when the ADC input is grounded and the DAC is at half the Vs supply voltage. After a lot of grinding and crunching, that comes out to be:
               Rcal × R × (Vs - Vth)
 Rbias  =  -----------------------------
           Vth × (Rcal + R) - Vs/2 × Rcal

As an example, consider an R value of 10k and Vs = 5.0 V, with Rcal set to 10k to get an input range of +/- 2.5 V. If the threshold voltage Vth is 1.5 V (typical), then Rbias comes out to be 70k. In practice, you would simply adjust Rbias until the trace shows zero with the ADC input grounded.

Note that if Vth = 1.25 V, Rbias is infinite because the denominator goes to zero. For still smaller thresholds, Rbias would have to be connected to a negative supply.

Although in theory you can increase the sensitivity by using a small Rcal, it's better to avoid this method. A smaller Rcal reduces the voltage range at the digital input, making the system potentially more sensitive to noise. Also, the input impedance of the ADC is reduced, placing a greater load on the input signal.

The best way to increase sensitivity is to add a gain stage before Rcal, which can also provide a high input impedance for the input signal.


UNIPOLAR SAR OPERATION:

The simplest configuration to allow unipolar operation over the entire DAC range is to employ an inverting amplifier on the input signal, such that the voltage applied to the Rcal input runs from zero to -5 V while the actual input runs from zero to +5 V. If Rcal is set to equal the net resistance R of the DAC ladder, then any voltage into Rcal can be balanced to zero at the digital input (Ch 2) junction by an opposite voltage from the DAC.

But of course we really want Vth at this junction, not zero, so we will add an Rbias resistor connected to Vs as for the normal bipolar active SAR. To determine the value of Rbias, consider that if the input goes to zero, the DAC will also go to zero to track it. This is effectively the same as both R and Rcal resistors connected to ground:

                  Vs = +5 V
                      |
                      |
                    Rbias
                      |               Ch 2
            .---------o--------------> In
            |         |               (Vth)
           (R)       Rcal
            |         |
 Gnd >------^---------^--------------> Gnd

But since we selected Rcal = R, the parallel combination is just R/2. Now we can use the voltage divider equations to find
 Rbias  =  R/2 × (Vs - Vth) / Vth
This same value will work equally well when the input is any negative voltage in the range, since it will essentially be "cancelled" by the DAC output so that the situation works out the same as the above. You can prove this to yourself by playing with the voltage divider equations, such as by setting the input to -5. Assume the DAC output will go to +5, which would then be effectively in parallel with Rbias, and solve for Vth.

(Note that the voltage divider is now relative to the -5 V input, not ground, so the effective input to the divider is 10 V total. Then to find Vth from the divider output you must subtract 5 V to get a value relative to ground.)

In reality, since you don't usually know Vth, you simply adjust Vbias to get full-range unipolar results from the waveform trace. You will probably want to use the special R:U Unipolar Range parameter as well.


MUX Model:

The MUX (Multiplex) model allows "simultaneous" DAC output and ADC input by rapidly switching between functions for each sample period. In operation, the DAC output is first connected in an active SAR (Successive Approximation Register) configuration to acquire the current ADC value from the input. Then the DAC is quickly switched to a simple sample-and-hold (S/H) circuit and the proper output value is sent and maintained for the rest of the sample interval. At the start of the next sample interval, the S/H holds that output value while the DAC is disconnected from it to acquire the next ADC input sample in the SAR configuration.
                 Vs = +5 V
                    |
                    |
                  Rbias
 ADC                |                            Ch 2
  In >-----Rcal-----o---------------------------> In
                    |
                    |   .----.
                 0  |   | 1  |
                  .-|---|-.  |   .--------.
 MUX              | o   o |  |   |        |       DAC
 Cntl >---------->|  \    |  `---|  S/H   |-----> Out
 (pin 17)         |   o   |      |        |
                  `---|---'      `--------'
                      |
 DAC >----------------'
 R-2R

The DAC R-2R resistor ladder (at the bottom of the diagram) comes in to the switch, where it can be connected to either the rest of the SAR circuit at the top, or to the S/H block for DAC output.

The switching function can be performed with one section of a CD4053 or 74HC4053 triple 2-channel analog multiplexer. The switch is controlled by the MUX Cntl output on pin 17 of the DB25 printer port connector. The LPTX driver sets this output high after the ADC input SAR cycle is complete and the proper data has been set for DAC output, causing the DAC voltage to be sent to the S/H. When MUX Ctrl goes low again at the start of the next sample, the switch reverts to SAR mode and the S/H is disconnected to initiate the "hold" phase.


SAMPLE-AND-HOLD (S/H):

The S/H is nothing more than an op-amp buffer with a small capacitor at the input to hold the voltage. (Actually, the preceding switch is a fundamental part of the sampling as well.)
              .------------------.
              |   .---------.    |
              `---|-        |    |         DAC
  From            | Op-Amp  |----^-------> Out
 Switch >-----.---|+        |
              |   `---------'
              C
              |
    Gnd >-----^--------------------------> Gnd
You will need a single-supply op-amp if you want to run this from just the +5 V supply needed for the digital parts. Avoid the LM324 for this, since it has high input bias current that will load down the capacitor in the "hold" state, and since it's output range doesn't go close enough to the positive supply to handle the maximum DAC output. (It also doesn't drive loads very well without adding extra pull-up resistors.)

The capacitor will be charged up by the R-2R output whenever the switch connects it. Since that output impedance is the same as R, this will form an RC low-pass filter which limits the output frequency response... although it does also reduce noise. With R = 10k and C = 1000 pF, the DAC output will be about 3 dB down at 16 kHz.

A potential problem with this simple circuit, at least for some applications, is that when the user turns off the DAC output (say via the STIM3 menu control), the S/H input is left unconnected and will slowly charge up or down due to the op-amp bias current. Even if the output is capacitively coupled to block DC, there may be a large click when the output is finally turned on and jumps to the proper value.

One way to avoid this problem is with a "dead man" switch that will clamp the S/H input if no DAC update pulses arrive for a certain period of time. This can be arranged very simply with one of the two remaining switch sections in the '4053 chip:

                  Vs = +5 V
                     |
                     |
                   Rbias
  ADC                |                            Ch 2
   In >-----Rcal-----o---------------------------> In
                     |
                     |   .----.
                  0  |   | 1  |
                   .-|---|-.  |   .--------.
  MUX              | o   o |  |   |        |       DAC
 Cntl >-----.----->|  \    |  |---|  S/H   |-----> Out
(pin 17)    |      |   o   |  |   |        |
            |      `---|---'  |   `--------'
            |          |      |
  DAC >----------------'      |   x
            |              0  |   | 1
            |---1Meg----.   .-|---|-.
            |           |   | o   o |   Vs = +5 V
            `-->|--10k--o-->|  \    |      |
            Diode       |   |   o   |      |
                        |   `---|---'     10k
                        |       |          |
                      1000pF    `----------|
                        |                  |
                        |                 10k
                        |                  |
  Gnd >-----------------^------------------^-----> Gnd

When the DAC is active, the regular stream of MUX Ctrl pulses keeps the lower switch activated by keeping the 1000 pF capacitor charged up through the diode and 10k resistor. This puts the switch "wiper" in the 1 position where it is unconnected to anything else. When the pulses stop, the capacitor discharges slowly through the 1 Meg resistor (since it can't discharge through the diode) and eventually the switch goes Off, to the 0 position. Now the wiper connects the S/H input to a voltage divider set for half of Vs... the same value the DAC puts out when Off (128 counts), even though it's now no longer connected.

SCHEMATIC AND BOARD LAYOUT PRINTER FILES:

Complete printed circuit board layouts for the MUX model are available for standard printers. These can be downloaded from the Daqarta Web site. The MUX board design can easily be modified if only the simpler LPTX models are desired. The general printed circuit contruction techniques section gives detailed instructions on actual board fabrication.

For each supported printer family, there is a .ZIP file containing separate schematic (.SCM) and board layout (.BRD) files. Note that many dot matrix printers emulate the Epson 9-pin or 24-pin formats, and likewise many laser and LED printers emulate the Hewlett-Packard LaserJet PCL format. Ink jet printers might emulate any of these.

Unless specifically indicated, files are for non-PostScript printers... you may have to manually switch out of PostScript mode on some systems.

Unzip the file for your printer, then print the separate .SCM and .BRD files with the DOS COPY command, using the /B Binary file option. For example, EPSON9.ZIP contains EPSON9.SCM and EPSON9.BRD files for 9-pin Epson-format printers. To print the board layout, use:

 COPY/B EPSON9.BRD PRN
or
 COPY/B EPSON9.BRD LPTn
where 'n' is the LPT number of the printer you want to use. (You must use the /B with COPY to prevent it from halting when it encounters a data byte with the same value as the text End Of File marker.)

CAUTION:
A file may appear to print properly on your printer, but the scaling may be wrong. Scaling doesn't matter for the schematic, but the board scaling must be correct or things won't fit. The simplest way to check scaling is to measure the width of the board edge outline at the top of the layout. If it's not 2.5 inches, try an alternate file.

If none of the printer formats gives satisfactory results with your printer, please contact us for other file formats.

ABOUT THE MUX BOARD CIRCUIT:

This MUX board uses dual 9 Volt batteries to power the analog portion, with a 78L05 regulator IC providing +5 Volts for the digital portion. A 74HC245 buffers the DAC resistor array, with one section of a 74HC32 quad OR gate providing a fixed threshold while buffering the digital input (Ch 2 In = DB25 pin 12).

Although not shown on the schematic, two of the remaining OR gates are wired as buffers for digital inputs on Ch 3 and 4 (which can be used for external pacer or external trigger inputs, respectively), and the final gate may be jumpered to buffer digital inputs Ch 0 or Ch 1, or the DDisk or Averager Remote inputs, or the Pulse output.

Two sections of a CD4053 triple 2-channel analog multiplexer perform the actual ADC / DAC switching, including "dead-man" operation to clamp the S/H input when there are no DAC strobe pulses from the MUX control output.

One half of a TL082 or LF353 dual op-amp acts as an input preamp to set a +/- 1 Volt input range. The remaining op-amp forms an output S/H buffer, with level shifting and gain to give a +/- 5 Volt output range.

10k and 20k 1% metal film resistors are required for the R-2R DAC ladder. Dual 20k 1% metal film resistors are shown for the clamp voltage divider, but you could use 10k here as well... the important thing is that they be the same value to cut the 5 V supply in half. Similarly, dual 10k 1% metal film resistors are shown for the S/H level-shifting output buffer, but again the important thing is just that they be the same value in order to get a gain of 2. If you are going to buy 100 or 200 pieces of each value (a typical minimum order for these parts), this helps minimize the number of different values.

The 78L05 regulator is not shown on the schematic, nor are its 47 µF electrolytic output capacitor or the several 0.047 µF ceramic bypass capacitors.

If your system's LPT port connector is too close to the top or bottom of the card edge, you may have to notch out one corner of the MUX board to clear the computer chassis.

The circuit can be improved by shielding it in a grounded metal enclosure. This will reduce pickup of interference from the digital signals onto the analog lines, especially the S/H input. To see how much improvement to expect, you can make a crude test enclosure by putting the board in a plastic bag, then wrapping that with aluminum foil. Clip the foil to the board ground... you won't be able to solder to aluminum.

Battery clips are easily obtained by cannibalizing dead 9 Volt batteries. Carefully peel back the crimped edge of the metal jacket with pliers or old side-cutters until the connector end starts to come loose. Pull it up far enough to clip the leads going to the connectors. Dispose of the rest of the battery properly... be careful of the sharp metal edges!

The connector leads are often small metal strips which have been spot-welded to the terminals. It's usually easier to solder to the strips than to the terminals themselves, but either way you must make sure the surface is clean. Use extra rosin flux if you have it, since the flux in normal rosin-core solder may not be enough.

Note that some batteries have glossy plastic connector ends, which will melt easily when you try to solder the terminals. If you can't find batteries with dull black or red ends, you can sometimes get away with soldering to the pre-exisiting terminal leads instead of directly to the metal terminals that are molded into the plastic.

Remember that the polarity of each connector is now OPPOSITE from what it was when it was a battery!

No switch is shown. You can either just connect the batteries each time, or add a double-pole, single-throw switch to connect both batteries at once.

MUX BOARD PARTS LIST:

 74HC245    Octal tranceiver (or 74HCT245)
 74HC32     Quad OR gate (or 74HCT32)
 CD4053     Triple 2-channel analog switch (or 74HC4053, etc)
 TL082      Dual BIFET op-amp (or LF353, etc)
 78L05      Positive 5 V regulator, 100 mA
 1N914      Signal diode (any)

 47 µF Aluminum electrolytic capacitor (axial leads)
 0.001 µF Mylar or other film S/H capacitor (Csh)
 0.001 µF dead-man capacitor, film or ceramic
 47 pF ceramic or film capacitor
 (5) 0.047 to 0.10 µF ceramic bypass capacitors

 (11) 20k 1% metal film resistors, 1/4 watt
 (10) 10k 1% metal film resistors, 1/4 watt
 1 Meg 5% carbon film resistor, 1/4 watt
 100k 5% carbon film resistor, 1/4 watt
 15k 5% carbon film resistor, 1/4 watt
 (2) 10k 5% carbon film resistors, 1/4 watt
 100 ohm 5% carbon film resistor, 1/4 watt
 68k typical Rbias... select as needed

 DB25M solder-cup connector
 (2) 9V Battery connectors (see above)

 See Resources for suppliers

GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH:
25 Years of Innovative Instrumentation
© Copyright 1999 - 2006 by Interstellar Research