Sie sind auf Seite 1von 22

HARDWARE IMPLEMENTATION

RELAYS
Introduction:

A relay is an electrical switch that opens and closes under the control of another
electrical circuit. In the original form, the switch is operated by an electromagnet to open
or close one or many sets of contacts. A relay is able to control an output circuit of higher
power than the input circuit, it can be considered to be, in a broad sense, a form of an
electrical amplifier.

Relays are usuallly SPDT (single pole double through switch)or DPDT (double pole
double through switch) but they can have many more sets of switch contacts, for example relays
with 4 sets of changeover contacts are readily available.
Basic operation of a relay:

An electric current through a conductor will produce a magnetic field at right angles
to the direction of electron flow. If that conductor is wrapped into a coil shape, the
magnetic field produced will be oriented along the length of the coil. The greater the
current, the greater the strength of the magnetic field, all other factors being equal.

Inductors react against changes in current because of the energy stored in this
magnetic field. When we construct a transformer from two inductor coils around a
common iron core, we use this field to transfer energy from one coil to the other.
However, there are simpler and more direct uses for electromagnetic fields than the
applications we've seen with inductors and transformers. The magnetic field produced by
a coil of current-carrying wire can be used to exert a mechanical force on any magnetic
object, just as we can use a permanent magnet to attract magnetic objects, except that this
magnet (formed by the coil) can be turned on or off by switching the current on or off
through the coil.

If we place a magnetic object near such a coil for the purpose of making that
object move when we energize the coil with electric current, we have what is called a
solenoid. The movable magnetic object is called an armature, and most armatures can be
moved with either direct current (DC) or alternating current (AC) energizing the coil. The
polarity of the magnetic field is irrelevant for the purpose of attracting an iron armature.
Solenoids can be used to electrically open door latches, open or shut valves, move robotic
limbs, and even actuate electric switch mechanisms and is used to actuate a set of switch
contacts

Relays can be categorized according to the magnetic system and operation:

Neutral Relays:

This is the most elementary type of relay. The neutral relays have a magnetic coil,
which operates the relay at a specified current, regardless of the polarity of the voltage
applied.

Biased Relays:

Biased relays have a permanent magnet above the armature. The relay operates if
the current through the coil winding establishes a magneto-motive force that opposes the
flux by the permanent magnet. If the fluxes are in the same direction, the relay will not
operate, even for a greater current through the coil.

Polarized Relays:

Like the biased relays, the polarized relays operate only when the current through
the coil in one direction. But there the principle is different. The relay coil has a diode
connected in series with it. This blocks the current in the reverse direction.
The major difference between biased relays and polarized relays is that the former
allows the current to pass through in the reverse direction, but does the not operate the
relay and the later blocks the current in reverse direction. You can imagine how critical
these properties when relays are connected in series to form logic circuits.

Magnetic Stick Relays or Perm polarized Relays:

These relays have a magnetic circuit with high permanence. Two coils, one to
operate (pick up) and one to release (drop) are present. The relay is activated by a current
in the operate coil. On the interruption of the current the armature remains in picked up
position by the residual magnetism. The relay is released by a current through the release
coil.

Slow Release Relays:

These relays have a capacitor connected in parallel to their coil. When the
operating current is interrupted the release of relay is delayed by the stored charge in the
capacitor. The relay releases as the capacitor discharges through the coil.

Relays for AC:

These are neutral relays and picked up for a.c. current through their coil. These
are very fast in action and used on power circuits of the point motors, where high current
flows through the contacts. A normal relay would be slow and make sparks which in turn
may weld the contacts together.

All relays have two operating values (voltages), one pick-up and the other other
drop away. The pick-up value is higher than the drop away value.

Applications:

 To control a high-voltage circuit with a low-voltage signal, as in some types of modems


or audio amplifiers,
 To control a high-current circuit with a low-current signal, as in the starter solenoid of an
automobile,
 To detect and isolate faults on transmission and distribution lines by opening and closing
circuit breakers (protection relays),
 To isolate the controlling circuit from the controlled circuit when the two are at different
potentials, for example when controlling a mains-powered device from a low-voltage
switch. The latter is often applied to control office lighting as the low voltage wires are
easily installed in partitions, which may be often moved as needs change. They may also
be controlled by room occupancy detectors in an effort to conserve energy,

 To perform logic functions. For example, the boolean AND function is realised by
connecting NO relay contacts in series, the OR function by connecting NO contacts in
parallel. The change-over or Form C contacts perform the XOR (exclusive or) function.
Similar functions for NAND and NOR are accomplished using NC contacts. The Ladder
programming language is often used for designing relay logic networks.
o Early computing. Before vacuum tubes and transistors, relays were used as
logical elements in digital computers. See ARRA (computer), Harvard Mark II,
Zuse Z2, and Zuse Z3.
o Safety-critical logic. Because relays are much more resistant than semiconductors
to nuclear radiation, they are widely used in safety-critical logic, such as the
control panels of radioactive waste-handling machinery.
 To perform time delay functions. Relays can be modified to delay opening or delay
closing a set of contacts. A very short (a fraction of a second) delay would use a copper
disk between the armature and moving blade assembly. Current flowing in the disk
maintains magnetic field for a short time, lengthening release time. For a slightly longer
(up to a minute) delay, a dashpot is used. A dashpot is a piston filled with fluid that is
allowed to escape slowly. The time period can be varied by increasing or decreasing the
flow rate. For longer time periods, a mechanical clockwork timer is installed

LM35 (Temperature sensor)

The LM35 series are precision integrated-circuit temperature sensors, whose output voltage
is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an
advantage over linear temperature sensors calibrated in ˚ Kelvin, as the user is not
required to subtract a large constant voltage from its output to obtain convenient Centi-
grade scaling. The LM35 does not require any external calibration or trimming to
provide typical accuracies of ± 1⁄4˚C at room temperature and ±3⁄4˚C over a full −55 to
+150˚C temperature range. Low cost is assured by trimming and calibration at the wafer
level. The LM35’s low output imped- ance, linear output, and precise inherent calibration
make interfacing to readout or control circuitry especially easy. It can be used with
single power supplies, or with plus and minus supplies. As it draws only 60 µA from its
supply, it has very low self-heating, less than 0.1˚C in still air. The LM35 is rated to operate
over a −55˚ to +150˚C temperature range, while the LM35C is rated for a −40˚ to +110˚C
range (−10˚ with improved accuracy). The LM35 series is available pack-aged in hermetic
TO-46 transistor packages, while the LM35C, LM35CA, and LM35D are also
available in the plastic TO-92 transistor package. The LM35D is also avail- able in an 8-
lead surface mount small outline package and a plastic TO-220 package.

Features

n Calibrated directly in ˚ Celsius (Centigrade)

n Linear + 10.0 mV/˚C scale factor

n 0.5˚C accuracy guaranteeable (at +25˚C)

n Rated for full −55˚ to +150˚C range

n Suitable for remote applications

n Low cost due to wafer-level trimming

n Operates from 4 to 30 volts

n Less than 60 µA current drain

n Low self-heating, 0.08˚C in still air

n Nonlinearity only ± 1⁄4˚C typical

n Low impedance output, 0.1 for 1 mA load


Block Diagram

The LM35 can be applied easily in the same way as other integrated-circuit temperature
s e n s o r s . It can be glued or cemented to a surface and its temperature will be within
about 0.01˚C of the surface temperature.

This presumes that the ambient air temperature is almost the same as the surface temperature; if
the air temperature were much higher or lower than the surface temperature, the actual
temperature of the LM35 die would be at an intermediate temperature between the surface
temperature and the air temperature. This is especially true for the TO-92 plastic package,
where the copper leads are the principal thermal path to carry heat into the device, so its
temperature might be closer to the air temperature than to the surface tempera- true.
To minimize this problem, be sure that the wiring to the LM35, as it leaves the device, is
held at the same tempera- ture as the surface of interest. The easiest way to do this is to
cover up these wires with a bead of epoxy which will insure that the leads and wires are
all at the same tempera- ture as the surface, and that the LM35 die’s temperature will not be
affected by the air temperature.

The TO-46 metal package can also be soldered to a metal surface or pipe without
damage. Of course, in that case the V− terminal of the circuit will be grounded to that
metal. Alternatively, the LM35 can be mounted inside a sealed-end metal tube, and can then
be dipped into a bath or screwed into a threaded hole in a tank. As with any IC, the LM35
and accompanying wiring and circuits must be kept insulated and dry, to avoid leakage and
corrosion. This is especially true if the circuit may operate at cold temperatures where
condensation can occur. Printed-circuit coatings and varnishes such as Humiseal a n d epoxy
paints or dips are often used to insure that moisture cannot corrode the LM35 or its
connections.

These devices are sometimes soldered to a small light-weight heat fin, to decrease
the thermal time constant and speed up the response in slowly-moving air. On the other
hand, a small thermal mass may be added to the sensor, to give the steadiest reading
despite small deviations in the air temperature.

LCD (Liquid Cristal Display)

Introduction:

A liquid crystal display (LCD) is a thin, flat display device made up of any
number of color or monochrome pixels arrayed in front of a light source or reflector. Each pixel
consists of a column of liquid crystal molecules suspended between two transparent electrodes,
and two polarizing filters, the axes of polarity of which are perpendicular to each other. Without
the liquid crystals between them, light passing through one would be blocked by the other. The
liquid crystal twists the polarization of light entering one filter to allow it to pass through the
other.
A program must interact with the outside world using input and output devices that
communicate directly with a human being. One of the most common devices attached to an
controller is an LCD display. Some of the most common LCDs connected to the contollers are
16X1, 16x2 and 20x2 displays. This means 16 characters per line by 1 line 16 characters per line
by 2 lines and 20 characters per line by 2 lines, respectively.

Many microcontroller devices use 'smart LCD' displays to output visual information. LCD
displays designed around LCD NT-C1611 module, are inexpensive, easy to use, and it is even
possible to produce a readout using the 5X7 dots plus cursor of the display. They have a standard
ASCII set of characters and mathematical symbols. For an 8-bit data bus, the display requires a
+5V supply plus 10 I/O lines (RS RW D7 D6 D5 D4 D3 D2 D1 D0). For a 4-bit data bus it only
requires the supply lines plus 6 extra lines(RS RW D7 D6 D5 D4). When the LCD display is not
enabled, data lines are tri-state and they do not interfere with the operation of the microcontroller.

Features:

(1) Interface with either 4-bit or 8-bit microprocessor.

(2) Display data RAM

(3) 80x 8 bits (80 characters).

(4) Character generator ROM

(5). 160 different 5 7 dot-matrix character patterns.

(6). Character generator RAM

(7) 8 different user programmed 5 7 dot-matrix patterns.

(8).Display data RAM and character generator RAM may be

Accessed by the microprocessor.

(9) Numerous instructions

Shapes and S
(10) .Clear Display, Cursor Home, Display ON/OFF, Cursor ON/OFF,

Blink Character, Cursor Shift, Display Shift.

(11). Built-in reset circuit is triggered at power ON.

(12). Built-in oscillator.

Data can be placed at any location on the LCD. For 16×1 LCD, the address locations
are:

Fig : Address locations for a 1x16 line LCD


Shapes and sizes:

Even limited to character based modules,there is still a wide variety of shapes and sizes
available. Line lenghs of 8,16,20,24,32 and 40 charecters are all standard, in one, two and four
line versions.

Several different LC technologies exists. “supertwist” types, for example, offer Improved
contrast and viewing angle over the older “twisted nematic” types. Some modules are available
with back lighting, so so that they can be viewed in dimly-lit conditions. The back lighting may
be either “electro-luminescent”, requiring a high voltage inverter circuit, or simple LED
illumination.
Electrical blockdiagram:

Power supply for lcd driving:


PIN DESCRIPTION:

Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two
pins are extra in both for back-light LED connections).

Fig: pin diagram of 1x16 lines lcd


CONTROL LINES:

EN:

Line is called "Enable." This control line is used to tell the LCD that you are
sending it data. To send data to the LCD, your program should make sure this line is low
(0) and then set the other two control lines and/or put data on the data bus. When the
other lines are completely ready, bring EN high (1) and wait for the minimum amount of
time required by the LCD datasheet (this varies from LCD to LCD), and end by bringing
it low (0) again.

RS:

Line is the "Register Select" line. When RS is low (0), the data is to be treated as
a command or special instruction (such as clear screen, position cursor, etc.). When RS is
high (1), the data being sent is text data which sould be displayed on the screen. For
example, to display the letter "T" on the screen you would set RS high.
RW:

Line is the "Read/Write" control line. When RW is low (0), the information on the
data bus is being written to the LCD. When RW is high (1), the program is effectively
querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read
command. All others are write commands, so RW will almost always be low.

Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation
selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0,
DB1, DB2, DB3, DB4, DB5, DB6, and DB7.

Logic status on control lines:

• E - 0 Access to LCD disabled

- 1 Access to LCD enabled

• R/W - 0 Writing data to LCD

- 1 Reading data from LCD

• RS - 0 Instructions

- 1 Character

Writing data to the LCD:

1) Set R/W bit to low

2) Set RS bit to logic 0 or 1 (instruction or character)

3) Set data to data lines (if it is writing)

4) Set E line to high

5) Set E line to low


Read data from data lines (if it is reading)on LCD:

1) Set R/W bit to high

2) Set RS bit to logic 0 or 1 (instruction or character)

3) Set data to data lines (if it is writing)

4) Set E line to high

5) Set E line to low

Entering Text:

First, a little tip: it is manually a lot easier to enter characters and commands in
hexadecimal rather than binary (although, of course, you will need to translate commands from
binary couple of sub-miniature hexadecimal rotary switches is a simple matter, although a little bit
into hex so that you know which bits you are setting). Replacing the d.i.l. switch pack with a of re-
wiring is necessary.

The switches must be the type where On = 0, so that when they are turned to the zero
position, all four outputs are shorted to the common pin, and in position “F”, all four outputs are
open circuit.

All the available characters that are built into the module are shown in Table 3. Studying
the table, you will see that codes associated with the characters are quoted in binary and
hexadecimal, most significant bits (“left-hand” four bits) across the top, and least significant bits
(“right-hand” four bits) down the left.

Most of the characters conform to the ASCII standard, although the Japanese and Greek
characters (and a few other things) are obvious exceptions. Since these intelligent modules were
designed in the “Land of the Rising Sun,” it seems only fair that their Katakana phonetic symbols
should also be incorporated. The more extensive Kanji character set, which the Japanese share
with the Chinese, consisting of several thousand different characters, is not included!

Using the switches, of whatever type, and referring to Table 3, enter a few characters onto
the display, both letters and numbers. The RS switch (S10) must be “up” (logic 1) when sending
the characters, and switch E (S9) must be pressed for each of them. Thus the operational order is:
set RS high, enter character, trigger E, leave RS high, enter another character, trigger E, and so on.

The first 16 codes in Table 3, 00000000 to 00001111, ($00 to $0F) refer to the CGRAM.
This is the Character Generator RAM (random access memory), which can be used to hold user-
defined graphics characters. This is where these modules really start to show their potential,
offering such capabilities as bar graphs, flashing symbols, even animated characters. Before the
user-defined characters are set up, these codes will just bring up strange looking symbols.

Codes 00010000 to 00011111 ($10 to $1F) are not used and just display blank characters.
ASCII codes “proper” start at 00100000 ($20) and end with 01111111 ($7F). Codes 10000000 to
10011111 ($80 to $9F) are not used, and 10100000 to 11011111 ($A0 to $DF) are the Japanese
characters.
Initialization by Instructions:
If the power conditions for the normal operation of the internal reset circuit
are not satisfied, then executing a series of instructions must initialize LCD unit.
The procedure for this initialization process is as above show.

CURRENT SENSORS:
Features and Benefits

▪ Low-noise analog signal path

▪ Device bandwidth is set via the new FILTER pin

▪ 5 μs output rise time in response to step input current

▪ 80 kHz bandwidth

▪ Total output error 1.5% at TA = 25°C

▪ Small footprint, low-profile SOIC8 package

▪ 1.2 mΩ internal conductor resistance

▪ 2.1 kVRMS minimum isolation voltage from pins 1-4 to pins 5-8

▪ 5.0 V, single supply operation

▪ 66 to 185 mV/A output sensitivity

▪ Output voltage proportional to AC or DC currents

▪ Factory-trimmed for accuracy

▪ Extremely stable output offset voltage

▪ Nearly zero magnetic hysteresis

▪ Ratiometric output from supply voltage

Description

The Allegro® ACS712 provides economical and precise solutions for AC or DC


current sensing in industrial, commercial, and communications systems. The device
package allows for easy implementation by the customer. Typical applications include
motor control, load detection and management, switched-mode power supplies, and over-
current fault protection. The device consists of a precise, low-offset, linear Hall sensor
circuit with a copper conduction path located near the surface of the die. Applied current
flowing through this copper conduction path generates a magnetic field which is sensed
by the integrated Hall IC and converted into a proportional voltage. Device accuracy is
optimized through the close proximity of the magnetic signal to the Hall transducer. A
precise, proportional voltage is provided by the low-offset, chopper-stabilized .

POTENTIOMETER:
A potentiometer is a three-terminal resistor with a sliding or rotating contact that
forms an adjustable voltage divider.[1] if only two terminals are used, one end and the
wiper, it acts as a variable resistoror rheostat.

The measuring instrument called a potentiometer is essentially a voltage


divider used for measuring electric potential (voltage); the component is an
implementation of the same principle, hence its name.
Potentiometers are commonly used to control electrical devices such as volume
controls on audio equipment. Potentiometers operated by a mechanism can be used as
position transducers, for example, in a joystick. Potentiometers are rarely used to directly
control significant power (more than a watt), since the power dissipated in the
potentiometer would be comparable to the power in the controlled load.

Das könnte Ihnen auch gefallen