Professional Documents
Culture Documents
A regulated power supply is very much essential for several electronic devices due to the
semiconductor material employed in them have a fixed rate of current as well as voltage. The device
may get damaged if there is any deviation from the fixed rate. The AC power supply gets converted
into constant DC by this circuit. By the help of a voltage regulator DC, unregulated output will be
fixed to a constant voltage. The circuit is made up of linear voltage regulator 7805 along with
capacitors and resistors with bridge rectifier made up from diodes. From giving an unchanging
voltage supply to building confident that output reaches uninterrupted to the appliance, the diodes
along with capacitors handle elevated efficient signal conveyed.
As we have previously talked about that regulated power supply is a device that
fixed voltage all the time although if there is a significant alteration in the DC
input voltage.
ICs regulator is mainly used in the circuit to maintain the exact voltage
the capacitor connected in parallel to the input terminal and the output terminal
of the IC regulator. For the checking of gigantic alterations in the input as well
as in the output filter, capacitors are used. While the bypass capacitors are used
to check the small period spikes on the input and output level. Bypass capacitors
are mainly of small values that are used to bypass the small period pulses
straightly into the Earth. A circuit diagram having regulator IC and all the above
Arduino Uno
Background
Technical specifications
Microcontroller: Microchip ATmega328P
Operating Voltage: 5 Volt
Input Voltage: 7 to 20 Volts
Digital I/O Pins: 14 (of which 6 provide PWM output)
Analog Input Pins: 6
DC Current per I/O Pin: 20 mA
DC Current for 3.3V Pin: 50 mA
Flash Memory: 32 KB of which 0.5 KB used by bootloader
SRAM: 2 KB
EEPROM: 1 KB
Clock Speed: 16 MHz
Length: 68.6 mm
Width: 53.4 mm
Weight: 25 g
Pins
Arduino UNO
General Pin functions
LED: There is a built-in LED driven by digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it's off.
VIN: The input voltage to the Arduino/Genuino 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.
5V: This pin outputs a regulated 5V from the regulator on the board. The
board can be supplied with power either from the DC power jack (7 - 20V),
the USB connector (5V), or the VIN pin of the board (7-20V). Supplying
voltage via the 5V or 3.3V pins bypasses the regulator, and can damage the
board.
3V3: A 3.3 volt supply generated by the on-board regulator. Maximum
current draw is 50 mA.
GND: Ground pins.
IOREF: This pin on the Arduino/Genuino board provides the voltage
reference with which the microcontroller operates. A properly configured
shield can read the IOREF pin voltage and select the appropriate power
source or enable voltage translators on the outputs to work with the 5V or
3.3V.
Reset: Typically used to add a reset button to shields which block the one
on the board.
Special Pin Functions
Each of the 14 digital pins and 6 Analog pins on the Uno can be used as an
input or output, using pinMode(),digitalWrite(), and digitalRead() functions.
They operate at 5 volts. Each pin can provide or receive 20 mA as
recommended operating condition and has an internal pull-up resistor
(disconnected by default) of 20-50k ohm. A maximum of 40mA is the value
that must not be exceeded on any I/O pin to avoid permanent damage to the
microcontroller.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 analogReference() function.
Communication
The Arduino/Genuino Uno has a number of facilities for communicating with a
computer, another Arduino/Genuino board, 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 (IDE) includes a serial monitor which allows
simple textual data to be sent to and from the 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 serial communication on any of the
Uno's digital pins.
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. It was invented
by Joseph Henry in 1835. Because a relay is able to control an output circuit of
higher power than the input circuit, it can be considered, in a broad sense, to
be a form of an electrical amplifier
Relays are components which allow a low-power circuit to switch a
relatively high current on and off, or to control signals that must be electrically
isolated from the controlling circuit itself.
To make a relay operate, you have to pass a suitable pull-in and holding
current (DC) through its energizing coil. And generally relay coils are designed
to operate from a particular supply voltage - often 12V or 5V, in the case of
many of the small relays used for electronics work. In each case the coil has a
resistance which will draw the right pull-in and holding currents when it is
connected to that supply voltage. So the basic idea is to choose a relay with a
coil designed to operate from the supply voltage you’re using for your control
circuit (and with contacts capable of switching the currents you want to
control), and then provide a suitable relay driver circuit so that your low-power
circuitry can control the current through the relay coil. Typically this will be
somewhere between 25mA and 70mA.
Often your relay driver can be very simple, using little more than an NPN
or PNP transistor to control the coil current. All your low-power circuitry has to
do is provide enough base current to turn the transistor on and off
In A, NPN transistor Q1 (say a BC337 or BC338) is being used to control a
relay (RLY1) with a 12V coil, operating from a +12V supply. Series base resistor
R1 is used to set the base current for Q1, so that the transistor is driven into
saturation (fully turned on) when the relay is to be energized. That way, the
transistor will have minimal voltage drop, and hence dissipate very little power
ó as well as delivering most of the 12V to the relay coil. RLY1 needs 50mA of
coil current to pull in and hold reliably, and has a resistance of 240W so it
draws this current from 12V. Our BC337/338 transistor will need enough base
current to make sure it remains saturated at this collector Current level. To
work this out, we simply make sure that the base current is greater than this
collector current divided by the transistor is minimum DC current gain hFE. So
as the BC337/338 has a minimum hFE of 100 (at 100mA), we had need to
provide it with at least 50mA/100 = 0.5mA of base current. In practice, you’d
give it roughly double this value, say 1mA of base current, just to make sure it
does saturate. So if your control signal Vin was switching between 0V and
+12V, you’d give R1 a value of say 11kW, to provide the 1mA of base current
needed to turn on both Q1 and the relay.
If our relay has a coil resistance of say 180W, so that it draws say 67mA
at 12V, we’d need to reduce R1 to say 8.2kW, to increase the base current to
about 1.4mA. Conversely if the relay coil is 360W and draws only 33mA, we
could increase R1 to 15kW, giving about 0.76mA of base current. Each time we
go for about twice the relay coil current divided by Q1’s hFE
Otherwise everything works just as before, and the value of base resistor
R2 is worked out in the same way as for R1. In fact because the minimum hFE
of the BC327/328 PNP transistors is also 100 at 100mA, you could use exactly
the same values of R2 to suit each relay resistance/current. The simple
transistor driver circuits of A and B are very low in cost, and are generally fine
for driving most relays. However there may be occasions, such as when your
control circuit is based on CMOS logic, where the base current needed by
these circuits is a bit too high.
Because the sensing inputs of the 555 are voltage sensing and need only
a micro amp or so of current, the value of input resistor R3 can be much larger
than for the transistor driver circuits. Typically you’d use a value of say 100kW,
or even 220kW for a circuit operating from 12V.
Although the push-pull output stage of the 555 automatically shunts the
relay coil when pin 3 is high, damping the back-EMF, it is probably still a good
idea to fit diode D3 as well- especially when using this circuit from a 12V
supply. That is because the negative-going back-EMF pulse could cause
damage to the transistors inside the 555. Capacitor C1 is fitted to make sure
that the 555 doesn’t turn on the relay in response to noise spikes on the supply
line.
By the way if you need the very low input current of this circuit, but
want to make the relay operate when Vin is low rather than high, simply
connect the relay coil and D3 from pin 3 of the 555 to ground ó just like the
arrangement shown in diagram B.
Finally in all of these circuits, it is a good idea to fit the supply line of the
relay/driver stage with a reasonably high value of bypass capacitor (say 100uF),
to absorb the current transients when the relay turns on and off. This will
ensure more reliable operation, and help prevent interference with the
operation of your control circuitry.
RECTIFIER
direct current or at least to current with only positive value, a process known
FULL-WAVE RECTIFICATION
center tapped transformer, four diodes are required instead of the one needed for
rectifiers each, for example, one for when AC terminal 'X' is positive and one
for when AC terminal 'Y' is positive. The other DC output requires exactly the
rectifiers arranged this way are called a diode bridge or bridge rectifier:
A full-wave rectifier converts the whole of the input waveform to one of
constant polarity (positive or negative) at its output by reversing the negative (or
negative) portions thus combine with the reversed negative (or positive)
For single-phase AC, if the transformer is center-tapped, then two diodes back-
BRIDGE RECTIFIER
RESISTOR
Resistor
Type Passive
Electronic symbol
Axial-lead resistors on tape. The component is cut from the tape during assembly and the part
is inserted into the board.
Size comparison of axial-lead resistors.
A resistor is a passive two-terminal electrical component that implements electrical
resistance as a circuit element. In electronic circuits, resistors are used to reduce current flow,
adjust signal levels, to divide voltages, bias active elements, and terminate transmission lines,
among other uses. High-power resistors that can dissipate many watts of electrical power as
heat, may be used as part of motor controls, in power distribution systems, or as test loads
for generators. Fixed resistors have resistances that only change slightly with temperature,
time or operating voltage. Variable resistors can be used to adjust circuit elements (such as a
volume control or a lamp dimmer), or as sensing devices for heat, light, humidity, force, or
chemical activity.
Resistors are common elements of electrical networks and electronic circuits and are
ubiquitous in electronic equipment. Practical resistors as discrete components can be
composed of various compounds and forms. Resistors are also implemented within integrated
circuits.
The electrical function of a resistor is specified by its resistance: common commercial
resistors are manufactured over a range of more than nine orders of magnitude. The nominal
value of the resistance falls within the manufacturing tolerance, indicated on the component.
Electronic symbols and notation
Main articles: Electronic symbol and RKM code
Two typical schematic diagram symbols are as follows:
IEC resistor symbol
The notation to state a resistor's value in a circuit diagram varies.
One common scheme is the RKM code following IEC 60062. It avoids using a decimal
separator and replaces the decimal separator with a letter loosely associated with SI prefixes
corresponding with the part's resistance. For example, 8K2 as part marking code, in a circuit
diagram or in a bill of materials (BOM) indicates a resistor value of 8.2 kΩ. Additional zeros
imply a tighter tolerance, for example 15M0 for three significant digits. When the value can
be expressed without the need for a prefix (that is, multiplicator 1), an "R" is used instead of
the decimal separator. For example, 1R2 indicates 1.2 Ω, and 18R indicates 18 Ω.
Theory of operation
Ohm's law
Main article: Ohm's law
The behaviour of an ideal resistor is dictated by the relationship specified by Ohm's law:
Ohm's law states that the voltage (V) across a resistor is proportional to the current (I), where
the constant of proportionality is the resistance (R). For example, if a 300 ohm resistor is
attached across the terminals of a 12 volt battery, then a current of 12 / 300 =
0.04 amperes flows through that resistor.
Practical resistors also have some inductance and capacitance which affect the relation
between voltage and current in alternating current circuits.
The ohm (symbol: Ω) is the SI unit of electrical resistance, named after Georg Simon Ohm.
An ohm is equivalent to a volt per ampere. Since resistors are specified and manufactured
over a very large range of values, the derived units of milliohm (1 mΩ = 10 −3 Ω), kilohm (1
kΩ = 103 Ω), and megohm (1 MΩ = 106 Ω) are also in common usage.
Series and parallel resistors
Main article: Series and parallel circuits
The total resistance of resistors connected in series is the sum of their individual resistance
values.
The total resistance of resistors connected in parallel is the reciprocal of the sum of the
reciprocals of the individual resistors.
For example, a 10 ohm resistor connected in parallel with a 5 ohm resistor and a 15 ohm
resistor produces 1/1/10 + 1/5 + 1/15 ohms of resistance, or 30/11 = 2.727 ohms.
A resistor network that is a combination of parallel and series connections can be broken up
into smaller parts that are either one or the other. Some complex networks of resistors cannot
be resolved in this manner, requiring more sophisticated circuit analysis. Generally, the Y-Δ
transform, or matrix methods can be used to solve such problems.[2][3][4]
Power dissipation
At any instant, the power P (watts) consumed by a resistor of resistance R (ohms) is
calculated as: where V (volts) is the voltage across the resistor and I(amps) is
the current flowing through it. Using Ohm's law, the two other forms can be derived. This
power is converted into heat which must be dissipated by the resistor's package before its
temperature rises excessively.
Resistors are rated according to their maximum power dissipation. Discrete resistors in solid-
state electronic systems are typically rated as 1/10, 1/8, or 1/4 watt. They usually absorb
much less than a watt of electrical power and require little attention to their power rating.
An aluminium-encased power resistor rated for dissipation of 50 W when mounted on a heat-
sink
Resistors required to dissipate substantial amounts of power, particularly used in power
supplies, power conversion circuits, and power amplifiers, are generally referred to as power
resistors; this designation is loosely applied to resistors with power ratings of 1 watt or
greater. Power resistors are physically larger and may not use the preferred values, color
codes, and external packages described below.
If the average power dissipated by a resistor is more than its power rating, damage to the
resistor may occur, permanently altering its resistance; this is distinct from the reversible
change in resistance due to its temperature coefficient when it warms. Excessive power
dissipation may raise the temperature of the resistor to a point where it can burn the circuit
board or adjacent components, or even cause a fire. There are flameproof resistors that fail
(open circuit) before they overheat dangerously.
Since poor air circulation, high altitude, or high operating temperatures may occur, resistors
may be specified with higher rated dissipation than is experienced in service.
All resistors have a maximum voltage rating; this may limit the power dissipation for higher
resistance values.
VZR power resistor 1.5kΩ 12W, manufactured in 1963 in the Soviet Union
Nonideal properties
Practical resistors have a series inductance and a small parallel capacitance; these
specifications can be important in high-frequency applications. In a low-noise
amplifier or pre-amp, the noise characteristics of a resistor may be an issue.
The temperature coefficient of the resistance may also be of concern in some precision
applications.
The unwanted inductance, excess noise, and temperature coefficient are mainly dependent on
the technology used in manufacturing the resistor. They are not normally specified
individually for a particular family of resistors manufactured using a particular technology.
[5]
A family of discrete resistors is also characterized according to its form factor, that is, the
size of the device and the position of its leads (or terminals) which is relevant in the practical
manufacturing of circuits using them.
Practical resistors are also specified as having a maximum power rating which must exceed
the anticipated power dissipation of that resistor in a particular circuit: this is mainly of
concern in power electronics applications. Resistors with higher power ratings are physically
larger and may require heat sinks. In a high-voltage circuit, attention must sometimes be paid
to the rated maximum working voltage of the resistor. While there is no minimum working
voltage for a given resistor, failure to account for a resistor's maximum rating may cause the
resistor to incinerate when current is run through it.
Fixed resistor
A single in line (SIL) resistor package with 8 individual, 47 ohm resistors. One end of each
resistor is connected to a separate pin and the other ends are all connected together to the
remaining (common) pin – pin 1, at the end identified by the white dot.
Lead arrangements
Carbon pile
A carbon pile resistor is made of a stack of carbon disks compressed between two metal
contact plates. Adjusting the clamping pressure changes the resistance between the plates.
These resistors are used when an adjustable load is required, for example in testing
automotive batteries or radio transmitters. A carbon pile resistor can also be used as a speed
control for small motors in household appliances (sewing machines, hand-held mixers) with
ratings up to a few hundred watts.[9] A carbon pile resistor can be incorporated in
automatic voltage regulators for generators, where the carbon pile controls the field current to
maintain relatively constant voltage.[10] The principle is also applied in the carbon
microphone.
Carbon film
Carbon film resistor with exposed carbon spiral (Tesla TR-212 1 kΩ)
A carbon film is deposited on an insulating substrate, and a helix is cut in it to create a long,
narrow resistive path. Varying shapes, coupled with the resistivity of amorphous carbon
(ranging from 500 to 800 μΩ m), can provide a wide range of resistance values. Compared to
carbon composition they feature low noise, because of the precise distribution of the pure
graphite without binding.[11] Carbon film resistors feature a power rating range of 0.125 W
to 5 W at 70 °C. Resistances available range from 1 ohm to 10 megohm. The carbon film
resistor has an operating temperature range of −55 °C to 155 °C. It has 200 to 600 volts
maximum working voltage range. Special carbon film resistors are used in applications
requiring high pulse stability.[8]
A carbon resistor printed directly onto the SMD pads on a PCB. Inside a 1989 vintage Psion
II Organiser
Carbon composition resistors can be printed directly onto printed circuit board (PCB)
substrates as part of the PCB manufacturing process. Although this technique is more
common on hybrid PCB modules, it can also be used on standard fibreglass PCBs.
Tolerances are typically quite large, and can be in the order of 30%. A typical application
would be non-critical pull-up resistors.
The resistance of both thin and thick film resistors after manufacture is not highly accurate;
they are usually trimmed to an accurate value by abrasive or laser trimming. Thin film
resistors are usually specified with tolerances of 1% and 5%, and with temperature
coefficients of 5 to 50 ppm/K. They also have much lower noise levels, on the level of 10–
100 times less than thick film resistors. [13] Thick film resistors may use the same conductive
ceramics, but they are mixed with sintered (powdered) glass and a carrier liquid so that the
composite can be screen-printed. This composite of glass and conductive ceramic (cermet)
material is then fused (baked) in an oven at about 850 °C.
Thick film resistors, when first manufactured, had tolerances of 5%, but standard tolerances
have improved to 2% or 1% in the last few decades. Temperature coefficients of thick film
resistors are high, typically ±200 or ±250 ppm/K; a 40-kelvin (70 °F) temperature change can
change the resistance by 1%.
Thin film resistors are usually far more expensive than thick film resistors. For example,
SMD thin film resistors, with 0.5% tolerances, and with 25 ppm/K temperature coefficients,
when bought in full size reel quantities, are about twice the cost of 1%, 250 ppm/K thick film
resistors.
Metal film
A common type of axial-leaded resistor today is the metal-film resistor. Metal Electrode
Leadless Face (MELF) resistors often use the same technology.
Metal film resistors are usually coated with nickel chromium (NiCr), but might be coated
with any of the cermet materials listed above for thin film resistors. Unlike thin film resistors,
the material may be applied using different techniques than sputtering (though this is one of
the techniques). Also, unlike thin-film resistors, the resistance value is determined by cutting
a helix through the coating rather than by etching. (This is similar to the way carbon resistors
are made.) The result is a reasonable tolerance (0.5%, 1%, or 2%) and a temperature
coefficient that is generally between 50 and 100 ppm/K.[14] Metal film resistors possess good
noise characteristics and low non-linearity due to a low voltage coefficient. Also beneficial
are their tight tolerance, low temperature coefficient and long-term stability.[8]
Wire wound
High-power wire wound resistors used for dynamic braking on an electric railway car. Such
resistors may dissipate many kilowatts for an extended length of time.
2. bifilar
4. Ayrton-Perry
Wirewound resistors are commonly made by winding a metal wire, usually nichrome, around
a ceramic, plastic, or fiberglass core. The ends of the wire are soldered or welded to two caps
or rings, attached to the ends of the core. The assembly is protected with a layer of paint,
molded plastic, or an enamel coating baked at high temperature. These resistors are designed
to withstand unusually high temperatures of up to 450 °C.[8] Wire leads in low power
wirewound resistors are usually between 0.6 and 0.8 mm in diameter and tinned for ease of
soldering. For higher power wirewound resistors, either a ceramic outer case or an aluminum
outer case on top of an insulating layer is used – if the outer case is ceramic, such resistors are
sometimes described as "cement" resistors, though they do not actually contain any
traditional cement. The aluminum-cased types are designed to be attached to a heat sink to
dissipate the heat; the rated power is dependent on being used with a suitable heat sink, e.g., a
50 W power rated resistor overheats at a fraction of the power dissipation if not used with a
heat sink. Large wirewound resistors may be rated for 1,000 watts or more.
Because wirewound resistors are coils they have more undesirable inductance than other
types of resistor, although winding the wire in sections with alternately reversed direction can
minimize inductance. Other techniques employ bifilar winding, or a flat thin former (to
reduce cross-section area of the coil). For the most demanding circuits, resistors with Ayrton-
Perry winding are used.
Applications of wirewound resistors are similar to those of composition resistors with the
exception of the high frequency. The high frequency response of wirewound resistors is
substantially worse than that of a composition resistor.[8]
Foil resistor
Ammeter shunts
An ammeter shunt is a special type of current-sensing resistor, having four terminals and a
value in milliohms or even micro-ohms. Current-measuring instruments, by themselves, can
usually accept only limited currents. To measure high currents, the current passes through the
shunt across which the voltage drop is measured and interpreted as current. A typical shunt
consists of two solid metal blocks, sometimes brass, mounted on an insulating base. Between
the blocks, and soldered or brazed to them, are one or more strips of low temperature
coefficient of resistance (TCR) manganin alloy. Large bolts threaded into the blocks make the
current connections, while much smaller screws provide volt meter connections. Shunts are
rated by full-scale current, and often have a voltage drop of 50 mV at rated current. Such
meters are adapted to the shunt full current rating by using an appropriately marked dial face;
no change need to be made to the other parts of the meter.
Grid resistor
In heavy-duty industrial high-current applications, a grid resistor is a large convection-cooled
lattice of stamped metal alloy strips connected in rows between two electrodes. Such
industrial grade resistors can be as large as a refrigerator; some designs can handle over 500
amperes of current, with a range of resistances extending lower than 0.04 ohms. They are
used in applications such as dynamic braking and load banking for locomotives and trams,
neutral grounding for industrial AC distribution, control loads for cranes and heavy
equipment, load testing of generators and harmonic filtering for electric substations.[18]
The term grid resistor is sometimes used to describe a resistor of any type connected to
the control grid of a vacuum tube. This is not a resistor technology; it is an electronic circuit
topology.
Special varieties
Cermet
Phenolic
Tantalum
Water resistor
Variable resistors
Adjustable resistors
A resistor may have one or more fixed tapping points so that the resistance can be changed by
moving the connecting wires to different terminals. Some wirewound power resistors have a
tapping point that can slide along the resistance element, allowing a larger or smaller part of
the resistance to be used.
Where continuous adjustment of the resistance value during operation of equipment is
required, the sliding resistance tap can be connected to a knob accessible to an operator. Such
a device is called a rheostat and has two terminals.
Potentiometers
Drawing of potentiometer with case cut away, showing parts: (A) shaft, (B) stationary carbon
composition resistance element, (C) phosphor bronze wiper, (D) shaft attached to wiper, (E,
G) terminals connected to ends of resistance element, (F) terminal connected to wiper.
An assortment of small through-hole potentiometers designed for mounting on printed circuit
boards.
A potentiometer (colloquially, pot) is a three-terminal resistor with a continuously adjustable
tapping point controlled by rotation of a shaft or knob or by a linear slider. [19] The
name potentiometer comes from its function as an adjustable voltage divider to provide a
variable potentialat the terminal connected to the tapping point. Volume control in an audio
device is a common application of a potentiometer. A typical low power potentiometer (see
drawing) is constructed of a flat resistance element (B) of carbon composition, metal film, or
conductive plastic, with a springy phosphor bronze wiper contact (C) which moves along the
surface. An alternate construction is resistance wire wound on a form, with the wiper sliding
axially along the coil.[19] These have lower resolution, since as the wiper moves the resistance
changes in steps equal to the resistance of a single turn.[19]
High-resolution multiturn potentiometers are used in precision applications. These have wire-
wound resistance elements typically wound on a helical mandrel, with the wiper moving on a
helical track as the control is turned, making continuous contact with the wire. Some include
a conductive-plastic resistance coating over the wire to improve resolution. These typically
offer ten turns of their shafts to cover their full range. They are usually set with dials that
include a simple turns counter and a graduated dial, and can typically achieve three digit
resolution. Electronic analog computers used them in quantity for setting coefficients, and
delayed-sweep oscilloscopes of recent decades included one on their panels.
Special devices
There are various devices whose resistance changes with various quantities. The resistance of
NTC thermistors exhibit a strong negative temperature coefficient, making them useful for
measuring temperatures. Since their resistance can be large until they are allowed to heat up
due to the passage of current, they are also commonly used to prevent excessive current
surges when equipment is powered on. Similarly, the resistance of a humistor varies with
humidity. One sort of photodetector, the photoresistor, has a resistance which varies with
illumination.
The strain gauge, invented by Edward E. Simmons and Arthur C. Ruge in 1938, is a type of
resistor that changes value with applied strain. A single resistor may be used, or a pair (half
bridge), or four resistors connected in a Wheatstone bridge configuration. The strain resistor
is bonded with adhesive to an object that is subjected to mechanical strain. With the strain
gauge and a filter, amplifier, and analog/digital converter, the strain on an object can be
measured.
A related but more recent invention uses a Quantum Tunnelling Composite to sense
mechanical stress. It passes a current whose magnitude can vary by a factor of 10 12 in
response to changes in applied pressure.
Measurement
The value of a resistor can be measured with an ohmmeter, which may be one function of
a multimeter. Usually, probes on the ends of test leads connect to the resistor. A simple
ohmmeter may apply a voltage from a battery across the unknown resistor (with an internal
resistor of a known value in series) producing a current which drives a meter movement. The
current, in accordance with Ohm's law, is inversely proportional to the sum of the internal
resistance and the resistor being tested, resulting in an analog meter scale which is very non-
linear, calibrated from infinity to 0 ohms. A digital multimeter, using active electronics, may
instead pass a specified current through the test resistance. The voltage generated across the
test resistance in that case is linearly proportional to its resistance, which is measured and
displayed. In either case the low-resistance ranges of the meter pass much more current
through the test leads than do high-resistance ranges, in order for the voltages present to be at
reasonable levels (generally below 10 volts) but still measurable.
Measuring low-value resistors, such as fractional-ohm resistors, with acceptable accuracy
requires four-terminal connections. One pair of terminals applies a known, calibrated current
to the resistor, while the other pair senses the voltage drop across the resistor. Some
laboratory quality ohmmeters, especially milliohmmeters, and even some of the better digital
multimeters sense using four input terminals for this purpose, which may be used with special
test leads. Each of the two so-called Kelvin clips has a pair of jaws insulated from each other.
One side of each clip applies the measuring current, while the other connections are only to
sense the voltage drop. The resistance is again calculated using Ohm's Law as the measured
voltage divided by the applied current.
Standards
Production resistors
Resistor characteristics are quantified and reported using various national standards. In the
US, MIL-STD-202[21] contains the relevant test methods to which other standards refer.
There are various standards specifying properties of resistors for use in equipment:
IEC 60062 (IEC 62) / DIN 40825 / BS 1852 / IS 8186 / JIS C 5062 etc. (Resistor
color code, RKM code, date code)
MIL-PRF-26
MIL-PRF-914
MIL-R-11 STANDARD CANCELED
Resistance standards
The primary standard for resistance, the "mercury ohm" was initially defined in 1884 in as a
column of mercury 106.3 cm long and 1 square millimeter in cross-section, at 0 degrees
Celsius. Difficulties in precisely measuring the physical constants to replicate this standard
result in variations of as much as 30 ppm. From 1900 the mercury ohm was replaced with a
precision machined plate of manganin.[23] Since 1990 the international resistance standard has
been based on the quantized Hall effect discovered by Klaus von Klitzing, for which he won
the Nobel Prize in Physics in 1985.[24]
Resistors of extremely high precision are manufactured for calibration and laboratory use.
They may have four terminals, using one pair to carry an operating current and the other pair
to measure the voltage drop; this eliminates errors caused by voltage drops across the lead
resistances, because no charge flows through voltage sensing leads. It is important in small
value resistors (100–0.0001 ohm) where lead resistance is significant or even comparable
with respect to resistance standard value.
Resistor marking
Axial resistors' cases are usually tan, brown, blue, or green (though other colors are
occasionally found as well, such as dark red or dark gray), and display 3-6 colored stripes that
indicate resistance (and by extension tolerance), and may be extended to indicate the
temperature coefficient and reliability class. The first two stripes represent the first two digits
of the resistance in ohms, the third represents a multiplier, and the fourth the tolerance (which
if absent, denotes ±20%). For five- and six- striped resistors the third is the third digit, the
fourth the multiplier and the fifth is the tolerance; a sixth stripe represents the temperature
coefficient. The power rating of the resistor is usually not marked and is deduced from the
size.
Preferred values
E-series of preferred numbers
Early resistors were made in more or less arbitrary round numbers; a series might have 100,
125, 150, 200, 300, etc. [26] Resistors as manufactured are subject to a certain
percentage tolerance, and it makes sense to manufacture values that correlate with the
tolerance, so that the actual value of a resistor overlaps slightly with its neighbors. Wider
spacing leaves gaps; narrower spacing increases manufacturing and inventory costs to
provide resistors that are more or less interchangeable.
A logical scheme is to produce resistors in a range of values which increase in a geometric
progression, so that each value is greater than its predecessor by a fixed multiplier or
percentage, chosen to match the tolerance of the range. For example, for a tolerance of ±20%
it makes sense to have each resistor about 1.5 times its predecessor, covering a decade in 6
values. In practice the factor used is 1.4678, giving values of 1.47, 2.15, 3.16, 4.64, 6.81, 10
for the 1–10-decade (a decade is a range increasing by a factor of 10; 0.1–1 and 10–100 are
other examples); these are rounded in practice to 1.5, 2.2, 3.3, 4.7, 6.8, 10; followed by 15,
22, 33, … and preceded by … 0.47, 0.68, 1. This scheme has been adopted as the E48
series of the IEC 60063 preferred number values. There are
also E12, E24, E48, E96 and E192 series for components of progressively finer resolution,
with 12, 24, 96, and 192 different values within each decade. The actual values used are in
the IEC 60063 lists of preferred numbers.
A resistor of 100 ohms ±20% would be expected to have a value between 80 and 120 ohms;
its E6 neighbors are 68 (54–82) and 150 (120–180) ohms. A sensible spacing, E6 is used for
±20% components; E12 for ±10%; E24 for ±5%; E48 for ±2%, E96 for ±1%; E192 for
±0.5% or better. Resistors are manufactured in values from a few milliohms to about a
gigaohm in IEC60063 ranges appropriate for their tolerance. Manufacturers may sort resistors
into tolerance-classes based on measurement. Accordingly, a selection of 100 ohms resistors
with a tolerance of ±10%, might not lie just around 100 ohm (but no more than 10% off) as
one would expect (a bell-curve), but rather be in two groups – either between 5 and 10% too
high or 5 to 10% too low (but not closer to 100 ohm than that) because any resistors the
factory had measured as being less than 5% off would have been marked and sold as resistors
with only ±5% tolerance or better. When designing a circuit, this may become a
consideration. This process of sorting parts based on post-production measurement is known
as "binning", and can be applied to other components than resistors (such as speed grades for
CPUs).
Earlier power wirewound resistors, such as brown vitreous-enameled types, however, were
made with a different system of preferred values, such as some of those mentioned in the first
sentence of this section.
SMT resistors
This image shows four surface-mount resistors (the component at the upper left is
a capacitor) including two zero-ohm resistors. Zero-ohm links are often used instead of wire
links, so that they can be inserted by a resistor-inserting machine. Their resistance is
negligible.
Surface mounted resistors of larger sizes (metric 1608 and above) are printed with numerical
values in a code related to that used on axial resistors. Standard-tolerance surface-mount
technology (SMT) resistors are marked with a three-digit code, in which the first two digits
are the first two significant digits of the value and the third digit is the power of ten (the
number of zeroes). For example:
334 = 33 × 104 Ω = 330 kΩ
222 = 22 × 102 Ω = 2.2 kΩ
473 = 47 × 103 Ω = 47 kΩ
105 = 10 × 105 Ω = 1 MΩ
Resistances less than 100 Ω are written: 100, 220, 470. The final zero represents ten to the
power zero, which is 1. For example:
100 = 10 × 100 Ω = 10 Ω
220 = 22 × 100 Ω = 22 Ω
Sometimes these values are marked as 10 or 22 to prevent a mistake.
Resistances less than 10 Ω have 'R' to indicate the position of the decimal point (radix point).
For example:
4R7 = 4.7 Ω
R300 = 0.30 Ω
0R22 = 0.22 Ω
0R01 = 0.01 Ω
Precision resistors are marked with a four-digit code, in which the first three digits are the
significant figures and the fourth is the power of ten. For example:
1001 = 100 × 101 Ω = 1.00 kΩ
4992 = 499 × 102 Ω = 49.9 kΩ
1000 = 100 × 100 Ω = 100 Ω
000 and 0000 sometimes appear as values on surface-mount zero-ohm links, since these have
(approximately) zero resistance.
More recent surface-mount resistors are too small, physically, to permit practical markings to
be applied.
Industrial type designation
Format: [two letters]<space>[resistance value (three digit)]<nospace>[tolerance
code(numerical – one digit)] [27]
Power
MIL-R-11 MIL-R-39008
Type No. rating
Style Style
(watts)
1
BB ⁄8 RC05 RCR05
1
CB ⁄4 RC07 RCR07
1
EB ⁄2 RC20 RCR20
GB 1 RC32 RCR32
HB 2 RC42 RCR42
GM 3 - -
HM 4 - -
Tolerance Code
Industrial
MIL
type Tolerance
Designation
designation
5 ±5% J
2 ±20% M
1 ±10% K
- ±2% G
- ±1% F
- ±0.5% D
- ±0.25% C
- ±0.1% B
If a resistor is coded:
EB1041: power dissipation capacity = 1/2 watts, resistance value = 10×10^4±10% =
between 9×10^4 ohms and 11×10^4 ohms.
Failure modes
The failure rate of resistors in a properly designed circuit is low compared to other electronic
components such as semiconductors and electrolytic capacitors. Damage to resistors most
often occurs due to overheating when the average power delivered to it greatly exceeds its
ability to dissipate heat (specified by the resistor's power rating). This may be due to a fault
external to the circuit, but is frequently caused by the failure of another component (such as a
transistor that shorts out) in the circuit connected to the resistor. Operating a resistor too close
to its power rating can limit the resistor's lifespan or cause a significant change in its
resistance. A safe design generally uses overrated resistors in power applications to avoid this
danger.
Low-power thin-film resistors can be damaged by long-term high-voltage stress, even below
maximum specified voltage and below maximum power rating. This is often the case for the
startup resistors feeding the SMPS integrated circuit.[citation needed]
When overheated, carbon-film resistors may decrease or increase in resistance. [30] Carbon
film and composition resistors can fail (open circuit) if running close to their maximum
dissipation. This is also possible but less likely with metal film and wirewound resistors.
There can also be failure of resistors due to mechanical stress and adverse environmental
factors including humidity. If not enclosed, wirewound resistors can corrode.
Surface mount resistors have been known to fail due to the ingress of sulfur into the internal
makeup of the resistor. This sulfur chemically reacts with the silver layer to produce non-
conductive silver sulfide. The resistor's impedance goes to infinity. Sulfur resistant and anti-
corrosive resistors are sold into automotive, industrial, and military applications. ASTM
B809 is an industry standard that tests a part's susceptibility to sulfur.
An alternative failure mode can be encountered where large value resistors are used
(hundreds of kilohms and higher). Resistors are not only specified with a maximum power
dissipation, but also for a maximum voltage drop. Exceeding this voltage causes the resistor
to degrade slowly reducing in resistance. The voltage dropped across large value resistors can
be exceeded before the power dissipation reaches its limiting value. Since the maximum
voltage specified for commonly encountered resistors is a few hundred volts, this is a
problem only in applications where these voltages are encountered.
Variable resistors can also degrade in a different manner, typically involving poor contact
between the wiper and the body of the resistance. This may be due to dirt or corrosion and is
typically perceived as "crackling" as the contact resistance fluctuates; this is especially
noticed as the device is adjusted. This is similar to crackling caused by poor contact in
switches, and like switches, potentiometers are to some extent self-cleaning: running the
wiper across the resistance may improve the contact. Potentiometers which are seldom
adjusted, especially in dirty or harsh environments, are most likely to develop this problem.
When self-cleaning of the contact is insufficient, improvement can usually be obtained
through the use of contact cleaner (also known as "tuner cleaner") spray. The crackling noise
associated with turning the shaft of a dirty potentiometer in an audio circuit (such as the
volume control) is greatly accentuated when an undesired DC voltage is present, often
indicating the failure of a DC blocking capacitor in the circuit.
TRANSFORMER:
A transformer is a device that transfers electrical energy from one
circuit to another through inductively coupled wires. A changing current in the
first circuit (the primary) creates a changing magnetic field; in turn, this
magnetic field induces a changing voltage in the second circuit (the secondary).
By adding a load to the secondary circuit, one can make current flow in the
transformer, thus transferring energy from one circuit to the other. The
secondary induced voltage VS is scaled from the primary VP by a factor ideally
equal to the ratio of the number of turns of wire in their respective windings:
The voltage induced across the secondary coil may be calculated from
Faraday's law of induction, which states that
Since the same magnetic flux passes through both the primary and
secondary coils in an ideal transformer, the instantaneous voltage across the
primary winding equals
Taking the ratio of the two equations for VS and VP gives the basic
equation for stepping up or stepping down the voltage
TYPES OF TRANSFORMERS
DISTRIBUTION TRANSFORMER
POWER TRANSFORMER
Power transformers are used in electronic circuits and come in
many different types and applications. Electronics or power transformers
are sometimes considered to be those with ratings of 300 volt-amperes and
below. These transformers normally provide power to the power supply of an
electronic device, such as in power amplifiers in audio receivers.
CLASSIFICATION
The many uses to which transformers are put lead them to be classified in a
number of different ways:
EMBEDDED C
INTRODUCTION TO EMBEDDED C
Looking around, we find ourselves to be surrounded by various types of embedded
systems. Be it a digital camera or a mobile phone or a washing machine, all of them has some
kind of processor functioning inside it. Associated with each processor is the embedded
software. If hardware forms the body of an embedded system, embedded processor acts as the
brain, and embedded software forms its soul. It is the embedded software which primarily
governs the functioning of embedded systems.
During infancy years of microprocessor based systems, programs were developed
using assemblers and fused into the EPROMs. There used to be no mechanism to find what
the program was doing. LEDs, switches, etc. were used to check correct execution of the
program. Some ‘very fortunate’ developers had In-circuit Simulators (ICEs), but they were
too costly and were not quite reliable as well.
As time progressed, use of microprocessor-specific assembly-only as the
programming language reduced and embedded systems moved onto C as theembedded
programming language of choice. C is the most widely used programming language for
embedded processors/controllers. Assembly is also used but mainly to implement those
portions of the code where very high timing accuracy, code size efficiency, etc. are prime
requirements.
Initially C was developed by Kernighan and Ritchie to fit into the space of 8K and to
write (portable) operating systems. Originally it was implemented on UNIX operating
systems. As it was intended for operating systems development, it can manipulate memory
addresses. Also, it allowed programmers to write very compact codes. This has given it the
reputation as the language of choice for hackers too.
As assembly language programs are specific to a processor, assembly language didn’t
offer portability across systems. To overcome this disadvantage, several high level languages,
including C, came up. Some other languages like PLM, Modula-2, Pascal, etc. also came but
couldn’t find wide acceptance. Amongst those, C got wide acceptance for not only embedded
systems, but also for desktop applications. Even though C might have lost its sheen as
mainstream language for general purpose applications, it still is having a strong-hold in
embedded programming. Due to the wide acceptance of C in the embedded systems, various
kinds of support tools like compilers & cross-compilers, ICE, etc. came up and all this
facilitated development of embedded systems using C.
Subsequent sections will discuss what is Embedded C, features of C language,
similarities and difference between C and embedded C, andfeatures of embedded C
programming.
EMBEDDED SYSTEMS PROGRAMMING
Embedded systems programming is different from developing applications on a
desktop computers.
Key characteristics of an embedded system, when compared to PCs, are as follows:
Embedded devices have resource constraints(limited ROM, limited RAM, limited
stack space, less processing power)
Components used in embedded system and PCs are different;
o Embedded systems typically uses smaller, less power consuming components.
o Embedded systems are more tied to the hardware.
Two salient features of Embedded Programming are code speed and code size. Code
speed is governed by the processing power, timing constraints, whereas code size is governed
by available program memory and use of programming language. Goal of embedded system
programming is to get maximum features in minimum space and minimum time.
Embedded systems are programmed using different type of languages:
Machine Code
Low level language, i.e., assembly
High level language like C, C++, Java, Ada, etc.
Application level language like Visual Basic, scripts, Access, etc.
Assembly language maps mnemonic words with the binary machine codes that the
processor uses to code the instructions. Assembly language seems to be an obvious choice for
programming embedded devices. However, use of assembly language is restricted to
developing efficient codes in terms of size and speed. Also, assembly codes lead to higher
software development costs and code portability is not there. Developing small codes are not
much of a problem, but large programs/projects become increasingly difficult to manage in
assembly language. Finding good assembly programmers has also become difficult
nowadays. Hence high level languages are preferred for embedded systems programming.
Use of C in embedded systems is driven by following advantages
It is small and reasonably simpler to learn, understand, program and debug.
C Compilers are available for almost all embedded devices in use today, and there is a
large pool of experienced C programmers.
Unlike assembly, C has advantage of processor-independence and is not specific to any
particular microprocessor/ microcontroller or any system. This makes it convenient for a
user to develop programs that can run on most of the systems.
As C combines functionality of assembly language and features of high level languages,
C is treated as a ‘middle-level computer language’ or ‘high level assembly language’
It is fairly efficient
It supports access to I/O and provides ease of management of large embedded projects.
Many of these advantages are offered by other languages also, but what sets C apart
from others like Pascal, FORTRAN, etc. is the fact that it is a middle level language; it
provides direct hardware control without sacrificing benefits of high level languages.
Compared to other high level languages, C offers more flexibility because C is
relatively small, structured language; it supports low-level bit-wise data manipulation.
Compared to assembly language, C Code written is more reliable and scalable, more
portable between different platforms (with some changes). Moreover, programs developed in
C are much easier to understand, maintain and debug. Also, as they can be developed more
quickly, codes written in C offers better productivity. C is based on the philosophy
‘programmers know what they are doing’; only the intentions are to be stated explicitly. It is
easier to write good code in C & convert it to an efficient assembly code (using high quality
compilers) rather than writing an efficient code in assembly itself. Benefits of assembly
language programming over C are negligible when we compare the ease with which C
programs are developed by programmers.
Objected oriented language, C++ is not apt for developing efficient programs in
resource constrained environments like embedded devices. Virtual functions & exception
handling of C++ are some specific features that are not efficient in terms of space and speed
in embedded systems. Sometimes C++ is used only with very few features, very much as C.
Ada, also an object-oriented language, is different than C++. Originally designed by
the U.S. DOD, it didn’t gain popularity despite being accepted as an international standard
twice (Ada83 and Ada95). However, Ada language has many features that would simplify
embedded software development.
Java is another language used for embedded systems programming. It primarily finds usage
in high-end mobile phones as it offers portability across systems and is also useful for
browsing applications. Java programs require Java Virtual Machine (JVM), which consume
lot of resources. Hence it is not used for smaller embedded devices.
Dynamic C and B# are some proprietary languages which are also being used in
embedded applications.
Efficient embedded C programs must be kept small and efficient; they must be
optimized for code speed and code size. Good understanding of processor architecture
embedded C programming and debugging tools facilitate this.
1. RS232
2. MAX232
3. AT89S51/52
RS232
DB-9 RS-232 is a serial I/O standard, used commonly in PCs and other devices.
MAX232
The output of RS232 is not compatible with the TTL. Inorder to connect
RS232 to AT89S51/52 microcontroller, a converter is required. Here we make
use of MAX232. This can convert the output of the microcontroller to the
RS232 output level and vice versa. Usually, MAX232 consists of two line
drivers for the transmission and reception of data.
ATMEL MICROCONTROLLER
Program
1. Serial Transmission
PROGRAM DESCRIPTION
Serial communication between the computer and
the microcontroller follows the below steps:
Step1
Inorder to configure the serial port, AT89S51/52 uses the SCON register.
The SCON register consists of the following registers as in the figure: In the
program for serial transmission and reception, SCON is entered with the value
0x40.
BIT NAME EXPLANATION
Multiprocessor Communication
5 SM2
Enable
1 TI Transmit Flag
0 RI Receive Flag
The bits SM0 and SM1 will determine the baud rate to be selected. Table below
shows how the baud rate is selected.
Step2
Baud Rate
Baud rate is defined as the rate at which the data is transferred in bits per
second. Usually for serial communication the baud rate is set according to SM0
and SM1. If the value of SM0 and SM1 are “00” or “10”, then baud rate
depends upon the oscillator frequency. In other cases, the baud rate depends
upon the Timer 1 of the microcontroller.
The value that has to be placed in TH1 to generate the required baud rate
depends upon the following equation.
In the program, TH1 is set to the value, 0xFD such that the baud rate is
9600bps according to the above equation for a crystal frequency of 11.059MHz.
Step3
After step 1 and 2, the serial port can be used for transmission and
reception of data. Hyper terminal is used for the reception and transmission of
data through RS232.
In the program of serial transmission, the letter ‘B’ is transmitted through SBUF
of the controller and is displayed on the hyper terminal of PC. While, in case of
serial reception, data is entered on the hyper terminal and it is serially received
through the SBUF of microcontroller. Inorder to view the output on the
microcontroller, in case of serial reception, LCD interfacing has to be done.