Friday, March 28, 2008

Opamps: Operational Amplifiers

Operational amplifiers, often known as opamps, are nifty little integrated circuits that contain several transistors. These transistors are used to amplify or attenuate a signal, depending on the circuit that the opamp is placed in.

Why use an opamp when you can use a transistor? Because opamp packages are easier to control, generally more powerful, and also more versatile. An equivalent amplifier circuit might take numerous components, but the opamp places them all into a compact package, reducing the amplifier’s circuit board footprint and the number of components that could fail.



The classic opamp, and perhaps the most widely used, is the UA741. This device comes in several packages, including a compact 8 pin DIP as well as a 10, 14, and 20 pin version for other purposes. All of these are quite cheap, with the 8 pin version costing only $0.30 or so at most online retailers. You would pay considerably more to construct an amplifier circuit using pure transistors.

Opamps are used very frequently for signal conditioning circuits. Let’s say you have a sensor, perhaps a heartbeat sensor, and it is picking up a signal of several millivolts. You want the signal to be windowed to 0-5V so you can hook it up to an analog-to-digital converter. Sounds hard right? Not so!

The first step in designing your circuit is to determine the gain you will need. Let’s assume that the signal from your sensor has a peak of 5 millivolts. In that case, you can calculate the gain as:

To find the gain you need, you divide the desired output by the input, in this case 5 and 5E-3 (.005) volts, respectively. Here, we need a gain of one thousand. Can the opamp handle that magnitude? Yes!

Now we need to construct our circuit. The opamp is represented as a triangle:


The leads on the left are inputs. One of these has to be grounded and which one depends on whether your signal is inverted or not. To avoid inverting (flipping) your signal, you need to ground IN- and connect your signal to IN+.

The other goofy thing about the opamp is that it needs two VCC signals, unlike most other integrated circuits. They should be identical in magnitude, but opposite in polarity. For example, you might connect positive 12V to VCC+ and negative 12V to VCC-. Finally, we have Vout, which is the output signal.

Now, to perform the amplification, we need to tell the opamp what gain we want. To do this, we but two resistors in a circuit with it, forming the classic non-inverting amplifier circuit:
Here, we see the two resistors, R1 and R2. The approximate gain of the amplifier in this case would be the ratio of R2 to R1. The two resistors can be any values as long as they maintain that ratio. In our case, we could use a 1000 ohm resistor for R1 and a 1 megaohm resistor for R2.

Now if this circuit was actually constructed, Vin could be connected to the sensor and Vout could be connected to the ADC. By looking at the input and output signals on an oscilloscope, you would be able to see that the signal was clearly amplified. If no amplification is occurring or you only see noise, ensure that your circuit is connected properly, you have +12 and -12 (not ground) volts connected to the opamp’s VCC, and also make sure that everything has a common ground. These are the most common mistakes that I have committed when working with opamps.

Now you should be able to go out and use the opamp effectively. We have looked at the most common circuit configuration, but it is also possible to configure the opamp to do frequency-based filtering and other nifty things.

Artikel From : freeinfosociety.com

Read More......

Monday, March 17, 2008

LED

Light from a Light Emitting Diode (LED) is created in much the same way that light is created in a flourescent tube or neon sign. In an LED crystal the electrons of its atoms are pumped up to higher energy states, and when they fall back down again, each atom gives off a particle/wave of light. However, the electrons in an LED are not exactly the same as the gas molecules in a neon sign. They are not in orbitals stuck to individual atoms.

Instead the electrons occupy a contiguous "sea of charge," and they continually wander among all the atoms in the material. But while they do this, they maintain a particular energy level just like
they do when stuck to individual atoms. It's as if each electron in an LED crystal was "orbiting" among all the atoms of the substance as a whole, and the electron always "orbits" at a particular "height" above each of the atoms it passes.

Be aware that *all* substances contain electrons. The electrons I'm discussing here are not supplied by the battery, they instead occur naturally in the wires, crystals, etc. They are in the LED all the time, even when the battery is not connected. Don't make my original mistake by imagining that electrons are injected into the LED by the power supply. In fact, they are already in the material, and the power supply simply forces them to flow.

To create LED light, first we connect two conductive crystals of different characteristics together. Both types of crystal contain movable electrons. In one type of crystal the electrons "orbit" naturally at a high energy level, and in the other, they always "orbit" low. When a voltage is applied across the joined crystals, the electrons inside are forced to flow across the boundary between the pair of crystals. If the flow direction is correct, electrons in the "high" crystal flow into the "low" crystal and must begin orbiting at the lower energy level. As they fall to the lower energy level, they give off light. The frequency of the light (which we see as the color) is determined by the difference in energy levels between the two crystals. By manufacturing different types of crystals having different natural energy levels, various colors of light can be created. Crystals with similar levels create low-energy photons of red light or even infrared light. With a larger difference in energy levels, green light can be created. An even larger energy-step can create blue light.

The "high" and "low" crystals are usually called "n-type" and "p-type." In n-type crystals the movable electrons wander around while staying at the upper energy level of an unfilled outer atomic orbital. During an electric current they travel at this level. In "p-type" crystals the mobile electrons naturally exist at a deeper orbital level. When the two crystals are connected to each other and then connected properly in a circuit with a battery, the battery creates a current in the entire circuit. It sucks electrons out of the end of the p-type crystal and into the wire. At the same time it pushes electrons into the far end of the n-type crystal. The electrons already in the n-type crystal then are forced to flow across the crystal junction, fall down in energy, emit light, and end up back in the p-type crystal.

Where did the electrons get the energy to emit light? How do they get to a higher energy level so they can enter the n-type crystal? Well, in order for the battery to push electrons through the LED, it had to apply electrical attraction and repulsion forces to the electrons in the crystal. To apply force to the electrons in the crystal, it had to apply a force to the electrons in the negative wire. This squeezes all the electrons on the surface of the negative wire together, which raises the voltage of the entire wire. (If electrons were like water, then the wire is like a long trough. The battery pumps water into one end of the trough, and this makes the water level 'voltage' rise everywhere in the trough.) When the negative wire's electrons get to the energy level equal to the n-type crystal, they start flowing into the crystal and falling "down" the junction, emitting light as they go. (This analogy is incomplete: at the same time that the battery was pumping up the "water level" of the negative wire to match the n-type crystal level, it also was REDUCING the "water level" of the positive wire so that the low-energy electrons of the p-type crystal could be sucked into the wire.)

Here's another way to visualize LEDs. In a neon sign, the electrons around each neon atom get pumped up in energy as they're whacked by incoming high-speed electrons. In an LED the battery pumps up the electrons directly. In a neon sign, each atom emits light when an electron falls back to its original energy level. In an LED, the whole crystal junction emits light as electrons drop back to a lower level. Therefor an LED resembles a gigantic single neon atom! An LED/atom is so large that we can connect its electron cloud directly to a battery with wires. It's so large that we can build in different characteristics, and change the color of its flourescence.

Light Emitting Diodes are much like solar cells. Both devices use n-type and p-type crystals, but in a solar cell the process runs backwards: instead of falling down in energy and emitting light, light hitting the solar cell causes electrons in the p-type crystal to jump upwards in energy. If these electrons are near the crystal junction, they can end up in the n-type crystal, and they can flow through wires to the outside world, falling down in energy as they do. In fact, if light shines on an LED, the LED behaves as a tiny, inefficient solar cell. And conversely, if a battery is used to create a current in a solar cell, the solar cell can emit a very tiny amount of (mostly infrared) light. An LED gives light when charge is pumped through it, and when light shines on a solar cell, the solar cell becomes a charge pump.

Light Emitting Diodes are also like thermocouples. N-type and p-type crystals are not the only materials whose electrons "orbit" at different energy levels. Different metals have different levels too. If a copper wire is twisted together with an iron wire, a junction is formed between them which contains an energy-step like that of an LED. The energy-step in a thermocouple is much smaller than in an LED. If electrons are forced to flow across the thermocouple's energy step, they fall down in energy level and emit energy. But what do they emit? Longwave Infrared light and crystal vibrations. Together we call these by the name "heat energy". The energy step in a thermocouple is too small, so it cannot emit photons of visible light. Instead it creates "heat." And conversely, if heated, a thermocouple can create an electric current. When operated one way, a thermocouple is a bit like an LED which emits heat. When operated the other way, it acts a bit like a "solar battery" and becomes a "heat battery."

Read More......

Sunday, March 9, 2008

Transistor

Transistors are electronic switching devices, which are the basis of nearly all electronic circuits. This page will give a brief outline of what they are, as well as different methods to interface analog transistors from digital circuitry.

Introduction

The simple explanation of a transistor is that it is a combination of three 'doped' pieces of semi-conductor material.

The piece in the middle is called the Base (in Bipolar Junction Transistors), and the outside edges are the Collector, and the Emitter.

When current is put into the Base, it changes the voltage characteristics of the entire transistor, and so it is possible to control the current flowing from the Collector to the Emitter. So a small change of current on the base, results in a large change between the Collector and Emitter.

Bi-Polar Junction Transistors (BJT)
NPN

This is the simplest type of BJT to understand. As you can see in the diagram below, when you apply voltage to the base of the BJT, it turns on the transistor.

A more detailed explanation is that when current is applied onto the base, it changes the voltage difference between the collector and the base. This difference changes the bias within the transistor, causing current to flow from the collector to the emitter.

When there isn't a lot of charge on the base, there are areas within the semiconductor that aren't capable of carrying current from collector to emitter. This means that a lot of power is dissipated to drive the current through. When there is so much charge on the base that no more will fit, the transistor is said to be saturated. There are plenty of carriers for the current, and not much power is dissipated, making the transistor more efficient. This is only true when the transistors Emitter is connected directly to ground (Common Emitter).

This diagram shows how an NPN is turned on. When the base is turned off (connected to ground), there is no way to put current through the transistor, so the transistor is off. When the base voltage is raised, driving charge onto the base, it turns the transistor on.

PNP

The PNP isn't quite as simple. The base still controls the flow of current, but it is more or less opposite. In order to turn the transistor on the base is connected to ground (turned off). To turn the transistor off, voltage is applied to the base.

The reason for this is because of the type of semi-conductor used. When the base is connected to ground, loose electrons are taken away, creating 'holes'. These holes can be thought of as positive charges, and are capable of carrying current from the Emitter to the Collector.

A PNP transistor will saturate only when it is set up as a Common Emitter

The diagram below shows how this works.

This PNP is set up as a Common Emitter configuration. When the input to the base is turned off, the transistor is turned on, and current flows through the load (resistor) to ground. When the base is 'turned on', it removes the 'holes' from the base, causing current to stop flowing in the transistor.

Read More......

Sunday, March 2, 2008

Dioda

Figure 1.1: Diode Schematic Symbol and Casing

A semiconductor diode consists of a semiconductor PN junction and has two terminals, an anode (+) and a cathode (-). Current flows from anode to cathode within the diode (according to the high to low circuit analysis method), but only when there is at least a certain amount of forward voltage applied. When positive voltage is applied across the diode, it is called a forward bias, whereas a negative voltage is called a reverse bias.

A diode is best described as a one way valve, since it only allows current to flow from anode to cathode. For example, if you applied a reverse bias to the diode with a magnitude of 5 volts, current would not flow.

If you applied 5 volts with a positive bias, current would flow.

This seems pretty simple, but there are exceptions to the one way valve analogy. For example, diodes have a minimum forward voltage level to allow current to flow. In most cases, about .7 volts are needed to trigger current flow. You can see this from figure 1.3 below. The current does not start to flow until a certain amount of forward voltage is applied.

Another exception is the breakdown voltage. All diodes have a point where, if the reverse voltage is high enough, the semiconductor structure will break down, allowing current to flow. This value is usually fifty volts or higher and when the breakdown voltage is reached, it generally damages or destroys the diode.

Why is a diode useful? Because it can be used for rectification, protection of components from reverse voltage, and creating interesting wave shapes. For example, say you have an electrolytic capacitor that can only withstand 10V of reverse bias voltage. All you have to do is place a diode in front of it and it will block most reverse voltages from destroying the capacitor. Rectification is the process of converting an alternating current signal into a direct current signal and is used in all AC to DC converters and power supplies.

Figure 1.2: The Operation of an Ideal Diode

Figure 1.3: The Operation of a Real Diode

Read More......