Fabricate a high-resolution sensor-to-USB interface
A precision analog acquisition system fits in your pocket.
Zoltan Gingl, University of Szeged, Szeged, Hungary; Edited by Paul Rako and Fran Granville -- EDN, November 17, 2011
The circuit in this Design Idea combines a mixed-signal microcontroller, a USB UART (universal asynchronous receiver/transmitter), and a novel adaptable analog sensor-input circuit. It allows you to connect many types of sensors to the design’s two analog-input channels, control the device, and read measurement data on a USB host. The USB connection powers the circuit. You can control the device from your computer with simple commands; even terminal software can make the measurements. The 8051 core allows for easy programming with freely available tools, such as IDEs (integrated development environments), debuggers, and C compilers.
The design is based on a $8 microcontroller
that features an 8051 architecture,
as well as a PGA (programmable-gain amplifier) and a 24-bit
sigma-delta ADC (figures 1, 2, and 3).
Microcontroller IC1 has an input multiplexer
allowing differential or single-ended
mode. It also has two DAC outputs
and can provide five unassigned
digital-I/O pins (Figure 1). One output
pin drives D1 under program control.
The remaining digital pins are used to
configure the two analog-input ports.
You also send the microcontroller’s
reference output to one of the analog-input
ports. Four remaining digital pins
interface with the USB’s UART chip
(Reference 1).

A 3.3V linear regulator, IC2, powers
the microcontroller (Figure 2). You
power USB chip IC1 directly from the
USB port through a ferrite bead and a
filter network. This popular and reliable
USB UART chip lets you communicate
with a computer using any
operating system. Op amp IC4 buffers
the microcontroller’s reference output
(Figure 3).

The analog-input architecture
allows you to directly connect many
kinds of sensors. For example, you can
connect a thermistor or a photoresistor
between the ground and the input pins
and switch on the pullup resistor to form
a voltage divider; the on-chip ADC can
directly digitize this voltage divider’s
output (Figure 5). This approach also
features ratiometric operation, meaning
that the ADC uses the same reference as
the driving voltage of the voltage divider. Current-output sensors can also be
connected as you would connect photodiodes—directly between the ground
and the input pins. Switch the pulldown
resistor so that the photocurrent develops
a voltage.The high-resolution ADC and PGA allow direct connection of thermocouples (Figure 6). You achieve the required bias point by switching on both the pullup and the pulldown resistors on one channel. You can use directly connected bridge-type sensors, such as load cells and pressure sensors, by switching off all of the internal resistors. In these cases, you should operate the ADC in differential mode. Leaving all of the switches open also suits use in potentiometer inputs or IC sensors, such as the SS49E Hall-effect magnetic-field sensor.

When using directly connected sensors,
you should consider source impedance,
signal range, filtering, and noise pickup (references 2 and 3). You might need to add external
buffer amplifiers or a more precise voltage reference. The
availability of a reference voltage and 3.3V power on the
analog ports makes this setup possible. You can also use the
DAC outputs in connector J1 to trim a value or to provide
an arbitrary voltage to the sensors. Note that J1 also has five
digital-I/O pins (Figure 1).

|
References |
|
Talkback






















