circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

April 2005, Issue 177

Simple USB Data Acquisition


SYSTEM OVERVIEW

I usually design my own boards, but for this project I used a couple of evaluation boards to implement my minimal USB data acquisition system. The boards are readily available, so a hardware design isn’t required to get up and running.

The system is comprised of two boards, an analog temperature sensor, and a PC running the GUI (see Figure 1). The Keil MCB2130 evaluation board contains the new ARM-based LPC2138 microcontroller (see Photo 1). The MCU reads the temperature sensor’s analog output voltage via its ADC and sends the reading via its UART. For this particular application, I used the board’s serial port circuitry (RS-232 transceiver and connector), expansion connector (for hooking in the temperature sensor), and power input connection. One of the board’s neat features is that it’s powered from an on-board USB connector. This means you don’t need a clunky wall wart to power the system. You can just run another USB line to it for power. This is a definite advantage to using USB, as long as your board doesn’t draw more power than the USB connection can handle.

(Click here to enlarge)

Photo 1—I used a Keil ULINK JTAG debugger to in-circuit debug and program the LPC2138 microcontroller. I soldered an LM60 temperature sensor to the prototyping area of the MCB2130 board.

 

(Click here to enlarge)

Figure 1—Where does the power come from? The USB is used for more than just communicating with the PC; it’s also used to power both boards, which enables you to remove those ugly black wall warts. The schematics are posted on the Circuit Cellar ftp site.

The Silicon Labs CP2101 evaluation board contains the CP2101 USB-to-UART bridge chip and an RS-232 transceiver. This allows you to plug in an RS-232 communicating device on one side and a USB communicating device on the other. The board and its virtual COM port software drivers form the link between the MCB2130 board’s RS-232 port and the PC’s USB port.

The National Semiconductor LM60 is a simple three-pin analog Celsius temperature sensor. It’s wired into the expansion connector on the MCB2130 board, which connects to the LPC2138’s ADC to read the analog voltage from the sensor. Its output is linearly proportional to temperature (6.25 mV/°C), and it has a DC offset of 424 mV to accommodate negative temperatures. This makes it a fairly easy sensor to deal with in software after it’s read via the LPC2138’s ADC.

The PC contains the Visual Basic GUI. It reads the raw temperature data sampled by the ADC over the virtual USB COM port, converts it to temperature, and displays and charts the results over time. The GUI puts the finishing touches on the design, making it a more user-friendly and professional-looking system. Imagine how much easier it will be to look at graphed data instead of the streaming serial data in a terminal emulator session.