DOC PREVIEW
UNCC ECGR 6185 - Simple USB Data Acquisition

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

60Issue 177 April 2005CIRCUIT CELLAR®www.circuitcellar.comdoing something with it is also animportant part of the process, so I’llshow you a PC GUI. By the end of thearticle, you’ll be able to create a sim-ple USB (embedded ARM-core-based)data acquisition device. Most impor-tantly, though, you’ll know how todevelop with an ARM-based micro-controller, how to use a USB-to-UARTbridge, and how to make a PC GUI totie it all together.SYSTEM OVERVIEWI usually design my own boards, butfor this project I used a couple of eval-uation boards to implement my mini-mal USB data acquisition system. Theboards are readily available, so a hard-ware design isn’t required to get upand running.The system is comprised of twoboards, an analog temperature sensor,and a PC running the GUI (see Figure1). The first board is the KeilMCB2130 evaluation board, whichcontains the new ARM-basedJust ask any of my friends, andthey’ll tell you I’m definitely anembedded system nut. I love tryingout the latest microcontrollers andchips that can breathe new life intomy designs. A couple of my recentfavorites are Philips ARM-basedmicrocontrollers and USB-to-UARTbridges. I’ve incorporated both of thesetypes of devices into my last fewdesigns. I’ve been extremely impressedwith the results. Another recent addition to my bagof tricks has been on the front end ofmy designs. Adding simple PC graphi-cal user interfaces (GUI) that can com-municate with my embedded designshas put the finishing touches on them.By adding a nice PC GUI that cancommunicate with the embedded sys-tem over a serial port, you can per-form things like system setup, real-time diagnostics, and tests. Besidesthese benefits, your end user or cus-tomer will have a more professional,user-friendly interface to work with. After thinking aboutways to combine all of thisin a single project, I decid-ed to work on a simpleUSB data acquisition proj-ect that allows you to col-lect temperature data froman analog temperature sen-sor and graph it via a PCGUI. Everyone wants tocollect data of some sort(temperature in my case).And what better way thanover USB via an ARM-based microcontroller? Ofcourse, taking the data andLPC2138 microcontroller (see Photo1). The MCU reads the temperaturesensor’s analog output voltage via itsA/D converter and sends the readingvia its UART. For this particular appli-cation, I used the board’s serial portcircuitry (RS-232 transceiver and con-nector), expansion connector (forhooking in the temperature sensor),and power input connection. One ofthe board’s neater features is that it’spowered off from an on-board USB connector.This means you don’tneed a clunky wall wartto power the system.You can just run anotherUSB line to it for power.This is a definite advan-tage to using a USB, aslong as your board does-n’t draw more powerthan the USB connec-tion can handle.The Silicon LabsCP2101 evaluation boardcontains the CP2101FEATURE ARTICLE by Bruce PrideSimple USB Data AcquisitionSimple data acquisition is only a project away. Read on to learn how to build a simple dataacquisition device around the LPC2138. The system features a simple GUI that allows youto view graphed data instead of the streaming serial data in a terminal emulator session.MBR2130BoardP3P2LPC21383.3 VPO-27GND3.3 VvOUTGNDLM60 Temperature sensorJ3CP2101J1CP2101-EBBoardUSBRS-232PC with VBGUIUSBFigure 1—Take a look at the USB connections in the system. Where does the power comefrom? The USB is used for more than just communicating with the PC; it’s also used topower both boards, which enables you to remove those ugly black wall warts. The schemat-ics are posted on the Circuit Cellarftp site.Photo 1—I used a Keil ULINK JTAG debugger to in-cir-cuit debug and program the LPC2138 microcontroller. Isoldered the LM60 temperature sensor to the prototyp-ing area of the MCB2130 board.www.circuitcellar.comCIRCUIT CELLAR®Issue 177 March 2005 61USB-to-UART bridge chip and an RS-232 transceiver. This allows you toplug in an RS-232 communicatingdevice on one side and a USB commu-nicating device on the other. Theboard and its virtual COM port soft-ware drivers form the link or bridgebetween the MCB2130 board’s RS-232port and the PC’s USB port.The National Semiconductor LM60is a simple three-pin analog Celsiustemperature sensor. It’s wired into theexpansion connector on the MCB2130board, which connects to theLPC2138’s A/D converter to read theanalog voltage from the sensor. Itsoutput is linearly proportional toCelsius (6.25 mV/°C), and it has a DCoffset of 424 mV to accommodate neg-ative temperatures. This makes it afairly easy sensor to deal with in soft-ware after it’s read via the LPC2138’sA/D converter. The PC contains the Visual BasicGUI that I used for this application. Itsimply reads the raw temperature datasampled by the A/D converter overthe virtual USB COM port, converts itto temperature, and displays andcharts the results over time. The GUIputs the finishing touches on thedesign, making it a more user-friendlyand professional-looking system. Justimagine how much easier it will be tolook at graphed data instead of thestreaming serial data in a terminalemulator session.LPC2138 MCUThe LPC2138 is one of Philips’snewest ARM based microcontrollers.Having previously designed with theLPC2106, the LPC2138 piquedmy interest given its vastassortment of added peripherals.The addition of A/D converters,D/A converters, an externalmemory controller, and edge-sensitive interrupts made it theperfect migration part for myLPC2106 designs (see Figure 2). The small LPC2138 containseverything but the kitchen sink.In addition to a ton of peripher-als and general-purpose I/O, it’sloaded with 512 KB of flashmemory (128 bits wide for highspeed) and 32 KB of RAM—defi-nitely not the typical memorysizes I’m used to seeing in plain-vanilla 8-bit microcontrollers.Another remarkable feature isthe chip’s size. The 64-pin QFPpart measures in at 10 mm × 10mm, making it perfect for tight-ly spaced applications. And then, of course, there’sthe one thing that makes thismicrocontroller shine: an ARM32-bit ARM7TDMI-S core. This32-bit ARM core yields 54 MIPSwhen running at 60 MHz,which is easily achieved by uti-lizing the LPC2138’s on-boardPLL. So, not only do you get avast number of peripherals andtons of memory, you get all thebenefits of using an ARM core!What are the benefits, you ask?An obvious one is its high perform-ance and low-power


View Full Document

UNCC ECGR 6185 - Simple USB Data Acquisition

Documents in this Course
Zigbee

Zigbee

33 pages

Load more
Download Simple USB Data Acquisition
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Simple USB Data Acquisition and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Simple USB Data Acquisition 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?