1 / 52

Low Cost DAQ

Low Cost DAQ. What is DAQ.

alaire
Download Presentation

Low Cost DAQ

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Low Cost DAQ

  2. What is DAQ Data 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.

  3. DAQ’s Block Diagram

  4. DAQ Device’s Components Signal Conditioning Signals 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.

  5. DAQ Device’s Components Analog-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.

  6. DAQ Device’s Components Computer Bus DAQ 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 802.11 Wi-Fi for wireless communication. There are many types of buses, and each offers different advantages for different types of applications.

  7. Market Background • Nowadays, 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

  8. Project Motivation • Ultra low cost MSP430™ series Microcontroller – starting from 2$ • Ultra low power consumption ~20uW • Integrated USB2 controller with PHY • Small dimension – can be applied on an USB dongle

  9. Principle 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.

  10. Introducing the MSP as the heart of the DAQ • 16-Bit RISC Architecture, 8+2KB SRAM, up to 25-MHz System Clock • An ADC with a 12 bit A/D conversion for collecting the analog data • Up to 43 GPIO’s for custom use • 4 16-bit timers for setting an analog sample rate, and generating PWM signal. • Full speed USB with integrated PHY

  11. Introducing the MSP as the heart of the DAQ

  12. Things to do • Check what an USB class device is the best for our application • Implement an USB client side communication using a TI MSP430 USB API • Implement the DAQ’s functions and operation modes

  13. Things to do • Implement a Windows driver for communicating with a MSP430F5529 • Using LabView, implement a GUI for data acquisition

  14. Development process: Tools MSP430F5529 USB Experimenter’s Board

  15. Development process: Tools MSP430F5529 USB EB Features • USB Based Development Platform • 5-pad capacitive touch strip • microSD Card Slot • 102x64 grayscale, dot-matrix LCD with backlight

  16. Development process: Tools MSP430F5529 USB EB Features • 4 push buttons • 3 GP LEDs, 5 LEDs for capacitive touch buttons, and 1 LED Power indicator. • Scroll wheel/Potentiometer • Integrated eZ-FET for Spy-Bi-Wire (2-wire JTAG) programming and debugging

  17. Development process: Tools MSP430F5529 USB EB Features • JTAG header for full 4-wire JTAG programming and debugging • Easy access to F5529 I/O pins by 100mil header

  18. Development process: Tools TI Code Composer Studio Integrated Development Environment v5 • CCS 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.

  19. Development 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

  20. Development 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.

  21. Development 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

  22. Development 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

  23. Development 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.

  24. Development 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 P5.1 - ADC reference voltage inputs. • PU – Communication with PC via USB protocol. • P5.2-P5.5 – Inputs for 2 crystal oscillators.

  25. Development process: Digital I/O For example Port 6 that can be used as GPIO and as Analog signal inputs for ADC:

  26. Development 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

  27. Development process: USB MSP430F5529 Block diagram

  28. Development process: USB MSP430 USB API stack supported USB classes • HID • MSC • CDC • PHDC

  29. Development process: USB HID • Human interface device class • Pros: there is no need for a driver for a Host machine. Great advantage for limited access workstations • Contras: 64KB/s

  30. Development process: USB MSC • Mass storage Device Class • Designed for storage operations • Supports only bulk transfer

  31. Development process: USB PHDC • Personal Healthcare Device Class • Certified for use with several Personal Healthcare devices such as blood pleasure monitor, thermometer, weight scale and etc. • Pros: Easy development • Contras: For PH devices only, consumes large amount of RAM

  32. Development process: USB CDC • Communication device class • For use with various communication devices. Simple protocol • Pros: Widely used virtual com class. High communication speed. Simple host application development • Contras: At the first use on the host workstation, an appropriate driver installation is needed. Disadvantage for a limited access workstations

  33. Development process: USB DAQ’s USB Class • For 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

  34. Development process: USB DAQ’s USB Class • Relying 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.

  35. Development process: USB DAQ’s USB Class • USB 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…

  36. Development process: USB MSP430 USB communication code • USB 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…

  37. Development process: USB USB Input handling • USB 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.

  38. Development process: USB USB output • After 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

  39. Development 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.

  40. Development process: ADC MSP430F5529 ADC Block diagram

  41. Development 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.

  42. Development process: ADC Main features • Greater than 200-ksps maximum conversion rate • Sample-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 reference • Up to 12 individually configurable external input channels

  43. Development process: ADC Main features • Conversion channels for internal temperature sensor, AVCC, and external references • Independent channel-selectable reference sources for both positive and negative references • Selectable conversion clock source • Single-channel, repeat-single-channel, sequence (autoscan), and repeat-sequence conversion modes • Interrupt vector register for fast decoding of 18 ADC interrupts • 16 conversion-result storage registers

  44. Development process: ADC Used ADC registers • ADC12CTL0: For setting a sampling time and turning the ADC module on • ADC12CTL1: For choosing an internal sampling timer, setting continuous/single sampling mode and choosing a conversion memory register • ADC12MCTLx: Assigning a memory register conversion input channel • ADC12IE: Enabling interrupts corresponding “memory loaded” flag • ADC12IV: Interrupt vector events

  45. Development process: ADC ADC decoding formula • Vin – Analog input • Vr+ - Positive reference voltage • Vr-- Negative reference voltage

  46. Development process: Timers MSP430F5529 features 4 16bit Timers • Timer A0 with 5 Capture/Compare registers • Timer A1 with 3 Capture/Compare registers • Timer A2 with 3Capture/Compare registers • Timer B0 with 7 Capture/Compare registers

  47. Development 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.

  48. Development process: Timer

  49. Development process: Timer We intend to use the timer for a sampling interval, as well as PWM generator. Timers code development hasn’t started yet.

More Related