Silicon ChipCircuit Surgery - February 2022 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions: PicoLog Cloud
  5. Back Issues: PICOLOG
  6. Publisher's Letter
  7. Feature: Should we be worried? by Mark Nelson
  8. Feature: Net Work by Alan Winstanley
  9. Project: Arduino-based Adjustable Power Supply by Tim Blythman
  10. Project: Battery Monitor Logger by TIM BLYTHMAN
  11. Project: ELECTRONIC Wind Chimes by John Clarke
  12. Project: Mini Digital AC Panel Meters by Jim Rowe
  13. Feature: KickStart by Mike Tooley
  14. Feature: Flowcode Graphical Programming by Martin Whitlock
  15. Feature: Max’s Cool Beans by Max the Magnificent
  16. Feature: AUDIO OUT by Jake Rothman
  17. Feature: Circuit Surgery by Ian Bell
  18. Feature: Make it with Micromite by Phil Boyce
  19. PCB Order Form
  20. Advertising Index

This is only a preview of the February 2022 issue of Practical Electronics.

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

Articles in this series:
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
Circuit Surgery Regular clinic by Ian Bell Op amp offsets – Part 1 O n the EEWeb Forum, user Deion posted about precision op amps, first quoting the OP97 datasheet from Analog Devices: ‘The OP97 is a low-power alternative to the industry-standard precision op amp, the OP07. The OP97 can be substituted directly into OP07, OP77, AD725, and PM1012 sockets with improved performance and/or less power dissipation and can be inserted into sockets conforming to the 741 pinout if nulling circuitry is not used. Generally, nulling circuitry used with earlier generation amplifiers is rendered superfluous by the extremely low offset voltage of the OP97 and can be removed without compromising circuit performance’. Then Deion asks ‘What confused me is the range of temperature? Should the resistor be balanced?’. Questions We are not sure exactly what Deion means in asking about the temperature range, as with the reply on the forum, the obvious answer is from the first page of the datasheet (and repeated in the ‘absolute maximum ratings’ table) – the device has an ‘extended industrial temperature range’ of −40°C to +85°C. However, specifications for bias current and various graphs of device characteristics on the datasheet cover a larger range of −55°C to +125°C. The −40°C to +85°C specification is an ‘absolute maximum rating’ which means that the device may be damaged outside this range or become unreliable if used close to the specified limits for extended periods. However, the op amp may work (at least for a while) beyond these stress ratings. The second question concerns the balancing of resistors in precision op amp circuits – the purpose of this is to reduce offsets due to bias currents flowing in the external circuit (although it is not always appropriate). In this month’s article, after discussing the basic concept of offsets, we will focus on op amp internal offsets, in particular looking at how input offset voltage is defined and modelled. Next month, we will look at input bias currents, and address the issues related to resistor balancing. 60 Offsets In simple terms, offsets are DC errors in a circuit’s output due to imperfections in the circuit or components. This issue is important in DC and very-low-frequency circuits, a key example being amplifiers used for sensor signals (such as temperature) where the quantity being measured changes slowly – here offsets cause inaccuracies in the measurement. In other cases, unwanted DC output may be damaging to a load intended to only be driven by an AC signal with zero offset (eg, a loudspeaker). Unwanted DC can be blocked using coupling capacitors, but this may not be practical if low wanted-signal frequency leads to a requirement for very large capacitance values. Even if available, capacitors with suitable values may be physically too large, or too expensive or have non-ideal characteristics of their own which affect the signal in an unacceptable way. If offsets were pure DC they would be fixed for all time and could be removed by a one-off calibration/cancellation procedure, but real offsets drift due to changes in temperature, aging and other factors that influence the circuit. These changing offsets are just like low-frequency signals and so are amplified along with the wanted signal – they act as low-frequency noise. Precision If offsets are changing in the same frequency range as the wanted signal, then it is not possible to use coupling capacitors to block the offsets, irrespective of the capacitors’ characteristics or cost (they would block the signal too). The only solution is to design circuits with inherently low offsets. As with any engineering design, making one aspect better tends to be at the expense of something else, for example lower offsets may mean poorer high-frequency response or higher power consumption. Op amps with low offsets as a key characteristic are often referred to as ‘precision’ op amps, like the OP97 mentioned in Deion’s post. The best offset performance is obtained by auto-zeroing amplifiers or chopper-stabilised amplifiers, but standard precision op amps can also provide good performance and may be more suitable in some applications, or where the precision requirements are not so stringent. We are focusing on standard precision op amps in this article. In an op amp circuit, offsets at the outputs can occur due to offsets in the op amp’s internal circuitry, or due to the external circuitry and its interaction with the op amp. The resistor balancing mentioned by Deion is an example of the latter situation, which we will discuss next month. Input offset voltage For an op amp, ideally, with a differential input of zero, the output should also be zero, but with real op amps there will typically be a non-zero output. The input offset voltage (VIO) is defined as the DC voltage which must be supplied between the inputs to force the quiescent (zero input signal) open-loop (no feedback applied) output voltage to zero. The definition of input offset voltage is illustrated in Fig.1. Typical values for standard (not autozeroing/chopping) precision op amps range from about 10µV to 500µV. Input offset voltage for an individual device can be of either polarity up to the specified value. Temperature often has a significant effect on offsets – the temperature coefficient of input offset voltage specifies how VIO changes with temperature, typical values for standard precision op amps are around 0.1 to 10µV/°C. The datasheet for an op amp may also have a graph showing offset variation with temperature. Aging of devices also causes offsets to vary. Again, this will often be specified – VOut = 0 V + VIO Fig.1. Offset voltage defined. Practical Electronics | February | 2022 Fig.2. The input-referred offset does not change, but the output referred offset will depend on – – VOut VOut VIn VIn the circuit in which the op amp – + + + is used. In a circuit with feedback the output offset depends VOS on the circuit, not on the op amp’s open-loop gain. Fig.2. An op amp with offset can be Use of a voltage source con- Fig.4. Using the LTspice Component Attribute Editor modelled as an ideal op amp with an offset nected to the non-inverting to configure the UniversalOpamp2 component. voltage source at its non-inverting input. input to model offset can be investigated in LTspice, but we need to are needed) via the Component Attribute on the datasheet, for example, as a longuse an idealised op amp with zero interEditor – see Fig.4. Note the offset paramterm stability value in µV/month. nal offset to do this. If we select a real op eter (Vos) for the UniversalOpamp2 is The circuit in Fig.1, used to define amp (we often do this for Circuit Surgery set to zero in our simulation because we input offset voltage, can also be the basis simulation examples), it will model that are using the external sources VOS1 and for analysing the offset in a circuit. For device’s offset, which we will not be able VOS2 to model the offset. analysis purposes we can replace an op to control – which is not what we want UniversalOpamp2 can model op amps amp with offset with an ideal op amp here. Instead, we can use the Universawith different amounts of detail. Setting plus an offset voltage source, as shown lOpamp2 component from LTspice’s library the level value for the component in Fig.2. The offset represented in this – it is right at the end of the list in the Op determines which model is used. There way is called ‘input referred’. Although amps section of the Component Selection are four levels (1, 2, 3 and 3a in increasing we are discussing input offset voltage, menu. An LTspice schematic with an inlevels of detail). For information on all the other sources of unwanted output from verting and a non-inverting standard op parameters refer to the example schematic the op amp, such as random noise and amp amplifier – both using Universainstalled by LTspice (typically at location the op amp’s response to power supply lOpamp2 – is shown in Fig.3. This circuit ...\Documents\LTspiceXVII\examples\ voltage variation can also be representincludes voltage sources, as discussed Educational\UniversalOpamp2.asc on ed in this way. above, to model the offset voltage. Windows). Use of idealised models with certain specific non-ideal characteristics Modelling allows us to explore the effect of those If an input, VIn is applied to an op amp UniversalOpamp2 characteristics in isolation from other effects its output will depend on both the input You may notice there are two other comto gain insights about circuit behaviour. signal and the input offset voltage. For ponents that are not real op amps on the For this example, we will use the simthe open-loop amplifier circuit in Fig.2, component menu: opamp (without supply plest (level 1) UniversalOpamp2 model. the output will be connections) and opamp2 (with supplies). This does not use the power supplies (eg, These can also be used to include idealised to limit the output voltage) but power VOut = AVIn + AVOS op amps (or real op amps) on a schematic supplies have been included on the but require an LTspice subcircuit to define schematic to allow the model level to their internal circuit or behaviour. UniverWhere A is the open-loop gain of the op be switched easily if required. We need salOpamp2 is more convenient for working amp. The value AVOS is the ‘output referred’ near-ideal behaviour, so we have set the with generic op amp behaviour because it offset. Normally, we do not use an op amp open-loop voltage gain (Avol model can be configured by right-clicking the op open loop, in which case the effect of the parameter) very high (100G = 1×1011) amp symbol and setting the various paoffset voltage can be analysed in the context rameters (if values other than the defaults of the specific circuit using the approach in so any errors in output voltage due to non-ideal (non-infinite) open-loop gain are not significant. Similarly, the input resistance (Rin model parameter) is set very high (10GΩ) so there is little impact on the currents in the external resistors. Op amp with offset Ideal op amp Simulation Fig.3. LTspice schematic for simulation to investigate modelling of offset voltages. Practical Electronics | February | 2022 The op amp amplifiers in Fig.3 have the same resistor values. Using the wellknown formulae for the gain of these circuits we get the following. For the inverting circuit, the gain is: −RF1/RI1 = −50kΩ/1kΩ = −50. For the non-inverting circuit, the gain is 1 + RF2/RI2 = 1 + 50kΩ/1kΩ = 51. With 10mV input provided by source V1 we would expect outputs (with no offset) of −50 × 0.01 = −0.5V for the inverting circuit and 51 × 0.01 = 0.51V for the non-inverting circuit. However, the circuit includes offsets, introduced by VOS1 and VOS2. We just need to find the DC output, so we can use an operating point simulation (.op SPICE directive). The results are: 61 --- Operating Point --V(in): 0.01 V(n003): 0.0105 V(out_noninv): 0.5355 V(vp): 5 V(vn): -5 V(n001): -0.0005 V(out_inv): -0.5255 V(n002): -0.0005 V(n004): 0.0105 voltage voltage voltage voltage voltage voltage voltage voltage voltage In both cases the output voltages V(out_ inv) and V(out_noninv) are shifted by 22.5mV from the values obtained in the calculation above. For the inverting circuit we have −0.5 – 0.0255 = –0.5225 and for the non-inverting 0.51 + 0.0225 = 0.5355. The magnitude of the offset at the output (with the same input offset) is the same for both circuits despite the different circuit gains. This is because the offset model is applied directly to the non-inverting input in both cases. As far as the offset voltage sources are concerned, both circuits behave as noninverting amplifiers. We can see this using some circuit theory called the ‘superposition theorem’ – if we have a linear circuit with multiple voltage and current sources the output is equal to the sum of effects of the individual sources, with the others set to zero. For the circuit in Fig.3, if we set the offset sources to zero (as for an ideal op amp) we get the standard amplifier circuits for which we have just calculated the output. We can also consider just the effect of the offset sources by setting the input voltage to zero (equivalent to shorting the input to ground). Doing this results in the circuits shown in Fig.5. We have the same circuit in each case – a non-inverting amplifier with the offset source as the input. Thus, in both cases the output due to the offset will be the non-inverting gain times the input offset voltage, in this case: 51 × ±500µV = ±22.5mV. The sign of the offset was set in the circuit of Fig.3 to increase the magnitude of the output, to make the result more obvious. Changing the polarity of the offset sources would reduce the magnitude of the total output in both cases (offset opposite in polarity to wanted output), but the offset magnitude would be the same. noise gain, rather than signal gain, is used when calculating output offset (or noise) for an op amp circuit. The term is commonly used in technical documents by op amp manufacturers discussing offsets and noise. Although the offset (or noise) voltage source is commonly depicted connected to the noninverting input, moving it to the inverting input does not change the fact that offset (or noise) is amplified by the noise gain (non-inverting gain). This can be verified by the LTspice circuit in Fig.6, which produces the same output voltages as the circuit in Fig.3. This may not be obvious at first sight, but consider Fig.5. If we consider just the contribution of the offset for the fact that in a feed- two amplifiers in Fig.3, then we find that in both cases back circuit the op amp is offset is amplified by the non-inverting gain. maintaining (in the ideal case) zero volts between its inputs, so of the inverting circuit is smaller than moving the source past the inputs does the non-inverting gain by this factor not change the effect it has on the output. (50 = 51×(50/51)). Another way to understand that the offset is not amplified by the circuit gain Offset nulling in the inverting amplifier is to consider Even with a low offset, op amp users the fact that in the inverting circuit (in may want a circuit to have the facility Fig.6) the offset source is connected dito manually adjust the offset to minirectly to the op amp input, so it is not mise (or null) it. This feature is provided going to be affected by the resistors in by some op amps, including the OP97, the same way as the input signal. The despite as quoted above, the datasheet input signal is attenuated by the potenindicating that it is ‘rendered supertial divider formed by RI1 and RF1 before fluous’. Typically, if offset adjustment is available, the op amp will have two arriving at the op amp (by a factor of pins labelled ‘Null’ (see Fig.7 for the 50kΩ/(50kΩ+1kΩ) = 50/51 = 0.9804 in OP97 pinout). our example). The magnitude of the gain Noise gain The fact that offsets, and random voltage noise (which is modelled as input referred to the op amp’s input in the same way), are amplified by the circuit’s non-inverting gain, irrespective of the amplifier circuit configuration, leads to the idea of ‘noise gain’. The noise gain of the circuit is the gain which applies to a voltage applied directly to the op amp’s inputs. It is equal to the non-inverting gain. The 62 Fig.6. Moving the offset voltage source to the other input produces the same results. Practical Electronics | February | 2022 conforming to the 741 pinout if nulling circuitry is not used’. If an op amp is swapped with one using a nulling cir– 2 7 –IN V + cuit connected to the opposite supply, it is likely to be destroyed. The device + 3 6 +IN OU T datasheet must always be checked for OV E R 5 V – 4 the exact details of using nulling pins OP 9 7 C OM P where they are available. For the OP97 the trimmer can be in Fig.7. OP97 op amp pinout. the range 5kΩ to 100kΩ and can adjust the offset between 300µV and 850µV Typically, to use the null pins they depending on the individual device. are connected to a trimmer potentiomUse of nulling pins is often not a good eter, with the wiper going to one of the solution for excessive offset. The pins supplies, as shown in Fig.8. For the can introduce noise into the circuit if OP97 it is the positive supply. For the used – particularly with poor layout, 741 it is the negative supply – hence such as long leads to the trimmer. Offset the comment in the quote above that drift with temperature and age may mean the OP97 ‘can be inserted into sockets that the offset has to be nulled more often than just at initial setup, which R 2 may be inconvenient. Adding nulling R 1 may make temperature drift worse. For VIn – VOut these reasons it is often better to find a device with an offset which is inher+ ently small enough for the application. Of course, higher-performance devices A dj ust to may cost more, which may limit options r emov e offset V S upply in some cases. Offset nulling can be achieved withFig.8. Example offset nulling circuit for an out the use of null pins using circuits inverting amplifier – check device datasheet such as the one in Fig.9. This creates for details (eg, which supply the trimmer a small, adjustable voltage at the nonwiper connects to). inverting input of the op amp in an N U L L 1 8 R 2 N U L L R 1 VIn – VOut + R R 3 R – VR A R B P + VR Fig.9. Example of offset nulling circuit using external circuitry rather than op amp null pins. inverting amplifier. The VR voltages can be the supply and RP can be equal to the parallel value of R1 and R2 – which relates to the resistor balancing which we will discuss next month. More details on offset adjustment circuits like this can be found in the MT-037 Tutorial document from Analog Devices, see: https://bit.ly/pe-feb22-ad Simulation files Most, but not every month, LTSpice is used to support descriptions and analysis in Circuit Surgery. The examples and files are available for download from the PE website. STEWART OF READING 17A King Street, Mortimer, near Reading, RG7 3RS Telephone: 0118 933 1111 Fax: 0118 933 2375 USED ELECTRONIC TEST EQUIPMENT Check website www.stewart-of-reading.co.uk Fluke/Philips PM3092 Oscilloscope 2+2 Channel 200MHz Delay TB, Autoset etc – £250 LAMBDA GENESYS LAMBDA GENESYS IFR 2025 IFR 2948B IFR 6843 R&S APN62 Agilent 8712ET HP8903A/B HP8757D HP3325A HP3561A HP6032A HP6622A HP6624A HP6632B HP6644A HP6654A HP8341A HP83630A HP83624A HP8484A HP8560E HP8563A HP8566B HP8662A Marconi 2022E Marconi 2024 Marconi 2030 Marconi 2023A PSU GEN100-15 100V 15A Boxed As New £400 PSU GEN50-30 50V 30A £400 Signal Generator 9kHz – 2.51GHz Opt 04/11 £900 Communication Service Monitor Opts 03/25 Avionics POA Microwave Systems Analyser 10MHz – 20GHz POA Syn Function Generator 1Hz – 260kHz £295 RF Network Analyser 300kHz – 1300MHz POA Audio Analyser £750 – £950 Scaler Network Analyser POA Synthesised Function Generator £195 Dynamic Signal Analyser £650 PSU 0-60V 0-50A 1000W £750 PSU 0-20V 4A Twice or 0-50V 2A Twice £350 PSU 4 Outputs £400 PSU 0-20V 0-5A £195 PSU 0-60V 3.5A £400 PSU 0-60V 0-9A £500 Synthesised Sweep Generator 10MHz – 20GHz £2,000 Synthesised Sweeper 10MHz – 26.5 GHz POA Synthesised Sweeper 2 – 20GHz POA Power Sensor 0.01-18GHz 3nW-10µ W £75 Spectrum Analyser Synthesised 30Hz – 2.9GHz £1,750 Spectrum Analyser Synthesised 9kHz – 22GHz £2,250 Spectrum Analsyer 100Hz – 22GHz £1,200 RF Generator 10kHz – 1280MHz £750 Synthesised AM/FM Signal Generator 10kHz – 1.01GHz £325 Synthesised Signal Generator 9kHz – 2.4GHz £800 Synthesised Signal Generator 10kHz – 1.35GHz £750 Signal Generator 9kHz – 1.2GHz £700 HP33120A HP53131A HP53131A Audio Precision Datron 4708 Druck DPI 515 Datron 1081 HP/Agilent HP 34401A Digital Multimeter 6½ Digit £325 – £375 HP 54600B Oscilloscope Analogue/Digital Dual Trace 100MHz Only £75, with accessories £125 (ALL PRICES PLUS CARRIAGE & VAT) Please check availability before ordering or calling in Keithley 228 Time 9818 Practical Electronics | February | 2022 Marconi 2305 Marconi 2440 Marconi 2945/A/B Marconi 2955 Marconi 2955A Marconi 2955B Marconi 6200 Marconi 6200A Marconi 6200B Marconi 6960B Tektronix TDS3052B Tektronix TDS3032 Tektronix TDS3012 Tektronix 2430A Tektronix 2465B Farnell AP60/50 Farnell XA35/2T Farnell AP100-90 Farnell LF1 Racal 1991 Racal 2101 Racal 9300 Racal 9300B Solartron 7150/PLUS Solatron 1253 Solartron SI 1255 Tasakago TM035-2 Thurlby PL320QMD Thurlby TG210 Function Generator 100 microHz – 15MHz Universal Counter 3GHz Boxed unused Universal Counter 225MHz SYS2712 Audio Analyser – in original box Autocal Multifunction Standard Pressure Calibrator/Controller Autocal Standards Multimeter o er lifier Voltage/Current Source DC Current & Voltage Calibrator Modulation Meter £250 Counter 20GHz £295 Communications Test Set Various Options POA Radio Communications Test Set £595 Radio Communications Test Set £725 Radio Communications Test Set £800 Microwave Test Set £1,500 Microwave Test Set 10MHz – 20GHz £1,950 Microwave Test Set £2,300 Power Meter with 6910 sensor £295 Oscilloscope 500MHz 2.5GS/s £1,250 Oscilloscope 300MHz 2.5GS/s £995 Oscilloscope 2 Channel 100MHz 1.25GS/s £450 Oscilloscope Dual Trace 150MHz 100MS/s £350 Oscilloscope 4 Channel 400MHz £600 PSU 0-60V 0-50A 1kW Switch Mode £300 PSU 0-35V 0-2A Twice Digital £75 Power Supply 100V 90A £900 Sine/Sq Oscillator 10Hz – 1MHz £45 Counter/Timer 160MHz 9 Digit £150 Counter 20GHz LED £295 True RMS Millivoltmeter 5Hz – 20MHz etc £45 As 9300 £75 6½ Digit DMM True RMS IEEE £65/£75 Gain Phase Analyser 1mHz – 20kHz £600 HF Frequency Response Analyser POA PSU 0-35V 0-2A 2 Meters £30 PSU 0-30V 0-2A Twice £160 – £200 Function Generator 0.002-2MHz TTL etc Kenwood Badged £65 d £350 £600 £350 POA POA £400 POA POA POA Marconi 2955B Radio Communications Test Set – £800 63