Input-Output Head (A2057) Manual

© 2004, Mike Bradshaw, Brandeis University
© 2008-2013, Kevan Hashemi, Brandeis University.


Command Bits
Analog Inputs
Digital Outputs
Analog Outputs


The Input-Output Head (A2057) is a LWDAQ device that provides two general-purpose analog inputs, two analog outputs, and four open-drain digital outputs. We can read and display the analog inputs with the LWDAQ Voltmeter Instrument. The Voltmeter Instrument also allows us to set the digital outputs. The A2057's analog outputs are provided by two eight-bit serial DACs (digital to analog converters). To set the output voltages of the DADs, we must instruct LWDAQ to transmit a special sequence of commands to the A2057.

Figure: The Input-Output Head (A2057A). The printed circuit board is part number A205701F.

The Input-Output Head (A2057A) provides three 4-way plugs for the inputs and outputs, as well as a grid of holes for additional circuits and connectors. The J2 connector accepts two analog inputs, J3 provides two analog outputs, and J4 provides four digital outputs. (Despite being named J1..J3, these connectors are plugs, not sockets.)

Figure: The Voltmeter (A2057V) with Open Enclosure. The printed circuit baord is part number A205701G.

The Voltmeter Head (A2057V) comes in a PPL enclosure. It provides two BNC plugs for the two analog inputs, allowing them to be used with oscilloscope probes. The LWDAQ device socket is set in the end wall opposite the BNC connectors. Two 4-way plugs provide four digital outputs (J4) and two analog outputs (J3). The enclosure as shown does not give external access to the digital or analog outputs, but is easy to cut additional holes in the cover.

Figure: Voltmeter (A2057V) with Closed Enclosure.

The Wheatstone Bridge Head (A2057W) adds a differential amplifier to the front end of the A2057A, as well as a 10-V power supply, as shown in S2057W_1. The A2057W allows us to power and read out most Wheatstone Bridge sensors. We connect the sensor to the new J100 plug, which provides 10-V power and accepts a differential input A/B from the bridge.

Figure: The Wheatstone Bridge Head (A2057W).

In the A2057W implementation shown above, we cut traces to J4 and put J100 in its place. All differential amplifier parts are installed on the patch area provided by the circuit board. Note that the A205701F circuit board, used by the A2057W, does not leave adequate clearance for metal standoffs in its top-left corner. There are several vias that will make contact with a hex nut on the top side of the board.


Note: All plugs on the A2057 are mis-named as sockets on the printed circuit boards and in the schematics. They should have been identified as Pn instead of Jn.

The four-way shrouded plugs are 0.1" pitch headers, part number 70543-0003 from Molex-Waldom. To mate with these connectors, we use crimp terminal 16-02-0096 and four-way crimp housing 50-57-9004. Pin one (1) on each plug is on the left when looking from the nearest board edge, and is identified also by a square pad.

The A2057A and A2057V use the A205701F and A205701G printed circuit boards respectively. These circuit boards differ in layout and in the presentation of the analog inputs. The A2057A provides two analog inputs on a four-way plug with the following pin assignments.

Table: Pinout J2 on the A2057A.

The X1 and X2 signals are the analog inputs, which are selected by the DC5 (ON1) and DC6 (ON2) device command bits respectively. The A2057V replaces connector J2 with two BNC plugs named J5 and J6. These provide connection to X1 and X2 respectively.

The pinout for J3 is shared by all versions of the A2057. This connector provides two analog outputs, each generated by a separate eight-bit DAC. We set the output voltage of these DACs by transmitting a sequence of roughly thirty device commands to the A2057.

Table:Pinout of J3. The Y1 and Y2 signals are the analog outputs.

The pinout for J4 is shared by all versions of the A2057. Each of the four pins is the drain of an NDS355AN MOSFET. The outputs OUT1 to OUT4 are controlled by device command bits DC1 to DC4 (OUT1 to OUT4). When the command bit is HI, the MOSFET turns on, connecting the digital output to 0 V through a resistance of approximately 0.2 Ω. When the command bit is LO, the output is open circuit.

Table:Pinout of J4.

The A2057W is built on the A205701F circuit board. We cut the traces to J4 and use the J4 footprint for the four-way J100 connector.

Table:Pinout of J100 on A2057W.

The Wheatstone Bridge amplifier circuit has inputs A and B and produces an output 101×(AB). This output is called XX1 and connects to J2-1, where it is buffered and becomes X1, the first analog input of the A2057. Another output from the amplifier is A itself, which connects to J2-3, and so becomes X2.

Command Bits

The table below gives the assignment of LWDAQ command bits to the A2057 functions.

Table: Command Bit Allocation.

To determine the command word that will implement a particular operation on the A2057, write out sixteen bits in a row, starting with bit sixteen (DC16) on the left, and ending with bit one (DC1) on the right. Set each bit to zero or one as you require. The left-most four bits form the most significant nibble of the sixteen-bit command word. The right-most four bits are the least significant nibble. Translate each nibble into a hex digit, and you have the hex version of the command word.

The A2057 provides four analog input channels. We set one and only one of the ON1..ON4 bits to select one and only one of the four analog inputs for amplification and transmission back to the LWDAQ Driver. In the LWDAQ Driver, this input is available to for 16-bit analog to digital conversion. The A2057's two analog inputs are selected by bits ON1 and ON2. The ON3 and ON4 channels are connected to 0V and 5V respectively, and allow the Voltmeter Instrument to auto-calibrate the A2057.

The A2057 provides two amplifier gains, one of which is ten times higher than the other. We call them the ×1 and ×10. The GSEL bit, when set, selects the higher gain. With ×1 gain, the dynamic range of the two analog inputs is ±15 V. With ×10 gain, the range is ±1.5 V.

The A2057 uses two Texas Instrument's TLV5623 8-bit digital-to-analog converters. The output of each DAC is passed through an adjustable op-amp gain stage.

The A2057 uses four NDS355AN n-channel mosfets. When OUTn is asserted, signal OUTn will be connected to 0 V through one of these mosfets. When OUTn is unasserted, OUTn will be open-circuit.


We control and read out all versions of the A2057 with the LWDAQ Software software. We read out the A2057 analog inputs with the software's Voltmeter Instrument. The same instrument allows us to set the digital outputs. We set the analog outputs with a TclTk script, as we describe below. The A2057 Tester script is an example LWDAQ Tool that allows us to test all aspects of the A2057A and A2057V. You can run it with "Run Tool" in the Tool menu. You will find the data acquisition steps required to control and read out the A2057 in Voltmeter.tcl, which is the TclTk script that defines the Voltmeter Instrument. In Driver.tcl you will find the routines that compose TCPIP messages to communicate with a LWDAQ Driver.

Analog Inputs

The A2057 provides two analog inputs. The A2057A presents these inputs on J2, which is a 4-way 0.1" header. The A2057V presents them on J5 and J6, which are BNC connectors and are set up for use with ×10 oscilloscope probes. For existing software to read the analog inputs, see above. Here we describe how to select the analog inputs with LWDAQ command words. To select analog input n we set bit ONn and clear the other three ON bits. We set GSEL if we want ×10 gain. We set WAKE to provide power to the amplifiers. We clear LB because we do not want the LVDS transmitter to assert a logic level on the R lines. We must set the OUT1..OUT4 bits to be consistent with the desired state of these four outputs. If we are not using them, then we can clear them all. But if we want them to remain in the same state, we must set them to the same values we used in the previous command word we sent to the A2057.

Once we have transmitted a command word, the A2057 asserts an analog voltage on the R signal back to the LWDAQ Driver. There we can digitize the voltage with LWDAQ driver commands. The following commands select analog input number one and digitize it 100 times with the sixteen-bit ADC in the LWDAQ Driver, leaving the 100 samples stored in the first 200 bytes of the driver memory. The samples are spaced by 8000 "delay ticks", each of which is 125 ns for a 1 kSPS sample rate. The driver job number "11" is the 16-bit ADC convert and store job.

LWDAQ_transmit_command_hex $sock "0090"
LWDAQ_set_repeat_counter $sock 99
LWDAQ_set_delay_ticks $sock 8000
LWDAQ_execute_job $sock 11

The voltage returned to the LWDAQ Driver is linear with respect to the voltage applied to the A2057 input. We can determine the input voltage from the driver voltage if we have an intercept and slope. We obtain the intercept and slope by reading input channels three and four (ON3 and ON4), which provide us with a known 0-V and 5-V input at the A2057. The Voltmeter Instrument uses these reference inputs to auto-calibrate the voltage it reads from the A2057.

You will find the above steps implemented with Tcl in Voltmeter.tcl and also in our example script A2057_Tester.

Digital Outputs

The four digital outputs are set by the four independent OUT1..OUT4 bits in the command word. When one of these bits is set, its corresponding digital output pin on connector J4 will be connected to 0 V by an NDS355AN transistor. The channel resistance of this transistor with a 3.3-V gate voltage is around 0.2 Ω. When the OUT bit is clear, the transistor is turned off, so the output pin is open-circuit. The outputs are "open-drain". If we connect them to +15V with a 10-kΩ resistor, we will see +15 V on the output pin when the OUT bit is clear, and 0 V when the bit is set. We can use these mosfets to turn on relays and lamps, but note that they include a diode between the drain and source, which prevents the output pin from dropping below −0.7 V.

Analog Outputs

The A2057 analog outputs are provided by two eight-bit serial DACs. The DAC outputs are amplified and buffered by two op-amps. The analog outputs are presented on connector J3 as described above. The Voltemeter Instrument does not allow us to set the analog outputs. Instead, we must send a sequence of commands to the A2057 to configure one of its 8-bit DACs. These commands control the DAC serial data input and serial clock directly, and so clock in a new sixteen-bit DAC word, of which eight bits dictate the analog output from the TLV5623 eight-bit DAC. Do not confuse the 16-bit LWDAQ command with the 16-bit DAC control word. We use a sequence of LWDAQ commands to send a single DAC control word.

The first four bits of the DAC's sixteen-bit control word are control bits. The next eight bits are the DAC value. The final four bits are all zeroes. The A2057 uses six command bits to control the DACs. These bits are DIN (DC16), SCLK (DC15), FS (DC14), DAC2 (DC13), DAC1 (DC11), and WAKE (DC8). The DAC1 and DAC2 bits select which DAC to use. Only one should be asserted at a time. The WAKE bit must be asserted to provide power to the A2057. The FS bit is called Frame Sync, and must be asserted once at the beginning of each data word transfer, and once again at the end of each data word transfer. The DIN bit is the serial data bit for the DACs. The rising edge of SCLK clocks DIN into the selected DAC.

A sixteen-bit control transmission to a DAC requires a total of 35 command transmissions, which takes 140 μs. The maximum square-wave output frequency of the DACs is 3.5 kHz. The list below gives an example command word sequence that sends one control word to DAC1. The DAC integer value is 6, or binary 00000110. We give the LWDAQ commands as hex values. The most significant nibble pulses SCLK, and the last three nibbles stay the same for a given DAC. Some of the bits in the sixteen-bit serial word are not used by the DAC, so we give them the name "X" and set them to zero.

  1. Select DAC1: $2080
  2. Activate DAC1: $2480
  3. Serial Bit 15 (X): $4480
  4. Serial Bit 15 (X): $0480
  5. Serial Bit 14 (SPD): $4480
  6. Serial Bit 14 (SPD): $0480
  7. Serial Bit 13 (PWR): $4480
  8. Serial Bit 13 (PWR): $0480
  9. Serial Bit 12 (X): $4480
  10. Serial Bit 12 (X): $0480
  11. Serial Bit 11 (Value Bit 8): $4480
  12. Serial Bit 11 (Value Bit 8): $0480
  13. Serial Bit 10 (Value Bit 7): $4480
  14. Serial Bit 10 (Value Bit 7): $0480
  15. Serial Bit 9 (Value Bit 6): $4480
  16. Serial Bit 9 (Value Bit 6): $0480
  17. Serial Bit 8 (Value Bit 5): $4480
  18. Serial Bit 8 (Value Bit 5): $0480
  19. Serial Bit 7 (Value Bit 4): $4480
  20. Serial Bit 7 (Value Bit 4): $0480
  21. Serial Bit 6 (Value Bit 3): $C480
  22. Serial Bit 6 (Value Bit 3): $8480
  23. Serial Bit 5 (Value Bit 2): $C480
  24. Serial Bit 5 (Value Bit 2): $8480
  25. Serial Bit 4 (Value Bit 1): $4480
  26. Serial Bit 4 (Value Bit 1): $0480
  27. Serial Bit 3 (0): $4480
  28. Serial Bit 3 (0): $0480
  29. Serial Bit 2 (0): $4480
  30. Serial Bit 2 (0): $0480
  31. Serial Bit 1 (0): $4480
  32. Serial Bit 1 (0): $0480
  33. Serial Bit 0 (0): $4480
  34. Serial Bit 0 (0): $0480
  35. End Transfer: $2080

The DACs' outputs feed into their own adjustable gain op-amp stage. The A2057 is built with ×1 gain. The user may adjust the gain by choosing values of resistors which provide the appropriate gain according to the equations found on Page 6 of the schematic.


Note: All our schematics and Gerber files are distributed under the GNU General Public License.


LVDS Transceiver
Command Receiver
Input Buffers
Selector and Amplifier
Analog and Digital Outputs
Output Buffers
Wheatstone Bridge


A205701F: Input-Output Head
A205701G: Voltmeter Head