- Information
- AI Chat
IARE IOT LAB Manual PRACTICAL PDF FOR BTECH CSE 7TH SEMESTER APEX UNIVERSITY
Database management system (BCO010C)
JECRC University
Related Studylists
IotPreview text
1 | P a g e
INTERNET OF THINGS LABORATORY
LAB MANUAL
Year : 2019-
Course Code : BPSB
Regulations : R
Branch : EEE (EPS)
Class / Semester : M. Tech – I Sem
Prepared by
B. Navothna
Assistant Professor
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING
INSTITUTE OF AERONAUTICAL ENGINEERING
(AUTONOMOUS)
Dundigal – 500 043, Hyderabad
INSTITUTE OF AERONAUTICALENGINEERING (Autonomous) Dundigal, Hyderabad – 500043
Department of Electrical and Electronics Engineering
PROGRAMME EDUCATIONAL OBJECTIVES (PEOs)
The students of M Electrical Power Systems are prepared to:
PEOI: Impart engineering knowledge in specific and re-equip with latest technologies to analyze, synthesize the problems in power system and multidisciplinary sectors.
PEOII: Design, develop innovative products and services in the field of electrical power systems with the latest technology and toolset.
PEOIII: Inculcate research attitude and life-long learning for a successful career.
PEOIV: Attain intellectual leadership skills to cater the needs of power industry, academia, society and environment.
PROGRAMME OUTCOMES (POs)
Upon completion of M Electrical Power Systems, the students will be able to:
PO1: Identify, formulate and solve power system related problems using advanced level computing techniques.
PO2: Explore ideas to carry out research / investigation independently to solve practical problems through continuing education.
PO3: Demonstrate knowledge and execute projects on contemporary issues in multidisciplinary environment.
PO4: Ability to write and present a substantial technical report / document.
PO5: Inculcate ethics, professionalism, multidisciplinary approach, entrepreneurial thinking and effective communication skills.
PO6: Function effectively as an individual or a leader in a team to propagate ideas and promote teamwork.
PO 7: Develop confidence for self-study and to engage in lifelong learning.
ATTAINMENT OF PROGRAM OUTCOMES
2 Design of digital ac voltmeter and ammeter PO1, PO
4 Design of digital frequency meter PO1, PO
- 1 Design of digital dc voltmeter and ammeter PO1, PO Exp. No Experiment Program Outcomes Attained
- 2 Design of digital ac voltmeter and ammeter PO1, PO
- 3 Direction control of three phase induction motor PO1, PO2, PO
- 4 Design of digital frequency meter PO1, PO
- 5 Measurement of power and energy PO1, PO2, PO
- 6 Measurement of phase shift and power factor PO1, PO2, PO
- 7 Implementation of over current relay PO1, PO2, PO3, PO
- 8 Over/under voltage protection of home appliances PO2, PO
- 9 Protection of three phase induction motor PO1, PO2, PO
- 10 Traffic signal control PO2, PO
- 11 Railway gate control by stepper motors PO2, PO
- 12 Direction and Speed control of DC motor PO2, PO3, PO
INTERNET OF THINGS LABORATORY
OBJECTIVE
The main objective IOT applications in Electrical engineering laboratory is to know the different real time
sensors used to measure the different electrical parameters and to control the different electrical devices
from anywhere through IOT.
OUTCOMES
Upon the completion of INTERNET OF THINGS LABORATORY , the student will be able to attain the followings:
- List out the different IOT applications and importance of IOT in present scenario.
- List the application of Arduino and Node MCU
- Know the different sensors available to measure the current and voltage
- Design the digital voltmeter and ammeter for both AC and DC circuits
- Design a digital frequency meter to measure the frequency in an AC circuit.
- Measure the power and energy consumption in a home using Arduino
- Measure the power factor and phase angle in an AC circuit using Arduino/Node MCU.
- Design a system to control the traffic signals through IOT
- Develop a system to control the direction of three phase induction motor
- Model a system to control the railway gate using stepper motors.
- Know the functioning of relay module and a 3-phase contactor.
- Design a system to protect the three phase induction motor from abnormal fault conditions
- Design a system to control the direction and speed of DC motor
- Design a relay to protect the home appliances from over currents, under voltages and over voltages.
1 ARDUINO CODE:
A) Code for DC Voltmeter: void setup() { Serial(9600); } void loop() { int volt = analogRead(A0);// read the input double voltage = map(volt,0,1023, 0, 2500) + offset;// map 0-1023 to 0-2500 and add correction offset voltage /=100;// divide by 100 to get the decimal values Serial("Voltage: "); Serial(voltage);//print the voltge Serial("V"); delay(500); }
B) Code for DC Voltmeter:
void setup() { Serial(9600); } void loop() { float average = 0; for(int i = 0; i< 1000; i++) { average = average + (.0264 * analogRead(A0) -13) / 1000; //5A mode, if 20A or 30A mode, need to modify this formula to //(.19 * analogRead(A0) -25) for 20A mode and //(.044 * analogRead(A0) -3) for 30A mode delay(1); } Serial(average); }
1 PROCEDURE
A) Procedure for DC Voltmeter:
- Make the connection as per the electrical circuit diagram
- Open the Arduino IDE in computer and write the program.
- Compile the program for any errors and upload it to the Arduino.
- Observe the voltage on LCD display.
- If a potentiometer is used between the battery and sensor to change the voltage value.
- Observe the changed voltage is updated on LCD display.
B) Procedure for DC Ammeter:
- Make the connection as per the electrical circuit diagram
- Open the Arduino IDE in computer and write the program.
- Compile the program for any errors and upload it to the Arduino.
- Observe the current on LCD display.
- If the load is increased by adding a series resistor to LED then current increases and is updated in LCD display.
1 PRE LAB VIVA QUESTIONS
- Define voltage.
- Define ohms law.
- Define KVL and KCL
- What is a current controlled device?
- Define Resistance.
1. 7 POST LAB VIVA QUESTIONS
- What is the sensor used to measure the voltage?
- What is meant by ACS?
- What is electrical circuit in ACS712 sensor?
- How many lines can be printed on LCD display?
- How many letters will be printed on LCD display?
2 Arduino Code
A) Code for AC Voltmeter:
int m;// initialise variable m float n;//initialise variable n void setup() { pinMode(A0,INPUT); // set pin a0 as input pin Serial(9600);// begin serial communication between arduino and pc } void loop() { m=analogRead(A0);// read analog values from pin A0 across capacitor n=(m* .304177);// converts analog value(x) into input ac supply value Serial(" analaog input " ) ; // specify name to the corresponding value to be printed Serial(m) ; // print input analog value on serial monitor Serial(" ac voltage ") ; // specify name to the corresponding value to be printed Serial(n) ; // prints the ac value on Serial monitor Serial(); }
B) Code for AC Ammeter:
#define CURRENT_SENSOR A0 // Define Analog input pin that sensor is attached float amplitude_current; // Float amplitude current float effective_value; // Float effective current void setup() { Serial(9600); pins_init(); } void loop() { int sensor_max; sensor_max = getMaxValue(); Serial("sensor_max = "); Serial(sensor_max); //the VCC on the Arduino interface of the sensor is 5v amplitude_current=(float)(sensor_max-512)/10245/1851000000; // for 5A mode,you need to modify this with 20 A and 30A mode; effective_value=amplitude_current/1; //for minimum current=1/10245/1851000000/1.414=18(mA) //Only sinusoidal alternating current Serial("The amplitude of the current is(in mA)"); Serial(amplitude_current,1); //Only one number after the decimal point Serial("The effective value of the current is(in mA)"); Serial(effective_value,1); } void pins_init() { pinMode(CURRENT_SENSOR, INPUT); } /Function: Sample for 1000ms and get the maximum value from the S pin/
int getMaxValue() { int sensorValue; //value read from the sensor int sensorMax = 0; uint32_t start_time = millis(); while((millis()-start_time) < 1000) //sample for 1000ms { sensorValue = analogRead(CURRENT_SENSOR); if (sensorValue>sensorMax) { /record the maximum sensor value/ sensorMax = sensorValue; } } return sensorMax; }
2 PROCEDURE
A) Procedure for AC Voltmeter:
- Make the connection as per the electrical circuit diagram
- Open the Arduino IDE in computer and write the program.
- Compile the program for any errors and upload it to the Arduino.
- Observe the voltage on LCD display.
- If a potentiometer is used between the battery and sensor to change the voltage value.
- Observe the changed voltage is updated on LCD display.
B) Procedure for AC Ammeter:
- Make the connection as per the electrical circuit diagram
- Open the Arduino IDE in computer and write the program.
- Compile the program for any errors and upload it to the Arduino.
- Observe the current on LCD display.
- If the load is increased by adding a series resistor to LED then current increases and is updated in LCD display.
2 RESULT:
2 PRE LAB VIVA QUESTIONS:
- What is the principle of transformer?
- Does Arduino take the analog values directly? Why?
- What is the processor used in Arduino?
- What is the name of the cable used to upload the Arduino code?
- What is meant by LCD? Differentiate LCD from LED display.
2 POST LAB VIVA QUESTIONS:
- What is the need of sensor?
- What is the function of center tapped transformer in this experiment?
- What is the difference between an AC Digital voltmeter and DC digital voltmeter?
- What is the term “anlogRead” in the code?
- How to control the brightness of LCD display?
- Academy of Media Arts Cologne */
#include "avr/pgmspace" #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) int ledPin = 13; // LED pin 7 int testPin = 7; int t2Pin = 6; byte bb; double dfreq; // const double refclk=31372; // =16MHz / 510 const double refclk=31376; // measured // variables used inside interrupt service declared as voilatile volatile byte icnt; // var inside interrupt volatile byte icnt1; // var inside interrupt volatile byte c4ms; // counter incremented all 4ms volatile unsigned long phaccu; // pahse accumulator volatile unsigned long tword_m; // dds tuning word m void setup() { pinMode(ledPin, OUTPUT); // sets the digital pin as output Serial(115200); // connect to the serial port Serial("DDS Test"); pinMode(6, OUTPUT); // sets the digital pin as output pinMode(7, OUTPUT); // sets the digital pin as output pinMode(11, OUTPUT); // pin11= PWM output / frequency output Setup_timer2(); // disable interrupts to avoid timing distortion cbi (TIMSK0,TOIE0); // disable Timer0 !!! delay() is now not available sbi (TIMSK2,TOIE2); // enable Timer2 Interrupt dfreq=1000; // initial output frequency = 1000 Hz tword_m=pow(2,32)*dfreq/refclk; // calulate DDS new tuning word } void loop() { while(1) { if (c4ms > 250) { // timer / wait fou a full second c4ms=0; dfreq=analogRead(0); // read Poti on analog pin 0 to adjust output frequency from 0. Hz cbi (TIMSK2,TOIE2); // disble Timer2 Interrupt tword_m=pow(2,32)*dfreq/refclk; // calulate DDS new tuning word sbi (TIMSK2,TOIE2); // enable Timer2 Interrupt Serial(dfreq); Serial(" "); Serial(tword_m); } sbi(PORTD,6); // Test / set PORTD,7 high to observe timing with a scope cbi(PORTD,6); // Test /reset PORTD,7 high to observe timing with a scope } } // set prscaler to 1, PWM mode to phase correct PWM, 16000000/510 = 31372 Hz clock void Setup_timer2() { // Timer2 Clock Prescalerto : 1 sbi (TCCR2B, CS20); cbi (TCCR2B, CS21); cbi (TCCR2B, CS22); // Timer2 PWM Mode set to Phase Correct PWM
cbi (TCCR2A, COM2A0); // clear Compare Match sbi (TCCR2A, COM2A1); sbi (TCCR2A, WGM20); // Mode 1 / Phase Correct PWM cbi (TCCR2A, WGM21); cbi (TCCR2B, WGM22); } // Timer2 Interrupt Service at 31372,550 KHz = 32uSec // this is the timebase REFCLOCK for the DDS generator // FOUT = (M (REFCLK)) / (2 exp 32) // runtime : 8 microseconds ( inclusive push and pop) ISR(TIMER2_OVF_vect) { sbi(PORTD,7); // Test / set PORTD,7 high to observe timing with a oscope phaccu=phaccu+tword_m; // soft DDS, phase accu with 32 bits icnt=phaccu>>24; // use upper 8 bits for phase accu as frequency information // read value fron ROM sine table and send to PWM DAC OCR2A=pgm_read_byte_near(sine256 + icnt); if(icnt1++ == 125) { // increment variable c4ms all 4 milliseconds c4ms++; icnt1=0; } cbi(PORTD,7); // reset PORTD, }
3 PROCEDURE
- Make the connection as per the electrical circuit diagram
- Open the Arduino IDE in computer and write the program.
- Compile the program for any errors and upload it to the Arduino.
- Observe the direction of motor on LCD display.
- The status of the motor whether is rotating in forward or reverse direction an also be displayed on a web link through IOT.
3 RESULT:
3 PRE LAB VIVA QUESTIONS:
- What is a 3 pole contactor?
- What is the function of relay module?
- How the direction of three phase induction motor can be reversed?
- What is the principle of induction motor?
- What are the types of induction motors?
3 POST LAB VIVA QUESTIONS:
- Why node MCU in this experiment? Why not Arduino?
- What is the difference between node MCU and Arduino?
- Which IDE is used for writing the node MCU program?
- Can we connect the phase voltage directly to node MCU? Why?
- Which induction motor is having high starting torque?
float frequency; LiquidCrystallcd(0, 1, 3, 4, 5, 6); void setup() { pinMode(input,INPUT); lcd(16, 2); } void loop() { lcd(); lcd(0,0); lcd("Frequency Meter"); high_time=pulseIn(input,HIGH); low_time=pulseIn(input,LOW); time_period=high_time+low_time; time_period=time_period/1000; frequency=1000/time_period; lcd(0,1); lcd(frequency); lcd(" Hz"); delay(500); }
4 PROCEDURE
- Make the connection as per the electrical circuit diagram
- Open the Arduino IDE in computer and write the program.
- Compile the program for any errors and upload it to the Arduino.
- Observe the frequency on LCD display.
4 RESULT:
4 PRE LAB VIVA QUESTIONS:
- Define frequency.
- What is time period?
- What is the frequency in DC circuits?
- What is the frequency of India and USA?
- How many cycles are there in 50Hz supply?
4 POST LAB VIVA QUESTIONS:
- What is the type of Arduino used in this experiment?
- What is the microcontroller used in Arduino uno?
- What is an opto-coupler?
- What is the function of diode in this experiment?
- What is the power rating of resistor used in this experiment?
EXPERIMENT – 5
MEASUREMENT OF POWER AND ENERGY
5 AIM:
To measure the power and energy in electrical circuit using Arduino and display the values in LCD display.
5 APPARATUS:
S No Name of the Equipment Quantity
1 Arduino Uno 1
2 16 x 2 LCD display 1
3 Diode (IN4007) 1
4 Resistor (47K/1W) 1
5 Opto-coupler 1
6 Computer with Arduino IDE software 1
7 jumper cables As required
5 ELECTRICAL CIRCUIT DIAGRAM:
Figure: 5 Circuit Diagram for measurement of power and energy.
5 ARDUINO CODE #include <LiquidCrystal> int currentPin = 1; double kilos = 0; int peakPower = 0; LiquidCrystallcd(8, 9, 4, 5, 6, 7); void setup() {
5 RESULT:
5 PRE LAB VIVA QUESTIONS:
Define power.
Define Energy?
What is apparent power?
What is reactive power?
Differentiate active, reactive powers. 5 POST LAB VIVA QUESTIONS:
What is the type of Arduino used in this experiment?
What is the microcontroller used in Arduino uno?
Can we measure the DC power with this experiment?
What are the units of energy?
How the time can be calculated for measuring energy in Arduino?
EXPERIMENT -
MEASUREMENT OF PHASE SHIFT AND POWER FACTOR
6 AIM:
To measure the phase shift and power factor in an electrical circuit for different loads using Arduino and display the value in LCD display.
6 APPARATUS:
S No Name of the equipment Quantity
1 Arduino Uno 1
2 16 x 2 LCD display 1
3 Voltage sensor 1
4 Current sensor 1
5 Opto-coupler (4N35) 2
6 Computer with Arduino IDE software 1
7 LM358 comparator 2
8 7845 XOR gate 1
9 Jumper cables As required
6 ELECTRICAL CIRCUIT DIAGRAM:
Figure: 6 Diagram for measurement of power and energy.
6 ARDUINO CODE
#include<LiquidCrystal> #include<math> float pw=0; float pf=0; float ph=0; const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; LiquidCrystallcd(rs, en, d4, d5, d6, d7); void setup()
IARE IOT LAB Manual PRACTICAL PDF FOR BTECH CSE 7TH SEMESTER APEX UNIVERSITY
Course: Database management system (BCO010C)
University: JECRC University
- Discover more from: