Tips for Measuring Small Currents

Most inexpensive hand-held multimeters have measurement ranges from several amps to single-digit milliamps. While generally handy, such meters are insufficient for sensitive current measurements. There is a solution though. With the following project, you can extend the current measurement range from milliamps down into the nanoamp and picoamp range with simple, low-cost circuits.

In his January 2015 article (Circuit Cellar 294), David Ludington writes:

Most inexpensive hand-held multimeters have current measurement capability. The measurement range for these meters extends from several amps down to single-digit milliamps and sometimes into the microamp range. While this measurement capability is sufficient for many applications, there are times when more sensitive current measurement is required. There are meters available which measure much lower levels of current, but these meters are also more expensive and are often dedicated to just this one measurement function.

The goal of this article is to extend the basic hand-held current measurement range from milliamps down into the nanoamp and picoamp range with relatively simple, low-cost circuits. First, I’ll describe several types of current sources with their relevant performance characteristics that affect measurement circuits. Then, I’ll present practical circuits that deliver high performance at low cost. Each of these circuits will be analyzed to determine what level of measurement performance can be expected. General design issues common to all of the circuit techniques will also be discussed and recommended circuit component and layout techniques will be provided. Finally, two of the circuits will be discussed that were built and tested to demonstrate the desired goal of measuring nanoamp and picoamp currents.

CURRENT SOURCES

Figure 1 shows several types of current sources. Figure 1a is the symbol of what electrical engineers call an ideal current source. It can have any level of current at the output and the output impedance is infinite. The result is that the output current is not affected at all by the characteristics of the measurement circuit. Of course no actual current source is ideal, but this is still a useful concept for approximating actual circuits and is used as a source in circuit simulation programs such as PSPICE.

Figure 1: The current sources: ideal (a), semiconductor (b), and resistive (c)

Figure 1: The current sources: ideal (a), semiconductor (b), and resistive (c)

Figure 1b shows a current source which uses semiconductor transistors (either bipolar or FET). In this circuit, the output impedance is not infinite but can still be quite high (megohms). This means that varying voltages at the collector of the bipolar transistor or drain of the FET transistor have little effect on the output current as long as the voltage is not large enough to affect transistor operation.

Figure 1c is the least ideal of the current sources. The current is generated by the voltage difference across the resistor R2. Any measurement voltage developed by the measurement circuit directly affects the voltage difference across the source resistor. This changes the current that is measured which can result in measurement error. Having said that, Keithley Instruments in Low Level Measurements Handbook (6th edition, page 2-20) uses this current source model in defining what they call the feedback ammeter (also transimpedance amplifier). It may well be that, in real-world circuits, this model is the one that describes the majority of practical applications.

Although the current sources just described are not part of the measurement circuit itself, it is helpful to understand their limitations so that the measurement circuits can be designed to disturb the current source as little as possible. In this way, measurement error is minimized.

CURRENT MEASUREMENT CIRCUITS

In the past, current was measured directly with a moving coil meter. Now using semiconductor technology, voltage is the parameter that is measured directly. The current to be measured is first converted to a voltage by flowing through a load resistor. The resultant voltage is then measured and along with the load resistor is used to calculate the input current.

Figure 2: Current measurement circuits: resistive (a), transimpedance (b), and integrator (c)

Figure 2: Current measurement circuits: resistive (a), transimpedance (b), and integrator (c)

Figure 2 and Figure 3 show several circuit techniques which are used to convert current to a voltage. Figure 2 shows the basic techniques, while Figure 3 shows modifications to two of these basic circuits, which give more accurate results and extend the measurement range. The symbol for the input current used in these circuits is the same as the symbol for the ideal current source used in Figure 1; but in this case, it is used to show where the input current connects to the measurement circuit and can represent any of the described current sources.

Figure 3: Modified current measurement circuits: modified resistive (a) and modified transimpedance amplifier (b)

Figure 3: Modified current measurement circuits: modified resistive (a) and modified transimpedance amplifier (b)

RESISTIVE CIRCUIT

Figure 2a is the least complicated of the measurement circuits. In this circuit, the current source is connected to one end of the load resistor R1 and the other end of the resistor is connected to ground or some other reference point. The voltage developed across this resistor is measured with the voltmeter and used to calculate the input current. This circuit is very simple and is often used on the spot with an available resistor for quick measurements at the workbench or in the field.
The voltage that is developed across the load resistor is called the burden voltage. For a current source that is nearly ideal (such as the transistor source), the burden voltage has relatively little effect on the current being measured unless it is large enough to change the internal working of the current source. For resistive current sources, the burden voltage can directly interact with the current source and give erroneous current readings. This occurs because the load resistor becomes part of the current generating resistance which reduces the current. To minimize this interaction, the load resistor should be much smaller that the output resistance of the current source. The corresponding burden voltage will then also be small.
When a simple hand-held voltmeter is used, the measured voltage cannot be too small because these meters rarely measure below 1 mV. Thus, a compromise is needed between measurement accuracy and a low voltage burden.

Most hand-held meters have a 10-MΩ input impedance on the voltage scale. The load resistor R1 will be in parallel with the meter impedance and needs to be selected appropriately to give the desired equivalent measurement resistance. An example in Table 1 shows the resistor values needed to give a measurement voltage of 50 mV for the given currents. This fairly low value of measurement voltage significantly decreases the burden voltage while at the same time providing enough voltage to give measurement accuracy on the order of 10%.

Table 1: Resistor Values versus Input Current for Resistive Circuit (*Rounded off value. Less than 0.1% error.)

Table 1: Resistor Values versus Input Current for Resistive Circuit (*Rounded off value. Less than 0.1% error.)

When making a current measurement with the resistive circuit, it is always a good idea to try several resistors of different values to see what voltage results. If changing resistor values by a certain amount changes the measurement voltage by the same amount, then the source current is not being affected by the measurement (burden) voltage. In this case you can use the higher value of resistance to get more output voltage and more measurement accuracy. Conversely, if the corresponding measurement voltage increases less than the amount of the resistor value change, the source current is being affected by the measurement circuit and the smaller resistor value should be used.
A small modification to the circuit as shown in Figure 3a gives improved performance by removing the burden voltage at the expense of adding a variable power supply. This can be particularly useful as a quick measurement tool using an available workbench power supply. The power supply is adjusted until VOUT is 0 V. The value of the current is then obtained by dividing the measured value of the power supply voltage by the resistance R1. In this way the burden voltage is removed and the load resistor can be increased so that the power supply voltage can be greater than 50 mV. This will give more accuracy in the measurements.
Because VOUT is zero, the leakage current going into the hand-held voltmeter is zero and the finite input impedance (10 MΩ) of the meter does not affect the measurement. Even when VOUT is not exactly zero, the leakage current is still small. For example, for VOUT < 5 mV, the leakage current will be less than 500 pA. This gives measurement accuracy of 1% or better for input currents greater than 50 nA. Since the resistor R1 in this modified circuit is not developing a burden voltage, the resistor value is decoupled from the input current and can be any practical value depending only on the maximum voltage of the power supply.

TRANSIMPEDANCE AMPLIFIER

Figure 2b shows the circuit for a transimpedance amplifier. This is perhaps the most versatile of the current measurement circuits in that it can cover a large current measurement range using a simple circuit. In this circuit, the output from the current source is connected to the negative input of the operational amplifier while the positive input of the amplifier is connected to a reference voltage. This reference voltage is typically the circuit ground when there are bipolar power supplies and some intermediate voltage when there is a single power supply.
The inputs of an operational amplifier have very high input impedances (greater than 1 GΩ) so that little current goes into the amplifier. Thus, the input current drives the negative input toward one of the power supply voltages depending on the polarity of the input current. This causes a voltage difference between the amplifier inputs which is then amplified with the large internal open loop gain of the amplifier. As a result, the amplifier output voltage moves in a direction to provide current through resistor R2 which is opposite to the input current. Equilibrium is achieved when the amplifier output voltage is such that the current through R2 is equal in magnitude to the input current. With an ideal amplifier and no offset voltage, this results in 0 V at the negative terminal matching the voltage at the positive terminal. Only the value of resistance R2 and the amplifier output voltage are needed to determine the input current. Since we know the resistance value and can measure the output voltage, we can calculate the current through R2 which will equal the magnitude of the input current.
Since there is no burden voltage, the input current is not affected by the value of the feedback resistor R2 or the magnitude of the output voltage. The output voltage is constrained by the power supply voltages, but in principle there is no constraint on the value of the feedback resistor. Table 2 shows R2 resistor values for several nominal input currents for an output voltage (VOUT) of 1 V.
As seen in Table 2, the resistor values get quite large for small currents. These large value resistors are expensive and are often also physically large. Also, circuit constraints like stray capacitance can have an appreciable effect on the circuit when the resistor value is large.

Table 2: Resistor values for nominal input currents and VOUT = 1 V

Table 2: Resistor values for nominal input currents and VOUT = 1 V

There are two ways to reduce the resistor value required for a particular input current. One way is to allow smaller voltages than 1 V to represent the input current. This is acceptable as long as all anomalous voltages in the circuit due to circuit imperfections are calibrated out. This calibration can be either physical using potentiometers to cancel offset voltages. Alternatively, data calibration can be used by measuring the output voltage without the input current and then subtracting that data from the output voltage with the input current. Thus, as the input current (and corresponding output voltage) are reduced, the measurement voltage will still have sufficient accuracy.
The second way to measure lower values of current with a lower resistor value is to use the modified transimpedance amplifier shown in Figure 3b. Here, the output voltage is reduced by the voltage divider consisting of R3 and R4 before driving the feedback resistor R2. If the feedback resistor here is the same as the feedback resistor without the divider, the current flowing to the negative input terminal will be less than before. The internal gain in the amplifier will make the output voltage larger to compensate. For a voltage division of 10, the input current is 10 times lower for the same output voltage as before. One caution: although this circuit does give flexibility in the design, care is needed because there is an amplifier voltage gain equal to the divider ratio. The internal offset voltage and noise voltage of the amplifier are multiplied by this amplifier gain along with the current signal.

The complete article appears in Circuit Cellar 294 (January 2015).

 

DIY Dead Man’s Switch (No Microcontrollers)

A “dead man’s switch” (abbreviated here as DMS) is a very useful device for applications where the effect of forgetting to turn something off ranges from a mild annoyance to costly or dangerous consequences. We first learned about the DMS from a locomotive engineer, who explained vividly that an engineer is supposed to press a button every minute to keep the locomotive going, otherwise the machine stops. Less “dramatic” applications include turning off lights or other equipment after a period of time.

The ideal DMS provides several minutes of “on” time, requires no programming, external controls, additional power supplies and no modifications of the existing equipment. In effect, no changes should occur in the standard operating procedures of using the equipment. To reset the timer from “off” back to “on,” it is desirable to either use a button or just cycle the power.

Ironically, a multitude of electronic timers available online or at home improvement retail stores are highly over-engineered. These timers either require programming of specific date-times to be “ON” or have very long pre-sets, require changes in equipment wiring, etc.

DMS OPERATION

This article presents a DMS design that has been tested and currently in use in two different systems. One is controlling a UV source and another is controlling a hydrogen gas line valve. If someone forgets to turn off the UV source, the repairs are costly. When it comes to forgetting to turn off hydrogen, a violent explosion may happen!

The DMS works as follows. First, there are no microcontrollers—just plain physics. Capacitors C1 (bipolar, electrolytic) and C2 make a voltage divider (see Figure 1). Note this timer was originally designed for the European voltage; however, it is very simple to recalculate the capacitor divider for the US voltage.

Figure 1: This is the timer schematic. The Reset button S1 is optional.

Figure 1: This is the timer schematic. The Reset button S1 is optional.

The voltage is rectified by a bridge and smoothed by C3. The voltage on C3 is approximately 13 V. When the timer is powered on, both capacitors C4 and C5 are quickly charged each to a half of the supply voltage. FET is turned on and relay is engaged. At the same time, the charge begins a slowly redistribution between the capacitors, with C5 discharging via R3 and C4 further charging. Note that diode D1 is not conducting. When C5 is discharged enough, FET is turned off. This causes the relay to disengage. The timer will continue to be in this state as long as the power is provided, because C4 is effectively blocking any current flow. If the power is removed, D1 opens up to discharge C4 via R2. Remember: C5 is already discharged. Thus, the timer is reset to its initial condition. In addition, a manual reset switch S1 is added in case if it is more convenient to reset the timer by pushing a button rather than briefly disconnecting the mains power.

“ON” TIME

With the indicated components, the “on” time is for approximately 6 minutes. Changing C4 and C5 adjusts the “on” time. Our hydrogen valve control system uses capacitances of 30 µF each, resulting in approximately 25 minutes of “on” time. Note that the capacitances of C4 and C5 must be the same.

ABOUT THE AUTHORS

Dr. Alexander Pozhitkov has an MS in Chemistry and a PhD in Genetics from Albertus Magnus University in Cologne, Germany. For 12 years he has been involved with interdisciplinary research relating to molecular biology, physical chemistry, software, and electrical engineering. Currently, Dr. Pozhitkov is a researcher at the University of Washington, Seattle. His technical interests include hardware programming, vacuum tubes, and high-voltage electronics.

Hans-Joachim Hamann is a staffer at the Max Planck Institute for Evolutionary Biology.

 

Diode Bridge Solution (EE Tip #140)

Once I connected a battery up to a DSP in the wrong “direction,” thereby destroying the DSP. That incident drove home the necessity of “suspenders and belt” design.Diode

After the accident, my colleague and I added a diode to the circuit to make it impossible to repeat that mistake. Nowadays, when I teach elementary electronics courses, I generally mention the diode bridge as a way to make it possible to connect up a battery in either “direction” without endangering the electronics to which the battery is to be connected.

My mistake has served as a cautionary tale for many years now.—Shlomo Engelberg, CC25, 2013

One-Wire RS-232 Half Duplex (EE Tip #135)

Traditional RS-232 communication needs one transmit line (TXD or TX), one receive line (RXD or RX), and a Ground return line. The setup allows a full-duplex communication. However, many applications use only half-duplex transmissions, as protocols often rely on a transmit/acknowledge scheme. With a simple circuit like Figure 1, this is achieved using only two wires (including Ground). This circuit is designed to work with a “real” RS-232 interface (i.e., using positive voltage for logic 0s and negative voltage for logic 1s), but by reversing the diodes it also works on TTL-based serial interfaces often used in microcontroller designs (where 0 V = logic 0; 5 V = logic 1). The circuit needs no additional voltage supply, no external power, and no auxiliary voltages from other RS-232 pins (RTS/CTS or DTR/DSR).Grun1-Wire-RS232-HalfDup

Although not obvious at a first glance, the diodes and resistors form a logic AND gate equivalent to the one in Figure 2 with the output connected to both receiver inputs. The default (idle) output is logic 1 (negative voltage) so the gate’s output follows the level of the active transmitter. The idle transmitter also provides the negative auxiliary voltage –U in Figure 2. Because both receivers are connected to one line, this circuit generates a local echo of the transmitted characters into the sender’s receiver section. If this is not acceptable, a more complex circuit like the one shown in Figure 3 is needed (only one side shown). This circuit needs no additional voltage supply either. In this circuit the transmitter pulls its associated receiver to logic 1 (i.e., negative voltage) by a transistor (any standard NPN type) when actively sending a logic 0 (i.e., positive voltage) but keeps the receiver “open” for the other transmitter when idle (logic 1). Here a negative auxiliary voltage is necessary which is generated by D2 and C1. Due to the start bit of serial transmissions, the transmission line is at logic 1 for at least one bit period per character. The output impedance of most common RS-232 drivers is sufficient to keep the voltage at C1 at the necessary level.

Note: Some RS-232 converters have quite low input impedance; the values shown for the resistors should work in the majority of cases, but adjustments may be necessary. In case of extremely low input impedance, the receiving input of the sender may show large voltage variations between 1s and 0s. As long as the voltage is below –3 V at any time these variations may be ignore.— Andreas Grün, “One Wire RS-232 Half Duplex,” Elektor July/August 2009.

Issue 286: EQ Answers

Question 1—A divider is a logic module that takes two binary numbers and produces their numerical quotient (and optionally, the remainder). The basic structure is a series of subtractions and multiplexers, where the multiplexer uses the result of the subtraciton to select the value that gets passed to the next step. The quotient is formed from the bits used to control the multiplexers, and the remainder is the result of the last subtraction.

If it is implemented purely combinatorially, then the critical path through all of this logic is quite long (even with carry-lookahead in the subtractors) and the clock cycle must be very slow. What could be done to shorten the clock period without losing the ability to get a result on every clock?

Answer 1—Pretty much any large chunk of combinatorial logic can be pipelined in order to reduce the clock period. This allows it to produce more results in a given amount of time, at the expense of increasing the latency for any particular result.

Divider logic is very easy to pipeline, and the number of pipeline stages you can use is fairly arbitrary. You could insert a pipeline register after each subtract-mux pair, or you might choose to do two or more subtract-mux stages per pipeline register You could even go so far as to pipeline the subtracts and the muxes separately (or even pipeline *within* each subtract) in order to get the fastest possible clock speed, but this would be rather extreme.

The more pipeline registers you use, the shorter the critical path (and the clock period) can be, but you use more resources (the registers). Also, the overall latency goes up, since you need to account for the setup and propagation times of the pipeline registers in the clock period (in addition to the subtract-mux logic delays). This gets multiplied by the number of pipeline stages in order to compute the total latency.

Question 2—On the other hand, what could be done to reduce the amount of logic required for the divider, giving up the ability to have a result on every clock?

 

Answer 2—If you don’t need the level of performance provided by a pipelined divider, you can computes the quotient serially, one bit at a time. You would just need one subtractor and one multiplexer, along with registers to hold the input values, quotient bits and the intermediate result.

You could potentially compute more than one bit per clock period using additional subtract-mux stages. This gives you the flexibility to trade off space and time as needed for a particular application.

Question 3—An engineer wanted to build an 8-MHz filter that had a very narrow bandwidth, so he used a crystal lattice filter like this:

EQ-fig1-CC287-June14

However, when he built and tested his filter, he discovered that while it worked fine around 8 MHz, the attenuation at very high frequencies (e.g., >80 MHz) was very much reduced. What caused this?

Answer 3—The equivalent circuit for a quartz crystal is something like this:EQ-fig2-CC287-June14

The components across the bottom represent the mechanical resonance of the crystal itself, while the capacitor at the top represents the capacitance of the electrodes and holder. Typical values are:

  • Cser: 10s of fF (yes, femtofarads, 10-15F)
  • L: 10s of mH
  • R: 10s of ohms
  • Cpar: 10s of pF

The crystal has a series-resonant frequency based on just Cser and L. It has a relatively low impedance (basically just R) at this frequency.

It also has a parallel-resonant (sometimes called “antiresonant”) frequency when you consider the entire loop, including Cpar. Since Cser and Cpar are essentially in series, together they have a slightly lower capacitance than Cser alone, so the parallel-resonant frequency is slightly higher. The crystal’s impedance is very high at this frequency.

But at frequencies much higher than either of the resonant frequencies, you can see that the impedance of Cparalone dominates, and this just keeps decreasing with increasing frequency. This reduces the crystal lattice filter to a simple capacitive divider, which passes high freqeuncies with little attenuation.

Question 4—Suppose you know that a nominal 10.000 MHz crystal has a series-resonant frequency of 9.996490 MHz and a parallel-resonant frequency of 10.017730 MHz. You also know that its equivalent series capacitance is 27.1 fF. How can you calculate the value of its parallel capacitance?

Answer 4—First, calculate the crystal’s equivalent inductance, based on the series-resonant frequency:EQ-equation1-CC287-June14

Next, calculate the capacitance required to resonate with that inductance at the parallel-resonant frequency:EQ-equation2-CC287-June14

Finally, calculate the value of Cpar required to give that value of capacitance when in series with Cser:EQ-equation3-CC287-June14

Note that all three equations can be combined into one, and this reduces to:EQ-equation4-CC287-June14

High Electron Mobility Transistors

gold backgroundThe TPH3002LD and the TPH3002LS are 600-V Gallium nitride (GaN)-based, low-profile power quad flat no-lead (PQFN) high electron mobility transistors (HEMTs). The HEMTs utilize Transphorm’s patented, high-performance EZ-GaNTM technology, which combines low switching and conduction losses, reducing the overall system energy dissipation up to 50%.

The TPH3002PD and TPH3002PS HEMTs are designed for use in smaller, lower-power applications (e.g., adapters and all-in-one computer power supplies). The HEMTs feature a Kelvin connection to isolate the gate circuit from the high-current output circuit to further reduce electromagnetic interference (EMI) and high-frequency switching capabilities.
Evaluation boards are available with the devices.

Contact Transphorm for pricing.

Transphorm, Inc.
www.transphormusa.com

A Serene Workspace for Board Evaluation and Writing

 Elecronics engineer, entrepreneur, and author Jack Ganssle recently sent us information about his Finksburg, MD, workspace:

I’m in a very rural area and I value the quietness and the view out of the window over my desk. However, there are more farmers than engineers here so there’s not much of a high-tech community! I work out of the house and share an office with my wife, who handles all of my travel and administrative matters. My corner is both lab space and desk. Some of the equipment changes fairly rapidly as vendors send in gear for reviews and evaluation.

ganssle-workspace

Ganssle’s desk is home to ever-changing equipment. His Agilent Technologies MSO-X-3054A mixed-signal oscilloscope is a mainstay.

The centerpiece, though, is my Agilent Technologies MSO-X-3054A mixed-signal oscilloscope. It’s 500 MHz, 4 GSps, and includes four analog channels and 16 digital channels, as well as a waveform generator and protocol analyzer. I capture a lot of oscilloscope traces for articles and talks, and the USB interface sure makes that easy. That’s pretty common on oscilloscopes, now, but being an old-timer I remember struggling with a Polaroid scope camera.

The oscilloscope’s waveform generator has somewhat slow (20-ns) rise time when making pulses, so the little circuit attached to it sharpens this to 700 ps, which is much more useful for my work. The photo shows a Siglent SDS1102CML oscilloscope on the bench that I’m currently evaluating. It’s amazing how much capability gets packed into these inexpensive instruments.

The place is actually packed with oscilloscopes and logic analyzers, but most are tucked away. I don’t know how many of those little USB oscilloscope/logic analyzers vendors have sent for reviews. I’m partial to bench instruments, but do like the fact that the USB instruments are typically quite cheap. Most have so-so analog performance but the digital sampling is generally great.

Only barely visible in the picture, under the bench there’s an oscilloscope from 1946 with a 2” CRT I got on eBay just for fun. It’s a piece of garbage with a very nonlinear timebase, but a lot of fun. The beam is aimed by moving a magnet around! Including the CRT there are only four tubes. Can you imagine making anything with just four transistors today?

The big signal generator is a Hewlett-Packward 8640B, one of the finest ever made with astonishing spectral purity and a 0.5-dB amplitude flatness across 0.5 MHz to 1 GHz. A couple of digital multimeters and a pair of power supplies are visible as well. The KORAD supply has a USB connection and a serviceable, if klunky, PC application that drives it. Sometimes an experiment needs a slowly changing voltage, which the KORAD manages pretty well.

They’re mostly packed away, but I have a ton of evaluation kits and development boards. A Xilinx MicroZed is shown on the bench. It’s is a very cool board that has a pair of Cortex-A9s plus FPGA fabric in a single chip.

I use IDEs and debuggers from, well, everyone: Microchip Technology, IAR Systems, Keil, Segger, you name it. These run on a variety of processors but, along with so many others, more and more I’m using Cortex-M series parts.

My usual lab work is either evaluating boards, products and instruments, or running experiments that turn into articles. It pains me to see so much engineering is done via superstition today. For example, people pick switch contact debounce times based on hearsay or smoke signals or something. Engineers need data, so I tested about 50 pairs of switches to determine what real bounce characteristics are. The results are on my website. Ditto for watchdog timers and other important issues embedded people deal with.

Ganssle notes that his other “bench” is his woodworking shop. To learn more about Ganssle, read our 2013 interview.

Battery Charger Design (EE Tip #130)

It’s easy to design a good, inexpensive charger. There is no justification for selling cheap, inadequate contraptions. Many companies (e.g., Linear Technology, Maxim, Semtech, and Texas Instruments) supply inexpensive battery management ICs. With a few external parts, you can build a perfect charger for just about any battery.

Texas Instruments’s UC2906 is an older (Unitrode) IC designed to build an excellent sealed lead-acid battery charger with a sophisticated charging profile. Figure 1 shows the recommended charger circuit.

Figure 1: This lead-acid battery charger uses Texas Instruments’s UC2906 IC.

Figure 1: This lead-acid battery charger uses Texas Instruments’s UC2906 IC.

In addition to the IC, only a handful of resistors and a PNP power transistor Q1 are needed to build it. Q1 must be rated for the maximum charging current and fitted with a heatsink.

An LED with its current-limiting resistor R can be connected to pin 7, which is an open-collector NPN transistor, to indicate the presence of power. Similarly, an LED with a series resistor could be connected to pin 9, which is also an open-collector NPN transistor to indicate overcharge (it is not used in Figure 1). The UC2906 datasheet and the Application Note provide tables and equations for selection of resistors Rs, Rt, RA, RB, RC, and RD and suggestions for adding various features.

Editor’s Note: This is an excerpt from an article written by George Novacek, “Battery Basics (Part 3): Battery Management ICs,” Circuit Cellar 280, 2013.

Issue 284: EQ Answers

PROBLEM 1
Can you name all of the signals in the original 25-pin RS-232 connector?

ANSWER 1
Pins 9, 10, 11, 18, and 25 are unassigned/reserved. The rest are:

Pin Abbreviation Source Description
1 PG - Protective ground
2 TD DTE Transmitted data
3 RD DCE Received data
4 RTS DTE Request to send
5 CTS DCE Clear to send
6 DSR DCE Data Set Ready
7 SG - Signal ground
8 CD DCE Carrier detect
12 SCD DCE Secondary carrier detect
13 SCTS DCE Secondary clear to send
14 STD DTE Secondary transmitted data
15 TC DCE Transmitter clock
16 SRD DCE Secondary received data
17 RC DCE Receiver clock
19 SRTS DTE Secondary request to send
20 DTR DTE Data terminal ready
21 SQ DCE Signal quality
22 RI DCE Ring indicator
23 - DTE Data rate selector
24 ETC DTE External transmitter clock

 

PROBLEM 2
What is the key difference between a Moore state machine and a Mealy state machine?

ANSWER 2
The key difference between Moore and Mealy is that in a Moore state machine, the outputs depend only on the current state, while in a Mealy state machine, the outputs can also be affected directly by the inputs.

 

PROBLEM 3
What are some practical reasons you might choose one state machine over the other?

ANSWER 3
In practice, the difference between Moore and Mealy in most situations is not very important. However, when you’re trying to optimize the design in certain ways, it sometimes is.

Generally speaking, a Mealy machine can have fewer state variables than the corresponding Moore machine, which will save physical resources on a chip. This can be important in low-power designs.

On the other hand, a Moore machine will typically have shorter logic paths between flip-flops (total combinatorial gate delays), which will enable it to run at a higher clock speed than the corresponding Mealy machine.

 

PROBLEM 4
What is the key feature that distinguishes a DSP from any other general-purpose CPU?

ANSWER 4
Usually, the key distinguishing feature of a DSP when compared with a general-purpose CPU is that the DSP can execute certain signal-processing operations with few, if any, CPU cycles wasted on instructions that do not compute results.

One of the most basic operations in many key DSP algorithms is the MAC (multiply-accumulate) operation, which is the fundamental step used in matrix dot and cross products, FIR and IIR filters, and fast Fourier transforms (FFTs). A DSP will typically have a register and/or memory organization and a data path that enables it to do at least 64 MAC operations (and often many more) on unique data pairs in a row without any clocks wasted on loop overhead or data movement. General-purpose CPUs do not generally have enough registers to accomplish this without using additional instructions to move data between registers and memory.

Issue 282: EQ Answers

PROBLEM 1
Construct an electrical circuit to find the values of Xa, Xb, and Xc in this system of equations:

21Xa – 10Xb – 10Xc = 1
–10Xa + 22Xb – 10Xc = –2
–10Xa – 10Xb + 20Xc = 10

Your circuit should include only the following elements:

one 1-Ω resistor
one 2-Ω resistor
three 10-Ω resistors
three ideal constant voltage sources
three ideal ammeters

The circuit should be designed so that each ammeter displays one of the values Xa, Xb, or Xc. Given that the Xa, Xb, and Xc values represent currents, what kind of circuit analysis yields equations in this form?

ANSWER 1
You get equations in this form when you do mesh analysis of a circuit. Each equation represents the sum of the voltages around one loop in the mesh.

PROBLEM 2
What do the coefficients on the left side of the equations represent? What about the constants on the right side?

ANSWER 2
The coefficients on the left side of each equation represent resistances. Resistance multiplied by current (the unknown Xa, Xb, and Xc values) yields voltage.
The “bare” numbers on the right side of each equation represent voltages directly (i.e., independent voltage sources).

PROBLEM 3
What is the numerical solution for the equations?

ANSWER 3
To solve the equations directly, start by solving the third equation for Xc and substituting it into the other two equations:

Xc = 1/2 Xa + 1/2 Xb + 1/2

21Xa – 10Xb – 5Xa – 5Xb – 5 = 1
–10Xa + 22Xb – 5Xa – 5Xb – 5 = –2

16Xa – 15Xb = 6
–15Xa + 17Xb = 3

Solve for Xa by multiplying the first equation by 17 and the second equation by 15 and then adding them:

272Xa – 255Xb = 102
–225Xa + 255Xb = 45

47Xa = 147 → Xa = 147/47

Solve for Xb by multiplying the first equation by 15 and the second equation by 16 and then adding them:

240Xa – 225Xb = 90
–240Xa + 272Xb = 48

47Xb = 138 → Xb = 138/47

Finally, substitute those two results into the equation for Xc:

Xc = 147/94 + 138/94 + 47/94 = 332/94 = 166/47

PROBLEM 4
Finally, what is the actual circuit? Draw a diagram of the circuit and indicate the required value of each voltage source.

ANSWER 4
The circuit is a mesh comprising three loops, each with a voltage source. The common elements of the three loops are the three 10-Ω resistors, connected in a Y configuration (see the figure below).

cc281_eq_fig1The values of the voltage sources in each loop are given directly by the equations, as shown. To verify the numeric solution calculated previously, you can calculate all of the node voltages around the outer loop, plus the voltage at the center of the Y, and ensure they’re self-consistent.

We’ll start by naming Va as ground, or 0 V:

Vb = Va + 2 V = 2 V

Vc = Vb + 2 Ω × Xb = 2V + 2 Ω × 138/47 A = 370/47 V = 7.87234 V

Vd = Vc + 1 Ω × Xa = 370/47 V + 1 Ω × 147/47A = 517/47 V = 11.000 V

Ve = Vd – 1 V = 11.000 V – 1.000 V = 10.000 V

Va = Ve – 10 V = 0 V

which is where we started.

The center node, Vf, should be at the average of the three voltages Va, Vc, and Ve:

0 V + 370/47 V + 10 V/3 = 840/141 V = 5.95745 V

We should also be able to get this value by calculating the voltage drops across each of the three 10-Ω resistors:

Va + (Xc – Xb) × 10 Ω = 0 V + (166 – 138)/47A × 10 Ω = 280/47 V = 5.95745 V

Vc + (Xb – Xa) × 10 Ω = 370/47V + (138-147)/47A × 10 Ω = 280/47 V = 5.95745 V

Ve + (Xa – Xc) × 10 Ω = 10 V + (147-166)/47 A × 10 Ω = 280/47 V = 5.95745 V

The Future of Inkjet-Printed Electronics

Silver nanoparticle ink is injected into an empty cartridge and used in conjunction with an off-the-shelf inkjet printer to enable ‘instant inkjet circuit’ prototyping. (Photo courtesy of Georgia Institute of Technology)

Silver nanoparticle ink is injected into an empty cartridge and used in conjunction with an off-the-shelf inkjet printer to enable ‘instant inkjet circuit’ prototyping. (Photo courtesy of Georgia Institute of Technology)

Over the past decade, major advances in additive printing technologies in the 2-D and 3-D electronics fabrication space have accelerated additive processing—printing in particular—into the mainstream for the fabrication of low-cost, conformal, and environmentally friendly electronic components and systems. Printed electronics technology is opening an entirely new world of simple and rapid fabrication to hobbyists, research labs, and even commercial electronics manufacturers.

Historically, PCBs and ICs have been fabricated using subtractive processing techniques such as photolithography and mechanical milling. These traditional techniques are costly and time-consuming. They produce large amounts of material and chemical waste and they are also difficult to perform on a small scale for rapid prototyping and experimentation.

This single-sided wiring pattern for an Arduino microcontroller was printed on a transparent sheet of coated PET film, (Photo courtesy of Georgia Technical Institute)

This single-sided wiring pattern for an Arduino microcontroller was printed on a transparent sheet of coated PET film, (Photo courtesy of Georgia Technical Institute)

To overcome the limitations of subtractive fabrication, over the past decade the ATHENA group at the Georgia Institute of Technology (Georgia Tech) has been developing an innovative inkjet-printing platform that can print complex, vertical ICs directly from a desktop inkjet printer.

To convert a standard desktop inkjet printer into an electronics fabrication platform, custom electronic inks developed by Georgia Tech replace the standard photo inks that are ejected out of the printer’s piezoelectric nozzles. Inks for depositing conductors, insulators/dielectrics, and sensors have all been developed. These inks can print not only single-layer flexible PCBs, but they can also print complex, vertically integrated electronic structures (e.g., multilayer wiring with interlayer vias, parallel-plate capacitors, batteries, and sensing topologies to sense gas, temperature, humidity, and touch).

To create highly efficient electronic inks, which are the key to the printing platform, Georgia Tech researchers exploit the nanoscale properties of electronic materials. Highly conductive metals (e.g., gold, silver, and copper) have very high melting temperatures of approximately 1,000°C when the materials are in their bulk or large-scale form. However, when these metals are decreased to nanometer-sized particles, their melting temperature dramatically decreases to below 100°C. These nanoscale particles can then be dispersed within a solvent (e.g., water or alcohol) and printed through an inkjet nozzle, which is large enough to pass the nanoparticles. After printing, the metal layer printed with nanoparticles is heated at a low temperature, which melts the particles back into a highly conductive metal to produce very low-resistance electrical structures.

Utilizing nanomaterials has enabled the creation of plastic, ceramic, piezoelectric, and carbon nanotube and graphene inks, which are the fundamental building blocks of a fully printed electronics platform. The inks are then tuned to have the correct viscosity and surface tension for a typical desktop inkjet printer.

By loading these nanomaterial-based conductive, dielectric, and sensing inks into the different-colored cartridges of a desktop inkjet printer, 3-D electronics topologies such as metal-insulator-metal (MIM) capacitors can then be created by printing the different inks on top of each other in a layer-by-layer deposition. Since printing is a non-contact additive deposition method, and the processing temperatures are below 100⁰C, these inks can be printed onto virtually any substrate, including standard photo paper, plastic, fabrics, and even silicon wafers to interface with standard ICs with printed feature sizes below 20 µm.

The Georgia Tech-developed printing platform is a major breakthrough. It makes the cost of additively fabricating circuits nearly the same as printing a photo on a home desktop inkjet printer—and with the same level of simplicity and accessibility.

These advancements in 2-D electronics printing combined with current research in low-cost 3-D printing are enabling commercial-grade fabrication of devices that typically required clean room environments and expensive manufacturing equipment. Such technology, when made accessible to the masses, has the potential to completely change the way we think about building, interacting with, and even purchasing electronics that can be digitally transmitted and printed.  While the printing technology is currently at a mature stage, we have only scratched the surface of potential applications that can benefit from printing low-cost, flexible electronic devices.

Client Profile: Lauterbach, Inc

1111 Main Street #115
Vancouver, WA 98660

Contact:
sales_us@lauterbach.com

LauterbachFeatured Product: The TRACE32-ICD in-circuit debugger supports a range of on-chip debug interfaces. The debugger’s hardware is universal and enables you to connect to different target processors by simply changing the debug cable. The PowerDebug USB 3.0 can be upgraded with the PowerProbe or the PowerIntergrator to a logic analyzer.

Product Features: The TRACE 32-ICD JTAG debugger has a 5,000-KBps download rate. It features easy high-level Assembler debugging and an interface to all industry-standard compilers. The debugger enables fast download of code to target, OS awareness debugging, and flash programming. It displays internal and external peripherals at a logical level and includes support for hardware breakpoints and trigger (if supported by chip), multicore debugging (SMP and AMP), C and C++, and all common NOR and NAND flash devices.

For more information, visit www.lauterbach.com/bdmusb3.html.

Client Profile: Digi International, Inc

Contact: Elizabeth Presson
elizabeth.presson@digi.com

Featured Product: The XBee product family (www.digi.com/xbee) is a series of modular products that make adding wireless technology easy and cost-effective. Whether you need a ZigBee module or a fast multipoint solution, 2.4 GHz or long-range 900 MHz—there’s an XBee to meet your specific requirements.

XBee Cloud Kit

Digi International XBee Cloud Kit

Product information: Digi now offers the XBee Wi-Fi Cloud Kit (www.digi.com/xbeewificloudkit) for those who want to try the XBee Wi-Fi (XB2B-WFUT-001) with seamless cloud connectivity. The Cloud Kit brings the Internet of Things (IoT) to the popular XBee platform. Built around Digi’s new XBee Wi-Fi
module, which fully integrates into the Device Cloud by Etherios, the kit is a simple way for anyone with an interest in M2M and the IoT to build a hardware prototype and integrate it into an Internet-based application. This kit is suitable for electronics engineers, software designers, educators, and innovators.

Exclusive Offer: The XBee Wi-Fi Cloud Kit includes an XBee Wi-Fi module; a development board with a variety of sensors and actuators; loose electronic prototyping parts to make circuits of your own; a free subscription to Device Cloud; fully customizable widgets to monitor and control connected devices; an open-source application that enables two-way communication and control with the development board over the Internet; and cables, accessories, and everything needed to connect to the web. The Cloud Kit costs $149.

Reduce EMI on a Micro (EE Tip #109)

Electromagnetic interference (EMI) on a typical microprocessor board is related to the clock. If the clock is a square wave, it contains frequencies at the clock frequency and harmonics. A perfect square wave clock would have harmonic frequencies at f, 3 × f, 5 × f, 7 × f, and so on. For a perfect square wave, or any string of pulses with a fast rise time, the strength of the harmonics declines inversely with frequency.

So, the eleventh harmonic would be one-eleventh as strong as the fundamental frequency. This corresponds to a decline in harmonic amplitude of 20 dB per decade.

Real time clocks are not perfect square waves, and pulses do not have infinitely fast rise times. As a result, the higher harmonics of any real waveform start dropping faster than 1/n at higher frequencies, generally dropping as 1/(n2), or 40 dB per decade, after the frequency is high enough.

You can see this in Figure 1. The antenna efficiency of PC board structures or cables increases 20 dB per decade as frequency increases and wavelength gets shorter and closer to the size of structures found on typical PC boards.

Figure 1—Here you can see the sources of EMI in a typical microprocessor and the resulting spectrum.

Figure 1: Here you can see the sources of EMI in a typical microprocessor and the resulting spectrum.

As a result, the beginning part of the radiated spectrum tends to be uniform, the 20 dB per decade decline in harmonic strength being balanced by the 20 dB per decade increase in antenna efficiency, until a high enough frequency is reached where the curve takes a bend and harmonics start declining at 40 dB per decade zone (see Figure 1).

Above this frequency, the radiated spectrum starts declining by 20 dB per octave. But, the amplitudes of the real harmonics of a real device are often quite irregular because of resonances that weaken some and reinforce others.

What is not usually understood is that the biggest source of EMI is not the clock directly, but a train of pulses generated on both edges of the clock when current surges into the microprocessor for a nanosecond or two when the clock transitions up or down. This pulse train has a frequency that’s double the clock frequency. It seeps out of the processor chip into the power supplies and generally infects the board with high-frequency EMI. It also gets into the output lines emanating from the processor package; therefore, it’s further spread around the board and to cables and devices connected to the board.

The current surges on both clock edges are related to the clock tree. The clock tree is a system consisting of a branching network of buffers that distribute the internal clock around the silicon die. Because these buffers drive considerable capacitance and have both polarities of the clock present, there is a surge of current on both edges of the clock. This occurs as current flows into the chip to charge up the capacitance in the part of the clock tree that is transitioning from 0 V to the power supply voltage. On-chip devices, such as flip-flops, also contain internal gates and buffers where both polarities of the clock are present and contribute to the current surge.

An additional current surge is related to the crossover current when both the N and P transistors in a CMOS buffer are momentarily conducting during a logic transition. The silicon chip tries to suck in the required current to service these fast transients through its power supply pins. However, these connections have inductance created by the bond wires and lead frame, so the voltage drops briefly on the die, creating an on-chip power supply voltage drop with an amplitude on the order of a few tenths of a volt and the duration of a nanosecond or so.

If this same on-chip power supply drives the output buffers that carry signal lines out of the chip, these lines will also be infected with the fast pulses present in the power and ground supplies. This is because the power supply noise is directly transmitted through the buffer power inputs to the output lines. The on-chip current surges create fast noise that passes out through the power supply pins to the power and ground planes on the PC board, further spreading the infection.

The amplitude of the harmonics of the periodic noise pulses, at least at lower frequencies, declines inversely with frequency (1/f). Unfortunately, the effectiveness of a short antenna, such as a PC board trace, increases directly with frequency (~f). The result is that the radiated EMI tends to be flat across the spectrum.

Fortunately, the amplitude of the harmonics starts declining more rapidly than 1/f; it’s more like 1/(f2) at some higher frequency determined by the finite rise time of the pulses in the pulse train. The balance of these countervailing effects is such that the most trouble is often found in the area of 100 to 300 MHz for lower-speed 8- and 16-bit microprocessor boards.

Decoupling capacitors and the intrinsic capacitance of the power and ground planes can be used to short circuit or filter noise on the power supply. However, this technique loses effectiveness above 100 MHz, because the decoupling capacitors have inductance of about 1 nH, giving an effective resistance of about 0.5 Ω at 200 MHz. The large currents involved will develop millivolt-level voltages across such capacitors.

REDUCTION TRICK #1

The problem of noise on the I/O lines of a processor can be addressed with two sets of power supply pins. One set is used for the processor core; the other is for the output drivers that are located in the I/O ring on the periphery of the die (see Figure 2).

Figure 2: The connection of separate power and ground pins for the core and I/O ring of a processor is shown here. A PC board filter blocks core noise from power planes. You can also see how I/O buffers spread power supply noise.

Figure 2: The connection of separate power and ground pins for the core and I/O ring
of a processor is shown here. A PC board filter blocks core noise from power planes.
You can also see how I/O buffers spread power supply noise.

If the I/O buffers are supplied with the same power that is made dirty by the fast transients in the processor core, every output pin of the processor will spread EMI. The EMI that tries to come out of the power pins for the core can be blocked by a combination of decoupling capacitors and PC board trace inductance. This keeps the PC board power planes a relatively clean source of power for the processor I/O ring. The design team figured this feature decreases EMI amplitudes by 10 dB, which is a factor of three in EMI electrical field strength measured by the prescribed calibrated antenna. This is a lot because it’s common to flunk the tests by 5 dB.

REDUCTION TRICK #2

Most microprocessors have I/O and memory devices connected to the same bus with distinct control signals for the devices. Generally, there is a lot more activity at a higher frequency for the memory devices. For instance, a Digi International Rabbit 3000 microprocessor has an option to use separate pins for memory and I/O devices, both address and data. The advantage is that the physical scope of the high-speed memory bus is limited to the memory devices. A separate address and data bus handles I/O cycles and has a much lower average operating frequency. In particular, the address lines toggle only during I/O bus cycles, greatly limiting the emissions from the I/O bus. This avoids the situation where the fast-toggling address and data lines of the memory bus have to be run all over the printed circuit board of a large system. This scheme also limits the capacitive loading on the memory bus, which does not have to extend to numerous I/O devices.

REDUCTION TRICK #3

A line spectrum is the spectrum generated by a square wave clock or by a train of short pulses. All of the energy is concentrated in a narrow spectral line at the harmonic frequencies.

When the FCC EMI measurement tests are performed, the spectrum analyzer measures the amplitude of the signal from a 120-kHz wide filter that is swept across the frequencies of interest. With a line spectrum, all of the energy in a single line passes through the filter, resulting in a strong signal. If the energy in the line could be spread out over a wider frequency, say 5 MHz, only one-fortieth the energy would pass through the 120-kHz wide filter, considerably reducing the reading (by 16 dB in amplitude for one fortieth of the energy). This is what a clock spectrum spreader does. It modulates the clock frequency by a little so as to smear out the spectral line in frequency.

The idea to do this for the purpose of reducing EMI was patented by Bell Labs in two patents during the 1960s. There are numerous ways to modulate the clock frequency. One method is to use a voltage-controlled oscillator and phase-lock loop so that the frequency sweeps back and forth at a low modulation rate (e.g., 50 kHz).

Another method is to insert random delays or dithers into the clock. These methods are all covered in the original Bell Labs patents. The Bell Labs people were probably interested in EMI because telephone switches involve a large amount of equipment in a small space. In addition, it’s conceivable that the early computerized switches suffered from EMI problems. We installed a clock spectrum spreader in the Rabbit 3000 based on a combination of digital and analog techniques. The spectrum spreader reduces FCC-style EMI readings by around 20 dB, which is a lot.

A control system makes sure that the modulated clock edge is never in error by more than 20 ns compared to where the clock edge would be if it were not modulated. This prevents disruption in serial communications or other timing functions. For example, a UART operating at 460,000 bps can tolerate about 500 ns of clock edge error before it will be near to generating errors. This is far less than our 20-ns worst error in clock edge position.—Circuit Cellar 146, Norman Rogers, “Killing the EMI Demon,” 2002.

This piece originally appeared in Circuit Cellar 146, 2002. Author: Norman Rogers, who was President of ZWorld, Inc. and Rabbit Semiconductor.

Member Profile: Scott Weber

Scott Weber

Scott Weber

LOCATION:
Arlington, Texas, USA

MEMBER STATUS:
Scott said he started his Circuit Cellar subscription late in the last century. He chose the magazine because it had the right mix of MCU programming and electronics.

TECH INTERESTS:
He has always enjoyed mixing discrete electronic projects with MCUs. In the early 1980s, he built a MCU board based on an RCA CDP1802 with wirewrap and programmed it with eight switches and a load button.

Back in the 1990s, Scott purchased a Microchip Technology PICStart Plus. “I was thrilled at how powerful and comprehensive the chip and tools were compared to the i8085 and CDP1802 devices I tinkered with years before,” he said.

RECENT EMBEDDED TECH ACQUISITION:
Scott said he recently treated himself to a brand-new Fluke 77-IV multimeter.

CURRENT PROJECTS:
Scott is building devices that can communicate through USB to MS Windows programs. “I don’t have in mind any specific system to control, it is something to learn and have fun with,” he said. “This means learning not only an embedded USB software framework, but also Microsoft Windows device drivers.”

THOUGHTS ON THE FUTURE OF EMBEDDED TECH:
“Embedded devices are popping up everywhere—in places most people don’t even realize they are being used. It’s fun discovering where they are being applied. It is so much easier to change the microcode of an MCU or FPGA as the unit is coming off the assembly line than it is to rewire a complex circuit design,” Scott said.

“I also like Member Profile Joe Pfeiffer’s final comment in Circuit Cellar 276: Surface-mount and ASIC devices are making a ‘barrier to entry’ for the hobbyist. You can’t breadboard those things! I gotta learn a good way to make my own PCBs!”