Silicon ChipCircuit Surgery - May 2020 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Publisher's Letter: Publisher's Statement
  5. Publisher's Letter
  6. Feature: The Fox Report by Barry Fox
  7. Feature: Techno Talk by Mark Nelson
  8. Feature: Net Work by Alan Winstanley
  9. Project: 433MHz Wireless Data Range Extender by John Clarke
  10. Project: Bridge-mode Audio Amplifier Adaptor by NICHOLAS VINEN
  11. Project: iCEstick by Tim Blythman
  12. Project: Ultra-low-distortion Preamplifier with Tone Controls by John Clarke
  13. Feature: Circuit Surgery by Ian Bell
  14. Feature: PIC n’Mix by Mike Hibbett
  15. Feature: Make it with Micromite by Phil Boyce
  16. Feature: AUDIO OUT by Jake Rothman
  17. Feature: Visual programming with XOD by Julian Edgar
  18. Back Issues by Julian Edgar
  19. Feature: Max’s Cool Beans by Max the Magnificent
  20. PCB Order Form
  21. Advertising Index

This is only a preview of the May 2020 issue of Practical Electronics.

You can view 0 of the 80 pages in the full issue.

Articles in this series:
  • Techno Talk (May 2020)
  • Techno Talk (May 2020)
  • Techno Talk (June 2020)
  • Techno Talk (June 2020)
  • Techno Talk (July 2020)
  • Techno Talk (July 2020)
  • Techno Talk (August 2020)
  • Techno Talk (August 2020)
  • Techno Talk (September 2020)
  • Techno Talk (September 2020)
  • Techno Talk (October 2020)
  • Techno Talk (October 2020)
  • (November 2020)
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
  • Techno Talk (June 2025)
  • Techno Talk (July 2025)
  • Techno Talk (July 2025)
Circuit Surgery Regular clinic by Ian Bell Impedance measurement and Howland current sources I n a recent post on the EEweb forum, Fariz Kurnia Sandy writes: ‘I want to build a circuit for bioimpedance spectroscopy (BIS) or electrical impedance spectroscopy (EIS) using an improved Howland current source (Fig.1) for the V-to-I converter, and I want to measure the actual current injected into an object (such as tissue). Injected current is found from the formula I = V/Rx, where Rx is the load to convert the voltage to current. Here, the voltage is the input voltage from the source, not the voltage after the amplifying process using an op amp (assuming a perfect op amp). Of course, no op amp is perfect. For example, if the input voltage is 1V, with Rx = 1kΩ, the injected current is 1mA (assuming an ideal op amp). I want to measure the actual injected current, from the actual applied voltage – what is the best way to do this?’ [Edited for publication.] Fariz’s circuit is part of a system to measure impedance over a range of frequencies, so we will start with a discussion of what impedance is before looking in more detail at the Howland current source he uses, and then discussing the current measurement that Fariz’s is asking about. Fig.2. One cycle of the current waveform through an impedance for the same applied voltage amplitude at two frequencies. The current shift in time with respect to the applied voltage and the amplitude of the current both vary with frequency. Impedance R4 . kΩ R2 . kΩ 12V – U2 LF351 R5 10kΩ + R1 . kΩ 12V – 1/ 1V 1kH z – U1A LF4 4 4 – 12V R3 . kΩ + – 12V 12V – U1B LF4 4 4 + – 12V Fig.1. Fariz’s impedance measurement circuit. 44 C 1 10µ F R6 1kΩ Impedance (symbol Z) is the AC version of resistance – the relationship between the applied voltage and resulting current that flows. More specifically Z = V/I, which superficially looks the same as the similar resistance relationship, R = V/I. The difference is that when dealing with AC signals we are concerned with both the magnitude (sinewave peak amplitude) and phase (relative time) relationship of the voltage and current, and impedance has to take account of this. If we apply a sinewave to a resistor the voltage and current follow one another exactly – the peak in current occurs at the same time as the peak in voltage. The same is not true for inductors and capacitors. If we apply a sinewave to a pure capacitor the peak in current will occur a quarter of Practical Electronics | May | 2020 the sinewave cycle earlier than the voltage peak (we refer to this as current leading voltage, or voltage lagging current). The time shift between voltage and current is usually expressed as an angle, where one cycle of the waveform is 360°. Thus, the current in a pure capacitor leads the voltage by 90°. For a pure inductor the current lags the voltage by 90°. For a pure resistor (R) the resistance does not change with the frequency of the applied voltage or current. For a pure inductor (L) the effective ‘resistance’ increases with frequency; that is, the magnitude of the current will decrease with frequency for the same magnitude of applied voltage. A pure inductor is a short circuit for DC and resists current flow more as frequency increases. For a pure capacitor (C) the effective resistance decreases with frequency – it is an open circuit for DC and resists current flow less as frequency increases. For impedances other than pure R, L or C, the phase shift may be other than 0° or ±90° and may vary with frequency along with the effective resistance. Fig.2 shows an example of the waveforms for a particular impedance. A 1.0V AC waveform is applied to the impedance. The resulting current is shown for two different frequencies for one cycle of the waveform. The peak in voltage occurs after the peak in current (voltage lags), but the amount of voltage lag varies with frequency. In Fig.2 this is about 60° at 10kHz and 40° at 20kHz. The amplitude of the current also varies with frequency. A single number (for ‘the voltage’, ‘the current’, or ‘the resistance’) cannot encompass both the amplitude and phase shift. We use two values – the magnitude and the phase shift angle to describe a waveform or an impedance – as shown in Fig.2. For example at 20kHz the current magnitude is about 0.78mA, so with an applied voltage of magnitude 1.0 V this indicates a ‘resistance’ of 1.0/0.78mA = 1.3kΩ, but this alone does not inform us of the phase shift and therefore the impedance. However we can write Z = 1300∠–40° to cover the magnitude and the 40° voltage lag (∠ is an ‘angle’ symbol). Complex numbers It turns out that the ‘magnitude-plus-phase’ annotation is not the most powerful way of representing impedance for mathematical circuit analysis; instead, complex numbers are often used. Complex numbers are two dimensional and therefore able to represent both amplitude and phase. The two parts of a complex number are called the ‘real’ and ‘imaginary’ parts. The term ‘imaginary’ is employed because the square root of –1 is involved. There is no ‘normal’ number which when multiplied by itself gives –1, but it is a Practical Electronics | May | 2020 very useful mathematical concept for representing real things, such RL as the behaviour of electronic L ES L RES R circuits. C In pure mathematics the square C DA RDA root of –1 is given the symbol i, but in electronics the symbol j is usually used to avoid confusion C = Cap acitance with the symbol for current. A RL = Leaka ge resistance RES R = Eq uiva lent series resistance (ES R) complex number is of the form: a L ES L = Eq uiva lent series ind uctance (ES R) + jb in which a and b are normal RDA = Dialectric absorbtion 2 C DA = Dialectric absorbtion numbers and j = –1. a is the real part of the complex number and b is the imaginary part. Impedance Fig.3. Model of a real capacitance – the various is represented by the complex non-deal elements of the capacitor (everything number Z = R + jX in which R except C) mean that the impedance variation with is resistance and X is reactance. frequency will be different from and more complex A resistor has impedance Z = R, than for an ideal capacitor. that is, the impedance is a purely some additional R, L or C in series or real number equal to the resistance. An parallel with the component. Fig.3 shows inductor has impedance Z = j2 fL, that is, a commonly used model – an equivalent it is purely imaginary value that increases circuit – for a real capacitor. Even more in proportion to frequency (f). A capacitor complex models are also used. Careful has impedance Z = 1/j2 fC, that is, it is a impedance measurement over a wide purely imaginary value that decreases in frequency range can determine the values inverse proportion to frequency. of the non-ideal characteristics of devices, Complex numbers and the magnitudewhich are often very important in high plus-phase version of signals and performance applications. impedances represent the same Impedance measurement over a range information, and we can convert between of frequencies (hence ‘spectroscopy’) is the two. For a complex value a + jb the not just used for characterising electronic magnitude is √(a2+b2) and the phase (angle) components, but has a wide range of uses in is tan–1 (b⁄a). Tan–1 is the inverse tangent science and industry. Examples in biology or arctangent function, which is commonly and medicine include measurement of available on scientific calculators or ‘google tissue and cell properties and the status calculator’. For a magnitude and phase of fluids in patient’s bodies. It is also impedance of |Z|∠ (magnitude |Z| used in biosensors (to detect certain and angle – Greek letter phi) the real pathogens). It can be used to characterise part (a) is |Z|cos( ) and the imaginary various materials, including ceramics, (b) part is |Z|sin( ). polymers, coatings and foodstuffs. It can be used to measure corrosion. It is Impedance analysis and used in chemistry for the measurement spectroscopy of electrochemical processes. It is useful to be able to measure the Accurate impedance measurement, electrical impedance of things, and because particularly at high frequencies is not easy impedance varies with frequency we due to the fact that any wiring between often need to measure impedance over the instrument and the test item will have a wide range of frequencies. Impedance impedance properties which might have measurement instruments – which is what to be compensated for and because the Fariz is trying to build – typically produce electronics driving and measuring the plots of the real and imaginary parts of signals will be subject to imperfections impedance (and/or magnitude and angle) that may introduce errors. over a wide range of frequencies. They apply a voltage or current and measure the resulting current or voltage signal Howland current source to determine the amplitude and phase The circuit posted by Fariz is known as relationship. Often, the applied signal is a ‘Howland current source’ (or ‘Howland also measured rather than just assuming current pump’). It is shown in it most its value from the signal generation process basic form in Fig.4, but there a number settings – this is the issue that Fariz is of variations. The circuit resembles a asking about. standard op amp differential amplifier, In electronics we might be interested which it would be if R4 were not present. in characterising electronic components. R4 is interesting in that it provides positive All real resistors, capacitors and inductors feedback. An advantage of the Howland have some level of the other two properties. current source, compared with some other For example, an inductor will have some common current-source circuits is that it resistance and some capacitance, but can both sink and source current. That things are often more complex than just is, is can drive a bidirectional (positive 45 I1 I1 R1 V1 – VN VI N + VP U1 IL R3 VO R4 RL Fig.4. Basic Howland current source. and negative) current signal through the load (RL in Fig.4). The Howland current source uses matched resistor ratios, specifically R2/ R1 = R3/R4 in Fig.4. It is not uncommon for all four of these resistors to have the same value. The circuit can be analysed without making initial assumptions about these ratios, but the resulting equations are a bit cumbersome. We will shortly do a simplified analysis to keep the algebra to minimum. Being a differential circuit, the input voltage VIN is applied between the two inputs, rather than referenced to ground, but can we also consider the voltage on the two inputs separately as V1 and V2. Often, one input is grounded and an input voltage is applied via the other input to control the output current (as in Fariz’s circuit in Fig.1). Circuit analysis If we assume that the op amp in Fig.4 has very high gain (ideally infinite) and is not saturated (ie, operating normally, with outputs not forced to minimum or maximum), then we can assume that its input terminal voltages are effectively equal (VN = VP = VX). Any significant difference between VN and VP would result in saturation due to the high gain. We will also assume that no current flows into the op amp due to its infinite input impedance and zero bias currents (in the ideal case). Thus the current in R1 will be the same as the current in R2. So we can write: I1 = (V1 – VX)/R1 = (VX – VO)/R2 This expression is simply Ohm’s law, relating voltage across the resistors due to the current through them. Since the equal resistor ratios are equal by design, that is, R2/R1 = R3/R4, we can also write this equation as: I1 = (V1 – VX)/R3 = (VX – VO)/R4 The current in R3 will be: 46 V1 R1 And the current in R4 is: I4 I3 V2 I3 = (V2 – VX)/R3 R2 I4 = (VX – Vo)/R4 However, unlike the currents in R1 and R2, I3 and I4 are not equal. I3 splits and flows through RL and R4. Again, assuming no current into the op amp, Kirchhoff’s Current Law tells us that I3 is equal to the sum of I4 and IL, that is: I3 = IL + I4 R2 VN – VP + U1 VO V2 R3 R4 R5 RL Fig.5. Improved Howland current source. Substituting the voltage/resistance expressions (from above) for the currents into this expression we get: The circuit in Fig.5 requires the resistor ratios to be matched such that: (V2 – VX)/R3 = IL + (VX – VO)/R4 R2/R1 = R3/(R4 + R5) Looking at the second version of our equation for I1, we see: As with the basic circuit, high-precision resistors must be used to achieve accurate matching of these ratios if good performance (high internal resistance of the current source) is to be achieved. In both circuits it is possible to use various trimmer arrangements to allow the matching to be adjusted. Even with good matching, the circuit in Fig.5 has limitations. More detailed analysis shows that if R2 is larger the current is more constant (as ideally required as RL varies). However, a large R2 limits the speed and precision of the circuit. This can be overcome by adding a buffer amplifier: A1 in Fig.6. With this buffer in place, all the current through R5 flows through RL. With resistor ratios R2/R1 = R3/R4 = k the output current is: (VX – VO)/R4 = (V1 – VX)/R3 So we can write this as: (V2 – VX)/R3 = IL + (V1 – VX)/R3 VX cancels in this equation, and then we can rearrange it to get: IL = (V2 – V1)/R3 Thus the current in the load does not depend on the value of RL and is set by the input voltage and R3. Like all circuits, the Howland current source has its limits and imperfections. One problem is that the circuit depends on exact matching of the resistor ratios. Precision resistors (0.1% or better) should be used, otherwise the internal resistance of the current source may not be very high (it can even be negative). Improvements A disadvantage of the basic Howland current source is its restricted voltage range. VO is larger than the voltage across the load, so if the load voltage needs to increase to maintain the current the op amp will saturate before the load voltage is anywhere near the supply. The circuit in Fig.5 is a modified version of the Howland current source which overcomes some of the issues with the basic design, including the voltage range. In the circuit in Fig.5, R4 from Fig.4 is split into R4 and R5. R5 is much smaller than R4 so the voltage drop across R5 in Fig.5 is much less than for R4 in Fig.4. This means that the load voltage is much closer to the op amp output voltage and its output range is not ‘wasted’ on the R4 drop. IL = (V2 – V1)/kR5 This is the form of Howland current source used by Fariz (Fig.1). Fuller details of this circuit and further enhancements can be found in an article for Analog Dialogue (from Analog Devices) by Nick Jiang, see: http://bit.ly/pe-may20-ad Current measurement There are two basic approaches to measuring the current applied to an impedance under test – these are shown in Fig.7 and Fig.8. In both cases we show a current source driving the impedance under test (Z) but it could be driven from a voltage source. Also, in both cases we show a differential amplifier being used to measure the voltage across Z – we need this signal along with the current in order to measure impedance. The first current measurement approach is shown in Fig.7 – it uses a sense resistor and measures the voltage across it using a differential amplifier. The current supplied to Z also flows through the sense resistor Practical Electronics | May | 2020 V1 R1 R2 + VN VP – + RS U1 IS A 1 V2 R3 – VO R4 R5 Current source I mp ed ance Z und er test U1 Vcurrent IS IZ + VZ – U2 Current source – IZ – Fig.7. Current measurement circuit using a sense resistor. Voltage measurement also shown. Transimpedance amplifier The second current measurement approach is shown in Fig.8 – it uses a transimpedance amplifier implemented using op amp U1 and resistor R1. The voltage across Z is measured using U2 in the same way as for the circuit in Fig.7. A transimpedance amplifier has an input of current and an output of voltage, so the gain (Vout/Iin) has units of ohms (compare V/I = R in Ohm’s Law). This circuit could also be called a ‘transresistance amplifier’, but the term ‘transimpedance’ is more general and more commonly used. The term ‘transimpedance’ is short for ‘transfer impedance’ – with ‘transfer’ indicating an input-to-output relationship, rather than the direct voltage-across to current-through relationship of a basic impedance or resistor. Looking at Fig.8, we see that the impedance under test is not connected to ground. However, using the same argument as for the two inputs of the op amp in the Howland current source being at the same voltage, we note that the inverting input of the op amp must be a voltage very close to 0V under normal operation. With an ideal op amp, the inverting input would be exactly at 0V. This behaviour of an op amp amplifier with the inverting input grounded is referred to as a ‘virtual’ earth (or ‘virtual’ ground). Given the impedance is not directly connected to ground – where does the current actually go? There are two possibilities – through resistor R1, or into the op amp. The amount of current flowing into the op amp depends on its input impedance and its input bias current. For an ideal op amp, the input bias current is zero and the input impedance is infinite. Therefore, no current flows into the op amp in the ideal version of this circuit, which means all of the input current must flow through R1. This makes it easy to find the voltage dropped across R1 – it is simply IZR1 by Ohm’s law. We also know from our previous discussion of virtual earth that the input end of the resistor is at 0V, so the other end must be at –IZR1 volts. So Vcurrent = –RiIZ. Real op amps are available with very high input impedances and very low input bias currents. Some op amps are specifically designed for use in transimpedance configurations. U2 Vvo ltage R1 + RS and creates a voltage drop, RSIZ, which is amplified by U1 to produce an output voltage proportional to the current in Z: Vcurrent = A1RSIZ, where A1 is the voltage gain of U1. The voltage across Z is measured using U2; its output is Vvoltage = A2VZ, where A2 is the voltage gain of U1. The differential amplifiers used in the circuit in Fig.7 must have very high input impedance and very low bias currents. Any current flowing into the differential amplifiers will cause discrepancies between the measured current and that flowing into the impedance under test. These amplifiers must also have very good common-mode rejection ratios (CMRR) so that their outputs are only dependent on differential inputs; again, if this is not the case measurement errors will occur. The same applies to the differential amplifier in Fig.8. Practical Electronics | May | 2020 VZ Vvo ltage RL Fig.6. Howland current source with feedback buffer. + I mp ed ance Z und er test U1 Vcurrent Fig.8. Measurement circuit using a transimpedance amplifier; voltage measurement also shown. Full-measurement system The current source and voltage and current measurement circuits do not form a complete impedance analysis system. The drive signal needs to be generated over the required range of frequencies and the measured voltage and current signals must be processed to obtain the impedance values (typically the real and imaginary parts). This can be done digitally by sampling the Vvoltage and Vcurrent waveforms using high speed data converters and using digital signal processing (DSP) to obtain the impedance values. ICs are available, which are targeted at bio-impedance/ electrochemical impedance measurement markets, such as in healthcare, which implement the functionality of impedance measurement on a single chip. For example, Analog devices produce the AD5940 ‘High Precision, Impedance & Electrochemical Front End’ and ADuCM350 ‘Configurable Impedance Network Analyzer & Potentiostat with Integrated Cortex M3 Core’. Your best bet since MAPLIN Chock-a-Block with Stock Visit: www.cricklewoodelectronics.com O r p h one our f riend ly kn owled geable staf f on 020 8452 0161 Components • Audio • Video • Connectors • Cables Arduino • Test Equipment etc, etc Vi s i t o u r Sh o p , Ca l l o r B u y o n l i n e a t : w w w .c r i c k l e w o o d e l e c t r o n i c s .c o m 020 8452 0161 Vi s i t o u r s h o p a t : 40- 42 Cr i c k l e w o o d B r o a d w a y Lo n d o n NW2 3ET 47