UNIVERSITY OF NAIROBI Department of Electrical Electronic Engineering
UNIVERSITY OF NAIROBI Department of Electrical & Electronic Engineering n A FOUR CHANNEL-D MICROCONTROLLER BASED DATA ACQUISITION SYSTEM WITH A SERIAL INTERFACE TO THE PC Project No. 061 LENNOX ABONG’O OGOLA F 17/2040/2004 Supervisor: Mr. Collins Ombura Examiner: Dr. H. A. Ouma
OBJECTIVES • To design and implement a four channel –D microcontroller based data acquisition system with a serial interface to the PC • Employ a graphical user interface to display the data transmitted to the PC
INTRODUCTION n The function of the data acquisition system (DAS) is to convert signals from the real world analogue domain to digital domain for processing by the digital electronic systems. n The fundamental operation of DAS is quantization, whose result is transmitted to the PC through serial interface.
DATA ACQUISITION SYSTEM
SENSORS Ø These are measuring instruments used to read values within the range of their measurements. Ø Process variable sensors include: ü temperature sensors-LM 35 DZ ü flow rate sensors -vortex shedding ü pressure sensors-strain gauge diaphragm ü level sensors-displacement float
INTERFACING SENSORS TO AVR MICROCONTROLLER n The sensor has the primary element and the signal conditioner, n The output of the primary element is a measure of the variable it is sensing, but it is not usually in a suitable form for transmission signal. n Hence a conditioner is required to convert it into a suitable value. The standard transmission signals are 4 -20 m. A electric current or 0 -5 v.
ADVANTAGES OF THE SYSTEM n The microcontroller design technique employed reduces the external support circuitry thus reduces much work involved in circuit design n The addition of more channels to the system is done within the program which makes the system flexible to design modifications n Higher accuracy due to accurate sensors used and digital data processing.
DESIGN AND IMPLEMENTATION Specifications of design • Sensor: • LM 35 DZ temperature sensors • AVR Microcontroller: • Atmega 168 20 PU • Line Driver: MAX 232 N. • DB 9/F Connector
SCHEMATIC DIAGRAM
THE ADC CONVERSION FLOW CHART
ADC CONVERSION n This forms the core of the system, the flow chart shows the routine to start A/D conversion n It preloads the counter with 64 -256 and starts counting up at frequency XTAL/8 n The conversion complete flag is cleared and the result is sent to the ADC data register ready for transmission.
PROGRAMMING ATMEGA 168
RESULTS CHANNEL_1 TEMPERATURE READINGS
CHANNEL_2 TEMPERATURE READINGS
CHANNEL_4 TEMPERATURE READINGS
CHANNEL_3 TEMPERATURE READINGS
ANALYSIS OF RESULTS n The windows Hyper. Terminal was used to display the data transmitted to the PC since this would make the user comfortably user the system without need of installing VB. NET n The temperature measured by the LM 35 DZ sensor were of averaged Tav=sum of the readings/number of the readings this was found to be 27 degrees centigrade. The result compared well with the room temperature of the day.
CONCLUSION The results give by the system determined the measurement of the physical phenomenatemperature. It also enhanced accurate measurements with a high response to any change in the parameters of the phenomena.
RECOMMENDATION n Recommendation: The addition of more sensors to ensure that all the ADC channels are used, n Duplex communication between the microcontroller and the PC to enhance execution of commands from the PC as well based on the data it receives.
THANK YOU!
- Slides: 20