Sei sulla pagina 1di 73

CONTENTS

ACKNOWLEDGEMENT
ABSTRACT
Chapter-1: INTRODUCTION

1.1Introduction of LVDT
........ 1
1.1.1 Linear Displacement Measurement
1.1.2 Linear Variable Differential Transformers (LVDTs)
1.2Construction
1.2.1 Transforme
1.2.2 Open Wiring LVDT
1.2.3 Ratiometric Wiring LVDT

1.3LVDT Measurement

.4

1.4 Signal Conditioning for LVDTs

1.5 Applications of LVDT

...8

1.6 Advantages of LVDT

..9

Chapter-2:ARDUINO
2.1 Introduction

10

2.2 Types of Arduino

.11

2.3 Hardware
2.3.1 Power
2.3.2 Memory
2.3.3 Input and output

13

2.4 Programming in Arduino

...14
1|P age

2.4.1 Features:
2.4.2 Arduino sketch:
2.5 Processing

..15

2.5.1 Void setup ()


2.5.2 Void draw()
2.5.3 Void serial Event()
2.6 Communication

.........................17

Chapter-3: GENERATION OF DC SUPPLY

3.1 The Full Wave Bridge Rectifier

..22

3.2 The Smoothing Capacitor


3.3 Clamping

..24
..........................26

Chapter-4: INTERFACING ARDUINO WITH LVDT

4.1 Arduino program

30

4.2 Liquid Crystal Display Interfacing

31

4.2.1 Circuit configuration


4.2.2 Code

Chapter-5: Practical Implementation of LVDT


5.1 Methodology to Make LVDT

...34

2|P age

5.1.1. Design Specifications


5.1.2.Working Specifications
5.2 Working of the LVDT

.36

5.3 Practical Implementation

39

Chapter-6: LVDT RESULTS USING ARDUINO

6.1 Arduino Programme

......................43

6.2 Hardware circuit with Result

..45

6.3 Serial Monitor Values in Arduino

...46

6.4 Output waveform in MegunoLink Software....................... 47

Conclusion

.48

Reference

.49

APPENDIX

3|P age

4|P age

ABSTRACT

A linear variable differential transformer (LVDT) is a type of electromechanical transducer capable of measuring linear displacement with a high
degree of accuracy.
Linear variable differential transformer (LVDT) which gives a linear analog
position detecting signal is investigated. This simple-structure LVDT consists of
a core, an exciting coil, and two detecting coils, and it gives good linearity. The
relationships among the width of the excitation coil, the core length, the number
of cores. The LVDT operation does not require an electrical contact between the
moving part (probe or core assembly) and the coil assembly, but instead relies
on electromagnetic coupling.
Arduino is a single board microcontroller it energises the LVDT and the output
signal of LVDT is then processed by a phase-sensitive demodulate.The output
of Arduino is proportional to the core movement in order to determine
displacement. The output has a linear relationship with the actual mechanical
movement of the core.
This transducer is useful for measurement and data acquisition purpose for all
indoor and outdoor applications

5|P age

CHAPTER-1

INTRODUCTION
1.1.Introduction of LVDT :
1.1.1

Linear Displacement Measurement

Linear displacement is movement in one direction along a single axis. A position or linear
displacement sensor is a device whose output signal represents the distance an object has
traveled from a reference point. A displacement measurement also indicates the direction of
motion (See Figure 1.0).

Figure 1.0: Linear Displacement Measurement

A linear displacement typically has units of millimeters (mm) or inches (in.) and a negative or
positive direction associated with it.
1.1.2

Linear Variable Differential Transformers (LVDTs)

Linear variable differential transformers (LVDT) are used to measure displacement. LVDTs
operate on the principle of a transformer. As shown in Figure 1.2, an LVDT consists of a coil
assembly and a core. The coil assembly is typically mounted to a stationary form, while the
core is secured to the object whose position is being measured. The coil assembly consists of
three coils of wire wound on the hollow form. A core of permeable material can slide freely
through the centerof the form. The inner coil is the primary, which is excited by an AC
source as shown. Magnetic flux produced by the primary is coupled to the two secondary
coils, inducing an AC voltage in each coil..

6|P age

Figure 1.1.General LVDT Assembly

The main advantage of the LVDT transducer over other types of displacement transducer is
the high degree of robustness. Because there is no physical contact across the

sensing

element.
There is no wear in the sensing element.Because the device relies on the coupling of
magnetic flux, an LVDT can have infinite resolution. Therefore the smallest fraction of
movement can be detected by suitable signal conditioning hardware, and the resolution of the
transducer is solely determined by the resolution of the data acquisition system.

1.2 Construction

Figure1.2.Typical Linear Variable Differential Transformer (LVDT)


The physical construction of a typical LVDT consists of a movable core of magnetic material
and three coils comprising the static transformer. One of the three coils is the primary coil
and the other two are secondary coils.

10

1.2.1Transformer
The basic transformer formula which states that the voltage is proportional to the number of
coil winding, is the backbone of the LVDT.
The formula is,

Where N is the number of coil winding and V is the voltage readout.


When the iron core slides through the transformer, a certain number of coil winding are
affected by the proximity of the sliding core and thus generate a unique voltage output.

Figure1.3.Principle of working
1.2.2 Open Wiring LVDT
11

Most LVDT's are wired as shown in the schematic above. This wiring arrangement is known
as open wiring. Since the number of coil windings is uniformly distributed along the
transformer, the voltage output is proportional to the iron core displacement when the core
slides through the transformer. This equation is,

where D is displacement of the iron core with respect to the transformer, and M is the
sensitivity of the transformer (slope of the displacement-voltage curve).

1.2.3 Ratiometric Wiring LVDT


Another commonly used LVDT wiring is known as ratiometric wiring, as shown
schematically below.

Figure 1.4.Ratiometric Wiring

The displacement for ratiometric LVDT's is given by the relation,

1.3 LVDT Measurement

An LVDT measures displacement by associating a specific signal value for any given position
of the core. This association of a signal value to a position occurs through electromagnetic
coupling of an AC excitation signal on the primary winding to the core and back to the
secondary windings. The position of the core determines how tightly the signal of the primary
coil is coupled to each of the secondary coils. The two secondary coils are series- opposed,
which means wound in series but in opposite directions. This results in the two signals on
each secondary being 180 deg out of phase. Therefore phase of the output signal determines
12

direction and its amplitude, distance. Figure 1.5 depicts a cross-sectional view of an LVDT.
The core causes the magnetic field generated by the primary winding to be coupled to the
secondaries. When the core is centered perfectly between both secondaries and the primary,
as shown, the voltage induced in each

secondary is equal in amplitude and 180 deg out

of phase. Thus the LVDT output (for the series-opposed connection shown in this case) is
zero because the voltagescanceleachother.

Figure 1.5.Cross-Sectional View of LVDT Core and Windings

13

Displacing the core to the left (Figure 1.6) causes the first secondary to be more strongly
coupled to the primary than the second secondary. The resulting higher voltage of the first
secondary in relation to the second secondary causes an output voltage that is in phase with
the primary voltage.

Figure 1.6. Coupling to First Secondary Caused by Associated Core


Displacement
Likewise, displacing the core to the right causes the second secondary to be more strongly
coupled to the primary than the first secondary. The greater voltage of the second secondary
causes an output voltage to be out of phase with the primary voltage.

Figure 1.7. Coupling to Second Secondary Caused by Associated Core Displacement

14

To summarize, The LVDT closely models an ideal zeroth-order displacement sensor


structure at low frequency, where the output is a direct and linear function of the input. It is a
variable-reluctance device, where a primary center coil establishes a magnetic flux that is
coupled through a center core (mobile armature) to a symmetrically wound secondary coil on
either side of the primary. Thus, by measurement of the voltage amplitude and phase, one can
determine the extent of the core motion and the direction, that is, the displacement.[1]
Figure 1.8 shows the linearity of the device within a range of core displacement. Note that the
output is not linear as the core travels near the boundaries of its range. This is because less
magnetic flux is coupled to the core from the primary. However, because LVDTs have
excellent repeatability, nonlinearity near the boundaries of the range of the device can be
predicted by a table or polynomial curve-fitting function, thus extending the range of the
device.

Figure 1.8: Proportionally Linear LVDT Response to Core Displacement

1.4 Signal Conditioning for LVDTs


Because the output of an LVDT is an AC waveform, it has no polarity. The magnitude of the
output of an LVDT increases regardless of the direction of movement from the electrical zero.

In order to know in which half of the device the center of the core is located, one must
consider the phase of the output as well as the magnitude as compared to the AC excitation
source on the primary winding. The output phase is compared with the excitation phase and it
can be either in or out of phase with the excitation source, depending upon which half of the
coil the center of the core is in.

The signal conditioning electronics must combine information on the phase of the output with
information on the magnitude of the output, so the user can know the direction the core has
15

moved as well as how far from the electrical zero position it has moved.

LVDT signal conditioners generate a sinusoidal signal as an excitation source for the primary
coil. This signal is typically between 50 Hz and 25 kHz. The carrier frequency is generally
selected to be at least 10 times greater than the highest expected frequency of the core
motion.[1] The signal conditioning circuitry synchronously demodulates the secondary
output signal with the same primary excitation source. The resulting DC voltage is
proportional to core displacement. The polarity of the DC voltage indicates whether the
displacement is toward or away from the first secondary (displacement left or right).

Figure 1.9 shows a practical detection scheme, typically provided as a single integrated
circuit (IC) manufactured specifically for LVDTs. The system contains a signal generator for
the primary, a phase-sensitive detector (PSD) and amplifier/filter circuitry.

Figure 1.9.Sophisticated Phase-Sensitive LVDT Signal Conditioning Circuit

Broad ranges of LVDTs are available with linear ranges from at least 50 cm down to 1
mm. The time response is dependent on the equipment to which the core is connected. The
units of an LVDT measurement are typically in mV/V/mm or mV/V/in. This indicates that
for every volt of stimulation applied to the LVDT there is a definite feedback in mV per unit
distance. A carefully manufactured LVDT can provide an output linear within 0.25% overa
range of core motion, with very fine resolution. The resolution is limited primarily by the
ability of signal conditioning hardware to measure voltage changes.

16

1.5 Applications of LVDT


Although the LVDT is a displacement sensor, many other physical quantities can be
sensed by converting displacement to the desired quantity via thoughtful arrangements.
Several examples will be given.

Displacement
- extensometers, temperature transducers, butterfly valve control, servo valve
displacement sensing

Deflection of Beams, Strings, or Rings


- load cells, force transducers, pressure transducers

Figure 1.10.Diaphragm Pressure Gage

Thickness Variation of Work Pieces


- dimension gages, thickness and profile measurements, product sorting by size

Figure 1.11.Profile Gage

Fluid Level
- fluid level and fluid flow measurement, position sensing in hydraulic cylinders
17

Figure 1.12.Fluid Level Gage

Velocity & Acceleration


- automotive suspension control
1.6 Advantages of LVDT
Some of the advantages of LVDT are given below.

It gives higher output for small change in magnetic core position.


It is highly sensitive transducer which can be used form the range of 50mv/mm
to 300mv/mm.
It can operate over a temperature range from -650C to 600C

18

19

20

CHAPTER-2
ARDUINO
2.1 Introduction
Arduino is an open source physical computing platform based on a simple
input/output (I/O) board and a development environment that implements the
Processing language Arduino can sense the environment by receiving input from a
variety of sensors and can affect its surroundings by controlling lights, motors, and
other actuators.
Arduino is a single-board microcontroller designed to make the process of
using electronics in multidisciplinary projects more accessible. The hardware consists
of a simple open source hardware board designed around an 8-bit Atmel AVR
microcontroller, though a new model has been designed around a 32-bit Atmel ARM.
The software consists of a standard programming language compiler and a boot loader
that executes on the microcontroller. There are sixteen officials Arduino's that have
been commercially produced to date.

Figure 2.1.OVERVIEW OF ARDUINO UNO

21

22

2.2 Types of Arduino

One of the most confusing things about Arduino is that there are too many
different choices with different sizes, colours and form factors.
Arduino itself have the latest Arduino Uno and older version Arduino
Duemilanove, Arduino Mega2560 (Uno version of Mega with lots of Input

and

Output pins), Arduino Mini (smallest version, need another board (FTDI) to connect
to USB), Arduino Nano (breadboard version), Lily Pad Arduino (wearable version,
for fashion designers), FIO and Arduino Bluetooth (No USB or serial port).These
different form factor caters to different needs like size and height requirements,
number of input/output pins, cost and shields compatibility. In this project we use
ARDUINO UNO. The Arduino UNO has pins compatible with all the available
shields
2.3 Hardware
The ArduinoMega is a microcontroller board based on the atmega1280
(datasheet). It has 54 digital input/output pins (of which 14 can be used as PWM
outputs), 16 analog inputs, 4 uarts (hardware serial ports), a 16 MHz crystal oscillator,
a USB connection, a power jack, an ICSP header, and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with a AC-to- DC adapter or battery to get started.

23

Figure 2.2. Hardware configurations of Arduino uno

2.3.1 Power
The Arduino Uno 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 (wall-wart) 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 board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The recommended
range is 7 to 12 volts.

24

The power pins are as follows:


1. VIN:- The input voltage to the Arduino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power source). You
can supply voltage through this pin, or, if supplying voltage via the power jack, access it
through this pin.
2. 5V:- The regulated power supply used to power the microcontroller and other
components on the board. This can come either from VIN via an on-board regulator, or be
supplied by USB or another regulated 5V supply.
3. 3.3V:- A 3.3 volt supply generated by the on-board regulator. Maximum current
draw is 50 mA.
4. GND:-Ground pins.
2.3.2 Memory
The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2 KB of
SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).
2.3.3 Input and Output
Each of the 14 digital pins on the Uno can be used as an input or output, using pin Mode,
digital Write, and digital Read () functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of
20-50 kilo Ohms. In addition, some pins have specialized functions:
Serial: 0 (RX) and 1 (TX):- Used to receive (RX) and transmit (TX) TTL serial data.
These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL
Serial chip.
External Interrupts 2 and 3:-These pins can be configured to trigger an interrupt on
a low value, a rising or falling edge, or a change in value.
PWM:- 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog Write ()
function.
SPI:- 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication using the SPI library.

20

The 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, though is it possible to change the upper end of their range
using the AREF pin and the analog Reference () function.

14 Digital IO pins (pins 013): These can be inputs or outputs, which is specified by
the sketch you create in the IDE.
6 Analogue In pins (pins 05): These dedicated analogue input pins take analogue
values (i.e., voltage readings from a sensor) and convert them into a number between
0 and 1023.
6 Analogue Out pins (pins 3, 5, 6, 9, 10, and 11):These are actually six of the digital
pins that can be reprogrammed for analogue output using the sketch you create in the
IDE. The board can be powered from your computers USB port, most USB chargers,
or an AC adapter (9 volts recommended, 2.1mm barrel tip, center positive). If there is
no power supply plugged into the power socket, the power will come from the USB
board, but as soon as you plug a power supply, the board will automatically use it.
Additionally, some pins have specialized functionality:

I2C A4 (SDA) and A5 (SCL):- Support I2C (TWI) communication using the Wire
library.

There are a couple of other pins on the board:

AREF: - Reference voltage (0 to 5V only) for the analog inputs. Used with analog
Reference ().
Reset:- Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.

14 Digital IO pins (pins 013):


These can be inputs or outputs, which is specified by the sketch you create in
the IDE.
a) 6 Analogue In pins (pins 05): These dedicated analogue input pins take analogue
values (i.e., voltage readings from a sensor) and convert them into a number between
0 and 1023.

26

b)

6 Analogue Out pins (pins 3, 5, 6, 9, 10, and 11):

These are actually six of the digital pins that can be reprogrammed for analogue
output using the sketch you create in the IDE. The board can be powered from your
computers USB port, most USB chargers, or an AC adapter (9 volts recommended,
2.1mm barrel tip, center positive). If there is no power supply plugged into the power
socket, the power will come from the USB board, but as soon as you plug a power
supply, the board will automatically use it.

2.4 Arduino Programming:

The Arduino IDE is a cross-platform application written in Java, and is


derived from the IDE for the Processing programming language and the Wiring
project. It is designed to introduce programming to artists and other newcomers
unfamiliar with software development. It includes a code editor with features such as
syntax highlighting, brace matching, and automatic indentation, and is also capable of
compiling and uploading programs to the board with a single click. There is typically
no need to edit make files or run programs on a command-line interface. Although
building on command-line is possible if required with some third-party tools such as
Ino.
The Arduino IDE comes with a C/C++ library called "Wiring" (from the
project of the same name), which makes many common input/output operations much
easier. Arduino programs are written in C/C++, although users only need define two
functions to make a run able program:
Setup () a function run once at the start of a program that can initialize
settings
loop () a function called repeatedly until the board powers off

It is a feature of most Arduino boards that they have an LED and load resistor
connected between pin 13 and ground, a convenient feature for many simple tests.[29]
The above code would not be seen by a standard C++ compiler as a valid program, so
when the user clicks the "Upload to I/O board" button in the IDE, a copy of the code
is written to a temporary file with an extra include header at the top and a very simple
main() function at the bottom, to make it a valid C++ program. The Arduino IDE uses
the GNU tool chain and AVR Library to compile programs, and uses avr to upload
programs to the board.
27

As the Arduino platform uses Atmel microcontrollers Atmels development


environment, AVR Studio or the newer Atmel Studio, may also be used to develop
software for the Arduino.
The Arduino hardware reference designs are distributed under a Creative
Commons Attribution Share-Alike 2.5 license and are available on the Arduino Web
site. Layout and production files for some versions of the Arduino hardware are also
available. The source code for the IDE and the on-board library are available and
released under the GPLv2 license.

2.4.1 Features:
ATmega328 microcontroller
Input voltage - 7-12V
14 Digital I/O Pins (6 PWM outputs)
6 Analog Inputs
32k Flash Memory
16Mhz Clock Speed
The maximum values that Arduino can handle:
Max frequency: 16MHz
Max Voltage: 5V
2.4.2 Arduino sketch:
Basically Arduino sketch consists of two main functions namely
1. Void setup ()
2. Void loop()

Void setup (): Setup () is called when a sketch starts. It is used to initialize variables,
pin modes, start using libraries etc. The setup () will only run once, after each power
up or reset of the Arduino board.

Syntax: Void setup ()


{
Statements;
}
28

Void loop(): After creating a setup () function which initializes and sets the initial
values, the loop () function does precisely what its name suggests, and loops
consecutively, allowing your program to change and respond. It is used to actively
control the Arduino board.

Syntax: Void loop ()


{
Statements;
}

29

2.5 Processing Sketch:


Processing is an open source programming language and environment for creating
graphs, images, animations, and interactions. Initially developed to serve as a
software sketchbook and to teach fundamentals of computer programming within a
visual context, Processing also has evolved into a tool for generating finished
professional work. Today, there are tens of thousands of students, artists, designers,
researchers, and hobbyists who use Processing for learning, prototyping, and
production.Basically

Programming

using

Processing

software

uses

three

main

functions namely

Void setup ()

Void draw ()

Void serial Event ()

2.5.1 Void setup ()


The setup () function is called once when the program starts. It is used to define
initial environment properties such as screen size and background color and to load
media such as images and fonts as the program starts. There can only be one setup ()
function for each program and it shouldn't be called again after its initial execution.
Note: Variables declared within setup () are not accessible within other functions,
including draw ().
Syntax: Void setup ()
{
Statements;
}

30

2.5.2 Void draw()


It is called directly after setup (), the draw () function continuously executes the
lines of code contained inside its block until the program is stopped or no Loop () is
called. draw () is called automatically and should never be called explicitly.
It should always be controlled with no Loop (), redraw () and loop (). After no
Loop () stops the code in draw () from executing, redraw () causes the code inside
draw () to execute once, and loop () will cause the code inside draw () to resume
executing continuously.
The number of times draw () executes in each second may be controlled with
the frame Rate () function. There can only be one draw () function for each sketch,
and draw () must exist if you want the code to run continuously, or to process events
such as mouse Pressed (). Sometimes, you might have an empty call to draw () in your
program.
Syntax: Void draw ()
{
Statements;
}

2.5.3 Void serial Event():


It is called when data is available. Use one of the read() methods to capture
this data. The serial Event () can be set with buffer () to only trigger after a certain
number of data elements are read and can be set with buffer Until() to only trigger
after a specific character is read. The which parameter contains the name of the port
where new data is available, but is only useful when there is more than one serial
connection open and it's necessary to distinguish between the two.
Syntax: Void serialEvent(which port)
{ Statements;
2.6 Communication :

Microcontrollers depend on a host computer for developing and compiling programs. The
software used on the host computer is known as an integrated development environment, or
IDE. For the Arduino, the development environment is based on the open source Processing
platform (www.processing.org) which is described by its creators as a programming
31

language and environment for people who want to program images, animation, and
interactions. The Arduino programming language leverages an open source project known
as Wiring (wiring.org.co). The Arduino language is based on good old-fashioned C. If you
are unfamiliar with this language, dont worry; its not hard to learn, and the Arduino IDE
provides some feedback when you make mistakes in your programs.
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The 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 '16U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, a inf file is required. The Arduino software
includes a serial monitor which allows simple textual data to be sent to and from the Arduino
board. The RX and TX LEDs on the board will flash when data is being transmitted via the
USB-to-serial chip and USB connection to the computer (but not for serial communication on
pins 0 and 1).
A SoftwareSerial library allows for serial communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus; see the documentation for details. For
SPI communication, use the SPI library.
As you go through the list of programming statements available in the Arduino IDE (choose
Help->Reference), you might think there isnt much power for doing things like running
servos, operating stepper motors, reading potentiometers, or displaying text on an LCD. Like
most any language based on C, the Arduino supports the notion of libraries code
repositories that extend core programming functionality. Libraries let you re-use code without
having to physically copy and paste it into all your programs. The standard Arduino software
installation comes with several libraries you may use, and you can download others from the
Arduino support pages and from third-party websites that publish Arduino library code. A
good example of a library youll use with the Robot and likely many other robot projects is
Servo. This library allows you to connect one or more hobby R/C servos to the Arduinos
digital

I/O

pins.

The Servo library comes with the standard Arduino installation

packageLibrary->Servo. This adds the line

#include <Servo.h>

32

which tells the Arduino IDE that you wish to include the Servo library in your sketch. With
the functionality of the library now available to you, you can use its various functions to
control one or more servos. For example, you can use the write function to rotate a servo to a
specific position, from 0 to 180 degrees. The following code

myServo.write(90);

moves a servo to its midpoint, or 90 degree position. Structurally, Arduino sketches are very
straightforward and are pretty easy to read and understand. The Arduino program contains
two main parts: setup() and loop(). These are programming functions that do what their
names suggest: setup() sets up the Arduino hardware, such as specifying which I/O lines
you plan to use, and whether
they are inputs or outputs. The loop() function is repeated endlessly when the Arduino
is operating.
Arduino IDE(Integrated development environment) is used to write the program and dump
into the Arduino board

Following are the steps involved :


1. Open Arduino IDE as shown below

Figure 2.3. Open Arduino IDE

33

2. Select the COM Port from tools

Figure 2.4. Select the COM Port

3.

Select the required Arduino board from Tools as shown below

Figure 2.5. Select the required Arduino board


34

4.Writing required Programme

Figure 2.6. Programme Overview

35

36

37

38

CHAPTER-3
GENERATION OF DC SUPPLY

3.1.Full Wave Bridge Rectifier

Circuit that produces the same output waveform as the full wave rectifier circuit above, is that
of the Full Wave Bridge Rectifier. This type of single phase rectifier uses four individual
rectifying diodes connected in a closed loop bridge configuration to produce the desired
output. The main advantage of this bridge circuit is that it does not require a special centre
tapped transformer, thereby reducing its size and cost. The single secondary winding is
connected to one side of the diode bridge network and the load to the other side as shown
below.

Figure 3.1. The Diode Bridge Rectifier


The four diodes labelled D1 to D4 are arranged in series pairs with only two diodes
conducting current during each half cycle. During the positive half cycle of the supply,
diodes D1 and D2 conduct in series while diodes D3 and D4 are reverse biased and the
current flows through the load as shown below.

39

Figure 3.2. The Positive Half-cycle


During the negative half cycle of the supply, diodes D3 and D4 conduct in series, but
diodes D1 and D2switch OFF as they are now reverse biased. The current flowing through
the load is the same direction as before.

Figure 3.3. The Negative Half-cycle

As the current flowing through the load is unidirectional, so the voltage developed across the
load is also unidirectional the same as for the previous two diode full-wave rectifier, therefore
the average DC voltage across the load is 0.637Vmax .

Figure 3.4.Typical Bridge Rectifier


40

However in reality, during each half cycle the current flows through two diodes instead of
just one so the amplitude of the output voltage is two voltage drops ( 2 x 0.7 = 1.4V ) less
than the input VMAX amplitude. The ripple frequency is now twice the supply frequency (e.g.
100Hz for a 50Hz supply)
Although we can use four individual power diodes to make a full wave bridge rectifier, premade bridge rectifier components are available off-the-shelf in a range of different voltage
and current sizes that can be soldered directly into a PCB circuit board or be connected by
spade connectors.
The image to the right shows a typical single phase bridge rectifier with one corner cut off.
This cut-off corner indicates that the terminal nearest to the corner is the positive
or +ve output terminal or lead with the opposite (diagonal) lead being the negative or ve output lead. The other two connecting leads are for the input alternating voltage from a
transformer secondary winding.
3.1.1 Full wave rectification
Below is a full wave rectifier circuit which makes up of four diodes network for the purpose
of rectification.

Figure3.5. Full wave rectification


30

3.2.The Smoothing Capacitor


We saw in the previous section that the single phase half-wave rectifier produces an output
wave every half cycle and that it was not practical to use this type of circuit to produce a
steady DC supply. The full-wave bridge rectifier however, gives us a greater mean DC value
(0.637 Vmax) with less superimposed ripple while the output waveform is twice that of the
frequency of the input supply frequency. We can therefore increase its average DC output
level even higher by connecting a suitable smoothing capacitor across the output of the bridge
circuit as shown below.

3.2.1 Full-wave Rectifier with Smoothing Capacitor

Figure 3.6. Resultant Output Waveform

31

The smoothing capacitor converts the full-wave rippled output of the rectifier into a smooth
DC output voltage. Generally for DC power supply circuits the smoothing capacitor is an
Aluminium Electrolytic type that has a capacitance value of 100uF or more with repeated DC
voltage pulses from the rectifier charging up the capacitor to peak voltage.
However, their are two important parameters to consider when choosing a suitable smoothing
capacitor and these are its Working Voltage, which must be higher than the no-load output
value of the rectifier and its Capacitance Value, which determines the amount of ripple that
will appear superimposed on top of the DC voltage.
Too low a capacitance value and the capacitor has little effect on the output waveform. But if
the smoothing capacitor is sufficiently large enough (parallel capacitors can be used) and the
load current is not too large, the output voltage will be almost as smooth as pure DC. As a
general rule of thumb, we are looking to have a ripple voltage of less than 100mV peak to
peak.
The maximum ripple voltage present for a Full Wave Rectifier circuit is not only determined
by the value of the smoothing capacitor but by the frequency and load current, and is
calculated as:

3.2.2 Bridge Rectifier Ripple Voltage

32

Where: I is the DC load current in amps, is the frequency of the ripple or twice the input
frequency in Hertz, and C is the capacitance in Farads.
The main advantages of a full-wave bridge rectifier is that it has a smaller AC ripple value for
a given load and a smaller reservoir or smoothing capacitor than an equivalent half-wave
rectifier. Therefore, the fundamental frequency of the ripple voltage is twice that of the AC
supply frequency (100Hz) where for the half-wave rectifier it is exactly equal to the supply
frequency (50Hz).
The amount of ripple voltage that is superimposed on top of the DC supply voltage by the
diodes can be virtually eliminated by adding a much improved -filter (pi-filter) to the output
terminals of the bridge rectifier. This type of low-pass filter consists of two smoothing
capacitors, usually of the same value and a choke or inductance across them to introduce a
high impedance path to the alternating ripple component
Another more practical and cheaper alternative is to use an off the shelf 3-terminal voltage
regulator IC, such as a LM78xx (where xx stands for the output voltage rating) for a
positive output voltage or its inverse equivalent the LM79xx for a negative output voltage
which can reduce the ripple by more than 70dB (Datasheet) while delivering a constant
output current of over 1 amp.
In the next tutorial about diodes, we will look at the Zener Diode which takes advantage of its
reverse breakdown voltage characteristic to produce a constant and fixed output voltage
across itself.

3.3 Clamping :
We can also use method of clamping in Arduino Uno board by Clamping the LVDT output
with Power pin 3 which gives a 3.3 volt supply generated by the on-board regulator.
Maximum current draw is 50 mA So briefly clampers are used to change the D.C. level of a
signal to a desired value as show in fig3.7

33

Figure 3.7. overview

Being different from clippers, clamping circuits uses a capacitor and a diode
connection. When diode is in its on state, the output voltage equals to diode drop
voltage (ideally zero) plus the voltage source, if any. Now let us examine the clamping
process for the circuit in (Fig.3.8)

Figure 3.8. Typical Clamping Circuit


As you know, this circuit, in fact, is a series R-C circuit. The resistance of diode (
several ohms above its drop voltage) and the small capacitance yield to a small
time-constant for this circuit. This means that the capacitor will rapidly be charged if any
input voltage, that is enough to swtich on the diode, is applied. The diode will conduct
during the positive cycle of the input signal (Fig. 3.9) and output voltage will
be ideally zero ( in practice this voltage equals ~0.6 V).

34

Fig 3.9. Diode conducts during positive cycle

Note that during positive cycle the capacitor is rapidly charged in inverse
polarity with the input voltage. After transition to negative cycle, the diode becomes to
its off state. In this case, the output voltage equals to the sum of the input voltage
and the voltage across the terminals of the capacitor which have the same polarity
with each other.(Fig 3.10)

E0 = - ( |Ei |+ |Ec | )

Figure 3.10. Diode is switched off during negative cycle

The resulting signal after a complete cycle is shown below.

Figure 3.11. Resulting signal after a complete cycle


35

By this process, the input signal is shifted to negative D.C. value (its maximum
value is ideally zero) without any change in its amplitude ideally. There exist again modified
versions of this circuit in which a threshold value is inserted for clamping. Following figures
illustrate these modifications and resulting outputs.

Figure 3.12.Modifications and resulting outputs.

Figure 3.13.Modifications and resulting outputs.

36

Figure 3.14.Real Time Clamping LVDT Output voltage in Arduino Uno Board

37

CHAPTER-4
INTERFACING ARDUINO WITH LVDT
4.1Arduino program:
The following program illustrates the generation of PWM signals in the Arduino
UNO. Usually the pulses generated here will be in magnitude of 5V. The logic here gives the
triggering pulses for 180 degree mode conduction.
Void

setup(){

pinMode(3,OUTPUT);
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT); }

Voidloop(){
analogWrite(3,127);
delay(3.333);
analogWrite(5,127);
delay(3.333);
analogWrite(6,127);
delay(3.333);
analogWrite(9,127);
delay(3.333);
analogWrite(10,127);
delay(3.333);
analogWrite(11.127);
delay(3.333);

38

4.2 Liquid Crystal Display Interfacing:

The LiquidCrystal library allows you to control LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you can usually tell them by
the 16-pin interface
The LCDs have a parallel interface, meaning that the microcontroller has to manipulate
several interface pins at once to control the display. The interface consists of the following
pins:
A register select (RS) pin that controls where in the LCD's memory you're writing data to.
You can select either the data register, which holds what goes on the screen, or an instruction
register, which is where the LCD's controller looks for instructions on what to do next.
A Read/Write (R/W) pin that selects reading mode or writing mode
An Enable pin that enables writing to the registers
8 data pins (D0 -D7). The states of these pins (high or low) are the bits that you're writing to a
register when you write, or the values you're reading when you read.
There's also a display constrast pin (Vo), power supply pins (+5V and Gnd) and LED
Backlight (Bklt+ and BKlt-) pins that you can use to power the LCD, control the display
contrast, and turn on and off the LED backlight, respectively.
The process of controlling the display involves putting the data that form the image of what
you want to display into the data registers, then putting instructions in the instruction register.
The LiquidCrystal Library simplifies this for you so you don't need to know the low-level
instructions.
The Hitachi-compatible LCDs can be controlled in two modes: 4-bit or 8-bit. The 4-bit mode
requires seven I/O pins from the Arduino, while the 8-bit mode requires 11 pins. For
displaying text on the screen, you can do most everything in 4-bit mode, so example shows
how to control a 2x16 LCD in 4-bit mode.

4.2.1 Circuit configuration :


Before wiring the LCD screen to your Arduino we suggest to solder a pin header strip to the
14 (or 16) pin count connector of the LCD screen, as you can see in the image above.
39

To wire your LCD screen to your Arduino, connect the following pins:
LCD RS pin to digital pin 12
LCD Enable pin to digital pin 11
LCD D4 pin to digital pin 5
LCD D5 pin to digital pin 4
LCD D6 pin to digital pin 3
LCD D7 pin to digital pin 2

Additionally, wire a 10K pot to +5V and GND, with it's wiper (output) to LCD screens VO
pin (pin3).

Figure 4.1.Configuring LCD screen with Arduino

40

Figure 4.2.Real Time Interfacing Output pins to Arduino & Uno Display Pins.

4.2.2.Code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins


Liqu idCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD. lcd.print("Displacement");
}
41

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0): lcd.setCursor(0,
1);
//

print

the

number

of

seconds

lcd.print(millis()/1000);
}

42

since

reset:

40

CHAPTER-5
Practical Implementation of LVDT

5.1 Methodology to Make LVDT


The conventional LVDT is shown in Fig.5.1, it consists one primary coil excited by AC
supply, two secondary coils and movable iron core. By connecting AC voltmeter across the
output terminal of the LVDT, an RMS voltage proportional to the displacement will be
displayed (that do not have polarity), not direction.

Figure 5.1.Conventional LVDT with back to back connection of secondary windings


Design constraints are mainly to limit construction effort and use easily available materials.
The number of turns in primary is 100 and each of the secondary consists 200 turns with
double layer winding. 1/2" PVC pipe was used to wound the coils and a section of 7/16 iron
rod for core. Here 0.315 mm (30 SWG) insulated copper wire was used to wound the coils.

5.1.1. Design Specifications


- ID of the PVC pipe = 2 cm

41

- OD of the PVC pipe = 2.2 cm (fig.5.4)

- Resistance of 30SWG wire = 0.2212 Ohm/mm

- Diameter of copper wire = 0.315 mm

- Diameter of the core = 1.8 cm

- Material of the core = iron (fig.5.3)

Figure 5.2.LVDT connections with dimentions

42

Figure 5.3.Real time Iron core of LVDT

Figure 5.4.Real time PVC Bobin of LVDT


43

5.1.3Working Specifications
1. LVDT Excitation (i/p) : 1-phase, A.C, 50Hz, 6V, 0.6A

2. Output Voltage Range : +0.501 to 0.523v

3. Zero Adjustment Range : + 0.003 V

4. Linearity : + 0.05% of full scale

5. Operating Temperature : - 20 to 140 deg F

6. Power Consumption : 0.2212 watts

5.2 Working of the LVDT


The position is indicated by the amplitude of DC voltage. The direction is indicated by
polarity of DC voltage, how the positive and negative voltages are increasing and decreasing.
The block diagram shown in Fig. 4 describes the operation of modified LVDT.

Figure 5.3.Block diagram shows the operation of LVDT

44

1-phase, 230V, 50Hz, AC supply was given to the primary winding. Initially movable iron
was placed at center position. The upper secondary winding terminals and lower secondary
winding terminals. In LVDT, terminals were series opposition short circuited and the output
was taken other two terminals.
The output terminals of secondary winding are connected to Diode Bridge to convert AC
voltage to DC voltage as show in figure 5.4, and this positive voltage can be measured by
using Arduino. Hence the total voltage corresponds to the displacement of the movable iron.

Figure 5.4.Real Time full wave Bridge Rectifier

1. Case A:
If the iron is placed in the forward direction, then, the voltage in the Vs1 is high and voltage
in the Vs2 is very low with negative sign. The Difference is positive voltage.

45

2. Case B:

If the iron is placed in the backward direction, then, the voltage in the Vs1 is low and voltage
in the Vs2 reading is high, and results negative voltage.

3. Case C:

If the iron is placed at the centre position across the primary winding, then the reading of Vs1
and Vs2 voltages gets cancelled each other and resultant voltage is zero. This point is known
as null position.

Figure 5.5.Voltages Induced Individually in Secondary windings Vs1 & Vs2 at


Null Position

46

47

Practical Readings

Maximum Induced AC
secondary voltages at Null
position

Vs1

Vs2 =

Vs1

0.478 volts
0.475 volts

- Vs2 = 0.003 volts

Table 1. Voltage Reading Induced Individually

5.3 Practical Implementation


The step by step implementation of the LVDT is given below.

1. Design normal LVDT with 100 turns in primary and a total 200 turns in each secondary
winding with double layer.

2. Give AC supply with 6Volts ,0.6Amp current to primary winding.

3. Place the iron core across the primary coil in such a way that the voltage induced in the
both the secondarys gets cancelled each other and this position is known as Null Position
which gives an error of 0.003v.

4. Now move the iron in forward direction and note the readings .

5. Similarly repeat the Step 4 in reverse direction.


48

6. Plot the graph by taking forward displacement along positive X-axis and reverse
displacement along negative X-axis and total voltage along Y-axis.

7. Determine the linearity i.e. lower bound point and upper bound point.

8. Now calculate the slope (m) of the linearity and determine the line equation passing
through origin having the slope (m) [i.e. y=mx].

9. Now move the iron to any arbitrary position and note the readings of both the voltmeters
and the total voltage. Now the following inferences were obtained

- If the sign of the total voltage is positive indicates forward direction and the value indicates
the position (x) of the iron. [i.e. x=y/m]

- If the sign of the total voltage is negative indicates reverse direction and the value indicates
the position (x) of the iron. [i.e. x=y/m]
- If the value of the total voltage is zero indicates Null Position.

10. The results were validated using graph and with the known values.

Figure 5.7.Real time working model of LVDT


49

50

The LVDT output AC voltages in both the directions

Core moving Downwards &

Core Displacement in Downward

Upward from Null position

Direction In (millimeters)

S.No

Core
(V lt )

(1
0.501(Ma x. V)

0 0134

l )

37.388

0.445

33.432

0.315

23.731

37mm

Forward
Direction

0.139

10.596

0.067

5.223

6
7

0.003 (Nul l pos i ti on)


0.220

0.22mm

0.2238 (error)
17.146
R

Table.2: Voltages in forward/backward directions in LVDT

The graphical representation of the above values shown in Fig.5.8, there is a linear
relationship between the displacement and the voltage induced in the secondary windings.

51

52

Figure 5.8. Variation of voltages in Real Time LVDT


The linearity exists between lower bound point (1.7,0.33) and upper bound point (2.2,0.34)

53

CHAPTER-6
LVDT RESULTS USING ARDUINO

6.1 Arduino Programme :


#include <GraphSeries.h>

GraphSeries g_aGraphs[] = {"wave"};


#include

<LiquidCrystal.h>

LiquidCrystal

lcd(12,11,4,5,6,7);

void setup()
{
Serial.begin(9600);
pinMode(A0,INPUT);
pinMode(A1,INPUT);

void loop()
{
float secondary1 =0;
float

secondary2

=0;

float secondary12 = 0;
float secondary22 = 0;
float secondary13 = 0;
float secondary23 = 0;
50

float dis = 0;
int wave;

for(int i =0; i<=40; i++)

{
secondary1 = sq(3.3 - analogRead(A0)*0.0048);
secondary2 = sq(3.3 - analogRead(A1)*0.0048);
secondary12

=secondary12+secondary1;

secondary22

=secondary22+secondary2;

delay(0.5);
}
secondary13

=sqrt(secondary12/40);

secondary23 =sqrt(secondary22/40);
dis = (125*(secondary13

- secondary23));

Serial.println(l);
lcd.begin(16, 2);

lcd.print("DIS=");
lcd.print(l);
lcd.print(" mm");
g_aGraphs[wave].SendData(analogRead(A0));
g_aGraphs[wave].SendData(analogRead(A1));
delay(1000);

50

6.2 Hardware circuit with Result :

Figure 6.1 Real Time Hardware circuit with Clamping

51 | P a g e

6.3 Serial Monitor Values in Arduino :

Figure 6.2 Serial Monitor Values in mm when Core Moving Upward Direction

Figure 6.3 Serial Monitor Values in mm when Core Moving Downward Direction
52 | P a g e

53 | P a g e

6.4Output waveform in MegunoLink Software :

Figure 6.5. MegunoLink Plotting Tool Graph

54 | P a g e

Conclusion:
In this project we are using Linear variable differential transformer (LVDT)interfacing with
Arduino. LVDT which gives a linear analog position detecting signal is investigated. Arduino
is a single board microcontroller it energises the LVDT and the output signal of LVDT is
then processed by a phase-sensitive demodulate. The output of Arduino is proportional to the
core movement in order to determine displacement. It is used in conjunction with LVDTs to
convert transducer mechanical position to a unipolar or bipolar dc voltage with a high degree
of accuracy and repeatability Hence, output result confirms that the measurement of position
as well as direction of the movable iron of LVDT was possible if the connections of the
secondary windings were in series opposition. The results confirm that the magnetic field
distribution from primary coil to secondary coil is uniform. So that the voltage induced in the
secondary windings was according to the movement of the iron. The output results of LVDT
displacements were valid and these results were verified using Arduino-program

55 | P a g e

References:

1. http://coolarduino.wordpress.com
2. http://forum.arduino.cc
3. http://www.mikesflightdeck.com/lvdts/lvdts.html
4. http://sensorwiki.org/doku.php/sensors/linear_variable_differential_transformer#co
nstruction
5. http://www.efunda.com/designstandards/sensors/lvdt/lvdt_app.cfm

6. http://electronics.ege.edu.tr/

7. www.ieee.org

56 | P a g e

Appendix

List of components:

Transformer 230/0-6v(0.6amp).

Resistors 1K(ohms).

capacitors

Diodes 1N007.

LVDT kit.

Arduino UNO.

Arduino uno Display (16*2).

57 | P a g e

Potrebbero piacerti anche