# Component Tolerance

We take for granted sometimes that the tolerances of our electronic components fit the needs of our designs. In this article, Robert takes a deep look into the subject of tolerances, using the simple resistor as an example. He goes through the math to help you better understand accuracy and drift along with other factors.

By Robert Lacoste

One of the last projects I worked on with my colleagues was a kind of high-precision current meter. It turned out to be far more difficult than anticipated, even with our combined experience totaling almost 100 years. Maybe this has happened with your projects too: You discover that, even when you’re not looking for top performance out of your electronic components, the accuracy and stability of those components can be pernicious. My topic this month is examining component tolerances. And, for simplicity, I will focus on the simplest possible electronic device: a resistor.

FIGURE 1 A very simple voltage divider. With these values, Uout will be 1 V with Uin=100 V

Let’s start with a basic application. Imagine that you have to design a voltage divider with a ratio of 1/100 (Figure 1). I will assume that the source impedance is very low and that the load connected on the output draws no current at all. With those parameters the calculations are very easy. You just need to know Ohm’s Law. Because the resistors are in series, the current circulating through the two resistors is:

Similarly, the output voltage is:

Given that the current I is the same in both equations, we get:

This circuit is indeed a voltage divider, with a ratio of R2/(R1+R2). We want a ratio of 1/100, so one resistor could be fixed arbitrarily and the second easily calculated. For example: R1=9,900 Ω and R2=100 Ω will do the job as:

Of course, you can easily simulate such a circuit with any SPICE-based circuit simulator if you wish. I personally used Proteus from Labcenter to draw and simulate the small schematic provided on Figure 1, and the output voltage is 1 V with 100 V applied on the input, as expected. As usual, I encourage you to reproduce these small examples with your preferred simulator: for example the free LT-Spice.

Now let’s talk about accuracy. You want your divider to be as precise as possible and therefore you want to buy reasonably accurate resistors. But what if your budget is constrained? Will you use a high accuracy resistor for R1 (9,900 Ω)? Or for R2 (100 Ω)? Or for both? The good answer is both. In that case, a 1% error on either R1 or R2 gives close to a 1% error of the output voltage, as shown in Figure 2. Even if R1 has a stranger value than R2—9,900 Ω vs. 100 Ω—their accuracy is just as critical.

Figure 2
A 1% error either on the top or bottom resistors will induce a roughly 1% error on the output. That would not be the case for other division ratios.

Maybe you think this is too obvious? In that case I will give you another exercise: What happens with a divide-by-2 circuit using two resistors of the same value? Do the calculation or simulate it and you will find that both resistors have still the same impact on accuracy. But now a 1% error on one of the resistors has only a 0.5% impact on the output voltage. That means you could buy slightly less expensive resistors for the same overall precision! In fact, the higher the division ratio, the higher is the impact of each resistor on the overall accuracy.

E Series Resistors

Let’s go back to the 1/100 divider example. If you want to build it and look for a
9,900-Ω resistor, you will have some difficulties because nobody sells them.. …

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!
Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

# Parts.io Vendor-Independent Search Engine Goes Live

Parts.io recently launched and announced that it is live, fully open, and free for anyone to use in their search for electronic components.  According to Parts.io, you can search over 135 million electronic components by category, availability, popularity, and price across a global network of distributors and manufacturers. The platform offers a visual representation of complex data, enabling engineers to make the best component selection for their projects and allows users to order directly from their favorite supplier through the platform.

“Component selection is a critical step in the design cycle, often impacting production schedules six months or more down the line. Parts.io offers a transparent way to compare and select the best components based on reliable data and big data analysis,” says Chris Gammell, Product Lead for Parts.io, which is part of the SupplyFrame engineering network. Visit Parts.io for more information.

Source: Parts.io

# Traveling With a “Portable Workspace”

As a freelance engineer, Raul Alvarez spends a lot of time on the go. He says the last four or five years he has been traveling due to work and family reasons, therefore he never stays in one place long enough to set up a proper workspace. “Whenever I need to move again, I just pack whatever I can: boards, modules, components, cables, and so forth, and then I’m good to go,” he explains.

Alvarez sits at his “current” workstation.

He continued by saying:

In my case, there’s not much of a workspace to show because my workspace is whichever desk I have at hand in a given location. My tools are all the tools that I can fit into my traveling backpack, along with my software tools that are installed in my laptop.

Because in my personal projects I mostly work with microcontroller boards, modular components, and firmware, until now I think it didn’t bother me not having more fancy (and useful) tools such as a bench oscilloscope, a logic analyzer, or a spectrum analyzer. I just try to work with whatever I have at hand because, well, I don’t have much choice.

Given my circumstances, probably the most useful tools I have for debugging embedded hardware and firmware are a good-old UART port, a multimeter, and a bunch of LEDs. For the UART interface I use a Future Technology Devices International FT232-based UART-to-USB interface board and Tera Term serial terminal software.

Currently, I’m working mostly with Microchip Technology PIC and ARM microcontrollers. So for my PIC projects my tiny Microchip Technology PICkit 3 Programmer/Debugger usually saves the day.

Regarding ARM, I generally use some of the new low-cost ARM development boards that include programming/debugging interfaces. I carry an LPC1769 LPCXpresso board, an mbed board, three STMicroelectronics Discovery boards (Cortex-M0, Cortex-M3, and Cortex-M4), my STMicroelectronics STM32 Primer2, three Texas Instruments LaunchPads (the MSP430, the Piccolo, and the Stellaris), and the following Linux boards: two BeagleBoard.org BeagleBones (the gray one and a BeagleBone Black), a Cubieboard, an Odroid-X2, and a Raspberry Pi Model B.

Additionally, I always carry an Arduino UNO, a Digilent chipKIT Max 32 Arduino-compatible board (which I mostly use with MPLAB X IDE and “regular” C language), and a self-made Parallax Propeller microcontroller board. I also have a Wi-Fi 3G TP-LINK TL-WR703N mini router flashed   with OpenWRT that enables me to experiment with Wi-Fi and Ethernet and to tinker with their embedded Linux environment. It also provides me Internet access with the use of a 3G modem.

Not a bad set up for someone on the go. Alvarez’s “portable workstation” includes ICs, resistors, and capacitors, among other things. He says his most useful tools are a UART port, a multimeter, and some LEDs.

In three or four small boxes I carry a lot of sensors, modules, ICs, resistors, capacitors, crystals, jumper cables, breadboard strips, and some DC-DC converter/regulator boards for supplying power to my circuits. I also carry a small video camera for shooting my video tutorials, which I publish from time to time at my website (www.raulalvarez.net). I have installed in my laptop TechSmith’s Camtasia for screen capture and Sony Vegas for editing the final video and audio.

Some IDEs that I have currently installed in my laptop are: LPCXpresso, Texas Instruments’s Code Composer Studio, IAR EW for Renesas RL78 and 8051, Ride7, Keil uVision for ARM, MPLAB X, and the Arduino IDE, among others. For PC coding I have installed Eclipse, MS Visual Studio, GNAT Programming Studio (I like to tinker with Ada from time to time), QT Creator, Python IDLE, MATLAB, and Octave. For schematics and PCB design I mostly use CadSoft’s EAGLE, ExpressPCB, DesignSpark PCB, and sometimes KiCad.

Traveling with my portable rig isn’t particularly pleasant for me. I always get delayed at security and customs checkpoints in airports. I get questioned a lot especially about my circuit boards and prototypes and I almost always have to buy a new set of screwdrivers after arriving at my destination. Luckily for me, my nomad lifestyle is about to come to an end soon and finally I will be able to settle down in my hometown in Cochabamba, Bolivia. The first two things I’m planning to do are to buy a really big workbench and a decent digital oscilloscope.

Alvarez’s article “The Home Energy Gateway: Remotely Control and Monitor Household Devices” appeared in Circuit Cellar’s February issue. For more information about Alvarez, visit his website or follow him on Twitter @RaulAlvarezT.