Sunday, May 3, 2009

Basic Electronics

For People Who Don't Get It

From Someone Who Barely Does

Electronics are difficult to understand, especially for a beginner. One of the most difficult parts to understand is the difference between voltage and current, so I'm going to do my best to describe basic electronics using a simple analogy that I've found works well. I barely understand how electronics work, so hopefully my explanations will be clearer than those by professionals, who can make things complicated just by trying to be perfect.

So on to the analogy that I use: water. To start out, I will explain voltage, current, and resistance using the water analogy.

Water

Imagine a squeeze bottle full of water (contact lens solution is a great example, but really any squeeze bottle will work). As you squeeze, you are applying pressure, which forces more water through the nozzle. The pressure that you are applying is like voltage; increasing the pressure is the same as applying more voltage, perhaps by adding more batteries to a circuit. The nozzle is a like resistor, keeping you from emptying the entire bottle at once. Finally, the flow of water coming out is like current.

The squeeze bottle also gives you a simple way of thinking about the relationship between pressure, flow, and nozzle size (voltage, current, and resistance, respectively). As you increase pressure, with a constant nozzle size, you increase the flow through it. Similarly, with an electronic circuit, if you add more voltage (perhaps by using more or larger batteries), but the resistance remains the same, then the current through the circuit will increase. Current is what can destroy electronics, usually by generating heat as it passes, which is why you should never apply extra voltage to a circuit: It will force more current through the constant resistance of the circuit, burning out the components in it.

That wasn't so tough, was it? So let's move on to a few other electronic components that you may have wondered about:

Capacitors

Imagine that you have a rubber bladder blocking off a water pipe. It can stretch, but only so far before it simply stays put (assuming that you don't apply so much pressure that it blows out). This could be useful if you have an uneven source of water pressure; place one of these near the source (but not in the direct line of flow, just off to the side) and it will absorb some of the pressure whet it is high, and then apply some pressure (until it slackens) when the pressure source is too low.

Similarly in electronics, a capacitor helps to even out the sine-wave shape of AC (Alternating Current, like a wall outlet) into something flat. This is especially useful in combination with diodes (covered next), which can help convert AC into DC (Direct Current, what most electronic circuits run on).

Diodes

A diode is like a valve. A valve only lets water pass in one direction, but not in the other. If you've never seen one, it may look like a hole in a metal sheet. A rubber gasket sits on one side, and beyond the gasket is a circle of metal that is free to move against or away from the metal plate. As water tries to flow from the side away from the metal circle, the circle moves away from the plate and allows the water to flow through the opening around it. If water tries to flow the other way, though, it pushes the circle against the gasket on the plate and prevents any flow from happening.

Diodes allow electricity to only flow in one direction, blocking it when it tries to flow the other way. They are the main component of a circuit called a 'Rectifier,' which converts AC into DC. What you do is take four diodes, and you arrange them into a diamond shape, all pointing upwards. Your AC source connects to the two sides of the diamond (at the intersection of the diodes pointing up from the bottom with the diodes pointing up to the top), and your DC circuit connects at the bottom and top of the diamond, at the intersections where the diodes both point away or towards the intersection. Instead of the sine-wave of AC, you'll have what would look like the absolute value of a sine-wave. You can flatten this into almost a straight line using capacitors.

Inductors

An inductor is like a propeller sitting in a water pipe. As the water flows, it resists for a little while as it builds up speed, but once it is running at the same speed as the water, there is no resistance. Then, when you turn off the pressure, it continues to try to turn, pushing more water until it has stopped.

In an electronic circuit, an inductor resists changes in the flow of electricity, just like that propeller.

Transistors

These are the most complex pieces of an electronic circuit, and not only because they connect to three wires instead of the usual two. But I'll try to describe an analogous system using water.

Imagine a straight pipe, allowing normal water flow. Now, add to this a spring-loaded valve. But, instead of the direction of the flow affecting whether the valve is open or shut (or somewhere in between), there is a separate pipe. This separate pipe has only a pressure plate that pushes on the valve, but it does not actually lead anywhere. As the water pressure increases on the pressure plate, it pushes the valve open more; as the water pressure decreases, the spring mechanism pulls the valve shut.

A transistor works like this. The level of voltage applied to the Base terminal allows or restricts flow through the other two terminals.

To complicate matters, however, there are two main types of transistors: NPN and PNP. NPN works like you might expect, with a higher applied voltage on the base allowing more current to flow through the other terminals. PNP works the opposite way: Lowering the voltage on the base allows more current to flow.

Standard Uses

So what's all this stuff good for, anyway? Here's a basic list of applications:

  • Capacitors:
    • Smoothing out a rough flow
    • Storing energy to be released later (like a fast battery)
  • Diodes:
    • Rectifiers -- making AC into DC
    • Protection -- if you worry that someone using your circuit may plug it in backwards, this could keep more sensitive components from blowing up
  • Inductors:
    • Not really sure... I'm guessing that these could also be used to smooth out a rough flow, since they resist change
  • Transistors:
    • Amplifiers -- Apply the signal you want to amplify to the base, and apply a power source to the input terminal (the collector, if you are using conventional current (positive flows towards negative)). The output would be controlled by the signal on the base.
    • Digital switching -- the flow through the collector/emitter is very sensitive to the voltage applied to the base, so you can basically turn the flow on or off. This is how digital logic in computers and other electronics works.

I hope this was informative. If I got anything wrong, please leave a comment, but remember, I'm not trying to be perfectly correct here; that's what has made most basic electronics textbooks too difficult to understand. I'm trying to be accurate enough that people can understand, and perhaps have a better idea of what is going on if they try to learn more later.

Main source of inspiration: "Electricity" Misconceptions Spread By Textbooks, by William J. Beaty.