Electronics notes/Resistors
Types
See also:
- http://www.google.com/search?q=Basics%20of%20Linear%20Fixed%20Resistors
- http://en.wikipedia.org/wiki/Resistor#Construction
Precision/tolerance
Resistor precision refers to the fact a production process will produce resistors with different resistance. (and not the abilities of a single resistor)
For example, if you grab a random 100 Ohm resistor
- from a 5% batch, you would see a value somewhere between 95 and 105 Ohm.
- from a 1% batch, you'll know it has a value between 99 and 101 Ohm.
- from a 0.1% or 0.01% resistor, well, you get the idea.
In most parts of most circuits, getting the resistor value exactly right doesn't matter.
Which is why you can use cheaper components from the less accurate production line.
And sometimes it does matter.
Say, in current-sensing resistors. Since the point is I=V/R (you measure the drop across a known resistor), your calculations's precision relies on knowing the resistance, which is why these resistors are often 0.1%.
And in some circuits (often a specific analog part of it) two or more components must match each other closely.
Yes, you could do that by just measuring individual resistors, and sorting them into smaller ranges. It's just that often, it's not worth your time or extra work in automated production, or arguably even in DIY, so it's cheaper and easier overall (process/production-wise) to buy higher-precision components for these cases.
When the value matters, temperature behavior often also matters.
Precision resistors in general are not necessarily any better behaved here - but some specifically are (e.g. current sensing resistors(verify)).
Resistor value series
Resistor marking
Resistors can be marked with their...
- resistance (pretty much always)
- tolerance (regularly)
- indicates how close you can expect the real resistance to be to the marked one - can be as high as 10% and 20%, or as low as 0.05%.
- For example, a 470 Ohm 5% resistor can be expected have a value within 446..493 Ohm
- For many applications (e.g. current limiting) the exact resistance does not matter much, or can be calibrated to (e.g. voltage dividing before an ADC), so the 5% tolerance that the bulk of basic cheap carbon resistors have is good enough
- quality/reliability (sometimes)
- indicates the failure rate per 1000 hours of continuous use at the rated power(verify)
- temperature coefficient (sometimes)
Marking systems:
Color band codes (mainly on through-hole resistors)
- one black band
- (near-)zero-Ohm resistor/link, a wire conductor in component form. Used in board designs where it may be a good idea for this to be replaceable with some other value later, to connect something only in testing, to manufacture with one step/machine less (avoid also placing jumpers), and perhaps other reasons.
- http://en.wikipedia.org/wiki/Zero-ohm_link
- color color color color (the most common)
- 2 digits, 1 multiplier, and 1 tolerance (The tolerance uses different color set - which is useful to see what side is the start of the series)
- You can think of this as scientific notation, digit digit E digit. For example, orange orange brown is 3 3 E 1, =33*101, =330 Ohm
- http://en.wikipedia.org/wiki/Resistor#Four-band_resistors
- color color color (three band)
- the previous system but with with 20% tolerance
- color color color color color can be...
- four-band system + quality band (2 bands of value, 1 multiplier, 1 tolerance, 1 quality)
- precision resistors (3 bands of value, 1 multiplier, 1 tolerance)
- same idea as 3-color system, but with one more digit - and so with the multiplier one less. e.g. 330 ohm as orange orange black black (330*100), whereas in 3-color it would be orange orange brown (33*101)
- color color color color color color can be...
- value value value multiplier tolerance TCR
See also:
- http://www.hobby-hour.com/electronics/resistor_color_code.php
- http://www.resistorguide.com/resistor-color-code/
Numbers, mainly on SMD resistors (note: sometimes confusable with SMD capacitors with similar marking)
- 0
- (near-)zero Ohm resistor, often for replaceability [1]
- number number number
- same system as color bands, without the color-namber mapping. For example:
- 330 is 33 Ohm (33 * 100)
- 221 is 220 Ohm (22 * 101)
- 223 is 22 kOhm (22 * 103)
- 105 is 1 MOhm (10 * 105)
- number number number number
- like the last - but with three digits, one multiplier
- e.g. 4992 is 49.9 kOhm
- number number letter
- EIA-96 marking, for 1%
- where letter in F, E, D, C, B, A, X or S, Y or R (for *100000 .. * 0.01)
- and the number should be looked up in a table
- letter number number
- similar to EIA-96 marking - same multiplier, but different lookups
- ...and the section within that lookup table tells you whether it's 2% (01..24), 5% (25..48), or 10% (49..60)
(What about EIA 48, 24, 12, 6?)
When there's enough space, such as on power resistor heatsinks, you also see the BS 1852 system (note: also used for capacitance), which roughly comes down either...
Either...
- letter B number number number number
- letter - wattage (B=1/8W, C=1/4W, E=1/2W, G=1W)
- B
- three numbers: value value multiplier
- tolerance (5=5%, 2=20%, 1=10%)
- Examples:
- EB1041 for 1/2W, 100kOhm, 10% tolerance
- CB3932 for 1/4W, 39kOhm, 20% tolerance
Or...
- an R before/in/after a number - for small values
- e.g. R56 (or 0R56) for 0.56Ohm
- 8R2 is 8.2 ohms
- 100R for 100 Ohm
- a K, or M within/after a number - larger values
- 2K7 for 2.7 kOhm
- 32K7 for 32.7 kOhm
- 1M0 for 1.0 MOhm
- ...with a possible an additional suffix letter refers to tolerance
- (M=20%, K=10%, J=5%, G=2%, and F=1% D=.5% C=.25 B=.1%)
- Examples:
- 3K2G for 3.2 kOhm, 2% tolerance
- 32KK for 32 kOhm, 10% tolerance
- 32K7F for 32.7 kOhm, 1% tolerance
Other systems
- MIL-R-11 or MIL-R-39008 (look like RC05, RCR05)
See also:
- http://www.marsport.org.uk/smd/res.htm
- http://en.wikipedia.org/wiki/BS_1852
- http://www.hobby-hour.com/electronics/resistor_color_code.php
Resistor sizes
https://eepower.com/resistor-guide/resistor-standards-and-codes/resistor-sizes-and-packages/#
Resistor behaviour
Basic behaviour
Variation with temperature (behaviour)
Resistance varies with temperature.
This is mostly because of the electron activity, and for most of the range the resistance varies proportional to temperature in Kelvin (0 K being a true-zero-energy point and all).
Around human-comfortable temperatures you can model this variation with something like
R = R0 (1 + ⍺(T-T0))
...where
- R0 is a reference resistance
- T0 is a reference temperature (e.g. a room temperature like 20°C or 25°C, occasionally 0°C)
- ⍺, the temperature coefficient, (unit: 1/°C.), is a small number (often in -0.007 .. 0.06)
- ...can be positive, meaning more resistance with higher temperatures (e.g. many metals)
- ...or negative, meaning resistance lowers with rising temperatures (e.g. semiconductors, such as carbon)
Note that this model simplifies away a few things and isn't ideal over large ranges or for extreme accuracy.
Thin film: 5..25 ppm / K ( 0.000005 .. 0.000025) Thick film: 200..250 ppm / K ( 0.000200 .. 0.000250) Carbon: ~-500..-2500 ppm / K (-0.000500 .. -0.002500) (verify)
So yes, you could use just a resistor as a poor man's temperature estimation.
But there are other ways of doing that better that are about as cheap, like thermocouples.
Thermistors (design/spec)
Thermistors (thermal and resistors) are resistors that significantly change their resistance at different temperatures (have a large ⍺);
Can be divided into:
- PTC (positive temperature coefficient) thermistor, or posistor.
- NTC (negative temperature coefficient) thermistor.
Their behaviour makes them useful for things like:
- temperature sensors
- either type could be used, needs to be calibrated anyway
- self-regulating heaters
- PTC, because becoming hot increases their resistance
- self-resetting overcurrent protectors
- PTC, because basically a plain wire when cold, and higher resistance once hot
- inrush limiting - limit current into things that otherwise initially accept a lot of current (transformers, capacitors, more?(verify))
- NTC, because high resistance when cold, lower resistance once warm
Contrast with varistor
Resistor noise (behaviour)
Fusible resistor (spec)
Designs and applications
Current limiting resistors (application)
Power resistors (design/spec)
Power resistors refers to a resistor being able to handle more power (dissipated as heat) than your average resistor.
Power resistors may be able to deal with on the order of 10W or even 50W (while your common carbon resistor can only dissipate 1/8 Watt).
They are usually low-resistance - a few dozen ohm and less.
They are usually physically larger to be able to dissipate the heat - and may come in heat-sinking constructions, depending on their rating - say, TO-220 (a package rated up to 5W), wrapped in ceramic, metal heatsinks, and more. See also an image search for power resistor.
They are regularly used to dissipate noticable power (as heat), in constructions that control considerable voltage or current (or may sometimes need to), or as a test load.
For an example of the last: to repurpose an ATX power supply to a lab power supply (See also Electronics_project_notes/Power_notes#Repurposing_an_ATX_power_supply), one part is fooling it into thinking it has load, which you can do by connecting a 10 ohm power resistor from 5V to ground, sinking (5V/10ohm=) 500mA amp and taking 2.5W (It's probably a good idea to take one rated for 5W since the cooling probably isn't going to be ideal inside a metal box).
Pull-up / pull-down resistors (application)
- tl;dr
A resistor that effectively makes the sensed state of a wire be, usually, either ground or full voltage level.
- What
The typical workaround is to tie any such input to a voltage level through a resistor (a fairly large-valued one, see below).
A pull-up resistor ties input to a higher voltage (often the supply / logic-high level).
A pull-down resistor settles to a lower level (often ground / logic-low).
In both cases, you keep in mind that:
- we want enough current to make the input robustly at that level for the component sensing it (which usually is very little)
- we want to waste as little current as possible
- if there is a sensor or driver on that same input (and the pullup/pulldown is only intended for when it's disconnected), we are often effectively make a voltage divider with it, and we want to minimize the effect of the pulling resistor on the actual sensor on that line
- depending on what you're connecting, you may be making a simple RC circuit, which may affect the switching speed of the thing you are connecting
Usually this means choosing a resistor in the few kilo-ohms to few dozen kilo-ohms range.
- Why
Components like jumpers, photo-diodes, switches (buttons, toggles, reed switches, etc) will, in some of their states, completely break the connection on a wire.
A completely disconnected contact will float, and digital ports on ICs, or analog ports on comparators or amplifiers or such (particularly high-impedance sensing, which various things aim for) that tends to mean that the input will be affected by the tiniest of environmental EM (stuff that you would usually consider negligible and almost always want to consider negligible) and lead to fluctuation, oscillation, and whatnot. While such behaviour doesn't necessarily happen, it is typically very complex to predicting where, when, how, and with what magnitude it does.
Since floating inputs are noisy at best and meaningless at worst, it's usually a good idea to work around that. Avoiding this is usually both simple and cheap.
- Summary / notes
- pulling up/down can be useful when you want input to be stable when a device/sensor is disconnected, and when a logic device cannot source current.
- Downsides: current will be used, you may affect inductive behaviours
- component designs may show different floating behaviour. For example, CMOS may float to half Vcc, where it may draw more current than it usually does. TTL will behave better current-wise.
- Some ICs (e.g. various TTL semiconductors) may have internal pull up resistors, which in the case of programmable ICs may be switchable (but be careful about the behaviour around reset)
- in very EM-noisy environments (industry, clubs, conduits anywhere), lower-valued pulling may be useful to avoid being sensitive to the environment
- (in particular with things like interrupts involved, which can be relevant on microcontroller projects)
See also:
- http://en.wikipedia.org/wiki/Pull-up_resistor
- http://www.horrorseek.com/home/halloween/wolfstone/Controllers/cioinp_InputInterfacing.html#PullUpPullDown
- http://www.piclist.com/tecHREF/logic/xtrapins.htm
- http://www.interfacebus.com/IC_Bus-Hold_Input_Pins.html
- http://www.seattlerobotics.org/encoder/mar97/basics.html
The first time you get an arduino and a pushbutton, you might have wired it like:
GND ---- switch ---- input pin
This would mean it's stably low while pressed, but floating when not pressed. If it happens to float high out of sheer luck, this might even function, at all, probably supriously.
Hope and luck is not great design, so instead you would probably want it high while not pressed. The first thought might be to do something like: (WARNING: don't do this)
5V | GND ---- switch --+-- input pin
This solves the case where the switch is open, asserting the input at 5V in that case. (though may use more current than really necessary to assert it at that logic level).
However, pressing the switch will connect 5V to GND with no resistance, shorting out the power supply, which then either smokes or disconnects power, so that doesn't work.
The next obvious change creates what is the basic pull-up design, which looks like:
5V | R | GND ---- switch --+-- input pin
That resistor primarily just fixes the just-mentioned short. When the switch is open this asserts the pin at high.
Closing the switch will create a direct connection between input and GND. Technically this is a voltage divider, but the wire-and-switch's resistance is so much lower that it'll be so close to ground you won't care about the difference.
It also places the resistor across the power source, so won't be a short -- in this direction is basically a current-limiting resistor instead, and since I=V/R and pull-ups are often at least 10kΩ, on e.g. 5V they'll use on the order of 0.5mA at most.
You can choose higher resistance (47kΩ is not rare), but once you're around or above 50kΩ or 100kΩ you have to at least start thinking and checking the specs for whatever you're feeding this input to - at some point, the current will be too small for the IO pin to keep a stable state and EM interference might be stronger.
A pull-down resistor refers to a very similar design, but the non-pressed state pulls to Gnd instead of 5V.
Usually there is some component that makes it pull-down, or pull-up, the more obvious choice than the other,
whether a switch is open or closed when not activated,
such as the circuit type (open-drain, open-collector, etc.),
whether pulling low or high makes more sense for a specific input for other reasons (e.g. uCs that have only pullups and not pulldowns, logic ICs that having inverted inputs, etc.).
Resistor ladders (application)
Can be used, for example...
- as a simple DAC
- to put a few different on/off input onto one analog input (via the luxury of having a unused ADC)
See also:
Current sense resistors (application / type)
Semi-sorted notes
Resistances of megaohms to (near-)infinity are everywhere, so high-resistance very-low-current paths can always happen on a circuit.
Sometimes this is because of the circuit (design) itself, sometimes it's a side effects from EM fields, moisture, non-cleaned soldering, and more (verify).
The resistance of such unplanned effects are generally on the order of megaohms or more (so micro-Amperes or less), so generally have little effect, but this can matter to high frequency circuits, fast switching, and such.
Potentiometers
Potentiometers, also known as pots, potmeters, variable resistors, and more, are resistors that are adjustable within a given range.
See also http://en.wikipedia.org/wiki/Potentiometer
Physically
Most pots have a shaft (or a hole for a shaft) that you an put a knob on.
Slider pots, a.k.a. faders, are also common in some applications, such as audio mixers and lighting controls.
There is also a variant often hidden inside equipment, trimmers, trimmer pots, preset pots.
You often tweak these with a screwdriver, because they are mostly used for factory calibration, sometimes recalibration, but not everyday use.
They are also regularly used as tweakable resistors, not using the third lead.
Trimmer pots (trimpots) are frequently multi-turn, user-tweakable pots more often single-turn.
Single-turn pots, which you can turn roughly three quarters of one rotation due to it conceptually, and often physically, being a metal wiper on an exposed resistor.
There are also multi-turn potmeters (often trimpots), which go through their range in many rotations, typically so that the same movement can be more accurate tweaking and, in particular, are great for calibration.
Continuous-turn pots also exist (but jump between their extremes at some point), though if you're doing this for position sensing, then there are simpler and more robust methods, such as encoders.
Taper
Taper is the relationship between position and the resistancec.
Within their physical range, a potmeter can be:
- Linear taper:
- resistivity proportional to angle/distance moved
- most common
- Logarithmic taper / audio taper
- output voltage roughly logarithmic with the angle/distance moved, making more range useful, and less fiddly in the lowest part
- polarized in that you care about which side that is
- many are approximations with two or three linear-ish segments (cheaper), some are more exact logarithmic pots (more expensive)
- Inverse logarithmic taper / reverse log taper / anti-log
- less common than log, but more practical in some circuits
Note that you can use a linear pot plus resistor to fake a log and inverse-log response,
see e.g. https://www.maximintegrated.com/en/design/technical-documents/tutorials/8/838.html
at the cost of some signal(verify)
Potentiometer marking
There are relatively few common values, and a bunch of useful values happen to be in kilo-ohm range (like 10K, 50K, 100K; 1K, 20K, 22K, 25K, 47K; 250K, 500K, 1M)
There's enough space on there so they sometimes print just that.
You also see the numeric resistor coding, e.g. 102 for 10K, 103 for 100K, 503 for 500K
There are roughly four different codes marking those types, that are also confusable:
- the asian one (probably most common)
- B for linear, A for log/audio
- Europe seems to
- A for linear, C for log/audio, F for anti-log
- The US seems to follow Asia but adds C for anti-log
- B for linear, A for log/audio, C for anti-log
- ...except Vishay (a US manufacturer), which seems to
- A for linear, L for log/audio, F for anti-log
Measuring it if you're still confused
Use a multimeter on ohm setting
- the largest value across any of the terminals is the pot's value
- and the third pin you're now not touching is the wiper
- rotate the pot to the middle. If the wiper pin to both ends is equal, it's a linear pot, otherwise it's not (and probably log/audio)
- this is a little crude but usually right
Motorized potentiometer
Functionally these are like servos that also expose their potentiometer (servos use potentiometers for position feedback).
Seen e.g. in some audio equipment. Sometimes on fancier amps, but perhaps more commonly on fancier mixing desks, because it's very convenient to be able to switch the entire board between settings for different songs you're working on.
Rheostats
A rheostat is a variable resistor used to control a load directly.
This often implies the track/wiper is low resistance, and thicker wire, so that it can can pass some actual current.
...compared to potmeters, which are often tiny-current (and often a handful or dozens of kilo-ohms) and often carrying only signals.
Another difference is that rheostats typically have only two terminals.
Note that for various purposes, there are more efficient ways to control a load than a rheostat, so they aren't widely used.
There are other sorts of rheostats - consider e.g. liquid rheostats
Softpot
Membrane pot, softpot, Ribbon Sensor
You can think of this as a resistive strip parallel with a conductive trace.
Depending on where you push it closed, you get a different resistance. (without touching the output is floating).
Gives smooth analog position.
(Looks roughly similar to some force sensitive resistors and some flex sensors)
Resistance of fluids