PIC Microcontroller Data Acquisition System
#1

[attachment=13456]
Abstract
A data acquisition system was developed as a final project for the microcontroller design course at UW-Platteville. This system was developed to monitor power supplies and aid as a development tool for the design of a 200 W switch-mode power supply. A PIC microcontroller from Microchip was used as the heart of the data collection system. Internal analog to digital converters acquired data from an analog interface. The analog subsystem gathered data from temperature, voltage, and current sensors. Data was recorded through HyperTerminal in Windows. Once the data was gathered MS Excel was used to convert, scale, and plot the data.
Introduction
Measurement of the three basic quantities: voltage, temperature, and current can provide enough information to allow for debugging of almost any electrical circuit. During the development of a switch-mode power supply it was determined that some sort of data logging was necessary to protect the supply and determine if the supply was operating properly. Out of this need a data acquisition system was developed. The data acquisition system measures one channel of voltage from 0 to 20 volts, one channel of current from –50 to +50 amps, and two channels of temperature (one ambient and one load). This amount of data is enough to determine supply efficiency and temperature rise. With additional channels or faster sampling rates it would be possible to measure and calculate inrush current, supply stability, and transient response.
Implementation options
Two options were initially considered to implement the data logger. First, adding an outboard analog to digital converter (ADC) to the 8052 board used for development in class was considered. This approach had the advantage of allowing me to use a known good development system, software toolset, and the ability to get support from teachers and other students. Unfortunately, I had a difficult time finding multi-channel ADC converters featuring parallel interfaces to 8-bit busses that could resolve more than 8 bits. Most modern ADCs found used a serial interface. This was a problem on the 8052 board as the serial port was tied up for communication to the PC. Also fully developing a software-based serial protocol on a relatively slow processor like the 8052 could be difficult. Figure 1 shows the proposed block diagram for the 8052 based data acquisition system.
Figure 1, data acquisition system using 8052 board
The second option considered the use of an altogether different processor, the Microchip PIC controller. PICs are self-contained microcontrollers often including clock, I/O, and a host of peripherals on-chip. The great advantage seen by adopting the PIC was a chip with onboard analog to digital converters was available in a small 14-pin DIP package. In addition a serial port, and multiple timer/counters were available. A low-cost ($35) development kit is available from Microchip to try out any of the 14-pin series of micrcontrollers. Additionally, for the intended application a low-power small form factor device was a plus. Essentially all the PIC needs to create the system is the analog interface and a voltage regulator. Just the 8052 board requires 2 to 3 times the space of the board designed for the PIC controller and analog board. The downside of this approach hinged around learning a new assembly language for the PIC microcontroller and learning a new development environment and device programmer. Figure 2 shows the block diagram for the PIC data acquisition system.
Figure 2, PIC processor based data acquisition system
PIC selection and setup
There are literally hundreds of PIC microcontrollers to pick from. The programmer I had already purchased narrowed this selection down to 8 or 14 pin devices. At minimum 4 ADC channels, a UART, and one counter timer were needed. The first device found to meet these specifications was the PIC16F688. The ‘688 contains 8 channels of 10-bit AD converters, an enhanced UART, two timer counters, analog input comparison modules, an internal 32kHz to 8MHz clock, and flash program memory.
In order to use the PIC, settings for all the internal registers needed to be determined or calculated via the datasheet. The internal oscillator was used and set to 4MHz. Next, the serial port was configured. The enhanced UART (EUSART) has an internal baud rate generator (no external timer is needed). The EUSART was setup to communicate at 9600 bps, 1 stop bit, 8 data bits, and no parity. This seemed to be a common serial data rate that was easily achieved with little error in bit-rate on the PIC (about 0.16%). The commonly used baud rates were all available in tables in the ‘688 datasheet. After the serial port was configured the analog to digital converter was set-up. A conversion time of 4.0us as dictated by the datasheet was selected. Then, registers were set up to use the positive supply as the ADC reference voltage along with selecting the location of the most significant bit of the result. Finally, a timer was set up to control the rate of data sampling. The timer values were set to allow for maximum delay that turned out to be around ¾ of a second. The timer overflow bit was checked via polling. This approach was used because exact time intervals were not needed and quick response was not necessary.
Microchip provides an integrated development environment (IDE) called MPLAB for coding, compiling, setting up, and controlling programmers for the PIC series of microcontrollers. Included in the IDE is a debugger and compiler. The debugger worked well until additional peripherals were initialized and used which then caused the debugger to crash the IDE. Thus, all further testing needed to be conducted on actual hardware. A simple USB powered programmer interfaced to the IDE and reprogrammed the flash program memory in PIC controllers.
Microcontroller Firmware
After configuration of peripherals the microcontroller firmware consisted of a simple loop that acquired samples, converted them to a format acceptable to HyperTerminal, and echoed them to the serial port. Code is attached to the end of this document in listing 1. Peripherals were first initialized as described in the previous section. Following this a timer set to approximately one second would overflow triggering a capture event. The capture event consists of setting ADC registers, then waiting for the conversion to be completed. These events are repeated four times to cover all the input channels. The results are then converted to a three digit octal number via shifts and bit masks. Only 8 bits of the 10-bit result are converted to octal, as it appeared the lower value bits only added noise to the acquired signal. Finally, the converted values were output on the serial port to HyperTerminal in ASCII format delimited with commas. Figure 3 shows the block diagram for the microcontroller firmware.
Figure 3, A block diagram of the PIC’s firmware
Hardware
The high integration of the PIC controller leads to a very simple hardware solution. On the digital side the PIC controller is connected to a MAX232, RS-232 to logic-level converter. A 5 V power supply and some supply decoupling capacitors round out the digital section of the hardware. Figure 4 shows the implementation of the digital board that was constructed on the PICKit-1 development board.
Figure 4, the digital section of the data acquisition system
Highly integrated sensors reduced the difficulty of implementing an analog interface board. The LM35 temperature sensor features a conditioned output with a 10mV/C output slope. It was decided to use the LM35’s output directly, without amplification, with slightly reduced resolution. A hall-effect current sensor the ASC750SCA-050 made by Allegro was chosen as an easy integrated solution for current sensing. The current sensor is capable of resolving –50 to +50 A and outputs a 0 to 5 V signal corresponding to the current through the device. In the original application it was expected to see load currents up to 30 A. However, when demonstrating the device it was not possible to find power supplies capable of supplying more than 2.5A, thus the captured waveforms appear very noisy due to the small currents measured. Figure 5 shows the schematic of the analog board.
Reply
#2

[attachment=15574]
This is actually a temperature logging System. Here 8 temperature sensors areconnected(4 shown in diagram for simplicity). values of all the sensors are sentserially by AT89C51 to pc. Software "DAQ System " takes these valuesand show them on its front panel, and also logs them to the data base "daq.mdb".we can set some parameters like set point , low limit ,and high limit . whentemperature of some sensor increases beyond set point ,the heater connected tocontroller (specific for that sensor) will be turned OFF( ON in opposite case ).Highlimit and low limits are for alarm. when temperature goes above high limit orbelow low limit the alarm will be turned on.
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: pic microcontroller development board, pic data acquisition system based projects pdf, pic microcontroller projects, ppt on pic microcontroller pic 16f73, pic data acquisition projects, datasheet at89c2951, pic microcontroller university questions,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  ROBUST DWT-SVD DOMAIN IMAGE WATERMARKING: EMBEDDING DATA IN ALL FREQUENCIES computer science crazy 2 5,223 19-06-2018, 06:10 PM
Last Post: KavyaIyengar
  Remote Controlling of Greenhouse Agriculture System by Microcontroller and Bluetooth smart paper boy 2 3,024 12-01-2018, 12:40 PM
Last Post: dhanabhagya
  DEVELOPMENT OF SOFTWARE & HARDWARE FOR MICROCONTROLLER BASED SMART NOTICE BOARD (US Electrical Fan 3 3,872 09-08-2016, 11:27 AM
Last Post: jaseela123d
  MICROCONTROLLER BASED DAM GATE CONTROL SYSTEM full report seminar class 13 17,304 19-06-2016, 07:53 PM
Last Post: Saianjana
  GSM based SCADA implementation using Microcontroller project report tiger 19 27,777 31-05-2016, 12:13 PM
Last Post: dhanabhagya
  Microcontroller Based Cellular Voting Machine seminar projects crazy 5 6,633 10-05-2016, 04:19 PM
Last Post: pankaj raj
  MICROCONTROLLER BASED AUTOMATIC RAILWAY GATE CONTROL full report project topics 49 58,014 10-09-2015, 03:18 PM
Last Post: seminar report asees
  microcontroller project ideas list and reports computer science crazy 2 3,330 08-07-2015, 02:27 PM
Last Post: seminar report asees
  microcontroller based projects electronics seminars 20 46,940 01-08-2014, 04:41 AM
Last Post: Guest
  PIC BASED INTELLIGENT TRACKING SYSTEM USING SOLAR POWER project report helper 3 4,139 27-03-2014, 05:35 AM
Last Post: Guest

Forum Jump: