Silicon ChipCircuit Surgery - March 2023 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions
  5. Back Issues: Hare & Forbes Machineryhouse
  6. Publisher's Letter: Important advice
  7. Feature: It’s handover time by Mark Nelson
  8. Feature: The Fox Report by Barry Fox
  9. Feature: Net Work by Alan Winstanley
  10. Project: Capacitor Discharge Welder by PHIL PROSSER
  11. Feature: Mini PIC Training Course – Part 2 by Peter Brunning
  12. Project: Raspberry Pi Pico BackPack by Tim Blythmhman
  13. Project: Semaphore Signal by LES KERR
  14. Feature: AUDIO OUT by Jake Rothman
  15. Feature: Make it with Micromite by Phil Boyce
  16. Feature: Circuit Surgery by Ian Bell
  17. Feature: Max’s Cool Beans by Max the Magnificent
  18. PCB Order Form
  19. Advertising Index

This is only a preview of the March 2023 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 Electronically controlled resistance – Part 7 T his month, we continue our Example designs The regulator in Fig.1 uses an internal series on electronically controlled The typical value for R1 in reference voltage reference circuit to provide a resistance by considering another point of comparison with the (scaled) designs (for example, in device datasheets) application of digipots (digital potentiis in the order of 100Ω to 300Ω, with output voltage. A feedback control ometers), which are digitally controller 121Ω and 240Ω being very commonly circuit, typically implemented using variable resistors, often, but not always used. For example, R1 = 121Ω and R2 = an internal op amp, regulates the voltage interfaced to microcontrollers. The prebetween the Out and Adj pins to be equal 365Ω and Vref = 1.25V gives Vout = 5V. vious three articles covered the basics of to the reference voltage (Vref). If the Adj These examples typically use R1 as a digipots, their characteristics, example pin is connected directly to ground the fixed resistor and R2 as a single variable devices, modelling in LTspice and their output is regulated to be equal to Vref. resistor, which implies use of a digipot use to control amplifier gain. in rheostat mode. If adjustment resistors (R1 and R2) are The control of amplifier gain, which The LM317 is probably the best-known included (as shown in Fig.1) then the we discussed last month, is not the only device of this type. The LT1085 is similar, output voltage is regulated to the voltage application for digipots. There are of but is ‘low drop out’ (LDO), which means at the Adj pin plus Vref. Electronically controlled 7 difference in voltage between course many possible specific applications that–aPart smaller The voltage across R1 is equal to Vresistance ref, – common circuits which could benefit input and output is required to maintain so the current through it is IR1 = Vref/R1. from digipot-based control include voltage operation (Vin needs to be about 3V above If we ignore the current required by the regulators and analogue filters. This Adj pin (Iadj) the same current flows in Vout for the LM317, but only 1V for the 𝑅𝑅' month, we will look at using digipots R1 and R2, so the voltage across R2 is LT1085, giving efficiency). The 𝑉𝑉!"# = 𝑉𝑉$%& #1 +superior ' controlled resistance – Part 7 𝑅𝑅( with adjustable Electronically linear voltage regulator LT1085 can provide up to 3A output IR1R2 = VrefR2/R1. The output voltage is circuits. Replacing the adjustment resistor current and has a Vref value of 1.25V. the voltage across R2 plus the reference with a digipot may seem straightforward, voltage, so: As an example design, consider controlled but there are some Electronically issues that need to resistance – Part 7 𝑅𝑅 adjustable output up to 15V using an 𝑅𝑅' ' 𝑉𝑉!"# = 𝑉𝑉$%& #1 + ' 𝑉𝑉!"#LT1085. = 𝑉𝑉$%& #1If+we use ' + 𝐼𝐼the be considered and which may not be value of R1 )*+ 𝑅𝑅typical ' 𝑅𝑅( 𝑅𝑅 immediately obvious. These are related to of 121Ω then (15V requires R2 = 1.33kΩ, the current and voltage ratings, available which we can find by rearranging the The current in the adjustment pin adds 𝑅𝑅' component values and tolerance, which Vout equation above: an additional contribution 𝑉𝑉!"# = 𝑉𝑉$%& #1 + ' to the voltage 𝑅𝑅( also adds to the are parameters that may to be of concern drop across R 𝑅𝑅'2, which 𝑉𝑉!"# = 𝑉𝑉$%&voltage, #1 + ' giving + 𝐼𝐼)*+ 𝑅𝑅'a more accurate 𝑅𝑅' = 𝑅𝑅( ) − 1+ in other types of circuit where digipots 𝑉𝑉!"# output 𝑅𝑅( 𝑉𝑉$%& are considered. formula for Vout, as: We also need a minimum input voltage 𝑅𝑅' of about 16V. Three-terminal regulators 𝑉𝑉!"# = 𝑉𝑉$%& #1 + ' + 𝐼𝐼)*+ 𝑅𝑅' 𝑅𝑅( 𝑉𝑉!"# A common form of adjustable regulator 1 1 1 𝑅𝑅' = 𝑅𝑅( ) − 1+ = − circuit is shown in Fig.1. Regulator First example However, the 𝑉𝑉$%&adjustment pin current is 𝑅𝑅,simulation 𝑅𝑅' 𝑅𝑅integrated circuits of this type are often typically in the order of 50 to 100µA, and For simulation purposes we can select ten referred to as ‘3-terminal regulators’, with the typical values of the resistors different values, stepped from 133Ω to R2 = 𝑉𝑉!"# 𝑅𝑅( ) − 1+ of ohms range reflecting the minimal pin count. We being 𝑅𝑅in the hundreds 1.33kΩ in 133Ω steps. The specific values ' = 𝑉𝑉$%& 1 1 IadjR 1 2 is small and can often 𝑅𝑅( much for illustrative will look at using a digipot for R2 (which the value of do not matter too = − 𝑉𝑉!"# = 3.75 #1 + ' 𝑅𝑅, 𝑅𝑅' 𝑅𝑅purposes – we are adjusts the output voltage). be ignored. 𝑅𝑅'not aiming to show all Input IN Regulator Adj Output OUT Vref IAdj R1 Cin Cout R2 Fig.1. Typical 3-terminal voltage regulator circuit. 56 1 1 1 = − 𝑅𝑅, 𝑅𝑅' 𝑅𝑅 𝑅𝑅( 𝑉𝑉!"# = 3.75 #1 + ' 𝑅𝑅' 𝑅𝑅( 𝑉𝑉!"# = 3.75 #1 + ' 𝑅𝑅 𝑅𝑅' 𝑅𝑅./' 𝑉𝑉!"# # ' = 𝑉𝑉$%& # ' 𝑅𝑅( + 𝑅𝑅' 𝑅𝑅./ + 𝑅𝑅0/ 𝑅𝑅 𝑅𝑅./ 𝑅𝑅'+ ' ' # 𝑅𝑅./ 𝑉𝑉!"# = 𝑉𝑉$%& #1 ' 𝑉𝑉!"# # ' 𝑅𝑅'(= 𝑉𝑉𝑅𝑅$%& ./#+ 𝑅𝑅0/ 𝑅𝑅( + 𝑅𝑅' 𝑅𝑅./ + 𝑅𝑅0/ 𝑅𝑅' 𝑅𝑅./ 𝑉𝑉!"# # ' = 𝑉𝑉$%& # ' 𝑅𝑅( + 𝑅𝑅' 𝑅𝑅./ + 𝑅𝑅0/ 𝑉𝑉!"# = 𝑉𝑉$%& #1 + 𝑅𝑅' 𝑅𝑅./ '# ' 𝑅𝑅( 𝑅𝑅./ + 𝑅𝑅0/ 𝑉𝑉!"# = 3.75𝑁𝑁 #1 + 𝑅𝑅' ' 𝑅𝑅( Fig.2. Possible use of a digipot with a 3-terminal regulator (see text for issues). 𝑅𝑅' 𝑅𝑅./ '# ' 𝑅𝑅( 𝑅𝑅 𝑅𝑅./ + 𝑅𝑅0/ ' 𝑉𝑉!"# = 3.75𝑁𝑁 #1 + ' 𝑅𝑅( 𝑉𝑉!"# = 𝑉𝑉$%& #1 + Practical Electronics | March | 2023 Fig.3. Simulation results from the circuit in Fig.2 showing output for various resistance values. designs given in datasheets, where it is assumed that a standard mechanical potentiometer is used for R2. The digipot is modelled using a stepped-resistor parameter – the behavioural resistors discussed previously are not required here as only a single resistor is required to model the digipot in rheostat mode. The simulation ramps the input voltage from 0 to 20V over two seconds. The time is not particularly important, but two seconds gives a simple time-to-voltage relationship. The results of the simulation are shown in Fig.3 – the step command plots a set of different results as Rdigipot is varied. The result show that the output voltage is regulated once the input voltage rises about 1V above the set output voltage, so, for example, the 15V output (Rdigipot = 1.33kΩ) appears after about 1.6s and the other voltages at proportionally earlier times. This can be seen more clearly in Fig.4, where the input voltage is also plotted (but this makes it harder to identify the individual stepped traces). Digipot current Fig.5 shows the current in the digipot. Once regulation is established (for a sufficiently large input voltage) the current is constant at about 10.3mA. This is equal to V ref/R 1 = 1.25/121 = 10.33mA. The problem with this is that this current is higher than the maximum continuous current rating for many digipots, which may be 5mA or 1mA. Low resistor values are used in standard versions of this circuit, partly to ensure that the resistor current is much larger Fig.4. Simulation results from the circuit in Fig.2 showing input-output relationship than the adjustment pin current (55µA (input: red trace; outputs: green traces). Electronically controlled resistanceto– 120µA Part 7 for the LT1085) and partly to take the minimum load current from the regulator output (5mA to 10mA for the LT1085). The resistors can be made larger 𝑅𝑅' to reduce the current, and, if necessary, 𝑉𝑉!"# = 𝑉𝑉$%& #1 + ' 𝑅𝑅( resistor could be added an additional load to ensure minimum current. It may be possible to overcome the maximum current problem by using a 𝑅𝑅' with 𝑉𝑉!"# =parallel 𝑉𝑉$%& #1 +resistor ' + 𝐼𝐼)*+ 𝑅𝑅' the digipot. This 𝑅𝑅( Fig.6, is shown in which is a modified version of Fig.6. For a required maximum effective value of R2 (the total parallel resistance for the maximum output 𝑉𝑉!"# and a digipot value 𝑅𝑅voltage 1+ ' = 𝑅𝑅( )to be−used) of RD the𝑉𝑉$%& parallel resistor value can be found using the parallel resistor formula rearranged to give RP: Fig.5. Digipot resistor current for the circuit in Fig.2. the possible steps of the typical digipot. Furthermore, a digipot with an end-to-end resistance of 1.33kΩ is unlikely to exist; however, devices with a resistance larger than this can be used with the setting restricted to the required values. Not Practical Electronics | March | 2023 using the full range of values is also often necessary in rheostat mode to account for the device resistance tolerance – as we discussed in Part 5. An LTspice schematic for this circuit is shown in Fig.2. This is similar to example 1 1 1 = − 𝑅𝑅, 𝑅𝑅' 𝑅𝑅- If we use a larger value of R1 (than in Fig.1) of 240Ω then we need R2 = 2.64kΩ for Vout = 15V.𝑅𝑅(For a 5kΩ digipot (RD) 𝑉𝑉!"# 3.75 #1 the=value of + RP𝑅𝑅is' 1/(1/2640 – 1/5000) = ' 5.56kΩ (as shown in Fig.6). Simulation results are shown in Fig.7, which confirm that the circuit is able to 𝑅𝑅' 𝑅𝑅./ 𝑉𝑉!"# # ' = 𝑉𝑉$%& # ' 𝑅𝑅( + 𝑅𝑅' 𝑅𝑅./ + 𝑅𝑅0/ 𝑅𝑅' 𝑅𝑅./ 57 Fig.6. Modified version of the circuit in Fig.2 with reduced digipot current. control the output voltage over a similar range to the circuit in Fig.2. However, notice that the relationship between the resistor step value (which corresponds to the digipot code) and the output voltage is no longer linear (output voltage steps are not equally spaced) due to the use of the parallel resistor combination to set the effective R2 value. The results in Fig.8 confirm the reduction in current through the digipot, which remains below 5mA over the range of input and output voltages covered Accuracy As we discussed in previous articles, digipots often have much worse tolerance for their absolute resistance value than is readily available for fixed resistors. In potentiometer mode, where the ratio of the two resistances from the wiper to the two ends controls the circuit, the excellent matching of the on-chip resistors to each other can lead to very good design tolerance. However, in rheostat mode, as used here, that does not apply. Using a digipot in rheostat mode in parallel with accurate fixed resistors reduces errors due to digipot tolerance, so this is another benefit of the circuit in Fig.6 over that in Fig.2. Use of series resistances with digipot in rheostat mode also has the same effect. We previously discussed use of series resistors to reduce the control range to allow more precise control of a circuit – it is often worth considering use of digipots in combination with fixed resistors to improve or better tailor the control of the circuit. If we assume the fixed resistors have negligible error in value and the digipots have a 10% tolerance, then we can calculate the variation in output voltage for the two worst-case digipot resistance values (at ±10%). This is just a matter of applying the Vout equation with the relevant highest and lowest digipot tolerance values, and, in the case of the circuit in Fig.5 applying the parallel resistor formula to obtain the effective R2 value. This gives a variation of about 9.2% for the circuit in Fig.2 and worst-case of 5.1% for the circuit in Fig.6 for the 15V output setting, which is a significant improvement. Alternative regulators Fig.7. Simulation results from the circuit in Fig.6. There is another major problem which may make the circuits in Fig.2 and Fig.6 impractical – at least for the voltage ranges used here – which is the maximum voltage across the digipot. Many digipots have maximum supply voltages of 5V (maybe 5.5V absolute maximum) and typically the maximum voltage across the resistor chain is equal to, or very similar to the supply voltage. Devices with 15V are available but tend to have larger resistor values, which may be less suitable in the type of regulator in these examples. Not all adjustable regulators are 3-terminal devices. Often, regulators have an adjustment input which is separate from the regulator ground – a typical circuit is shown in Fig.9 which features the LT1121. The LT1121 is a micropower LDO regulator capable of supplying Vin IN LT1121 SHDN GND Fig.8. Digipot resistor current for the circuit in Fig.6. 58 Vout OUT R1 + ADJ Cout R2 Fig.9. Typical adjustable regulator circuit for a device with separate adjust and ground pins. Practical Electronics | March | 2023 𝑅𝑅( 𝑉𝑉!"# − 1+ 𝑉𝑉$%& is between voltage (3.75V) 𝑅𝑅' = 𝑅𝑅( ) ground and the adjustment pin, rather than the output and the adjustment pin. 1 1 1 The voltage = −across R2 sets 𝑅𝑅 𝑅𝑅 𝑅𝑅 , ' its current (and -the current in R1) to 3.75/R2 and so the output voltage is: 𝑉𝑉!"# = 3.75 #1 + Fig.10. LTspice schematic for an LT1121 regulator with digipot control. voltage to obtain 3.75V at the adjustment 150mA of output current with a dropout pin. Like the LT1085, some current flows voltage of 0.4V. The output voltage is into the adjustment pin. This is about adjustable from 3.75V to 30V (fixed output 150nA for the LT1121, much smaller than versions are also available). The device the LT1085 and similar devices, which has a 5V logic, active-low shutdown pin facilitates use of larger resistors in the (output turned off if shutdown is driven feedback network (R1 and R2 in Fig.9). below about 0.6V). The shutdown pin can be floating if not used. Internally, the adjustment pin is Circuit operation connected to the control circuit input. The operation of this circuit is similar The control circuit adjusts the output to the circuit in Fig.1 except the reference 𝑅𝑅( ' 𝑅𝑅' Note that the resistor ratio in the formula is the round 𝑅𝑅' opposite way𝑅𝑅./ 𝑉𝑉!"# # compared ' = 𝑉𝑉$%& ' to #the 𝑅𝑅( + 𝑅𝑅' 𝑅𝑅./formula + 𝑅𝑅0/ for the circuit in Fig.1, with the resistors numbered 𝑅𝑅' 𝑅𝑅./ 𝑉𝑉!"# = 𝑉𝑉$%& #1 + ' # ' similarly. To avoid confusion, you 𝑅𝑅( 𝑅𝑅./ +if𝑅𝑅0/ consult the datasheet, also note that this uses a different resistor numbering. Like the previous circuit, an error voltage of IadjR𝑉𝑉1 can be added 𝑅𝑅 to' 'Vout to !"# = 3.75𝑁𝑁 #1 + 𝑅𝑅(current account for the adjustment pin if required. The datasheet states that the value of R2 should be less than 400kΩ, so a 20kΩ is easily suitable and may be available for 15V device. A 50kΩ or 100kΩ digipot could also be used. Fig.10 shows an LTspice schematic of the LT1121 circuit with digipot control. The digipot is in potentiometer mode and has a resistance of RAB. There is a resistor (R3) between the digipot and ground – this sets the maximum output voltage when the digipot wiper is fully at the B end, where the effective value of R1/R2 in the above formula is RAB/R3. If we want a maximum output voltage of 15V then we need R1/R2 = 3 (because 3.75 × (1 + 3) = 15), so with RAB = 20kΩ we get R3 = RAB/3 = 6.67kΩ. When the digipot is fully at the A end R1 (= RWA) is zero (ideally) so Vout = 3.75V. Simulation models Fig.11. Simulation results from the circuit in Fig.10. The digipot in Fig.10 is modelled using two parameters. The total resistance (RAB) is parameter Rdigipot_AB. The resistance between the wiper and B terminal (RWB) is parameter Rdigipot_ WB. One of the digipot resistors is simply equal to Rdigipot_WB, the other (wiper to A terminal, RWA) is calculated using a behavioural resistor with value: R = {Rdigipot_AB} - {Rdigipot_WB} Fig.12. Digipot resistor current for the circuit in Fig.10. Practical Electronics | March | 2023 The simulation steps Rdigipot_WB through a set of values to give a simulation similar to the other examples above. As discussed when we used behavioural resistors in Part 5, it is necessary to ensure that the calculated value resistor is never zero, so the first stepped value of Rdigipot_WB is 1mΩ rather than zero. Also, Rdigipot_WB is a little larger than 20kΩ to prevent the subtraction returning zero. 59 𝑉𝑉!"# = 𝑉𝑉$%& #1 + 𝑉𝑉!"# = 𝑉𝑉$%& #1 + Electronically controlled resistance – Part 7 𝑅𝑅' ' 𝑅𝑅( 𝑅𝑅' ' + 𝐼𝐼)*+ 𝑅𝑅' 𝑅𝑅( 𝑉𝑉!"# 𝑅𝑅' = 𝑅𝑅( ) − 1+ 𝑅𝑅𝑉𝑉'$%& 𝑉𝑉!"# = 𝑉𝑉$%& #1 + ' 𝑅𝑅( 1 1 1 = − 𝑅𝑅,𝑅𝑅' 𝑅𝑅' 𝑅𝑅𝑉𝑉!"# = 𝑉𝑉$%& #1 + ' + 𝐼𝐼)*+ 𝑅𝑅' 𝑅𝑅( 𝑅𝑅 𝑅𝑅' ( Fig.13. LTspice schematic for digipot regulator control with lower voltage requirements. 𝑉𝑉!"# = 3.75digipot #1 + supply ' Simulation results are shown in Fig.11. The basic pattern is similar to the previous examples, but the steps are non-linear. This may make it difficult to set specific values at the higher voltage end (depending on the number of wiper positions). The situation can be improved with series and parallel resistances and was discussed in the context of amplifier gain last month. The results in Fig.12 show a much lower digipot current than in the previous examples – under 600µA at all points. 𝑉𝑉!"# 𝑅𝑅' = 𝑅𝑅voltage − 1+ () divider 𝑉𝑉$%& for the digipot (the two inputs to op amp U2), thus: 𝑅𝑅' 𝑅𝑅WB ./ 𝑉𝑉!"# # ' = 𝑉𝑉$%& # ' 𝑅𝑅 + 𝑅𝑅 𝑅𝑅 ./ + 𝑅𝑅0/ WB WA 1 ( 1' 1 = − 𝑅𝑅, 𝑅𝑅' 𝑅𝑅-𝑅𝑅 𝑅𝑅./ ' 𝑉𝑉!"# = 𝑉𝑉$%& #1 + ' # ' 𝑅𝑅( 𝑅𝑅./ 0/ WB + 𝑅𝑅WA At the same time, the regulator’s internal 𝑅𝑅( the adjustment pin circuitry ensures 𝑉𝑉!"# = 3.75 #1 + that ' ' is at the reference𝑅𝑅voltage 𝑅𝑅'(Vref, which is 3.75𝑁𝑁 + ' The digipot !"# = for equal to 𝑉𝑉 3.75V the#1 LT1121). 𝑅𝑅( is connected between the adjustment pin and ground so it has a constant 3.75V Lower digipot supply 𝑅𝑅' 𝑅𝑅./ it, which The circuit in Fig.10 has a low digipot𝑉𝑉!"# #across '= 𝑉𝑉$%& #should be no ' problem for 𝑅𝑅( + 𝑅𝑅' 𝑅𝑅./ + 𝑅𝑅0/ devices running from 5V supplies. current but does not allow the digipot As discussed last month, if we define the to control the full output range of the 𝑅𝑅' 𝑅𝑅./ = 𝑉𝑉$%& #1 + ' #as a value N, ' where N = 0 position regulator (up to 30V) because the full𝑉𝑉!"# wiper 𝑅𝑅( 𝑅𝑅./ + 𝑅𝑅0/ with the wiper at B and N = 1 when the output voltage occurs across the digipot. wiper is A, then the digipot potential divider Most digipots have maximum supply function becomes NVref, so we have: voltages below 15V. A possible solution to this is provided in an article by Robert 𝑅𝑅' 𝑉𝑉!"# = 3.75𝑁𝑁 #1 + ' Swartz in Electronic Design (January 𝑅𝑅( 2016): Extend Low-Voltage Digipot Resolution to Control an Adjustable Design calculations Regulator. A version of this technique The ratio of R1 and R2 sets the maximum applied to the LT1121 is shown in Fig.13. output voltage for the wiper position N = The circuit in Fig.13 contains an additional 1. For an output of 30V (the maximum for op amp in the regulation control loop, which the LT1121) we need R1/R2 = 7 (because ensures that the potential divider voltage 3.75 × 1 × (1 + 7) = 30). The circuit in from R1 and R2 is the same as the potential Fig.13 uses 70kΩ and 10kΩ to achieve this. The output voltage is linearly dependent on the wiper position, which is an advantage over the circuit in Fig.10. The circuit can operate with values of N which give Vout at 3.75V or more. With R1/ R2 = 7 the minimum value of N is RAB/8. For a 20kΩ digipot this is 2.5kΩ – the RWB resistance (Rdigipot_AB parameter) in the simulation is stepped from this minimum value to account for this. In a real system this would have to be ensured by the software. Alternatively, a suitable resistor can be placed in series with the digipot, in a similar way to R3 in Fig.10, which allows the full range of the digipot to be used. Simulation results are shown in Fig.14. Again, this is similar to previous results, but shows the larger output range of 3.75V to 30V and the linear relationship between the digipot setting at the output voltage (evenly spaced output voltage traces). This circuit requires more components (particularly the op amp) but provides significant advantages over the others discussed above. The fixed voltage across the digipot (once the input voltage is sufficient for the regulator to operate) leads to a constant current through the digipot of Vref/RAB = 3.75/20k = 188µA. The discussion in this article has focused on the use of digipots to control voltage regulators. We have not discussed all aspects of the circuits, for example selection of suitable values for the capacitors. Some regulator circuits may require additional components which have not been included in the schematics here – for example, protection diodes. In all cases, device datasheets and other relevant technical document from device manufacturers should be consulted when developing designs. Simulation files Fig.14. Simulation results from the circuit in Fig.13. 60 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. Practical Electronics | March | 2023