Circuit and working
Fig. 2 shows the circuit of USB data acquisition system.
The heart of the system is a 64-pin ATMEL USB chip AT90USB1287, which is an 8-bit microcontroller that can do USB communication and take analogue input through its eight 10-bit analogue-to-digital converters (ADCs). It has 48 programmable input/output pins. The microcontroller runs on a 16MHz clock and has 128 kB of flash memory. As the microcontroller does not have any digital-to-analogue converter (DAC) on its output pins, we required an external chip for this purpose. We used TLC7226 from Texas Instruments (TI), which is an 8-bit DAC with quad outputs.
Before finalising the design, ensure that all the AVR hardware design considerations mentioned in ATMEL application note are met. You can easily get IC samples for academic and research purposes, which the manufacturers always support.
This is a 20-pin dual-in-line chip. You may refer to its datasheet from TI for more details. This IC is driven by a reference diode LM336 to have a regulated voltage supply of 2.5V. So for an input ranging from 0 to 255 through parallel eight pins of the microcontroller, the output varies from 0 to 2.5V. As the output desired is 5V, we have used a voltage amplifier with gain set at ‘2.’ For voltage amplification we used quad op-amp OPA2335 from Texas Instruments, which has zero drift and low offset voltage of 5 μV.
The circuit is powered from the USB port, which provides a voltage output of up to 4.5V. If you need to connect the output pins to a load larger than that supported by your USB port (typically 500 mA per port), use an external power source of 5V and remove the USB power jumper (SJ1) shown in Fig. 6.
Since the system requires interfacing with an external device for input and output, we have used connectors for various purposes. One 18-pin connector (CON2) is used for analogue inputs and outputs, while another 18-pin connector (CON1) is used for digital inputs and outputs. There is also a 6-pin connector for ISP interfacing and a 2-pin shorting jumper connector for power supply from the USB port.
Specifications of the developed DAQ device are listed in Table I.
Once done with the schematic of the project, you need to mount the components on the provided PCB. An actual-size, double-side, solder-side PCB track layout of USB data acquisition system is shown in Fig. 3 and component-side track layout in Fig. 4. The component layout is shown in Fig. 5. The author’s assembled board with input and output pin details is shown in Fig. 6.
The original board routing and layout design was done by the author on a four-layered board with inner layers supplying the power. Having continuous copper layers in the inner layers provided better stability to ADC and DAC systems.
The board was built with a mix of surface-mount device (SMD) and through-hole technology (THT) components as we could not obtain small quantities of the discrete components in SMD packages. You can choose to use only SMD components to have a compact design. You can also try assembling the circuit on a double-layered board to cut down the development cost.