SlideShare a Scribd company logo
UNIT-2
Peripheral Interface
Prof. K. R. Rane
Electrical Department
K.K.W.I.E.E.R
Learning Outcomes-
➔ What is LED?
➔ Interfacing of LED with Arduino UNO Board
➔ Coding or Algorithm
➔ What is LCD?
➔ Interfacing of LCD with Arduino UNO Board
➔ Serial communication using Arduino IDE
➔ Concept of ADC in ATMEGA 328
➔ Interfacing of temperature sensor with Arduino board, LVDT, Strain
gauge
What is LED?
● A light-emitting diode (LED) is a semiconductor device that emits light when an
electric current flows through it.
● Features: Long lifespan, Low cost & size, high luminance, low power
consumption, Energy Efficiency.
Interfacing of ATMEGA 328 based Arduino board with LED
● LED cathode is connected to GND.
● GPIO pin no. 9 of board is connected
With LED anode through resistor
(It’s value is inversely proportional to
current & brightness of LED).
Program or Code:
void setup()
{
pinMode(9, OUTPUT); // initialize digital pin 9 as an output.
}
void loop() // the loop function runs over and over again forever
{
digitalWrite(9, HIGH ); // turn the LED ON by making the voltage
HIGH
delay(1000); // Wait for a second
digitalWrite(9, LOW); // turn the LED ON by making the voltage
LOW
delay(1000); // Wait for a second
}
To connect 3 LED’s with Arduino:
Code:
void setup()
{
pinMode (5, OUTPUT);
pinMode (6, OUTPUT);
pinMode (7, OUTPUT);
}
void loop()
{
digitalWrite (5, HIGH);
digitalWrite (6, HIGH);
digitalWrite (7, HIGH);
delay (5000);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
digitalWrite (7, LOW);
delay (5000);
}
What is LCD?
● LCD is a flat display technology, stands for "Liquid Crystal Display”.
● Used in computer monitors, instrument panels, cell phones, digital cameras, TVs,
laptops, tablets, and calculators.
● It is a thin display device that offers support for large resolutions and better picture
quality.
● 16×2 LCD display is shown below:
Interfacing of LCD with ATMEGA 328 based Arduino board:
Figure: Circuit diagram of connecting 16*2 LCD with Arduino board
Code or algorithm:
#include <LiquidCrystal.h> // initialize the library
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup()
{
lcd.begin(16, 2);
lcd.print("hello, world!");
}
void loop()
{
lcd.setCursor(0, 0);
lcd.print(“Hello,world!” );
serial.println (“Hello,world!”);
lcd.setCursor(0, 1);
lcd.print(“Hi….”);
serial.println (“Hi…”);
}
Example to blink the output on LCD:
#include <LiquidCrystal.h> // initialize the library
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup()
{
lcd.begin(16, 2);
}
void loop()
{
lcd.clear();
delay(1000);
lcd.setCursor(0, 0);
lcd.print(“Hello….! );
lcd.setCursor(0, 1);
lcd.print(“Hi….”);
delay(1000);
}
Serial communication using Arduino IDE:
● Arduino UNO pins 0 &1 are of UART used for serial communication.
● UART requires two pins for communication: Tx & Rx.
● Connection of Atmega328 on Arduino Uno board to PC:
Algorithm:
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println(“Hello!, Welcome to the Arduino world”);
delay(1000)
}
Concept of ADC in Atmega328 based arduino board:
ADCSRA – ADC Control and Status Register A:-
Bit 7 6 5 4 3 2 1 0
0x7A ADEN ADSC ADATE ADIF ADIE ADPS2 ADPS1 ADPS0
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
Initial Value 0 0 0 0 0 0 0 0
● Bit 7 – ADEN: ADC Enable: Writing this bit to one enables the ADC. By writing it to
zero, the ADC is turned off. Turning the ADC off while a conversion is in progress, will
terminate this conversion.
● Bit 6 – ADSC: ADC Start Conversion: In Single Conversion mode, write this bit to one
to start each conversion. In Free Running mode, write this bit to one that will take 25
ADC clock cycles instead of the normal 13 This first conversion performs initialization of
the ADC. ADSC will read as one as long as a conversion is in progress. When the
conversion is complete, it returns to zero.
● Bit 5 – ADATE: ADC Auto Trigger Enable: When this bit is written to one, Auto
Triggering of the ADC is enabled. The ADC will start a conversion on a positive edge of
the selected trigger signal. The trigger source is selected by setting the ADC Trigger Select
bits, ADTS in ADCSRB.
● Bit 4 – ADIF: ADC Interrupt Flag:
This bit is set when an ADC conversion completes and the Data Registers are updated.
The ADC Conversion Complete Interrupt is executed if the ADIE bit and the I-bit in
SREG are set. ADIF is cleared by hardware when executing the corresponding interrupt
handling vector.
● Bit 3 – ADIE: ADC Interrupt Enable:
When this bit is written to one and the I-bit in SREG is set, the ADC Conversion
Complete Interrupt is activated.
● Bits 2:0 – ADPS[2:0]: ADC Prescaler Select Bits: These bits determine the division
factor between the system clock frequency and the input clock to the ADC.
● ADPS2 ADPS1 ADPS0 Division Factor
0 0 0 2
0 0 1 2
0 1 0 4
0 1 1 8
1 0 0 16
1 0 1 32
1 1 0 64
1 1 1 128
ADCSRB – ADC Control and Status Register B:
Bit 7 6 5 4 3 2 1 0
– ACME – – – ADTS2 ADTS1 ADTS0
Read/Write R R/W R R R R/W R/W R/W
Initial Value 0 0 0 0 0 0 0
0
● Bit 7,5,4 ,3:Reserved bits:Input
This bits are used for future purpose.
● Bit 6-ACME:
ACME=1 & ADC is switched off, ADC multiplexer selects input connected at
ADC channels as negative input to the analog comparator.
ACME=0 AIN1 acts as negative terminal of analog comparator.
Bit 2:0 – ADTS[2:0]: ADC Auto Trigger Source selection
If ADATE in ADCSRA is written to one, the value of these bits selects which source will trigger an ADC
conversion.
ADTS2 ADTS1 ADTS0 Trigger Source
0 0 0 Free Running mode
0 0 1 Analog Comparator
0 1 0 External Interrupt Request 0
0 1 1 Timer/Counter0 Compare Match A
1 0 0 Timer/Counter0 Overflow
1 0 1 Timer/Counter1 Compare Match B
1 1 0 Timer/Counter1 Overflow
1 1 1 Timer/Counter1 Capture Event
ADMUX – ADC Multiplexer Selection Register:
Bit 7 6 5 4 3 2 1 0
0x7C REFS1 REFS0 ADLAR – MUX3 MUX2 MUX1 MUX0
Read/Write R/W R/W R/W R R/W R/W R/W R/W
Initial Value 0 0 0 0 0 0 0 0
Bit 7:6 – REFS[1:0]: Reference Selection Bits:
Bit 5 – ADLAR: ADC Left Adjust Result
The ADLAR bit affects the presentation of the ADC conversion result in the ADC Data
Register. Write one to ADLAR to left adjust the result. Otherwise, the result is right
adjusted.
• Bits 3:0 – MUX[3:0]: Analog Channel Selection Bits
The value of these bits selects which analog inputs are connected to the ADC.
MUX[3:0]
Single Ended
Input
0000 ADC0
0001 ADC1
0010 ADC2
0011 ADC3
0100 ADC4
0101 ADC5
0110 ADC6
0111 ADC7
1000
ADC8(for internal temperature
sensor)
1001 (reserved)
1010 (reserved)
1011 (reserved)
1100 (reserved)
1101 (reserved)
1110 1.1V (VBG)
1111 0V (GND)
ADCL and ADCH – The ADC Data Register: ADLAR = 1 :When
an ADC conversion is complete, the result is found in these two registers. A total of 10 bits
of conversion result is stored in these two registers.
Bit 15 14 13 12 11 10 9 8
0x79 ADC9 ADC8 ADC7 ADC6 ADC5 ADC4 ADC3 ADC2
Read/Write R R R R R R R R
Bit 7 6 5 4 3 2 1 0
0x78 ADC1 ADC0 – – – – – –
Read/Write R R R R R R R R
Bit 15 14 13 12 11 10 9 8
0x79 – – – – – – ADC9 ADC8
Read/Write R R R R R R R R
Bit 7 6 5 4 3 2 1 0
0x78 ADC7 ADC6 ADC5 ADC4 ADC3 ADC2 ADC1 ADC0
Read/Write R R R R R R R R
ADLAR = 0
DIDR0 – Digital Input Disable Register 0:
Bit 7 6 5 4 3 2 1 0
0x7E – – ADC5D ADC4D ADC3D ADC2D ADC1D ADC0D
Read/Write R R R/W R/W R/W R/W R/W R/W
Initial Value 0 0 0 0 0 0 0
0
Bit 5:0 – ADC5D…ADC0D: ADC5…0 Digital Input Disable
When this bit is written logic one, the digital input buffer on the corresponding
ADC pin is disabled. The corresponding PIN Register bit will always read as zero
when this bit is set. When an analog signal is applied to the ADC5…0 pin and the
digital input from this pin is not needed, this bit should be written logic one to
reduce power consumption in the digital input buffer.
What is temperature sensor?
● The Temperature Sensor LM35 series are precision
integrated-circuit temperature devices with an output
voltage linearly proportional to the Centigrade
temperature.
● The LM35 device calibrated in Kelvin.
● The LM35 device does not require any external
calibration or trimming to provide typical accuracies
of ±¼°C at room temperature and ±¾°C over a full
−55°C to 150°C temperature range.
Features:
● Calibrated Directly in Celsius (Centigrade)
● Linear + 10-mV/°C Scale Factor.
● 0.5°C Ensured Accuracy (at 25°C)
● Rated for Full −55°C to 150°C Range.
● Suitable for Remote Applications.
● Low-Cost Due to Wafer-Level Trimming.
● Operates From 4 V to 30 V.
Interfacing of LM35 with arduino:
Program:
Float T;
void setup() {
pinMode(A1,INPUT);
Serial.begin(9600);}
void loop() {
temp = (4.882* analogRead(A1))/10;
Serial.print("Temperature = ");
Serial.print((float)T);
Serial.println("degree C");
delay(1000); }
What is LVDT?
● The term LVDT stands for the Linear
Variable Differential Transformer.
● It is the most widely used inductive
transducer that converts the linear motion into
the electrical signal.
● The output across secondary of this
transformer is the differential.
● The transformer consists of a primary winding P and two secondary windings S1 and S2
wound on a cylindrical former (which is hollow in nature and contains the core).
● Both the secondary windings have an equal number of turns and we place them on either
side of primary winding
● The primary winding is connected to an AC source which produces a flux in the air gap
and voltages are induced in secondary windings.
● A movable soft iron core is placed inside the former and displacement to be measured is
connected to the iron core.
● The iron core is generally of high permeability which helps in reducing harmonics and
high sensitivity of LVDT.
● The LVDT is placed inside a stainless steel housing because it will provide electrostatic
and electromagnetic shielding.
● The both the secondary windings are connected in such a way that resulted output is the
difference between the voltages of two windings.
Principle of Operation and Working:
● CASE I When the core is at null position (for no displacement)
When the core is at null position then the flux linking with both the secondary windings is
equal so the induced emf is equal in both the windings. So for no displacement the value of
output eout is zero as e1 and e2 both are equal. So it shows that no displacement took place.
● CASE II When the core is moved to upward of null position (For displacement to the
upward of reference point)
In the this case the flux linking with secondary winding S1 is more as compared to flux
linking with S2. Due to this e1 will be more as that of e2. Due to this output voltage eout is
positive.
● CASE III When the core is moved to downward of Null position (for displacement to the
downward of the reference point). In this case magnitude of e2 will be more as that of e1.
Due to this output eout will be negative and shows the output to downward of the reference
point.
Advantages of LVDT:
● High Range – The LVDTs have a very high range for measurement of
displacement.they can used for measurement of displacements ranging from 1.25
mm to 250 mm
● No Frictional Losses – As the core moves inside a hollow former so there is no
loss of displacement input as frictional loss so it makes LVDT as very accurate
device.
● High Input and High Sensitivity – The output of LVDT is so high that it doesn’t
need any amplification. The transducer possesses a high sensitivity which is
typically about 40V/mm.
● Low Hysteresis – LVDTs show a low hysteresis and hence repeatability is
excellent under all conditions
● Low Power Consumption – The power is about 1W which is very as compared
to other transducers.
● Direct Conversion to Electrical Signals – They convert the linear displacement
to electrical voltage which are easy to process.
Disadvantages of LVDT:
● LVDT is sensitive to stray magnetic fields so it always requires a setup to
protect them from stray magnetic fields.
● LVDT gets affected by vibrations and temperature.
Applications of LVDT
1. We use LVDT in the applications where displacements to be measured
are ranging from a fraction of mm to few cms.
2. The LVDT can also act as a secondary transducer. E.g. the Bourbon tube
which acts as a primary transducer and it converts pressure into linear
displacement and then LVDT coverts this displacement into an electrical
signal which after calibration gives the readings of the pressure of fluid.
Circuit diagram of LVDT with Arduino board: (For low
output LVDT)
LVDT
Precision Amplifier
Interfacing of LVDT with Arduino Board:(For 0-5 V output
LVDT)
Interfacing of LVDT with Arduino Board:(For 0-10 V output
LVDT)
Code or Algorithm:
Float D;
void setup()
{
pinMode(A0,INPUT);
Serial.begin(9600);
}
void loop()
{
D = (2*4.882* analogRead(A0))/8000;
Serial.print("Displacement is = ");
Serial.println((float)D);
delay(1000);
}
What is strain gauge?
● Strain Gauge is a transducer which generates an electrical signal whose
magnitude is proportional to the force applied.
● Strain gauge is used to measure strain.
Strain gauge in wheatstone bridge:
gauge factor Gf = (∆R/R)/( ∆l/l) R1 / R2 = Rx / R3
Strain Gauge Working Principle:
● The foil type strain gauges (Figure1) are very common in which a resistive foil
is mounted on a backing material. These are available in a variety of shapes
and sizes for different applications. The resistance of the foil changes as the
material to which the gauge is attached undergoes tension or compression due
to change in its length and diameter.
● This change in resistance is proportional to the applied strain. As this change in
resistance is very small in magnitude so its effect can be only sensed by a
Wheatstone bridge. This is the basic strain gauge working principle.
● A circuit diagram is shown in Figure 2. In this circuit diagram, a strain gauge is
connected into a Wheatstone bridge. This circuit is so designed that when no force
is applied to the strain gauge, R1 is equal to R2 and the resistance of the strain
gauge is equal to R3. In this condition the Wheatstone bridge is balanced and the
voltmeter shows no deflection.
● But when strain is applied to the strain gauge, the resistance of the strain gauge
sensor changes, the Wheatstone bridge becomes unbalanced, a current flows
through the voltmeter. Since the net change in the resistance is proportional to the
applied strain, therefore, resultant current flow through the voltmeter is
proportional to the applied strain. So, the voltmeter can be calibrated in terms of
strain or force.
Advantages:
● In the strain gauge you will find no moving parts.
● Most of the strain gauge are cheap and quite inexpensive
● Strain gauge are usually small so these are easy to handle.
Disadvantages:
● Strain gauges biggest disadvantage is that they are non-linear.
● It needs regular calibration in order to use perfectly and take perfect
reading.
● Highly Sensitive
Applications:
● Strain measurement
● Residual stress measurement
● Vibration measurement
● Torque measurement
● Bending and deflection measurement
● Compression and tension measurement
Interfacing of strain gauge with Arduino board using
H*711:
Interfacing of strain gauge with Arduino board using
INA128:
Program or Code:
void setup() {
pinMode(A0,INPUT);
Serial.begin(9600);
}
void loop()
{
Serial.print("Weight = ");
Serial.print(analogRead(A0);
delay(1000);
}

More Related Content

What's hot

Alternator / Synchronous Generator
Alternator / Synchronous GeneratorAlternator / Synchronous Generator
Alternator / Synchronous Generator
Ridwanul Hoque
 
Voltage commutated chopper
Voltage commutated chopperVoltage commutated chopper
Voltage commutated chopper
Josin Hippolitus
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
UR11EC098
 
DAC-digital to analog converter
DAC-digital to analog converterDAC-digital to analog converter
DAC-digital to analog converter
Shazid Reaj
 
Power electronics Introduction
Power electronics   IntroductionPower electronics   Introduction
Power electronics Introduction
Burdwan University
 
Dc machines ppt
Dc machines pptDc machines ppt
Dc machines ppt
viignesh viignesh
 
Verilog full adder in dataflow & gate level modelling style.
Verilog full adder in dataflow  & gate level modelling style.Verilog full adder in dataflow  & gate level modelling style.
Verilog full adder in dataflow & gate level modelling style.
Omkar Rane
 
R-2R Ladder DAC
R-2R Ladder DACR-2R Ladder DAC
R-2R Ladder DAC
Chandul4y
 
DIFFERENTIAL AMPLIFIER using MOSFET
DIFFERENTIAL AMPLIFIER using MOSFETDIFFERENTIAL AMPLIFIER using MOSFET
DIFFERENTIAL AMPLIFIER using MOSFET
Praveen Kumar
 
ADC Interfacing with pic Microcontrollert
ADC Interfacing with pic MicrocontrollertADC Interfacing with pic Microcontrollert
ADC Interfacing with pic Microcontrollert
leapshare007
 
Inverter
InverterInverter
Working Principle of a Stepper Motor.pptx
Working Principle of a Stepper Motor.pptxWorking Principle of a Stepper Motor.pptx
Working Principle of a Stepper Motor.pptx
SarmistaSengupta1
 
Delta star relationship (1)
Delta star relationship (1)Delta star relationship (1)
Delta star relationship (1)140120109032
 
MOSFET as an Amplifier
MOSFET as an AmplifierMOSFET as an Amplifier
MOSFET as an Amplifier
Riyaaz Nayeem Shaik
 
8051 ch9-950217
8051 ch9-9502178051 ch9-950217
8051 ch9-950217
Gopal Krishna Murthy C R
 
half wave, full wave, pushpull single pahse inverter and 3 phase inverter
half wave, full wave, pushpull single pahse inverter and 3 phase inverterhalf wave, full wave, pushpull single pahse inverter and 3 phase inverter
half wave, full wave, pushpull single pahse inverter and 3 phase inverter
Sanil Sharahudeen
 
Pulse width modulation (PWM)
Pulse width modulation (PWM)Pulse width modulation (PWM)
Pulse width modulation (PWM)
amar pandey
 
DC GENERATOR
DC GENERATORDC GENERATOR
DC GENERATOR
Ketan Nayak
 
Sinusoidal pwm
Sinusoidal pwmSinusoidal pwm
Sinusoidal pwm
Chintan Hansalia
 
Arduino for Beginners
Arduino for BeginnersArduino for Beginners
Arduino for Beginners
Sarwan Singh
 

What's hot (20)

Alternator / Synchronous Generator
Alternator / Synchronous GeneratorAlternator / Synchronous Generator
Alternator / Synchronous Generator
 
Voltage commutated chopper
Voltage commutated chopperVoltage commutated chopper
Voltage commutated chopper
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
 
DAC-digital to analog converter
DAC-digital to analog converterDAC-digital to analog converter
DAC-digital to analog converter
 
Power electronics Introduction
Power electronics   IntroductionPower electronics   Introduction
Power electronics Introduction
 
Dc machines ppt
Dc machines pptDc machines ppt
Dc machines ppt
 
Verilog full adder in dataflow & gate level modelling style.
Verilog full adder in dataflow  & gate level modelling style.Verilog full adder in dataflow  & gate level modelling style.
Verilog full adder in dataflow & gate level modelling style.
 
R-2R Ladder DAC
R-2R Ladder DACR-2R Ladder DAC
R-2R Ladder DAC
 
DIFFERENTIAL AMPLIFIER using MOSFET
DIFFERENTIAL AMPLIFIER using MOSFETDIFFERENTIAL AMPLIFIER using MOSFET
DIFFERENTIAL AMPLIFIER using MOSFET
 
ADC Interfacing with pic Microcontrollert
ADC Interfacing with pic MicrocontrollertADC Interfacing with pic Microcontrollert
ADC Interfacing with pic Microcontrollert
 
Inverter
InverterInverter
Inverter
 
Working Principle of a Stepper Motor.pptx
Working Principle of a Stepper Motor.pptxWorking Principle of a Stepper Motor.pptx
Working Principle of a Stepper Motor.pptx
 
Delta star relationship (1)
Delta star relationship (1)Delta star relationship (1)
Delta star relationship (1)
 
MOSFET as an Amplifier
MOSFET as an AmplifierMOSFET as an Amplifier
MOSFET as an Amplifier
 
8051 ch9-950217
8051 ch9-9502178051 ch9-950217
8051 ch9-950217
 
half wave, full wave, pushpull single pahse inverter and 3 phase inverter
half wave, full wave, pushpull single pahse inverter and 3 phase inverterhalf wave, full wave, pushpull single pahse inverter and 3 phase inverter
half wave, full wave, pushpull single pahse inverter and 3 phase inverter
 
Pulse width modulation (PWM)
Pulse width modulation (PWM)Pulse width modulation (PWM)
Pulse width modulation (PWM)
 
DC GENERATOR
DC GENERATORDC GENERATOR
DC GENERATOR
 
Sinusoidal pwm
Sinusoidal pwmSinusoidal pwm
Sinusoidal pwm
 
Arduino for Beginners
Arduino for BeginnersArduino for Beginners
Arduino for Beginners
 

Similar to EEE UNIT-2 PPT.pdf

Lpc 17xx adc
Lpc 17xx adcLpc 17xx adc
Lpc 17xx adc
PriyangaKR1
 
Vhdl-Code-for-Adc0804-Comparator-and-Parity-Generator.pptx
Vhdl-Code-for-Adc0804-Comparator-and-Parity-Generator.pptxVhdl-Code-for-Adc0804-Comparator-and-Parity-Generator.pptx
Vhdl-Code-for-Adc0804-Comparator-and-Parity-Generator.pptx
asolis5
 
Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148
Omkar Rane
 
STM_ADC para microcontroladores STM32 - Conceptos basicos
STM_ADC para microcontroladores STM32 - Conceptos basicosSTM_ADC para microcontroladores STM32 - Conceptos basicos
STM_ADC para microcontroladores STM32 - Conceptos basicos
ps6005tec
 
Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)
Daman Singh
 
project report on embedded system
project report on embedded systemproject report on embedded system
project report on embedded system
ram avtar
 
Analog to digital converter
Analog to digital converterAnalog to digital converter
lab_ADC.pdf
lab_ADC.pdflab_ADC.pdf
lab_ADC.pdf
boukomra
 
Mc module5 lcd_interface_ppt_msj
Mc module5 lcd_interface_ppt_msjMc module5 lcd_interface_ppt_msj
Mc module5 lcd_interface_ppt_msj
mangala jolad
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
Tony Olsson.
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
Tony Olsson.
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and robotics
Pallavi Bharti
 
Automatic irrigation system using Arduino
Automatic irrigation system using ArduinoAutomatic irrigation system using Arduino
Automatic irrigation system using Arduino
BalajiK109
 
digital clock atmega16
digital clock atmega16digital clock atmega16
digital clock atmega16
Arcanjo Salazaku
 
Analog to digital converter
Analog to digital converterAnalog to digital converter
Analog to digital converterCorrado Santoro
 
analog to digital converter seminar
analog to digital converter seminaranalog to digital converter seminar
analog to digital converter seminar
gayatrigayu1
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
NIT Raipur
 

Similar to EEE UNIT-2 PPT.pdf (20)

Lpc 17xx adc
Lpc 17xx adcLpc 17xx adc
Lpc 17xx adc
 
Anup2
Anup2Anup2
Anup2
 
Vhdl-Code-for-Adc0804-Comparator-and-Parity-Generator.pptx
Vhdl-Code-for-Adc0804-Comparator-and-Parity-Generator.pptxVhdl-Code-for-Adc0804-Comparator-and-Parity-Generator.pptx
Vhdl-Code-for-Adc0804-Comparator-and-Parity-Generator.pptx
 
Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148
 
STM_ADC para microcontroladores STM32 - Conceptos basicos
STM_ADC para microcontroladores STM32 - Conceptos basicosSTM_ADC para microcontroladores STM32 - Conceptos basicos
STM_ADC para microcontroladores STM32 - Conceptos basicos
 
Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)
 
project report on embedded system
project report on embedded systemproject report on embedded system
project report on embedded system
 
Analog to digital converter
Analog to digital converterAnalog to digital converter
Analog to digital converter
 
Analog to digital converter
Analog to digital converterAnalog to digital converter
Analog to digital converter
 
lab_ADC.pdf
lab_ADC.pdflab_ADC.pdf
lab_ADC.pdf
 
Mc module5 lcd_interface_ppt_msj
Mc module5 lcd_interface_ppt_msjMc module5 lcd_interface_ppt_msj
Mc module5 lcd_interface_ppt_msj
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Physical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digitalPhysical prototyping lab2-analog_digital
Physical prototyping lab2-analog_digital
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and robotics
 
Automatic irrigation system using Arduino
Automatic irrigation system using ArduinoAutomatic irrigation system using Arduino
Automatic irrigation system using Arduino
 
digital clock atmega16
digital clock atmega16digital clock atmega16
digital clock atmega16
 
Analog to digital converter
Analog to digital converterAnalog to digital converter
Analog to digital converter
 
Módulo adc 18f4550
Módulo adc   18f4550Módulo adc   18f4550
Módulo adc 18f4550
 
analog to digital converter seminar
analog to digital converter seminaranalog to digital converter seminar
analog to digital converter seminar
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
 

Recently uploaded

MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 

Recently uploaded (20)

MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 

EEE UNIT-2 PPT.pdf

  • 1. UNIT-2 Peripheral Interface Prof. K. R. Rane Electrical Department K.K.W.I.E.E.R
  • 2. Learning Outcomes- ➔ What is LED? ➔ Interfacing of LED with Arduino UNO Board ➔ Coding or Algorithm ➔ What is LCD? ➔ Interfacing of LCD with Arduino UNO Board ➔ Serial communication using Arduino IDE ➔ Concept of ADC in ATMEGA 328 ➔ Interfacing of temperature sensor with Arduino board, LVDT, Strain gauge
  • 3. What is LED? ● A light-emitting diode (LED) is a semiconductor device that emits light when an electric current flows through it. ● Features: Long lifespan, Low cost & size, high luminance, low power consumption, Energy Efficiency.
  • 4. Interfacing of ATMEGA 328 based Arduino board with LED ● LED cathode is connected to GND. ● GPIO pin no. 9 of board is connected With LED anode through resistor (It’s value is inversely proportional to current & brightness of LED).
  • 5. Program or Code: void setup() { pinMode(9, OUTPUT); // initialize digital pin 9 as an output. } void loop() // the loop function runs over and over again forever { digitalWrite(9, HIGH ); // turn the LED ON by making the voltage HIGH delay(1000); // Wait for a second digitalWrite(9, LOW); // turn the LED ON by making the voltage LOW delay(1000); // Wait for a second }
  • 6. To connect 3 LED’s with Arduino:
  • 7. Code: void setup() { pinMode (5, OUTPUT); pinMode (6, OUTPUT); pinMode (7, OUTPUT); } void loop() { digitalWrite (5, HIGH); digitalWrite (6, HIGH); digitalWrite (7, HIGH); delay (5000); digitalWrite (5, LOW); digitalWrite (6, LOW); digitalWrite (7, LOW); delay (5000); }
  • 8. What is LCD? ● LCD is a flat display technology, stands for "Liquid Crystal Display”. ● Used in computer monitors, instrument panels, cell phones, digital cameras, TVs, laptops, tablets, and calculators. ● It is a thin display device that offers support for large resolutions and better picture quality. ● 16×2 LCD display is shown below:
  • 9. Interfacing of LCD with ATMEGA 328 based Arduino board: Figure: Circuit diagram of connecting 16*2 LCD with Arduino board
  • 10. Code or algorithm: #include <LiquidCrystal.h> // initialize the library const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); void setup() { lcd.begin(16, 2); lcd.print("hello, world!"); } void loop() { lcd.setCursor(0, 0); lcd.print(“Hello,world!” ); serial.println (“Hello,world!”); lcd.setCursor(0, 1); lcd.print(“Hi….”); serial.println (“Hi…”); }
  • 11. Example to blink the output on LCD: #include <LiquidCrystal.h> // initialize the library const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); void setup() { lcd.begin(16, 2); } void loop() { lcd.clear(); delay(1000); lcd.setCursor(0, 0); lcd.print(“Hello….! ); lcd.setCursor(0, 1); lcd.print(“Hi….”); delay(1000); }
  • 12. Serial communication using Arduino IDE: ● Arduino UNO pins 0 &1 are of UART used for serial communication. ● UART requires two pins for communication: Tx & Rx. ● Connection of Atmega328 on Arduino Uno board to PC:
  • 14. Concept of ADC in Atmega328 based arduino board:
  • 15. ADCSRA – ADC Control and Status Register A:- Bit 7 6 5 4 3 2 1 0 0x7A ADEN ADSC ADATE ADIF ADIE ADPS2 ADPS1 ADPS0 Read/Write R/W R/W R/W R/W R/W R/W R/W R/W Initial Value 0 0 0 0 0 0 0 0
  • 16. ● Bit 7 – ADEN: ADC Enable: Writing this bit to one enables the ADC. By writing it to zero, the ADC is turned off. Turning the ADC off while a conversion is in progress, will terminate this conversion. ● Bit 6 – ADSC: ADC Start Conversion: In Single Conversion mode, write this bit to one to start each conversion. In Free Running mode, write this bit to one that will take 25 ADC clock cycles instead of the normal 13 This first conversion performs initialization of the ADC. ADSC will read as one as long as a conversion is in progress. When the conversion is complete, it returns to zero. ● Bit 5 – ADATE: ADC Auto Trigger Enable: When this bit is written to one, Auto Triggering of the ADC is enabled. The ADC will start a conversion on a positive edge of the selected trigger signal. The trigger source is selected by setting the ADC Trigger Select bits, ADTS in ADCSRB.
  • 17. ● Bit 4 – ADIF: ADC Interrupt Flag: This bit is set when an ADC conversion completes and the Data Registers are updated. The ADC Conversion Complete Interrupt is executed if the ADIE bit and the I-bit in SREG are set. ADIF is cleared by hardware when executing the corresponding interrupt handling vector. ● Bit 3 – ADIE: ADC Interrupt Enable: When this bit is written to one and the I-bit in SREG is set, the ADC Conversion Complete Interrupt is activated.
  • 18.
  • 19. ● Bits 2:0 – ADPS[2:0]: ADC Prescaler Select Bits: These bits determine the division factor between the system clock frequency and the input clock to the ADC. ● ADPS2 ADPS1 ADPS0 Division Factor 0 0 0 2 0 0 1 2 0 1 0 4 0 1 1 8 1 0 0 16 1 0 1 32 1 1 0 64 1 1 1 128
  • 20. ADCSRB – ADC Control and Status Register B: Bit 7 6 5 4 3 2 1 0 – ACME – – – ADTS2 ADTS1 ADTS0 Read/Write R R/W R R R R/W R/W R/W Initial Value 0 0 0 0 0 0 0 0
  • 21. ● Bit 7,5,4 ,3:Reserved bits:Input This bits are used for future purpose. ● Bit 6-ACME: ACME=1 & ADC is switched off, ADC multiplexer selects input connected at ADC channels as negative input to the analog comparator. ACME=0 AIN1 acts as negative terminal of analog comparator.
  • 22. Bit 2:0 – ADTS[2:0]: ADC Auto Trigger Source selection If ADATE in ADCSRA is written to one, the value of these bits selects which source will trigger an ADC conversion. ADTS2 ADTS1 ADTS0 Trigger Source 0 0 0 Free Running mode 0 0 1 Analog Comparator 0 1 0 External Interrupt Request 0 0 1 1 Timer/Counter0 Compare Match A 1 0 0 Timer/Counter0 Overflow 1 0 1 Timer/Counter1 Compare Match B 1 1 0 Timer/Counter1 Overflow 1 1 1 Timer/Counter1 Capture Event
  • 23. ADMUX – ADC Multiplexer Selection Register: Bit 7 6 5 4 3 2 1 0 0x7C REFS1 REFS0 ADLAR – MUX3 MUX2 MUX1 MUX0 Read/Write R/W R/W R/W R R/W R/W R/W R/W Initial Value 0 0 0 0 0 0 0 0
  • 24. Bit 7:6 – REFS[1:0]: Reference Selection Bits:
  • 25. Bit 5 – ADLAR: ADC Left Adjust Result The ADLAR bit affects the presentation of the ADC conversion result in the ADC Data Register. Write one to ADLAR to left adjust the result. Otherwise, the result is right adjusted. • Bits 3:0 – MUX[3:0]: Analog Channel Selection Bits The value of these bits selects which analog inputs are connected to the ADC.
  • 26. MUX[3:0] Single Ended Input 0000 ADC0 0001 ADC1 0010 ADC2 0011 ADC3 0100 ADC4 0101 ADC5 0110 ADC6 0111 ADC7 1000 ADC8(for internal temperature sensor) 1001 (reserved) 1010 (reserved) 1011 (reserved) 1100 (reserved) 1101 (reserved) 1110 1.1V (VBG) 1111 0V (GND)
  • 27. ADCL and ADCH – The ADC Data Register: ADLAR = 1 :When an ADC conversion is complete, the result is found in these two registers. A total of 10 bits of conversion result is stored in these two registers. Bit 15 14 13 12 11 10 9 8 0x79 ADC9 ADC8 ADC7 ADC6 ADC5 ADC4 ADC3 ADC2 Read/Write R R R R R R R R Bit 7 6 5 4 3 2 1 0 0x78 ADC1 ADC0 – – – – – – Read/Write R R R R R R R R
  • 28. Bit 15 14 13 12 11 10 9 8 0x79 – – – – – – ADC9 ADC8 Read/Write R R R R R R R R Bit 7 6 5 4 3 2 1 0 0x78 ADC7 ADC6 ADC5 ADC4 ADC3 ADC2 ADC1 ADC0 Read/Write R R R R R R R R ADLAR = 0
  • 29. DIDR0 – Digital Input Disable Register 0: Bit 7 6 5 4 3 2 1 0 0x7E – – ADC5D ADC4D ADC3D ADC2D ADC1D ADC0D Read/Write R R R/W R/W R/W R/W R/W R/W Initial Value 0 0 0 0 0 0 0 0
  • 30. Bit 5:0 – ADC5D…ADC0D: ADC5…0 Digital Input Disable When this bit is written logic one, the digital input buffer on the corresponding ADC pin is disabled. The corresponding PIN Register bit will always read as zero when this bit is set. When an analog signal is applied to the ADC5…0 pin and the digital input from this pin is not needed, this bit should be written logic one to reduce power consumption in the digital input buffer.
  • 31. What is temperature sensor? ● The Temperature Sensor LM35 series are precision integrated-circuit temperature devices with an output voltage linearly proportional to the Centigrade temperature. ● The LM35 device calibrated in Kelvin. ● The LM35 device does not require any external calibration or trimming to provide typical accuracies of ±¼°C at room temperature and ±¾°C over a full −55°C to 150°C temperature range.
  • 32. Features: ● Calibrated Directly in Celsius (Centigrade) ● Linear + 10-mV/°C Scale Factor. ● 0.5°C Ensured Accuracy (at 25°C) ● Rated for Full −55°C to 150°C Range. ● Suitable for Remote Applications. ● Low-Cost Due to Wafer-Level Trimming. ● Operates From 4 V to 30 V.
  • 33. Interfacing of LM35 with arduino:
  • 34.
  • 35. Program: Float T; void setup() { pinMode(A1,INPUT); Serial.begin(9600);} void loop() { temp = (4.882* analogRead(A1))/10; Serial.print("Temperature = "); Serial.print((float)T); Serial.println("degree C"); delay(1000); }
  • 36. What is LVDT? ● The term LVDT stands for the Linear Variable Differential Transformer. ● It is the most widely used inductive transducer that converts the linear motion into the electrical signal. ● The output across secondary of this transformer is the differential.
  • 37.
  • 38. ● The transformer consists of a primary winding P and two secondary windings S1 and S2 wound on a cylindrical former (which is hollow in nature and contains the core). ● Both the secondary windings have an equal number of turns and we place them on either side of primary winding ● The primary winding is connected to an AC source which produces a flux in the air gap and voltages are induced in secondary windings. ● A movable soft iron core is placed inside the former and displacement to be measured is connected to the iron core. ● The iron core is generally of high permeability which helps in reducing harmonics and high sensitivity of LVDT. ● The LVDT is placed inside a stainless steel housing because it will provide electrostatic and electromagnetic shielding. ● The both the secondary windings are connected in such a way that resulted output is the difference between the voltages of two windings.
  • 39. Principle of Operation and Working: ● CASE I When the core is at null position (for no displacement) When the core is at null position then the flux linking with both the secondary windings is equal so the induced emf is equal in both the windings. So for no displacement the value of output eout is zero as e1 and e2 both are equal. So it shows that no displacement took place. ● CASE II When the core is moved to upward of null position (For displacement to the upward of reference point) In the this case the flux linking with secondary winding S1 is more as compared to flux linking with S2. Due to this e1 will be more as that of e2. Due to this output voltage eout is positive. ● CASE III When the core is moved to downward of Null position (for displacement to the downward of the reference point). In this case magnitude of e2 will be more as that of e1. Due to this output eout will be negative and shows the output to downward of the reference point.
  • 40. Advantages of LVDT: ● High Range – The LVDTs have a very high range for measurement of displacement.they can used for measurement of displacements ranging from 1.25 mm to 250 mm ● No Frictional Losses – As the core moves inside a hollow former so there is no loss of displacement input as frictional loss so it makes LVDT as very accurate device. ● High Input and High Sensitivity – The output of LVDT is so high that it doesn’t need any amplification. The transducer possesses a high sensitivity which is typically about 40V/mm. ● Low Hysteresis – LVDTs show a low hysteresis and hence repeatability is excellent under all conditions ● Low Power Consumption – The power is about 1W which is very as compared to other transducers. ● Direct Conversion to Electrical Signals – They convert the linear displacement to electrical voltage which are easy to process.
  • 41. Disadvantages of LVDT: ● LVDT is sensitive to stray magnetic fields so it always requires a setup to protect them from stray magnetic fields. ● LVDT gets affected by vibrations and temperature. Applications of LVDT 1. We use LVDT in the applications where displacements to be measured are ranging from a fraction of mm to few cms. 2. The LVDT can also act as a secondary transducer. E.g. the Bourbon tube which acts as a primary transducer and it converts pressure into linear displacement and then LVDT coverts this displacement into an electrical signal which after calibration gives the readings of the pressure of fluid.
  • 42. Circuit diagram of LVDT with Arduino board: (For low output LVDT) LVDT Precision Amplifier
  • 43. Interfacing of LVDT with Arduino Board:(For 0-5 V output LVDT)
  • 44. Interfacing of LVDT with Arduino Board:(For 0-10 V output LVDT)
  • 45. Code or Algorithm: Float D; void setup() { pinMode(A0,INPUT); Serial.begin(9600); } void loop() { D = (2*4.882* analogRead(A0))/8000; Serial.print("Displacement is = "); Serial.println((float)D); delay(1000); }
  • 46. What is strain gauge? ● Strain Gauge is a transducer which generates an electrical signal whose magnitude is proportional to the force applied. ● Strain gauge is used to measure strain.
  • 47. Strain gauge in wheatstone bridge: gauge factor Gf = (∆R/R)/( ∆l/l) R1 / R2 = Rx / R3
  • 48. Strain Gauge Working Principle: ● The foil type strain gauges (Figure1) are very common in which a resistive foil is mounted on a backing material. These are available in a variety of shapes and sizes for different applications. The resistance of the foil changes as the material to which the gauge is attached undergoes tension or compression due to change in its length and diameter. ● This change in resistance is proportional to the applied strain. As this change in resistance is very small in magnitude so its effect can be only sensed by a Wheatstone bridge. This is the basic strain gauge working principle.
  • 49. ● A circuit diagram is shown in Figure 2. In this circuit diagram, a strain gauge is connected into a Wheatstone bridge. This circuit is so designed that when no force is applied to the strain gauge, R1 is equal to R2 and the resistance of the strain gauge is equal to R3. In this condition the Wheatstone bridge is balanced and the voltmeter shows no deflection. ● But when strain is applied to the strain gauge, the resistance of the strain gauge sensor changes, the Wheatstone bridge becomes unbalanced, a current flows through the voltmeter. Since the net change in the resistance is proportional to the applied strain, therefore, resultant current flow through the voltmeter is proportional to the applied strain. So, the voltmeter can be calibrated in terms of strain or force.
  • 50. Advantages: ● In the strain gauge you will find no moving parts. ● Most of the strain gauge are cheap and quite inexpensive ● Strain gauge are usually small so these are easy to handle. Disadvantages: ● Strain gauges biggest disadvantage is that they are non-linear. ● It needs regular calibration in order to use perfectly and take perfect reading. ● Highly Sensitive
  • 51. Applications: ● Strain measurement ● Residual stress measurement ● Vibration measurement ● Torque measurement ● Bending and deflection measurement ● Compression and tension measurement
  • 52. Interfacing of strain gauge with Arduino board using H*711:
  • 53. Interfacing of strain gauge with Arduino board using INA128:
  • 54. Program or Code: void setup() { pinMode(A0,INPUT); Serial.begin(9600); } void loop() { Serial.print("Weight = "); Serial.print(analogRead(A0); delay(1000); }