Silicon ChipMITCHELECTRONICS - February 2024 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions
  5. Back Issues: Hare & Forbes Machineryhouse
  6. Publisher's Letter: Teach-In 2024
  7. Feature: Cheeky chiplets by Max the Magnificent
  8. Feature: Net Work by Alan Winstanley
  9. Project: Active Mains Soft Starter by John Clarke
  10. Project: ADVANCED SMD TEST TWEEZERS by Tim Blythman
  11. Project: Active Subwoofer For Hi-Fi at Home by Phil Prosser
  12. Feature: Max’s Cool Beans by Max the Magnificent
  13. Feature: Circuit Surgery by Ian Bell
  14. Feature: MITCHELECTRONICS by Robin Mitchell
  15. Project: Audio Out by Jake Rothman
  16. PCB Order Form
  17. Advertising Index: Bush MB60 portable radio by Ian Batty

This is only a preview of the February 2024 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)
Items relevant to "Active Mains Soft Starter":
  • Active Mains Soft Starter PCB [10110221] (AUD $10.00)
  • PIC12F617-I/P programmed for the Active Mains Soft Starter [1011022A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Firmware for the Active Mains Soft Starter [1011022A] (Software, Free)
  • Active Mains Soft Starter PCB pattern (PDF download) [10110221] (Free)
  • Active Mains Soft Starter lid panel artwork (PDF download) (Free)
Articles in this series:
  • Active Mains Soft Starter, Part 1 (February 2023)
  • Active Mains Soft Starter, Part 2 (March 2023)
  • Active Mains Soft Starter (January 2024)
  • Active Mains Soft Starter (February 2024)
Items relevant to "ADVANCED SMD TEST TWEEZERS":
  • Advanced/ESR Test Tweezers back panel PCB (blue) [04105242] (AUD $2.50)
  • Advanced SMD Test Tweezers PCB set [04106221+04106212 {blue}] (AUD $10.00)
  • PIC24FJ256GA702-I/SS programmed for the Advanced SMD Test Tweezers (0410622A.HEX) (Programmed Microcontroller, AUD $15.00)
  • 0.96in cyan OLED with SSD1306 controller (Component, AUD $10.00)
  • Advanced SMD Test Tweezers kit (Component, AUD $45.00)
  • Firmware for the Advanced SMD Test Tweezers [0410622A.HEX] (Software, Free)
  • Advanced SMD Test Tweezers PCB patterns (PDF download) [04106221+04106212] (Free)
  • Advanced SMD Test Tweezers sticker artwork (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Advanced Test Tweezers, Part 1 (February 2023)
  • Advanced Test Tweezers, Part 2 (March 2023)
  • ADVANCED SMD TEST TWEEZERS (January 2024)
  • ADVANCED SMD TEST TWEEZERS (February 2024)
Items relevant to "Active Subwoofer For Hi-Fi at Home":
  • Bookshelf Speaker Passive Crossover PCB [01101201] (AUD $10.00)
  • Bookshelf Speaker Subwoofer Active Crossover PCB [01101202] (AUD $7.50)
  • Bookshelf Speaker Passive and Active Crossover PCB patterns (PDF download) [01101201-2] (Free)
  • Bookshelf Speaker System timber and metal cutting diagrams (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Easy-to-build Bookshelf Speaker System (January 2020)
  • Building the new “bookshelf” stereo speakers, Pt 2 (February 2020)
  • Building Subwoofers for our new “Bookshelf” Speakers (March 2020)
  • Stewart of Reading (October 2023)
  • Stewart of Reading (November 2023)
  • ETI BUNDLE (December 2023)
  • Active Subwoofer For Hi-Fi at Home (January 2024)
  • Active Subwoofer For Hi-Fi at Home (February 2024)
Articles in this series:
  • Audio Out (January 2024)
  • Audio Out (February 2024)
  • AUDIO OUT (April 2024)
  • Audio Out (May 2024)
  • Audio Out (June 2024)
  • Audio Out (July 2024)
  • Audio Out (August 2024)
  • Audio Out (September 2024)
  • Audio Out (October 2024)
  • Audio Out (March 2025)
  • Audio Out (April 2025)
  • Audio Out (May 2025)
  • Audio Out (June 2025)
MITCHELECTRONICS Learn the basics of electronics with Robin Mitchell Part 3 – Introducing the op amp MitchElectronics is a series of projects by Robin Mitchell that introduces beginners to useful, simple, easy-to-understand circuit designs. Each month, he will introduce fundamental components, theory and ideas used in electronics. The series will cover both analogue and digital electronics. I n the previous article, we further explored how the 555 timer integrated circuit (IC) worked, introduced you to some digital logic devices, and looked at how these can be used together to create some interesting projects. Now that we have a solid understanding of some basics, it’s time to explore the most important analogue IC, the operational amplifier – typically shortened to ‘op amp’. Introduction So far, we have created passive analogue circuits, which can reduce a voltage or divide the flow of current, but they can’t amplify it. For example, potential dividers take an input voltage and reduces it in a predictable manner across a number of resistors. But how can we take a small voltage and make it bigger – ie, amplify it? To do this, you need to use active components. The fundamental active component is the transistor, which we will of course explain, but later in this series. It’s actually easier to start off with a device made up of many transistors and to treat it as a simple amplification block without worrying too much about what goes on under the hood. That amplification block is the op amp, and in this article we will explore how it works, along with a number of sensors that we can use to detect light, temperature and sound. What is an op amp? The op amp is a cheap, flexible and easyto-use voltage amplifier, which is found in an extraordinary range of applications and circuit configurations. It can be used to amplify signals, compare signals, add/subtract voltages, build filters and oscillators and much more. The basic schematic for the op amp can be seen in Fig.1. Op amps themselves are not a single component, but a complex IC made up of transistors, resistors, diodes and capacitors. The first op amps were built using thermionic valves and were primarily designed to perform mathematical operations in analogue computers – hence the label ‘operational’ amplifier. They were certainly useful, but they were physically large, expensive and power hungry, a world away from the cheap, tiny efficient devices of today. (As an aside, if you read Jake Rothman’s recent Audio Out articles you can get an idea of how to build an op amp from modern discrete components. Fig.2 shows the MitchElectronics Discrete Op Amp which uses transistors and resistors to build a complete op amp. Do note that the MitchElectronics Discrete Op Amp is an educational circuit and does not produce a particularly good op amp. It is designed to teach how an op amp works, Positive power V+ Non-inverting input Vin+ Inverting input Vin– + Output VO – V– Negative power Fig.1. Basic schematic symbol for an operational amplifier, or ‘op amp’ for short. 54 Fig.2. Discrete Op Amp kit from MitchElectronics not create a precision circuit like Jake’s excellent design.) Early IC designers realised that a small, inexpensive op amp offered many advantages and it was one of the first designs that was turned into an IC. Thanks to this integration, highly complex op amps can be fitted onto the tiniest piece of silicon, consuming little power and able to operate at very high frequencies. Ideal op amp When first looking at how op amps work, we use an imaginary model called the ‘ideal op amp’. This helps us get up and running with designing, building and troubleshooting real op amp circuits. Once you get the hang of the ideal version you are in a good position to take account of the limitations of real devices. An ideal op amp has two power connections and just three signal connections – two inputs and one output. The inputs are called non-inverting (marked with a ‘+’) and inverting (marked with a ‘–’), the output is the unmarked third terminal. All op amps needs a power source, typically a positive and negative rail, although many op amps are happy for the negative rail to sit at 0V. The output is generally limited to a band between the two supply voltages and cannot be greater than the supply positive voltage, or less than its negative counterpart. Op amps are usually low-voltage devices and typical supply voltages are ±15V, +9V/0V or +5V/0V. The output voltage produced by an op amp is equal to the difference of the two inputs multiplied by its gain value. So the obvious question is what is the gain of the op amp? The surprising answer is that by and large you don’t know! It is not a well-defined parameter, but even more surprising is the fact that this doesn’t matter. All you need to know is that it is very very large. In fact, for our ideal op Practical Electronics | February | 2024 VO1 1 8 V+ Vin1– 2 – Vin1+ 3 + V– 4 7 VO2 – 6 + 5 Vin2+ Vin2– Fig.3.(top) LM358 op amp and (below) its pin layout. amp it is effectively infinite, but let’s dial that down just a tad and call it at least a 100,000, or a million, if not ten million! So how does this help us design and build circuits? It leads us to the first of two important rules for using op amps. Remember, we said op amps are low-voltage devices. Let’s say we are powering our amp with a 10V supply and its gain is 10,000,000. That means if its maximum output is at 10V then its input – the difference between its two inputs terminals – must be 10 divided by 10,000,000, which is a millionth of a volt, a microvolt, written as 1µV. Now, there are times when you need to manipulate such miniscule voltages, but for many real-world applications a microvolt is a pretty good approximation to nothing, 0V. This leads us to the first rule: the voltage difference between the two inputs of an op amp can be treated as zero volts. Our second rule is just as simple. The way an op amp is designed and built its inputs draw no current. Op amp inputs just respond to whatever voltage is applied, but they don’t take any current from whatever is connected to them. These two rules will get you surprisingly far in circuit design, and even when you start to take into account the nonideal aspects of real op amps, the ideal op amp model is an excellent place to start. However, we need to add one very important caveat. All of the above explanation assumes that you are using the op amp in a particular way – in a negative feedback configuration. Negative feedback Feedback – especially negative feedback – is at the heart of a large body of work called ‘control theory’. Unfortunately, Practical Electronics | February | 2024 it is a heavily mathematical discipline, and this is not the place to look into it in any great depth, but the key concept is straightforward: take the output signal, feed it back to the op amp’s input, and subtract it from the input signal. This is why you have two inputs in an op amp – the inverting input does the subtracting and is connected, often via other components, to the output and the result is a negative feedback system that turns a poorly defined very-high-gain amplifier into an amplifier with a much lower, but very well defined gain. You effectively trade huge unknow gain for limited, well-understood gain. It’s a good trade because op amps have lots of gain to offer and most designs only need gain up to a hundred or so, often much less. Shortly, we’ll show you just how easy it is to use our two op amp golden rules to design an amplifier with a specific, accurate gain value. Real op amps We’ve talked a lot about ‘ideal op amps’, but what does a real one look like? A famous op amp that most engineers grew up with is called the ‘741’ – it’s a venerable design dating back to the late 1960s, and while it is certainly works adequately, it doesn’t have the best of characteristics, certainly compared with more modern devices. Instead, MitchElectronics kits use the LM358 op amp (Fig.3) which is a real workhorse of the modern electronics industry. For its price, it has excellent characteristics, low current consumption, and can be used in most non-precision applications. It’s a dual device, which means you get two independent op amps in one small package, as shown in the pin connection diagram in Fig.3. Expect to pay 50p for single devices, but you can probably pick them up for less than 20p if you buy 10 or more on eBay. They really are very cheap. How does a comparator work? Before we get into the nitty-gritty of designing our first negative-feedback op amp circuit, a small diversion to a useful op amp circuit that doesn’t use negative feedback or our two golden rules. This first configuration that we will explore is a circuit called the ‘comparator’ which is so simple it requires no external components. As its name suggests, the comparator compares two voltages, telling you which is bigger or smaller than the other. It’s useful if you need to know when a particular voltage – perhaps the output of a temperature sensor – rises or falls above or below a particular voltage. The basic layout of a comparator is shown in Fig.4. Start by examining V+ + Vin + 2.5V 0V VO – – V– Vin 2.5V t VO V+ t Fig.4. Basic comparator circuit. the inputs of the op amp being used as a comparator. The non-inverting input is connected to a voltage under test, and the inverting input is tied to a fixed voltage. What we have here is effectively a circuit whose output represents a logic signal indicating which voltage is larger. If the non-inverting input is larger than the inverting input, then the output will go straight to the positive supply voltage – remember that the output is just a very large multiple of the difference between the two inputs and the output cannot exceed its power supply voltages. Likewise, if the noninverting is smaller than the inverting input, then the output will drop to the negative supply voltage. In the case of the design shown in Fig.4, our inverting input is connected to a 2.5V supply, so as the non-inverting input rises above 2.5V, the output will switch to 9V, and if it falls below 2.5V, then it will drop to 0V. Recalling last month’s article where we described how potential dividers and potentiometers work, we can replace the fixed reference comparison voltage on the inverting input with a potentiometer to create a comparator circuit that has an adjustable switching point. Fig.5 shows how a potentiometer can be used to adjust this detection level. +9V + Vin – VO 0V Fig.5. Comparator circuit using a potentiometer to set switching level. 55 𝑅𝑅" 𝑅𝑅" 𝑅𝑅" 𝑉𝑉#$% = 𝑉𝑉&𝑅𝑅 𝑅𝑅× "" 𝑅𝑅 + 𝑉𝑉 = 𝑉𝑉 × 𝑉𝑉#$% = #$% 𝑉𝑉&& × × &𝑅𝑅" ! 𝑅𝑅" 𝑉𝑉 𝑉𝑉 #$% = 𝑅𝑅!! + + 𝑅𝑅 𝑅𝑅""! + 𝑅𝑅" 𝑉𝑉#$% = 𝑉𝑉& × 𝑅𝑅 𝑅𝑅! + 𝑅𝑅" 𝑅𝑅" 𝑉𝑉#$' = 𝑉𝑉#$% = 𝑉𝑉&𝑅𝑅 𝑅𝑅× " " 𝑅𝑅 𝑅𝑅 " == ! + 𝑅𝑅" 𝑉𝑉#$' =𝑉𝑉#$' 𝑉𝑉#$% =𝑉𝑉#$% 𝑉𝑉&& × ×= 𝑉𝑉&𝑅𝑅× 𝑉𝑉 𝑉𝑉 𝑉𝑉 #$' = #$% " 𝑅𝑅 ! + 𝑅𝑅" VO 𝑅𝑅 + 𝑉𝑉#$' = 𝑉𝑉#$% = 𝑉𝑉& × 𝑅𝑅!! + 𝑅𝑅"" – Rearranging, we can 𝑅𝑅! + 𝑅𝑅"get the gain (the ratio of the input to the output voltage): 𝑉𝑉#$' 𝑅𝑅" 𝑅𝑅" 𝑉𝑉#$' 𝑅𝑅= R1 𝑉𝑉 𝑅𝑅 #$' 𝑉𝑉#$' "" 𝑅𝑅 + 𝑉𝑉 𝑅𝑅" = & ! = = 𝑅𝑅" 𝑅𝑅 + 𝑅𝑅 𝑉𝑉 R– 2 Introducing the op amp Part 3Part 𝑉𝑉&& = 𝑉𝑉𝑅𝑅 𝑅𝑅 + 𝑅𝑅""! &!! + " 𝑉𝑉 3 – Introducing the op amp #$' 𝑉𝑉& 𝑅𝑅! + 𝑅𝑅" 0V Which can be rewritten as: 𝑉𝑉& 𝑅𝑅! 𝑅𝑅!𝑅𝑅+ ! 𝑅𝑅" 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 𝑉𝑉 + 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 𝑅𝑅 + 𝑅𝑅" =+ 𝑉𝑉&& 𝑅𝑅 + &!!𝑅𝑅+ 𝑉𝑉 𝑅𝑅 " 𝑅𝑅""!𝑅𝑅𝑅𝑅 𝑉𝑉 = #$' = 𝑉𝑉& =𝑉𝑉𝑅𝑅! + 𝑅𝑅" 𝑅𝑅"" Fig.6. Op amp non-inverting amplifier. 𝑉𝑉#$' 𝑅𝑅"" " 𝑉𝑉 #$' = #$'𝑅𝑅 Part 3Part – Introducing the opthe amp 𝑅𝑅" 3 – Introducing op amp 𝑉𝑉#$' Simplifying the equation results in: 𝑉𝑉& × 𝑅𝑅𝑅𝑅"𝑅𝑅" 𝑅𝑅𝑅𝑅 𝑅𝑅! !" How does a non-inverting ampli-𝑉𝑉#$% =𝑉𝑉#$% 𝑉𝑉 𝑉𝑉 ×+ & = ! 𝑅𝑅! 𝑅𝑅= &!"+ 𝑉𝑉&&𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝑉𝑉𝑅𝑅 𝑅𝑅 𝑅𝑅 𝑅𝑅!!1 + 𝑅𝑅! & !𝑅𝑅 𝑉𝑉 𝑅𝑅 𝑅𝑅 𝑅𝑅 𝑅𝑅 " = = 1 + " ! 𝑅𝑅 + ! " 𝑉𝑉 𝑅𝑅 𝑅𝑅 𝑅𝑅 ! " = + = 1 + 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 + fier work? #$' + " = 𝑅𝑅 +𝑅𝑅!"𝑅𝑅= = +𝑅𝑅! 11"+ 𝑉𝑉& = " 𝑅𝑅 𝑉𝑉#$' 𝑅𝑅""" + 𝑅𝑅 𝑅𝑅""" = 𝑅𝑅"" 𝑅𝑅" 𝑉𝑉 𝑅𝑅 #$' =𝑉𝑉#$' 1"+𝑅𝑅"𝑅𝑅 Now let’s dive into our first op amp circuit𝑉𝑉 𝑅𝑅 𝑅𝑅 𝑅𝑅 #$' " " " that uses negative feedback – the nonAnd thus the gain – the ratio of output 𝑅𝑅" 𝑅𝑅 " inverting amplifier. This is a configuration to=input is: ! 𝑉𝑉#$' =𝑉𝑉#$' 𝑉𝑉#$% =𝑉𝑉𝑉𝑉𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 𝑅𝑅𝑉𝑉 = ×1𝑅𝑅 &× 𝑅𝑅+"𝑅𝑅! = &𝑅𝑅 𝑅𝑅+ 𝑅𝑅×"!= ! 𝑅𝑅 𝑉𝑉& #$% ×= !1 +" 𝑅𝑅" "! 𝑅𝑅 that turns a regular op amp into a practical𝑉𝑉#$% = 𝑉𝑉#$% 𝑉𝑉 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 + 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 1 + & 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 + 𝑅𝑅 𝑅𝑅! 𝑅𝑅 𝑅𝑅𝑅𝑅!"""! + 𝑅𝑅"" 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 + 𝑅𝑅 amplifier with a positive configurable 𝑅𝑅" gain. As the name suggests, the gain 𝑅𝑅" 𝑅𝑅" resistors 𝑉𝑉#$'selecting 𝑅𝑅! for an op amp of a non-inverting amplifier is greater 𝑉𝑉#$' When =𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 ==𝑅𝑅 2.5𝑅𝑅= "𝑅𝑅 1 + ! that the resistors 𝑅𝑅"!1 𝑉𝑉 𝑅𝑅 + ! 𝑅𝑅"𝑅𝑅 = 𝑉𝑉 = 𝑉𝑉 × than zero, meaning that the sign of 𝑉𝑉the circuit, it is important 𝑉𝑉 𝑅𝑅 + 𝑅𝑅 & #$%= !& " #$' 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 𝑅𝑅 & ! 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 2.5 = + 𝑉𝑉 𝑉𝑉 = 𝑉𝑉 × = 2.5 = 1 + #$' = 2.5 #$% = 𝑅𝑅 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 1!&++𝑅𝑅𝑅𝑅!𝑅𝑅" +𝑅𝑅𝑅𝑅" 𝑅𝑅""!as to "" result in large voltage is preserved – a positive voltage 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 are=not 2.5 so = 1small + 𝑅𝑅 𝑅𝑅" not so large that the is amplified into a bigger positive voltage, current flow, but 𝑅𝑅𝑅𝑅"! + 𝑅𝑅"have sufficient current 𝑉𝑉𝑅𝑅&! +doesn’t and a negative voltage is amplified into a 𝑉𝑉&op=amp 𝑅𝑅 ! 𝑉𝑉#$' 𝑉𝑉 𝑅𝑅𝑅𝑅 = "! = 𝑅𝑅 𝑅𝑅 #$' 𝑅𝑅 𝑅𝑅 ! more negative voltage. (By contrast, in a 𝑉𝑉#$' to operate. Remember, while an ideal op = ! 𝑉𝑉#$' 𝑅𝑅 "1.5 " 𝑅𝑅 = " = "1.5 =+1.5 1.5 𝑅𝑅&!= 𝑅𝑅 & 𝑅𝑅 "! + no 𝑅𝑅 𝑅𝑅 𝑅𝑅 𝑅𝑅!𝑉𝑉 future article we will meet the inverting 𝑉𝑉amp consumes current, a real op amp " " 𝑅𝑅 "" = 1.5 𝑅𝑅"require a minimum level of current amplifier, where the gain is less than does 𝑉𝑉& 𝑅𝑅𝑅𝑅!" 𝑅𝑅albeit 𝑅𝑅! very zero, which means that the sign of the (microamps 𝑉𝑉𝑅𝑅to" operate, 𝑅𝑅!𝑅𝑅small ! ! = 𝑉𝑉&& + = 1 𝑅𝑅&! + 𝑅𝑅 = = 1𝑅𝑅"is ++ "!++ 𝑅𝑅! best to choose 𝑉𝑉 𝑅𝑅 𝑅𝑅 𝐺𝐺𝑎𝑎𝑎𝑎𝑎𝑎 = 52.8 = 1 voltage is reversed – a positive voltage is to nanoamps). It often 𝑅𝑅 𝑉𝑉#$' 𝑉𝑉#$' 𝑅𝑅" 𝐺𝐺𝑎𝑎𝑎𝑎𝑎𝑎 𝑅𝑅𝑅𝑅"" = 𝑅𝑅 ! = ! 𝑅𝑅 𝑅𝑅 " 𝑅𝑅 "1 " " 52.8 𝐺𝐺𝑎𝑎𝑎𝑎𝑎𝑎 = 52.8 52.8 = 1+ += 𝐺𝐺𝑎𝑎𝑎𝑎𝑎𝑎 = 𝑅𝑅!1 + from 𝑉𝑉#$' 𝑅𝑅="= amplified into a bigger negative voltage, 𝐺𝐺𝑎𝑎𝑎𝑎𝑎𝑎 resistors 𝑅𝑅"" 𝑅𝑅" 1kΩ to 100kΩ. #$' in 𝑅𝑅 =𝑉𝑉52.8 = the 1 𝑅𝑅 +"range " and a negative voltage is amplified into Let’s design a𝑅𝑅couple of non-inverting a bigger positive voltage.) amplifiers. Say you need to amplify a 𝑅𝑅 𝑅𝑅 ! 𝑅𝑅 1 𝑉𝑉& 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 𝑅𝑅&" = 𝑅𝑅!+ 𝑅𝑅!! of𝑅𝑅2.5, 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 =𝑅𝑅!!a1 𝑅𝑅1= 51.8 The circuit for a non-inverting amplifier signal factor what resistors 𝑅𝑅 " 𝑅𝑅 !+ ! 𝑅𝑅 ! 𝑅𝑅by = 𝑉𝑉 + = + ! 𝑅𝑅 " 𝑅𝑅 = 𝑅𝑅= +" = 51.8 =𝑅𝑅"1 + = 51.8 51.8 𝑉𝑉#$' 𝑉𝑉#$' 𝑅𝑅" 𝑅𝑅𝑅𝑅 " is shown in Fig.6. It uses a potential would 𝑅𝑅" 𝑅𝑅choose? 𝑅𝑅""you 𝑅𝑅We " " simply set the 𝑅𝑅!"" = 51.8 𝑅𝑅"equal to 2.5: divider on the output that feeds back gain into the inverting input terminal of the 𝑅𝑅! 0 ! 𝑅𝑅𝑅𝑅 ! 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 2.5== =12.5 1++ 𝑅𝑅𝑅𝑅 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 =!𝑅𝑅 1=+ ! op amp – hence negative feedback. It’s 𝑅𝑅01 + 0 = 1 𝑅𝑅 𝑅𝑅 ! 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 !1+ "=0!1𝑅𝑅+ 𝑅𝑅 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = + 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 + 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = = 11 + +𝑅𝑅! =𝑅𝑅"11"+ +0 = =" 11∞ = 1 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 this connection between the output and 𝑅𝑅"" = 𝑅𝑅1"+ 𝑅𝑅 ∞"= 1∞ ∞ 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 + 𝑅𝑅 the inverting input that controls the gain We subtract 1 from 𝑅𝑅" ∞ each side so that: of the circuit, via the ratio of the two 𝑅𝑅! 𝑅𝑅! = 1.5 = 1.5 𝑅𝑅! op amp resistors, summarised in the following𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 𝑅𝑅 = =" 2.5 1 += 1 + 𝑅𝑅! " 2.5𝑅𝑅 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = equation: 𝑅𝑅" 𝑅𝑅" And that gives us a nice R1:R2 ratio. We 𝑅𝑅! 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 + could have R1 and R2 = 1kΩ, or 𝑅𝑅!= 1.5kΩ 𝑅𝑅" 𝑅𝑅! 𝐺𝐺𝑎𝑎𝑎𝑎𝑎𝑎 = = 1 +and 𝑅𝑅52.8 R1 15kΩ R2 = 10kΩ 𝐺𝐺𝑎𝑎𝑎𝑎𝑎𝑎 52.8 = 1 + != = 𝑅𝑅 ! 𝑅𝑅" 𝑅𝑅" = 1.5 = 1.5 But how is this equation derived? This is an amplifier with a gain of 𝑅𝑅If" we𝑅𝑅need " where our golden rules come into play. say 52.8 then we just repeat the process 𝑅𝑅" 𝑉𝑉#$% = 𝑉𝑉assume If we that the internal gain of with different numbers: &× 𝑅𝑅! 𝑅𝑅! 𝑅𝑅 + 𝑅𝑅" the op amp! is huge and that the output = 51.8= 51.8 𝑅𝑅! 𝑅𝑅 𝐺𝐺𝑎𝑎𝑎𝑎𝑎𝑎 = 1 += 1 + 𝑅𝑅! 𝑅𝑅 " 52.8 𝐺𝐺𝑎𝑎𝑎𝑎𝑎𝑎 ="=52.8 of our amplifier circuit is small (a few 𝑅𝑅" 𝑅𝑅" volts), then the voltages at the two inputs 𝑅𝑅" must Resulting in: 𝑉𝑉#$' = 𝑉𝑉#$%be = the 𝑉𝑉& ×same value, since even the 𝑅𝑅! 𝑅𝑅! 0 𝑅𝑅 𝑅𝑅" 0 ! +would tiniest difference result in a𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 very= 1 +𝑅𝑅= = 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 ! 1+ 𝑅𝑅! 1 +=∞1=+1 = 1 𝑅𝑅 = 51.8 𝑅𝑅"= 51.8 ∞ " large output. 𝑅𝑅" 𝑅𝑅" at the inverting input he op amp 𝑉𝑉The voltage 𝑅𝑅" #$' terminal = is provided by the potential + 𝑉𝑉& 𝑅𝑅circuit ! + 𝑅𝑅"𝑅𝑅comprising R1 and R2, divider 𝑅𝑅! 𝑅𝑅! V0in ! 0 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺is=driven 1 + by the output voltage VO 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 + = 1 + = 1 which of 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 =𝑅𝑅 1 + = 1 + = 1– 𝑅𝑅" " 𝑅𝑅" ∞ ∞ the op amp. Thus, we can say that the 𝑉𝑉& 𝑅𝑅! + 𝑅𝑅" voltage = at the inverting input terminal is: 𝑉𝑉#$' 𝑅𝑅" R1 ≈ 0Ω 𝑅𝑅" R2 ≈ ∞Ω (short circuit) 𝑉𝑉#$% = 𝑉𝑉& × (open circuit) 𝑅𝑅! + 𝑅𝑅" Vin + 𝑉𝑉& But𝑅𝑅"we know 𝑅𝑅! 𝑅𝑅! = + = 1that + this must be equal to 𝑉𝑉#$' the𝑅𝑅voltage 𝑅𝑅 𝑅𝑅 on the input, " " 𝑅𝑅"non-inverting " so=we can 𝑉𝑉#$' 𝑉𝑉#$% = say: 𝑉𝑉& × 𝑅𝑅! + 𝑅𝑅" 𝑅𝑅! 56 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 + 𝑅𝑅 𝑉𝑉#$' 𝑅𝑅"" = + Vin VO – Vin 5V t –5V VO 5V t –5V Fig.7. Op amp unity-gain buffer circuit and example output. Note that the gain is precisely 1 for this amplifier.. At this point you will have to do a little experimentation with the available values of resistors, and you may not hit exactly 51.8, but you might decide – for example – that 62kΩ/1.2kΩ = 51.67 is close enough (it’s about 0.25% out). Do remember that unless you (unnecessarily) invest in high-precision resistors the components you use typically have a precision of around 1% (or worse), so chasing ultra-close resistor ratios is a fool’s errand! How does a unity-gain buffer work? A particularly common variant of the noninverting amplifier is called the unity-gain amplifier, often referred to as a buffer. It is a non-inverting amplifier with a gain of exactly one. However, unlike other noninverting amplifiers, a unity-gain buffer doesn’t require any external resistors to work, and only needs the output directly connected to the inverting input terminal, as shown in Fig.7. This configuration is useful when measuring extremely sensitive voltage sources that are highly susceptible to the tiniest change in resistance or current. Buffers are used to separate sensors from driver circuits so that no matter how much current a driver circuit is consuming, the sensor will not be affected. If we draw out a unity-gain buffer as a non-inverting amplifier, we can see why its gain is 1. Fig.8 shows a non-inverting Vin + – VO 0V Fig.8. Non-inverting amplifier as a unity-gain buffer. Practical Electronics | February | 2024 ! " 𝑉𝑉& 𝑅𝑅! + 𝑅𝑅" = 𝑉𝑉#$' 𝑅𝑅" PTC (positive 𝑅𝑅 temperature 𝑉𝑉 𝑅𝑅! 𝑅𝑅! & " coefficient) = thermistor + =1+ 𝑉𝑉#$' 𝑅𝑅" +t° 𝑅𝑅" 𝑅𝑅" +t° 𝑅𝑅! NTC 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 + (negative temperature 𝑅𝑅" coefficient) thermistor –t° –t° 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 2.5 = 1 + 𝑅𝑅! 𝑅𝑅" Fig.9. Thermistor schematic symbol and real-world example. 𝑅𝑅! = 1.5 amplifier with 𝑅𝑅" two resistors whose values are 0Ω and ‘infinite’ Ω. The 0Ω resistor represents a straight wire connecting the output to the inverting 𝑅𝑅! input terminal 𝐺𝐺𝑎𝑎𝑎𝑎𝑎𝑎 = 52.8 = 1 +On the other hand, input, a short circuit. 𝑅𝑅" the infinite-ohms resistor represents an open circuit or disconnection. If we plug 𝑅𝑅! these numbers into the non= 51.8 equation (remember inverting 𝑅𝑅 amplifier " that zero divided by anything is always zero), we get the following. 𝑅𝑅! 0 𝐺𝐺𝐺𝐺𝐺𝐺𝐺𝐺 = 1 + = 1+ =1 𝑅𝑅" ∞ It’s a simple, handy circuit that you will definitely use, and now you know how it is designed. Sensors We have looked at three important op amp circuit configurations, so let’s put them to good use and learn how three different sensors work, and how they can be used in circuits. All the sensors and op amp circuits shown here are available from the MitchElectronics Sense Range (as well as the light and sound alarm circuits). How do thermistors work? Thermistors are resistors whose resistance greatly depends on their temperature. While the resistance of all materials depends on their temperature, thermistors are unusual in that the variation of resistance in relation to their temperature is much more pronounced compared to say a piece of metal. For example, heating a piece of copper a few degrees would result in a negligible change in resistance, but for a thermistor, this temperature change could easily be 1kΩ. The schematic symbol and an example of a thermistor are shown in Fig.9. Two main types of thermistors exist, positive temperature coefficient (PTC) and negative temperature coefficient (NTC). It is important that you select the right one for your circuit, as they work in the opposite way to each other. A PTC thermistor has a positive correlation with temperature, so an increase in its temperature results in an increase in its resistance. An NTC, however, has a negative correlation – an increase in its temperature results in a decrease in its resistance. The graph for these resistances can be seen in Fig.10. All thermistors have a nominal resistance at a specified temperature, typically at 25°C, but the amount by which a thermistor responds to temperature changes can vary. For example, a 1kΩ NTC thermistor will have a resistance of 1kΩ at 25°C, but how much this changes with temperatures will depend on its construction and composition – you need to check the device’s datasheet or specification to find the characteristics of your chosen device. A thermistor on its own isn’t very useful, which is why they are commonly used in potential divider circuits. With the addition of a fixed resistor, a potential divider can be constructed whose output voltage depends on the temperature of the thermistor, and the selection of either a PTC or NTC will change how the potential divider reacts to changes in temperature. Fig.11 shows how thermistors can be used in potential divider circuits to create these responses. (To understand how this circuit operates you need to know how a potential divider works – see last month’s article for an in-depth explanation.) R Resistance Vin NTC RT PTC PTC +t° 10kΩ at 25°C VO 0V Metal Temp Fig.10. Graph showing PTC and NTC thermistor resistance vs. temperature. Although thermistors are not very linear (curved-line response), they are much more sensitive to temperature compared with metals. Practical Electronics | February | 2024 R Vin RT Fig.12. LDR schematic symbol and example component. Resistance (Ω) & Light intensity Fig.13. LDR illumination-resistance graph – more light leads to lower resistance. How do light sensors work? Light sensors, as the name suggests, are sensors that react to changes in light levels, and come in numerous variations. The most common light sensor that engineers will be familiar with is the light-dependent resistor, or LDR for short, with the schematic symbol shown in Fig.12. As the amount of light falling on an LDR increases, its resistance decreases, which gives LDRs a negative response, as illustrated in the graph in Fig.13. This makes LDRs ideal for using in potential divider circuits, just like thermistors. However, most LDRs (if not all) use toxic compounds including cadmium, which are restricted by all kinds of legislation around the world (eg, RoHS and REACH). Because of this, MitchElectronics recommends makers and engineers avoid LDRs and switch over to photodiodes (which all MitchElectronics kits use). Photodiodes are light-sensitive diodes that produce a tiny amount of current when light falls on them. See Fig.14 for their schematic symbol and an example of a component. NTC –t° 10kΩ at 25°C VO 0V Fig.11. Potential divider circuits using a PTC and NTC thermistor. Fig.14. Photodiode schematic symbol and component. 57 V+ R Electret microphone capsule + Vin D VO VO 0V Light intensity Fig.16. Schematic symbol for the electret microphone and real-world component. t VO Vin 0V Fig.15. Photodiode potential divider circuit and its output response. When using photodiodes, we don’t use them as a current source, but instead, we use them in reverse-bias mode. What this means is that instead of connecting the anode to a positive voltage and the cathode to a negative voltage, we flip the diode polarity. Why on earth would we do this? We l l , i t t u r n s o u t t h a t w h e n a photodiode is in reverse-bias mode in the dark then it doesn’t conduct electricity, but when it is illuminated with light, it starts to conduct thus it effectively goes from near-infinite resistance to some finite level of resistance. If used with another resistor, it becomes possible to create a potential divider circuit so we can produce a voltage that depends on the amount of light falling on the photodiode. Fig.15 shows an example of how a photodiode can be used in a potential divider circuit. While it is possible to calculate the exact resistor value needed, doing so is a rather complex procedure due to the diode’s mathematically complicated relationship between light levels and current conduction. Fortunately, you can bypass all this complexity with a potentiometer to tune a circuit so that its sensitivity can be adjusted in-circuit. Additional prototyping on a breadboard to identify a suitable value resistor is also appropriate, and typical values will range from 1kΩ to 10kΩ. How do electret microphones work? After temperature and light, another common measurement parameter is sound level. Measuring sound is the job of microphones, which come in a variety of technologies and price points. Of all the microphone technologies out there, the electret microphone is by far the most popular due to its low price, small size and ease of use. The electret microphone (show in Fig.16) integrates a transistor amplifier and capacitorbased diaphragm into a single package, requiring only two connections. While the workings of the internal transistor won’t be explored here (we will cover transistors in a later issue), the basic principle behind the electret microphone 0V Fig.17. Internal schematic of an electret microphone and potential divider circuit with DC blocking capacitor. is that as sound hits the capacitor-based diaphragm, a small change in electric charge causes the internal transistor to become more conductive – ie, its resistance drops. So, again, we can connect our sensor (the electret microphone) into a potential divider circuit so that as the sound level rises the potential divider voltage drops – see Fig.17 for the basic circuit configuration. Because of its inverting nature and the fact that there is a large DC component in the electret microphone’s output signal, electret microphones circuits almost always incorporate a DC-blocking capacitor. The blocking capacitor removes the DC component but preserves the sound signal. Selecting the resistor value in an electret microphone potential divider circuit is not a precise science and is somewhat more experimental. General values for this resistor are between 1kΩ and 10kΩ. I hope you can see from just these three examples that the time and effort we invested in understanding the potential divider circuit last month was well worth it! Fig.18. The MitchElectronics Sense Range collection of circuits. Top row (l-r): IR Range, IR Sensor and Light Sensor; botom row (l-r): Sound Sense, Temperature Sensor. 58 Practical Electronics | February | 2024 V+ V+ – RV1 10kΩ U1A LM358 + C1 100nF + D1 photodiode R1 10kΩ J1 V+ VDO VAO 0V C1 100nF U1B LM358 C2 10µF U1B – R3 10kΩ Fig.19. Light Sense kit circuit diagram. D1 1N4148 MK1 Electret microphone 0V R2 1kΩ Light Sense Now that we have covered op amps, their configurations and some sensors, we can explore the MitchElectronics Sense Range; Fig.18 shows the various modules in the range. These kits are designed to act as modules that can be used with other circuits, and each module has its own unique type of sensor. Most of the Sense Range kits have the same circuit setup; a non-inverting amplifier for amplifying the signal of a sensor, and a comparator to act as a digital level detector. The schematic for the Light Sense is shown in Fig.19. We can see in this schematic that there are two op amps inside the LM358 IC, labelled as U1A and U1B; both op amps are powered by the same voltage source. U1A is configured as a comparator, while U1B is configured as a non-inverting amplifier whose gain is determined by R3 and R2. The photodiode D1 is in a potential divider circuit with resistor R1, and in this configuration, as the amount of light falling on D1 increases, the voltage across D1 will decrease as its resistance falls. As a light-detecting circuit, that response is somewhat counterintuitive, so in our comparator circuit, instead of connecting the voltage across D1 to the non-inverting input terminal of the op amp U1A, we have connected it to the inverting input terminal. By connecting the potentiometer RV1 to the non-inverting input terminal, we can set what level of light will result in the comparator triggering, and because we have connected the sensor’s output to the inverting input, the comparator’s output will go high when light above a certain level is detected. Fig.20 shows the output of the comparator depending on the light level and different potentiometer settings. Op amp U1B has been configured as a non-inverting amplifier with feedback resistors of 10kΩ and 1kΩ. If we plug these numbers into our gain equation, we find that the amplifier has a gain of 11. As the photodiode in this circuit produces a low voltage for light detection, this amplifier is only useful for detecting high levels of brightness because when there is no light, this amplifier will be saturated (ie, the output will be equal to the supply voltage). Finally, capacitor C1 is called a ‘decoupling capacitor’ – it smooths out the power rail during rapid switching. Decoupling capacitors are recommended for any circuit using ICs, as fast switching circuits can induce noise into the power rails and interfere with the operation of integrated circuits – not damage them – but cause output errors. Sound sense The Sound Sense circuit is a little more complicated because the electret microphone needs a bit of extra design consideration. Fig.21 shows the Sound Sense schematic, and you can see it is similar to the Light Sense design we just analysed. Again, op amp U1A is a comparator and U1B is a non-inverting amplifier. However, there are several differences that relate to how the sensor works and Light intensity Light intensity Light intensity V t DC component of signal t t Signal after DC blocking capaitor V pot setting 0V t t Fig.20. Comparator output vs. light level and potentiometer setting. The higher the potentiometer output voltage setting, the more light is required to switch the comparator. Practical Electronics | February | 2024 t V VDO 2.5V pot setting Signal before DC blocking capaitor 0V t VDO 1V pot setting R3 47kΩ Fig.21. Sound Sense kit circuit diagram. The MitchElectronics Sense Range VDO V+ VDO VAO 0V + LM358 – R2 1kΩ J1 – RV1 10kΩ R4 10kΩ 0V U1A + LM358 + R1 10kΩ t Fig.22. Signal from Sound Sense electret microphone vs. same signal after passing through the DC blocking capacitor C2. 59 Fig.23. Menu options in CircuitJS. the gain of the non-inverting amplifier. The electret microphone is in a potential divider circuit with R1, but this circuit results in an inverse response (ie, louder sound results in a smaller voltage across MK1). Despite this negative response, because the signal from this potential divider has been AC coupled to the op amps, only the change in signal is detected, thus eliminating a negative response. Fig.22 shows the output of the electret microphone potential divider, and the resulting AC signal after passing through C2. The next section of circuitry is diode D1 and resistor R4. After the signal from the electret goes through DC-blocking capacitor C2, it contains both a positive and negative component. The negative (<0V) portion of the signal can cause the LM358 to exhibit unusual behaviour because here, its negative power rail is 0V. By connecting a diode in reversebias mode between the AC signal and ground, any negative signal greater than 0.6V is removed. Resistor R4 ensures that no DC signal can form across C2 by discharging the negative plate of C2. Without R4, the capacitor would slowly charge, resulting in a large voltage and suppressing the microphone signal. Comparator U1A, unlike in the Light Sense, has its noninverting input connected to the AC-coupled signal (via the DC-blocking capacitor) from the electret microphone, and its inverting input connected to a potentiometer. This means the comparator will output a high voltage if the voltage from the AC-coupled stage exceeds the potentiometer voltage, thus indicating the presence of sound. Finally, the non-inverting amplifier U1B has R3 = 47kΩ and R2 = 1kΩ, which results in a gain of 48. It needs more gain than the Light Sense because the microphone produces a smaller signal. Building and testing the projects To learn how to build and test these electronic circuits, see the previous editions of Practical Electronics (December 2023 and January 2024). The Falstad Circuit JS Simulator In the last article, we mentioned how simulations can be used to help prototype circuits before making them in real life, which can save time and expense. We also learned that simulations are excellent for demonstrating how circuits operate, allowing you to probe various components, measure voltages and currents, and plot these figures on charts against time. But of the many simulators that exist, which one should you use? LTSpice is a good option as it’s free and comes with a wide range of parts, but it does involve a steep learning curve, making it a challenge for beginners. Others, such as Multisim, are great for beginners, being simple to use, but they aren’t free, so possibly not ideal for those of you just starting out in electronics. All MitchElectronics kits take advantage of a browser-based simulator called CircuitJS, created by Falstad. This simulator is not only free, but runs in an Internet browser and is simple to use. To load this simulator, visit: https://bit.ly/ME-CircuitJS Create a new file The first step you will need to do is create a new blank simulation: click File > New Blank Circuit (see Fig.23). Under this menu option, you can also save circuit designs, load circuit designs and export your circuit as an image file. Drawing components Fig.24. Draw menu with add resistor option. 60 The second step you will need to do is add components. You can do this by clicking the Draw option in the menu bar, and searching for the component you want to place (in this case, lets place a resistor which is found under Draw > Add Resistor, see Fig.24). Once selected, you need to click and drag the mouse to generate the length of resistor you want. Drawing wires Once you have placed your components you need to draw connecting wires. Again, navigate to Draw and select the first option ‘Add Wire’. In CircuitJS, you can only connect components and wires at their end terminals (indicated by white dots). This means that if there are multiple components connected to the same wire, you will need to draw individual segments between components, as seen in Fig.25. (You can see if a junction isn’t connected properly because it will be red instead of white.) Simulation controls Once you have a basic circuit built, you need to start (and stop) a simulation. To do this, click the Run / STOP button found in the righthand pane of the simulator (see Fig.26). Here you will also find two additional options, Simulation Speed and Current Speed. Adjusting the simulation speed will either slow down or speed up the simulation, while the Current Speed option will change how fast the current icons flows around the circuit (represented as small yellow boxes that run along wires). Current flow A really unique feature of the CircuitJS simulator is that it shows both voltage and current flow simultaneously in a graphical animated form. This not only helps to visualise how current is flowing around a circuit, but also helps in understanding how circuits work – see Fig.27. The colour of a wire indicates the voltage at that point, while small yellow squares represent current flow. The greener a wire is, the more positive its voltage, and the redder a wire is, the more negative. The direction and speed indicate which way current is flowing and how large that current is. Partnership with PE MitchElectronics Ltd is an independent UK company. These articles are not ‘advertorials’, PE does not pay for the articles and MitchElectronics does not pay for their publication. All the kits/parts described in the series are available from: https://mitchelectronics.co.uk Practical Electronics | February | 2024 parts, op amps can be made to do all kinds of things, and the three circuits that we covered in this article are just a sample of the many possible configurations. Sensors also play a critical role in electronics. Without them, we would not be able to make devices that respond to their Fig.25. Wire connections, including a disconnect (red junction). environment. By combining sensors with op amps, we can create all kinds Note that these colours and speeds are of useful circuits that can control other entirely relative, meaning that they only circuits, both analogue and digital. represent the situation of a circuit as If you want to get started with opposed to indicating an absolute value. sensors and op amps and would like Give CircuitJS simulator a try, it’s a to help support the work we do at fun and intuitive way of learning and MitchElectronics, then consider heading understanding electronics. over to www.mitchelectronics.co.uk where you can find inexpensive kits, Conclusion instructions, guides and other resources Op amps are vital components in the that will aid you in building your own field of electronics thanks to their low electronic projects. cost, ease of use, flexibility, excellent In the next article, we will make our characteristics and small size. With just first piece of test equipment, a Simple a handful of external resistors and other Function Generator, and learn how to make square and triangular waves that can be used to test other projects. Fig.26. CircuitJS simulation controls. Fig.27. Running a CircuitJS simulation showing positive voltage and current flow. 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 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 HP33120A HP53131A HP53131A Audio Precision Datron 4708 Druck DPI 515 Datron 1081 ENI 325LA Keithley 228 Time 9818 Practical Electronics | February | 2024 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 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 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 RF Power Amplifier 250kHz – 150MHz 25W 50dB Voltage/Current Source DC Current & Voltage Calibrator £350 £600 £350 POA POA £400 POA POA POA POA Marconi 2955B Radio Communications Test Set – £800 61