Dasar LDR DAN THERMISTOR

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 12

Pemakaian Komponen LDR

A photoresistor is a sensor whose resistance varies with light intensity. 


Most decrease in resistance as the light intensity increases.  In a typical
microcontroller application, this resistance must be converted to a voltage
so that an A2D converter can measure it.  The easiest way to do this is with
a voltage divider circuit.

A voltage divider is just two resistors in series connected between a


voltage supply and ground.  If R1 is connected to the voltage supply and
R2 is connected to ground then the voltage at the junction between the two
resistors is:

If R1 is the photoresistor, the voltage will increase with increasing light


intensity.  If R2 is the photoresistor, the voltage will decrease with
increasing light intensity. 

Sample Photoresistor Circuit

- 1 -
Introduction

The interface of various sensors to a controller like the BrainStem GP 1.0


module typically involves either conditioning or converting voltage levels
into the range the controller requires.  Many systems use A/D converters to
make the sensor value relevant in a program or data logging configuration. 
These converters have a fixed range of voltages they can convert from with
0-5V being by far the most common. 

Sensors often create voltages in different ranges than those required by


the controllers they are being interfaced to which requires the conversion
of one voltage to another.  This conversion often breaks down into a
combination one or more of three types, amplification, dividing, and
shifting. 

Dividing Voltages

Voltage dividing is probably the easiest transformation you can perform on


sensor outputs to alter the value being connected to a microcontroller or
other circuit. 

The mathematical equivalent of what you are trying to achieve when


dividing voltages is a simple division.  For instance, say you have a sensor
that outputs 0-100V and you want to convert this to 0-5V for interface to the
A/D input on your BrainStem.  The goal would be to create a 20:1 ratio of
voltage which means dividing the original sensor output voltage by a factor
of 20.  So we need a small circuit that will accomplish the following
pictorially:

The easiest way to accomplish this division is using a few resistors to form
a voltage divider.  The resistors are wired up in series to create
intermediate voltages based with the desired division.  The above example
could be accomplished as follows:

- 2 -
This voltage divider uses the input as the top of the resistor ladder and
ground as the bottom.  The actual division is defined by the proportion of
resistance between the two resistors. 

Notice the above circuit does not work out to an exact division by 20.  This
is because the resistors used are commonly found resistor values. 
Precision resistors with exact tolerances can be used but are often not
needed since the original output of sensors typically varies.  Here the
resulting output voltage is slightly below the maximum of 5V but with a
reasonable A/D converter like the 10-bit converters used in the BrainStem
GP 1.0 module would still offer plenty of dynamic range in the sensor
readings. 

Amplifying Voltages

Voltage amplification is required for a class of sensors that create small


voltages.  Often sensors of this type are converting some sort of physical
energy such as acceleration, temperature, or other minimal physical force
into a voltage.  This conversion is often an inefficient conversion and the
measured energy is minimal which results in very small voltages generated
by the sensor.  To make these small voltages meaningful, they must be
amplified to a usable level. 

The equation for amplification is the exact opposite of dividing.  You want
to multiply the output voltage from a sensor to gain the full range of your
A/D input or other interfaced circuit.  Lets say you have an accelerometer
which measures accelerations in g (gravity) units.  A sensor like this may
have a response of 312mV/g which means the sensor will generate 0.312V
for each gravity unit of force it encounters.  Now, say you would like to
measure up to 2 gravity units (2g) with your detector with the full range of
your 0-5V A/D converter.  This means you need to multiply the output
voltage of your accelerometer by a factor of about 16 to get the desired
range and sensitivity in your measurements.  So we want to accomplish the
following pictorially:

Probably the most common way to multiply a voltage is using an amplifier. 


Here, we will use a common Operational Amplifier (Op Amp) to multiply the
voltage.  These Op Amp circuits are extremely common in electronics and
there are volumes of literature devoted specifically to the various
characteristics and performance of each.  We use one of the original
versions which is widely available and easy to interface called the 741. 
Here is one circuit that will amplify the voltage by a factor of about 16:

- 3 -
There are some things to note about this circuit.  Again, changing
resistance values gives a different voltage amplification (multiplication). 
The small numbers indicate the pins of the 741 package that you would
connect to for this circuit (it is an 8 pin chip).  Also, notice the additional
power supply which is both positive and negative.  This is very common for
Op Amp circuits.  Since the Op Amp is powered by a plus/minus voltage of
9V, the absolute output can at best be 9V.  In practice, the output voltage
will probably be slightly less. 

The gain for this amplifier may not be exactly linear, depending on the
input and output voltages.  This can often be hidden in the noise of the
sensor and accuracy of the A/D conversion on the other end but it should
be considered.  The higher the gain of an amplifier, the larger the margin of
error and noise. 

Shifting Voltages

Shifting voltages can be a requirement for sensor data that are generated
symmetrically about a common (often ground) voltage.  A simple example
of this would be a motor acting as a generator where spinning in one
direction creates a positive voltage and spinning in the other direction
creates a negative voltage.  Since most common A/D converters in
microcontrollers deal with a 0-VCC range for conversions, sensors that are
symmetric about the ground voltage reference need to be shifted into the 0-
VCC range. 

The equation for shifting is then then the addition or subtraction of an


offset from the original sensor's voltage.  For example, if your sensor
produces -2 to 2V, you would want to add 2V to the output for reading with
a common 0-5V A/D converter.  This addition would result in a final output
of 0-4V which the A/D converter could then use.  This conversion looks like
this pictorially:

- 4 -
This circuit is a two-stage summing amplifier using an Op-Amp chip (the
1458) that houses two op-amps on a single chip.  Notice there are some
fixed values of resistors that essentially create a voltage summing circuit. 
The input on one side is a resistor network that creates a fixed voltage to
sum with the input voltage.  The variable resistor values change this
resistor network's set voltage.  You could substitute a potentiometer for R1
and R2 to make the addition variable, by twisting the potentiometer. 

The addition circuit also requires a plus/minus 9V power supply for the op-
amps.  In addition, a tap from the 5V supply used for the logic is used
although this could be done with the positive 9V side as well, provided the
voltages are computed correctly. 

Contents

Combining Conversions

So the above conversions define addition, subtraction, multiplication, and


division of a voltage.  Each of these conversions can be thought of in
isolation as shown above or they can be combined to create composite
conversions.  We essentially have an algebra of blocks we can use to
achieve a wide variety of overall conversions. 

Say you have a sensor that creates -100 to 100V and you want to read the
value with a 0-5V A/D converter.  You would need to scale down the original
voltage to -2.5 to 2.5V first and then offset the result by adding 2.5V to get
the result into the desired range of 0-5V for your A/D converter.  You can

- 5 -
chain together the conversions for such an effect which would look like
this pictorially:

Conversion Impurities

The above conversions all introduce impurities in the resulting signal in the
form of noise, non-linearity, and other corruptions of the original input
voltage.  Care must be taken to minimize the number of stages and also to
order them for reduced error.  Testing and careful thought can typically
reduce these impurities to a minimum but they cannot be disregarded. 

There is a general rule of thumb with regard to these introduced


impurities.  The more you are changing the original voltage, the more
impurities you will introduce.  For instance, an amplification of 100x would
be generally more noisy than one of 2x. 

Power Supply Issues

Several of these circuits require a plus/minus 9V supply for the Op Amps. 


This can readily be accomplished using two standard 9V batteries.  More
sophisticated options include standard power supplies, charge pumps and
inverters and several other options.  The 9V battery is cheap, simple and it
works well.  Op Amp circuits tend to be pretty efficient so the batteries
should last quite some time. 

- 6 -
Thermistor

NTC thermistor, bead type, insulated wires

Thermistor symbol

A thermistor is a type of resistor with resistance varying according to its


temperature. The word is a combination of thermal and resistor. Samuel
Ruben invented the thermistor in 1930, and was awarded U.S. Patent No.
2,021,491.

Thermistors are widely used as inrush current limiters, temperature


sensors, self-resetting overcurrent protectors, and self-regulating heating
elements.

Assuming, as a first-order approximation, that the relationship between


resistance and temperature is linear, then:

ΔR = kΔT

where

ΔR = change in resistance
ΔT = change in temperature
k = first-order temperature coefficient of resistance

Thermistors can be classified into two types depending on the sign of k. If


k is positive, the resistance increases with increasing temperature, and the
device is called a positive temperature coefficient (PTC) thermistor, or

- 7 -
posistor. If k is negative, the resistance decreases with increasing
temperature, and the device is called a negative temperature coefficient
(NTC) thermistor. Resistors that are not thermistors are designed to have
the smallest possible k, so that their resistance remains nearly constant
over a wide temperature range.

Thermistors differ from resistance temperature detectors in that the


material used in a thermistor is generally a ceramic or polymer, while RTDs
use pure metals. The temperature response is also different; RTDs are
useful over larger temperature ranges.

CONTENTS

 1 Steinhart-Hart equation
 2 B parameter equation
 3 Conduction model
 4 Self-heating effects
 5 Applications

Steinhart-Hart equation

In practice, the linear approximation (above) works only over a small


temperature range. For accurate temperature measurements, the
resistance/temperature curve of the device must be described in more
detail. The Steinhart-Hart equation is a widely used third-order
approximation:

where a, b and c are called the Steinhart-Hart parameters, and must be


specified for each device. T is the temperature in kelvins and R is the
resistance in ohms. To give resistance as a function of temperature, the
above can be rearranged into:

The error in the Steinhart-Hart equation is generally less than 0.02°C in the
measurement of temperature. As an example, typical values for a
thermistor with a resistance of 3000 Ω at room temperature (25°C = 298.15
K) are:

- 8 -
B parameter equation

NTC thermistors can also be characterised with the B parameter equation,


which is essentially the Steinhart Hart equation with c=0.where the
temperatures are in kelvin. Using the expansion only to the first order
yields:

The B-parameter equation can also be arranged in the form y = mx + c by


taking natural logs of both sides to give LnR = Bx + 1 / T. This can be used
to convert the function of resistance against temperature of a thermistor,
into a linear function of which the gradient can be found to give the B
value.

- 9 -
Conduction model

Many NTC thermistors are made from a pressed disc or cast chip of a
semiconductor such as a sintered metal oxide. They work because raising
the temperature of a semiconductor increases the number of electrons able
to move about and carry charge - it promotes them into the conduction
band. The more charge carriers that are available, the more current a
material can conduct. This is described in the formula:

I = electric current (ampere)

n = density of charge carriers (count/m³)

A = cross-sectional area of the material (m²)

v = velocity of charge carriers (m/s)

e = charge of an electron ( coulomb)

The current is measured using an ammeter. Over large changes in


temperature, calibration is necessary. Over small changes in temperature,
if the right semiconductor is used, the resistance of the material is linearly
proportional to the temperature. There are many different semiconducting
thermistors with a range from about 0.01 kelvin to 2,000 kelvins (-273.14°C
to 1,700°C).

Most PTC thermistors are of the "switching" type, which means that their
resistance rises suddenly at a certain critical temperature. The devices are
made of a doped polycrystalline ceramic containing barium titanate
(BaTiO3) and other compounds. The dielectric constant of this ferroelectric
material varies with temperature. Below the Curie point temperature, the
high dielectric constant prevents the formation of potential barriers
between the crystal grains, leading to a low resistance. In this region the
device has a small negative temperature coefficient. At the Curie point
temperature, the dielectric constant drops sufficiently to allow the
formation of potential barriers at the grain boundaries, and the resistance
increases sharply. At even higher temperatures, the material reverts to NTC
behaviour. The equations used for modeling this behaviour were derived
by W. Heywang and G. H. Jonker in the 1960s.

Another type of PTC thermistor is the polymer PTC, which is sold under
brand names such as "Polyfuse", "Polyswitch" and "Multiswitch". This
consists of a slice of plastic with carbon grains embedded in it. When the

- 10 -
plastic is cool, the carbon grains are all in contact with each other, forming
a conductive path through the device. When the plastic heats up, it
expands, forcing the carbon grains apart, and causing the resistance of the
device to rise rapidly. Like the BaTiO 3 thermistor, this device has a highly
nonlinear resistance/temperature response and is used for switching, not
for proportional temperature measurement.

Yet another type of thermistor is a Silistor, a thermally sensitive silicon


resistor. Silistors are similarly constructed and operate on the same
principles as other thermistors, but employ silicon as the semiconductive
component material.

Self-heating effects

Though commonly used, "self-heating" is a misnomer. Thermistors are


passive devices and thus cannot heat themselves. It is the external circuit
that supplies the energy that causes the heating. "Resistive heating" is a
more accurate term.

When a current flows through a thermistor, it will generate heat which will
raise the temperature of the thermistor above that of its environment. If the
thermistor is being used to measure the temperature of the environment,
this electrical heating may introduce a significant error if a correction is not
made. Alternatively, this effect itself can be exploited. It can, for example,
make a sensitive air-flow device employed in a sailplane rate-of-climb
instrument, the electronic variometer, or serve as a timer for a relay as was
formerly done in telephone exchanges.

The electrical power input to the thermistor is just

where I is current and V is the voltage drop across the thermistor. This
power is converted to heat, and this heat energy is transferred to the
surrounding environment. The rate of transfer is well described by
Newton's law of cooling:

where T(R) is the temperature of the thermistor as a function of its


resistance R, T0 is the temperature of the surroundings, and K is the
dissipation constant, usually expressed in units of milliwatts per °C. At
equilibrium, the two rates must be equal.

The current and voltage across the thermistor will depend on the particular
circuit configuration. As a simple example, if the voltage across the
thermistor is held fixed, then by Ohm's Law we have I = V / R and the
equilibrium equation can be solved for the ambient temperature as a
function of the measured resistance of the thermistor:

- 11 -
The dissipation constant is a measure of the thermal connection of the
thermistor to its surroundings. It is generally given for the thermistor in still
air, and in well-stirred oil. Typical values for a small glass bead thermistor
are 1.5 mW/°C in still air and 6.0 mW/°C in stirred oil. If the temperature of
the environment is known beforehand, then a thermistor may be used to
measure the value of the dissipation constant. For example, the thermistor
may be used as a flow rate sensor, since the dissipation constant
increases with the rate of flow of a fluid past the thermistor.

Applications

 PTC thermistors can be used as current-limiting devices for circuit


protection, as replacements for fuses. Current through the device
causes a small amount of resistive heating. If the current is large
enough to generate more heat than the device can lose to its
surroundings, the device heats up, causing its resistance to
increase, and therefore causing even more heating. This creates a
self-reinforcing effect that drives the resistance upwards, reducing
the current and voltage available to the device.
 PTC thermistors can be used as heating elements in small
temperature-controlled ovens. As the temperature rises, resistance
increases, decreasing the current and the heating. The result is a
steady state. A typical application is a crystal oven controlling the
temperature of the crystal of a high-precision crystal oscillator.
Crystal ovens are usually set at the upper limit of the equipment's
temperature specification, so they can maintain the temperature by
heating.
 NTC thermistors are used as resistance thermometers in low-
temperature measurements of the order of 10 K.
 NTC thermistors can be used as inrush-current limiting devices in
power supply circuits. They present a higher resistance initially
which prevents large currents from flowing at turn-on, and then heat
up and become much lower resistance to allow higher current flow
during normal operation. These thermistors are usually much larger
than measuring type thermistors, and are purposely designed for
this application.
 NTC thermistors are regularly used in automotive applications. For
example they monitor things like coolant temperature and/or oil
temperature inside the engine and provide data to the ECU and
indirectly the dashboard.
 Thermistors are also commonly used in modern digital thermostats
and to monitor the temperature of battery packs while charging.

- 12 -

You might also like