2What is DAQData AcQuisition (DAQ) is the process of measuring an electrical or physical signals such as voltage, current, temperature, pressure, or sound with a computer. A DAQ system consists of sensors, DAQ measurement hardware, and a computer with programmable software. Compared to traditional measurement systems, PC-based DAQ systems exploit the processing power, productivity, display, and connectivity capabilities of industry-standard computers providing a more powerful, flexible, and cost-effective measurement solution.
4DAQ Device’s Components Signal ConditioningSignals from sensors or the outside world can be noisy or too dangerous to measure directly. Signal conditioning circuitry manipulates a signal into a form that is suitable for input into an ADC. This circuitry can include amplification, attenuation, filtering, and isolation. Some DAQ devices include built-in signal conditioning designed for measuring specific types of sensors.
5Analog-to-Digital Converter (ADC) DAQ Device’s ComponentsAnalog-to-Digital Converter (ADC)Analog signals from sensors must be converted into digital before they are manipulated by digital equipment such as a computer. An ADC is a chip that provides a digital representation of an analog signal at an instant in time. In practice, analog signals continuously vary over time and an ADC takes periodic “samples” of the signal at a predefined rate. These samples are transferred to a computer over a computer bus where the original signal is reconstructed from the samples in software.
6DAQ Device’s Components Computer BusDAQ devices connect to a computer through a slot or port. The computer bus serves as the communication interface between the DAQ device and computer for passing instructions and measured data. DAQ devices are offered on the most common computer buses including USB, PCI, PCI Express, and Ethernet. More recently, DAQ devices have become available for Wi-Fi for wireless communication. There are many types of buses, and each offers different advantages for different types of applications.
7Market BackgroundNowadays, there is several low cost DAQ applications, with an average 200$ price tag.Typical dimensions varies from a size of a cigarettes pack.Typical power consumption of such devices varies between : ~ 0.1W - 0.5W
9Project MotivationUltra low cost MSP430™ series Microcontroller – starting from 2$Ultra low power consumption ~20uWIntegrated USB2 controller with PHYSmall dimension – can be applied on an USB dongle
10Principle of operation To implement the DAQ device, we will use an MSP430F5529’s GPIOs for collecting analog DATA and to generate a desired output. Integrated ADC will convert the signals. As a DAQ’s manipulator and a data analyzer, we will use a PC powered with NI LabView. Thanks to the integrated USB2 controller, we will be able to achieve a 12Mb/s data link.
11Introducing the MSP as the heart of the DAQ 16-Bit RISC Architecture, 8+2KB SRAM, up to 25-MHz System ClockAn ADC with a 12 bit A/D conversion for collecting the analog dataUp to 43 GPIO’s for custom use4 16-bit timers for setting an analog sample rate, and generating PWM signal.Full speed USB with integrated PHY
13Things to doCheck what an USB class device is the best for our applicationImplement an USB client side communication using a TI MSP430 USB APIImplement the DAQ’s functions and operation modes
14Things to doImplement a Windows driver for communicating with a MSP430F5529Using LabView, implement a GUI for data acquisition
15Development process: Tools MSP430F5529 USB Experimenter’s Board
16Development process: Tools MSP430F5529 USB EB FeaturesUSB Based Development Platform5-pad capacitive touch stripmicroSD Card Slot102x64 grayscale, dot-matrix LCD with backlight
17Development process: Tools MSP430F5529 USB EB Features4 push buttons3 GP LEDs, 5 LEDs for capacitive touch buttons, and 1 LED Power indicator.Scroll wheel/PotentiometerIntegrated eZ-FET for Spy-Bi-Wire (2-wire JTAG) programming and debugging
18Development process: Tools MSP430F5529 USB EB FeaturesJTAG header for full 4-wire JTAG programming and debuggingEasy access to F5529 I/O pins by 100mil header
19Development process: Tools TI Code Composer Studio Integrated Development Environment v5CCS is used for MSP430 target code development and designing. It features integrated ez-FET driver for MSP430F5529 EB flasher/debbuger, MSP430 family API, various debugger tools, and C compiler for MSP430 MCUs.
20Development process: Tools MSP430 USB API Stack for CDC/PHDC/HID/MSC This API is used for implementing a client side USB communication with a Host. For our application, we have chose the CDC USB class. Classes description, and the choice reason will be explained later
21Development process: Tools National Instruments LabView LabVIEW (short for Laboratory Virtual Instrumentation Engineering Workbench) is a system design platform and development environment for a visual programming language from National Instruments.
22Development process: Tools National Instruments LabView This design platform was chosen for implementing the PC host side client application. The main reason of this choice is ease and relatively short development time of the host application
23Development process: Digital I/O The digital I/O features include: • Independently programmable individual I/Os • Any combination of input or output • Individually configurable P1 and P2 interrupts. • Independent input and output data registers • Individually configurable pullup or pulldown resistors
24Development process: Digital I/O MSP459F5529 have eight digital I/O ports implemented (P1 to P8, PU and PJ).P1 to P7 ports contain eight I/O lines; however, P8, Port U and Port J contains three, three and four lines respectively.Ports P1 and P2 always have interrupt capability.Each interrupt for the P1 and P2 I/O lines can be individually enabled and configured to provide an interrupt on a rising or falling edge of an input signal.Most pins connect to a more specialized peripheral, but if that peripheral is not needed, the pin may be used for general-purpose I/O.
25Development process: Digital I/O We are going to use the following ports:P1 or/and P2 - Timers and External interrupts.P6, P7.0-P7.3 – 12 bit ADC inputs.P5.0 and P ADC reference voltage inputs.PU – Communication with PC via USB protocol.P5.2-P5.5 – Inputs for 2 crystal oscillators.
26Development process: Digital I/O For example Port 6 that can be used as GPIO and as Analog signal inputs for ADC:
27Development process: USB Universal Serial Bus (USB) is an industry standard developed in the mid-1990s that defines the cables, connectors and communications protocols used in a bus for connection, communication and power supply between computers and electronic devices. This communication protocol is widely used nowadays for communicating between a host PC and various detachable peripherals
28Development process: USB MSP430F5529 Block diagram
29Development process: USB MSP430 USB API stack supported USB classesHIDMSCCDCPHDC
30Development process: USB HIDHuman interface device classPros: there is no need for a driver for a Host machine. Great advantage for limited access workstationsContras: 64KB/s
31Development process: USB MSCMass storage Device ClassDesigned for storage operationsSupports only bulk transfer
32Development process: USB PHDCPersonal Healthcare Device ClassCertified for use with several Personal Healthcare devices such as blood pleasure monitor, thermometer, weight scale and etc.Pros: Easy developmentContras: For PH devices only, consumes large amount of RAM
33Development process: USB CDCCommunication device classFor use with various communication devices. Simple protocolPros: Widely used virtual com class. High communication speed. Simple host application developmentContras: At the first use on the host workstation, an appropriate driver installation is needed. Disadvantage for a limited access workstations
34Development process: USB DAQ’s USB ClassFor implementing an USB communication with a host PC, was decided to use the CDC protocol due to it’s high data rate speed (up to 6.3Mbp/s) and simple communication protocol that fits our needs
35Development process: USB DAQ’s USB ClassRelying on the USB API stack, we developed a target code that gives the ability to the MSP430F5529 to communicate with a host PC through virtual COM port.
36Development process: USB DAQ’s USB ClassUSB communication target code is initializing MSP430 device as CDC class device with a temporary (development) VID/DID. USB interrupt register launches several routines to handle USB events such as initial connection handshake, data transmit ready, data receive ready, device disconnected, host busy and etc…
37Development process: USB MSP430 USB communication codeUSB communication target code is initializing MSP430 device as CDC class device with a temporary (development) VID/DID. USB interrupt register launches several routines to handle USB events such as initial connection handshake, data transmit ready, data receive ready, device disconnected, host busy and etc…
38Development process: USB USB Input handlingUSB target code designed to continuously receive all incoming data and to store it in the buffer. After receiving the CR (Enter) character, a C case routine handle the received data to perform the user desired request and the buffer is cleared.
39Development process: USB USB outputAfter the desired DAQ’s operation performed, MCU will prepare the collected data and transmit it back to the PC. Yet not designed a transmitted data package. It is up to the host’s application to handle and to decode the package
40Development process: ADC An analog-to-digital converter (abbreviated ADC) is a device that converts a continuous signal to a discrete time digital representation.Typically, an ADC is an electronic device that converts an input analog voltage or current to a digital number proportional to the magnitude of the voltage or current.
42Development process: ADC The ADC module supports 12-bit analog-to-digital conversions. The module implements a 12-bit SAR core, and a 16-word conversion-and-control buffer. The conversion-and-control buffer allows up to 16 independent analog-to-digital converter samples to be converted and stored without any CPU intervention.
43Development process: ADC Main featuresGreater than 200-ksps maximum conversion rateSample-and-hold with programmable sampling periods controlled by software or timers.Conversion initiation by software or timers.Software-selectable on-chip reference voltage generation (1.5 V, 2.0 V, or 2.5 V)Software-selectable internal or external referenceUp to 12 individually configurable external input channels
44Development process: ADC Main featuresConversion channels for internal temperature sensor, AVCC, and external referencesIndependent channel-selectable reference sources for both positive and negative referencesSelectable conversion clock sourceSingle-channel, repeat-single-channel, sequence (autoscan), and repeat-sequence conversion modesInterrupt vector register for fast decoding of 18 ADC interrupts16 conversion-result storage registers
45Development process: ADC Used ADC registersADC12CTL0: For setting a sampling time and turning the ADC module onADC12CTL1: For choosing an internal sampling timer, setting continuous/single sampling mode and choosing a conversion memory registerADC12MCTLx: Assigning a memory register conversion input channelADC12IE: Enabling interrupts corresponding “memory loaded” flagADC12IV: Interrupt vector events
46Development process: ADC ADC decoding formulaVin – Analog inputVr+ - Positive reference voltageVr- - Negative reference voltage
47Development process: Timers MSP430F5529 features 4 16bit TimersTimer A0 with 5 Capture/Compare registersTimer A1 with 3 Capture/Compare registersTimer A2 with 3 Capture/Compare registersTimer B0 with 7 Capture/Compare registers
48Development process: Timers 16-bit timer/counter with up to seven capture/compare registers. Timer can support multiple capture/compares, PWM outputs, and interval timing. Timer also has extensive interrupt capabilities. Interrupts may be generated from the counter on overflow conditions and from each of the capture/compare registers.
50Development process: Timer We intend to use the timer for a sampling interval, as well as PWM generator. Timers code development hasn’t started yet.
51Gantt E X A M S task name duration 26/3 2/4 9/4 16/4 23/4 30/4 7/5 14/521/528/54/611/618/625/6EXAMS30/76/813/820/8Reading materials 1 week XX Experimenting with MSP430F5529 Characterization C code writing:10 weeksUSB Interface3 weeksADC modes library4 weeksDAQ’s modes – MSP side2 weeksHost PC LabView GUI developmentFine tuningMid presentation1 weeksVerification and Debugging Final report7 weeksFinal presentation