Top Banner

of 27

Data Acquisition System

Mar 09, 2016

Download

Documents

Abhinav Agarwal

data acquisition presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

Data Acquisition System

Data Acquisition System ABHINAV AGARWAL Adm. No.- 2013JE0145 5th Sem Btech- Electronics and Instrumentation EngineeringWhat is Data Acquisition?Data acquisitionis the process of sampling signals that measure real world physical conditions and converting the resulting samples into digital numeric values that can be manipulated by a computer.The components of data acquisition systems include:Asensor, that converts a physical property into a corresponding electrical signal (e.g.,strain gauge, thermistor).

Signal conditioning circuitry to convert sensor signals into a form that can be converted to digital values.

Analog-to-digital converters, which convert conditioned sensor signals to digital values.

A computer with appropriate application software to process, analyse and log data to the disc, print and may also provide a graphical display of the data.

Block Diagram Physical Variables: Noisy Electrical Filtered and Digitized Binary Code Temperature, Signal Amplified Signal Signal Pressure, Flow etc.

Work Done on the projectAim:- Work done on the project is aimed at taking analog voltage signals from sensors and display the voltage value on computer screen and also display the crossing of limit set, by any sensor by glowing a LED. Components used in this project:

Arduino UNO boardBatteries(9V)10K PotentiometerBread boardUSB cableArduino UNO Board

What is Arduino UNO?The Uno is a microcontroller board based on theATmega328P.It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack and a reset button.The Uno can be programmed with theArduino Software(IDE).The ATmega328 on the Uno comes preprogrammed with abootloaderthat allows you to upload new code to it without the use of an external hardware programmer.

It has a 10-bit successive approximation type ADC.

Atmega 328 Pin Diagram

The Uno board can be powered via the USB connection or with an external power supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the GND and Vin pin headers of the POWER connector.

The power pins are as follows:Vin- The input voltage to the Uno board when it's using an external power source. We can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.

5V- This pin outputs a regulated 5V from the regulator on the board.

The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V).

3.3V- A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.

GND- Ground pins.

Serial: 0 (RX) and 1 (TX)- Used to receive (RX) and transmit (TX) serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-Serial chip.

I/O pins of Arduino UNOThe Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts.

The UNO has 14 digital I/O pins labeled 0 to 13.

Communication by Arduino UNOThe ATmega328 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial communication over USB and appears as a virtual com port to software on the computer.The Arduino Software (IDE) includes a serial monitor which allows simple textual data to be sent to and from the board.Technical SpecsMicrocontrollerATmega328POperating Voltage5VInput Voltage (recommended)7-12VInput Voltage (limit)6-20VDigital I/O Pins14 (of which 6 provide PWM output)PWM Digital I/O Pins6Analog Input Pins6DC Current per I/O Pin20 mADC Current for 3.3V Pin50 mAFlash Memory32 KB (ATmega328P)of which 0.5 KB used by bootloaderSRAM2 KB (ATmega328P)EEPROM1 KB (ATmega328P)Clock Speed16 MHzProgram done on Arduino Software (IDE) The Program written on Arduino Software (IDE) aims at taking analog voltage output from sensors and displaying it on the serial monitor. Limit of each analog voltage from different sensors is set randomly such that if the voltage values exceeds that limit, corresponding LEDs will glow to indicate that the voltage output from the sensor is exceeding the limit set.

This enables us to keep an eye on the physical variables to be measured that they are not going beyond the safety limits set by an industry.Circuit Connections:-5 Analog inputs are given to 5 analog input pins of Arduino UNO board by batteries. Potentiometers are used to vary the voltage input given to the board.5 digital output pins are then connected to 5 LEDs on breadboard.Program Code#define limit1 2.45#define limit2 3.21#define limit3 1.72#define limit4 4.98#define limit5 5.0

void setup() {Serial.begin(9600);pinMode(A1,INPUT);pinMode(A2,INPUT);pinMode(A3,INPUT);pinMode(A4,INPUT);pinMode(A5,INPUT);pinMode(2,OUTPUT);

pinMode(3,OUTPUT);pinMode(4,OUTPUT);pinMode(5,OUTPUT);pinMode(6,OUTPUT);}

void loop() {float voltage1,voltage2,voltage3,voltage4,voltage5;

voltage1= analogRead(A1); voltage2= analogRead(A2); voltage3= analogRead(A3); voltage4= analogRead(A4); voltage5= analogRead(A5); voltage1 = (voltage1*5)/1023;

voltage2 = (voltage2*5)/1023; voltage3 = (voltage3*5)/1023; voltage4 = (voltage4*5)/1023;voltage5 = (voltage5*5)/1023;

Serial.print("Sensor1 = "); Serial.print(voltage1); Serial.print("\n"); Serial.print("Sensor2 = "); Serial.print(voltage2); Serial.print("\n");

Serial.print("Sensor3 = "); Serial.print(voltage3); Serial.print("\n"); Serial.print("Sensor4 = ");

Serial.print(voltage4); Serial.print("\n"); Serial.print("Sensor5 = "); Serial.print(voltage5); Serial.print("\n"); if(voltage1 > limit1) { digitalWrite(2,HIGH) ; } else { digitalWrite(2,LOW); }

if(voltage2 > limit2) { digitalWrite(3,HIGH) ; } else { digitalWrite(3,LOW); } if(voltage3 > limit3) { digitalWrite(4,HIGH) ; } else { digitalWrite(4,LOW); }

if(voltage4 > limit4) { digitalWrite(5,HIGH) ; } else { digitalWrite(5,LOW); } if(voltage5 > limit5) { digitalWrite(6,HIGH) ; } else { digitalWrite(6,LOW); } delay(1000);}

Serial monitor display