Sunday, April 19, 2009

Electricity for Synth-DIYers: Resistors

As the name suggests, the purpose of a resistor is to restrict the flow of electricity through a circuit. Here's a few things that a synth-DIYer needs to know about resistors.

What are Resistors For?

Resistors are used to control the voltage in a circuit, or to control the flow of current through a circuit. We saw an example of the latter in the first installment of this series, where we used a resistor to limit the amount of current flowing through an LED. Resistors are often used to create a drop in voltage in a circuit. For example, if two resistors of equal value are wired in series between the two poles of a battery, the voltage at the point in between the two resistors will be half the battery voltage; this type of circuit is known as a voltage divider. Unequal values create different in-between voltages.

Resistors can be used to "convert" a current into a voltage. An example often seen in synth circuits is a resistor wired to the output of an OTA, an IC frequently used in analog synts. The OTA produces a specific output current which is proportional to its inputs. By placing a resistor on the output, a voltage is developed in between the OTA output and the resistor which is proportional to the OTA's output current.

A pull-up resistor is used to apply voltages to the inputs of components which act as electronic switches, such as JFET transistors and bilateral switches. The switch has an "open" or "closed" position, but in order for another circuit to sense that, some voltage must be applied to the switch input. A pull-up resistor between a supply voltage and the switch input provides the necessary voltage. With the output of the switch connected to ground, when the switch is closed, the measured voltage at the switch input will be zero. When the switch opens, the voltage at the switch's input will rise to the supply voltage, due to the pull-up resistor. The pull-up also limits the current when the switch is closed; otherwise, the switch would short out the supply voltage.

Similarly, a resistor wired between a voltage source and ground acts as a "pull-down". A high-value resistor is often wired to the external input of a circuit to provide some protection against static charges. Static electricity may have very high voltage, but very low current. A high-value resistor dissipates the static charge without "loading down" the circuit's normal input signal.

A resistor in series with a capacitory has an effect which is similar to reducing the capacitance value of the capacitor. This will be covered further in a later installment.

Ohm's Law

The degree to which a resistor resists is measured in ohms. The definition of an ohm is: if a voltage of one volt is applied to a resistance of one ohm, a current of one amp results. This leads to a basic formula of electricity, known as Ohm's Law:

E=IR

where E is the voltage, I is the current, and R is the resistance. (Why is E the voltage and I the current? E comes from an old term for voltage, "electromotive force". You do sometimes see the letter V used instead. "I" for current, I have no idea, other than the fact that "C" was already taken for something else.) Of course, you can do simple algebraic manipulations to find any quantity needed, given the other two; for example, if you know the voltage and the resistance and you want to find the resulting current, divide both sides by R, and you get:

I = E/R

Specifying and Choosing Resistors

In specifying resistance values, the ohm is represented by the Greek letter omega, which is: Ω. The usual metric multiplier prefixes can be added to this for larger values, for instance, 6 kilo-ohms would be written as 6kΩ, or sometimes just 6k if the context is understood. One ohm isn't much; typically, in electronics about the smallest resistance one encounters is 100Ω, and resistors with values in the megaohms range are sometimes called for. In practice, the omega symbol is often omitted when it is understood from context. A convention that is sometimes seen is that the resistance value will be written with either the letter "R" or the metric multiplier prefix placed in the number where the decimal point would go. So for example, 100Ω might be written as 100R; 1000Ω would be written as 1k, and 6800Ω would be written as 6k8.

Two other parameters are commonly given in specifying a resistor: the tolerance and the maximum power dissipation. Resistors are mass produced, in very large quantities, and the manufacturing processes are not perfect. As a result, it's actually rare for a resistor to measure as being exactly the specified value; it may be some small percentage more or less. Manufacturers measure and grade their resistors as to how close to the spec value they actually are, and then "bin" them up into tolerance ranges. As one might expect, the tighter tolerance ranges cost more. The most common tolerance range sold today is 5%, meaning that if a resistor is marked as a 10KΩ, 5% resistor, its actual value may be anywhere from 9500Ω to 10,500Ω. Besides 5% resistors, the other commonly available ranges are 1% and 0.1%. Electronic products built prior to about 1980 may contain 10% resistors, but resistor manufacturing processes have improved to the point where the 10% range is no longer marketed much, since there is no cost savings. When designing a circuit, the circuit designer will determine for each resistor in the circuit how much tolerance is allowable in order for the circuit to work, and then specify the tolerance based on that information.

Power Dissipation

Whenever a current passes through a resistor, some of the energy contained in that current is converted into heat. A resistor can only dissipate so much heat before it reaches a high enough temperature to destroy itself or nearby components. This waste heat, along with all other measures of energy and power production in the electrical world, is measured in watts. Note that the watt is not a quantity of energy; that's a common mistake. It is rather a rate at which energy or power is produced, flowed, or consumed. (In order to drive your car down the highway at a given miles or kilometers per hour rate, the engine must produce power at a certain rate. That rate of power production can be measured in watts, although in the case of automobile engines, "horsepower" is usually used instead. Horsepower is simply a different unit for the same thing: 1 horsepower roughly equals 750 watts.)

The power dissipated as heat will of course raise the temperature of the resisitor. To avoid cooking the resistor, the dissipation needs to be kept below the rating. If you know the voltage across the resistor and the current flowing through it, the dissipation is given by:

Watts = EI

Many times, in circuit design, you won't know the exact current, only the voltage applied to the resistor. Using Ohm's Law, you can substitute for I in the above:

I = E/R

so,

Watts = E(E/R) = E^2/R

The most common dissipation rating for the types of resistors used in electronics is 1/4 watt. 1/8 watt and 1/2 watt types are also common. In general, the dissipation rating is directly proportional to the physical size of the resistor. Types rated for more than 1 watt are usually large and difficult to package; they are also often built as "wirewound" types which have other effects on a circuit that must be taken into account in the circuit design.

Substituting Resistors

A few rules of thumb for resistor substitution:

  1. You can always use a resistor of tighter tolerance than specified. If a parts list calls for a 5% resistor, you can use a 1% or better resistor of the same value.

  2. You can use a higher-dissipation resistor than specified, provided that it physically fits in the space where it needs to go, and as long as you avoid wirewound types. If the parts list calls for a 1/4 watt resistor, a 1/2 watt or 1 watt one will work as long as it fits on the board. Don't use wirewound resistors unless the schematic specifically calls for it.

  3. If you are in a pinch for a resistor value you don't have, or if you need an oddball value, you might be able to assemble using some combination of series and/or parallel resistors; see the next section.
Resistors in Series and in Parallel

Sometimes, you need a resistance value that is not a standard value or not easily available. You can build different values by wiring up two or more resistors in series and parallel. The rule for combining resistors in series is simple: their resistance values add. Example: a 10K resistor in series with a 6.8K resistor adds up to 16.8K. Resistors wired in parallel are more complicated: the rule there is often called "reciprocal sums". Suppose you have three resistors, R1, R2, and R3 in parallel. You first take the reciprocal of all of their values and add those:

1/Rsum = 1/R1 + 1/R2 + 1/R3

Then, take the reciprocal of 1/Rsum to get the result. So, for example, if R1 = 1K, R2 = 2200 ohms, and R3 = 5000 ohms, the calculation is:

1/Rsum = 1/1000 + 1/2200 + 1/5000

1/Rsum = 0.001 + 0.00045 + 0.0002 = 0.00165

Rsum = 1/0.00165 = 604 ohms

Note that the resulting value is less than the lowest-valued resistor in the set. This will always be true for resistors in parallel. The technique can be extended to any number of parallel resistors. Simplification: if all of the parallel resistors have the same value, the result will be that value divided by the number of resistors.

To figure the dissipation of series or parallel resistors, you would have to work out the applied voltage for each resistor, which can be some work. Try this shortcut first: figure the dissipation treating the resulting value of the series or parallel combination as if it were a single resistor. If that is within the dissipation of all of the resistors in the combination, then it's okay.

Resistor Markings

Resistors often do not have their value printed on the resistor body; instead, they use what are known as the RETMA codes, which are the colored rings you see painted on the resistor body. In current usage, this will be a sequence of four or five color bands. Four bands, with one of them being a gold or silver band, indicates a 10% or 5% tolerance. To determine the value, orient the resistor so the gold or silver band is on the right. Then, read the other bands according to this code:

0 = black
1 = brown
2 = red
3 = orange
4 = yellow
5 = green
6 = blue
7 = violet
8 = gray
9 = white

For a 10% or 5% type, the first two bands indicate the first two digits of the resistance value. The third band indicates that the specified number of zeroes should be added on (Note: this is not the same thing as specifying a power of ten! Some resistors use more digit bands, and the same color last band indicates a different power of ten on these. To keep it straight, don't worry about powers of ten; just add on the specified number of zeroes.) So, for example, a resistor with the color code orange/green/red indicates:

orange: 3
green: 5
red: 00 (two zeroes)

The value is 3500 ohms. A gold band at the end indicates it's a 5% tolerance; a silver band indicates 10%.

1% and better types will have five bands instead of four. It can be a bit difficult to determine which end is the left and which is the right, but if you know the type, a brown band at one end will indicate a 1% type. A violet band indicates a 0.1% type; other values are possible. Read the other bands the same way: red/red/violet/orange indicates:

red: 2
red: 2
violet: 7
orange: 000 (three zeroes)

This is a 227K ohm resistor. Below are pictured five resistors. See if you can make out their values.



Top: violet (hard to see in the photo), green, brown, gold = 750 ohms, 5%, 1/4 watt. Second: red, red, red, gold = 2200 ohms, 5%, 1/4 watt.
Third: orange, yellow, orange, gold = 34K ohms, 5%, 1/2 watt (note larger size).
Fourth: red, red, yellow, gold = 220K ohms, 5%, 1/4 watt
Bottom: brown, black, green, gold = 1.5M ohms, 5%, 1/4 watt

Below are some 9.09K, 1/4 watt, 1% types. Note that they use a printed designation instead of the RETMA markings. This seems to be the way the high-precision types are going.





Here are some old 10% types -- note the silver stripes. You don't see these much anymore.






Specialized Resistors

We mentioned wirewound resistors earlier. You normally want to avoid these because they have a property called induction, which will be covered in a later installment. The induction can mess up the circuit that the resistor is in. You will seldom need one of these in music gear, but there is one place where you may run into one -- amplifiers. Reason: wirewound resistors can be made to tolerate very high dissipations, 5W and up. These are often called "power resistors", and sometimes they are needed to control the high currents found in a high-power amp.

A specialized type often found in synthesizers is the temperature-compensating resistor, or "tempco" for short. All resistors are somewhat temperature-dependent. But a tempco's resistance change at different temperatures follows a very specific formula. This can be used to compensate for other circuit characteristics that change with temperature. All VCO circuits that have volts/octave response need a circuit called an "exponential converter" to transform the input control voltage to drive the oscillator core, but the implementation that is generally used in analog VCOs is very temperature-sensitive. A tempco is essential to offset this in order for the VCO's tuning to remain stable as the circuit heats up.


Summary

Resistors are one of the most frequently used of the electrical components. They are available in a huge array of types and values. Sorting out the markings can be tricky, so look closely. If you have trouble remembering the color codes, there are "RETMA" calculators that have little wheels where you can dial up the colors and it will tell you the value.

Next installment: capacitors.

4 comments:

Guy D2 said...

Good stuff - informative and helpful.
Looking forward to the demystification of caps...

Thanks !

Benjamin Budts said...

very good, thx a lot :-), can't wait to read the capacitor part. thx for sharing this.

Wally said...

I saw some resistors are sold with and "E" letter at the end, like "220E" and "470E". What does this "E" stands for? What is actually the value of these resistors?

Thanks!

Wally said...

Just a new comment to make follow up by mail!